summaryrefslogtreecommitdiff
path: root/x11-toolkits/ruby-fox12/Makefile
blob: cebdbbde6702431d39e148b9a65edfc0c564c4cf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# New ports collection makefile for:	FXRuby
# Date created:		24 February 2001
# Whom:			Akinori MUSHA aka knu <knu@idaemons.org>
#
# $FreeBSD$
#

PORTNAME=	fox
PORTVERSION=	${FXRUBY_PORTVERSION}
CATEGORIES=	x11-toolkits ruby
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	fxruby
PKGNAMEPREFIX=	${RUBY_PKGNAMEPREFIX}
DISTNAME=	${FXRUBY_DISTNAME}
DIST_SUBDIR=	ruby

MAINTAINER=	knu@FreeBSD.org

#BUILD_DEPENDS=	swig1.3:${PORTSDIR}/devel/SWIG-devel
LIB_DEPENDS=	FOX.1:${PORTSDIR}/x11-toolkits/fox \
		png.4:${PORTSDIR}/graphics/png \
		jpeg.9:${PORTSDIR}/graphics/jpeg

FOX_VERSION=	0.99.166
FXRUBY_REVISION=	1
.if defined(FXRUBY_REVISION) && !empty(FXRUBY_REVISION)
FXRUBY_PORTVERSION=	${FOX_VERSION}.${FXRUBY_REVISION}
FXRUBY_DISTNAME=	FXRuby-${FOX_VERSION}-${FXRUBY_REVISION}
.else
FXRUBY_PORTVERSION=	${FOX_VERSION}
FXRUBY_DISTNAME=	FXRuby-${FOX_VERSION}
.endif

USE_RUBY=	yes
USE_RUBY_EXTCONF=	yes

USE_XLIB=	yes
USE_MESA=	yes

WRKSRC=		${WRKDIR}/${DISTNAME}/src
INSTALL_TARGET=	site-install
CONFIGURE_ARGS=	--with-fox-include="${LOCALBASE}/include/fox" \
		--with-fox-lib="${LOCALBASE}/lib"
#MAKE_ARGS=	LOCAL_LIBS="-lgcc"

DOCS_EN=	README	index.html

post-patch:
	${RUBY} -i -pe 'sub %r:/usr/X11R6\b:, "${X11BASE}"' ${WRKSRC}/extconf.rb

pre-build:
#	cd ${WRKSRC}/../swig-interfaces; ${MAKE}
	${RUBY} -i -pe 'sub %r:^CXXFLAGS *=.*:, "CXXFLAGS = $$(CFLAGS) $$(CPPFLAGS)"' ${WRKSRC}/Makefile

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${RUBY_EXAMPLESDIR}/fox
	${CP} -R ${WRKSRC}/../examples/* ${RUBY_EXAMPLESDIR}/fox/
	${MKDIR} ${RUBY_DOCDIR}/fox
.for f in ${DOCS_EN}
	${INSTALL_DATA} ${WRKSRC}/../${f} ${RUBY_DOCDIR}/fox/
.endfor
.endif

.include <bsd.port.mk>