2000-10-16 11:43:32 +02:00
|
|
|
# New ports collection makefile for: SWIG
|
|
|
|
# Date created: 19 April 1996
|
|
|
|
# Whom: jkh
|
1996-04-19 20:44:04 +02:00
|
|
|
#
|
1999-08-25 07:57:29 +02:00
|
|
|
# $FreeBSD$
|
1996-04-19 20:44:04 +02:00
|
|
|
#
|
|
|
|
|
2000-04-11 23:30:15 +02:00
|
|
|
PORTNAME= swig
|
2002-10-27 23:32:52 +01:00
|
|
|
PORTVERSION= 1.3.16
|
2002-09-07 07:55:22 +02:00
|
|
|
CATEGORIES= devel
|
2002-10-27 23:32:52 +01:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
2000-06-14 15:21:38 +02:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
1996-04-23 09:47:40 +02:00
|
|
|
|
2000-08-22 03:45:49 +02:00
|
|
|
MAINTAINER= knu@FreeBSD.org
|
1996-04-23 09:47:40 +02:00
|
|
|
|
2001-08-06 14:05:21 +02:00
|
|
|
BUILD_DEPENDS= autoconf:${PORTSDIR}/devel/autoconf
|
|
|
|
|
2001-07-14 06:15:07 +02:00
|
|
|
VER= ${PORTVERSION:R}
|
2000-10-16 11:43:32 +02:00
|
|
|
|
2002-02-14 04:23:04 +01:00
|
|
|
SWIG_LANGUAGES?= guile perl php4 python ruby tcl
|
2001-04-24 10:53:52 +02:00
|
|
|
.for lang in ${SWIG_LANGUAGES}
|
|
|
|
WANT_SWIG_${lang:U}= yes
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.if defined(WANT_SWIG_GUILE)
|
|
|
|
BUILD_DEPENDS+= guile:${PORTSDIR}/lang/guile
|
2002-02-14 04:23:04 +01:00
|
|
|
PLIST_SUB+= WANT_SWIG_GUILE=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_GUILE="@comment "
|
2001-04-24 10:53:52 +02:00
|
|
|
.endif
|
|
|
|
.if defined(WANT_SWIG_PERL)
|
2002-09-07 07:55:22 +02:00
|
|
|
CATEGORIES+= perl5
|
2001-04-24 10:53:52 +02:00
|
|
|
USE_PERL5= yes
|
2002-02-14 04:23:04 +01:00
|
|
|
PLIST_SUB+= WANT_SWIG_PERL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_PERL="@comment "
|
|
|
|
.endif
|
|
|
|
.if defined(WANT_SWIG_PHP4)
|
|
|
|
# We need both mod_php4 and php4
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/libexec/apache/libphp4.so:${PORTSDIR}/www/mod_php4 \
|
|
|
|
php:${PORTSDIR}/lang/php4
|
|
|
|
PLIST_SUB+= WANT_SWIG_PHP4=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_PHP4="@comment "
|
2001-04-24 10:53:52 +02:00
|
|
|
.endif
|
|
|
|
.if defined(WANT_SWIG_PYTHON)
|
2002-09-07 07:55:22 +02:00
|
|
|
CATEGORIES+= python
|
2001-04-24 10:53:52 +02:00
|
|
|
USE_PYTHON= yes
|
|
|
|
PYTHON_NO_DEPENDS= yes
|
|
|
|
BUILD_DEPENDS+= ${PYTHON_CMD}:${PYTHON_PORTSDIR}
|
|
|
|
CONFIGURE_ARGS+= --with-pyincl=${PYTHON_INCLUDEDIR} \
|
|
|
|
--with-pylib=${PYTHON_LIBDIR}
|
2002-02-14 04:23:04 +01:00
|
|
|
PLIST_SUB+= WANT_SWIG_PYTHON=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_PYTHON="@comment "
|
2001-04-24 10:53:52 +02:00
|
|
|
.endif
|
|
|
|
.if defined(WANT_SWIG_RUBY)
|
2002-09-07 07:55:22 +02:00
|
|
|
CATEGORIES+= ruby
|
2000-09-22 06:50:44 +02:00
|
|
|
USE_RUBY= yes
|
|
|
|
RUBY_NO_RUN_DEPENDS= yes
|
2002-02-14 04:23:04 +01:00
|
|
|
PLIST_SUB+= WANT_SWIG_RUBY=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_RUBY="@comment "
|
2001-04-24 10:53:52 +02:00
|
|
|
.endif
|
|
|
|
.if defined(WANT_SWIG_TCL)
|
2002-09-07 07:55:22 +02:00
|
|
|
CATEGORIES+= tcl83
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/tclsh8.3:${PORTSDIR}/lang/tcl83
|
|
|
|
CONFIGURE_ARGS+= --with-tclincl=${LOCALBASE}/include/tcl8.3/ \
|
|
|
|
--with-tcllib=${LOCALBASE}/lib/tcl8.3/
|
2002-02-14 04:23:04 +01:00
|
|
|
PLIST_SUB+= WANT_SWIG_TCL=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_TCL="@comment "
|
2001-04-24 10:53:52 +02:00
|
|
|
.endif
|
|
|
|
|
2002-09-07 07:55:22 +02:00
|
|
|
.if defined(WANT_SWIG_OCAML)
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/ocamlc:${PORTSDIR}/lang/ocaml
|
|
|
|
PLIST_SUB+= WANT_SWIG_OCAML=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_OCAML="@comment "
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WANT_SWIG_PIKE)
|
|
|
|
BUILD_DEPENDS+= ${LOCALBASE}/bin/pike:${PORTSDIR}/lang/pike
|
|
|
|
PLIST_SUB+= WANT_SWIG_PIKE=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_PIKE="@comment "
|
|
|
|
CONFIGURE_ARGS += --without-pike
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(WANT_SWIG_JAVA)
|
|
|
|
CATEGORIES+= java
|
|
|
|
USE_JAVA= 1.2+
|
|
|
|
PLIST_SUB+= WANT_SWIG_JAVA=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= WANT_SWIG_JAVA="@comment "
|
|
|
|
CONFIGURE_ARGS += --without-java
|
|
|
|
.endif
|
|
|
|
|
2000-06-16 23:52:40 +02:00
|
|
|
INSTALLS_SHLIB= yes
|
2001-07-14 06:15:07 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME:U}
|
2000-06-15 19:12:51 +02:00
|
|
|
USE_LIBTOOL= yes
|
2001-02-02 06:11:48 +01:00
|
|
|
CONFIGURE_ENV= CFLAGS="${CFLAGS} -fpic -DPIC"
|
2000-10-16 11:43:32 +02:00
|
|
|
ALL_TARGET= swig runtime
|
2002-02-14 04:23:04 +01:00
|
|
|
PLIST_SUB+= VER="${VER}"
|
|
|
|
|
|
|
|
post-patch:
|
|
|
|
${PERL} -i.orig -p \
|
|
|
|
-e 's:/usr/local(/include/php)\b:${LOCALBASE}$$1:;' \
|
|
|
|
-e 's:(/php_config\.h)\b:/main$$1:;' \
|
|
|
|
${WRKSRC}/configure.in ${WRKSRC}/configure
|
|
|
|
${PERL} -i.orig -p \
|
|
|
|
-e 's:^(LIBS\s+=\s+):$${1}libswigphp4\$$(RELEASESUFFIX).la :;' \
|
|
|
|
${WRKSRC}/Runtime/Makefile.in
|
2000-10-16 11:43:32 +02:00
|
|
|
|
|
|
|
post-install:
|
2001-04-24 10:53:52 +02:00
|
|
|
${LN} -f ${PREFIX}/bin/swig ${PREFIX}/bin/swig${VER}
|
2000-06-16 23:52:40 +02:00
|
|
|
|
1996-04-19 20:44:04 +02:00
|
|
|
.include <bsd.port.mk>
|