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
|
2009-03-29 13:49:15 +02:00
|
|
|
PORTVERSION= 1.3.39
|
2010-09-15 20:35:24 +02:00
|
|
|
PORTREVISION= 1
|
2002-09-07 07:55:22 +02:00
|
|
|
CATEGORIES= devel
|
2009-08-22 02:18:43 +02:00
|
|
|
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
|
1996-04-23 09:47:40 +02:00
|
|
|
|
2007-03-31 03:10:13 +02:00
|
|
|
MAINTAINER= rafan@FreeBSD.org
|
2003-02-18 06:52:56 +01:00
|
|
|
COMMENT= Simplified Wrapper and Interface Generator
|
1996-04-23 09:47:40 +02:00
|
|
|
|
2010-09-15 20:35:24 +02:00
|
|
|
USE_AUTOTOOLS= autoconf:267:env libtool:22
|
2005-06-30 00:33:22 +02:00
|
|
|
|
2009-01-17 21:48:26 +01:00
|
|
|
MAN1= ccache-swig.1
|
|
|
|
|
2001-07-14 06:15:07 +02:00
|
|
|
VER= ${PORTVERSION:R}
|
2005-06-30 00:33:22 +02:00
|
|
|
PLIST_SUB+= PORTVERSION=${PORTVERSION}
|
2000-10-16 11:43:32 +02:00
|
|
|
|
2008-04-11 16:53:24 +02:00
|
|
|
# Supported languages: allegrocl c# clisp chicken guile java lua ocaml Octave
|
|
|
|
# perl php pike python R ruby tcl
|
2001-04-24 10:53:52 +02:00
|
|
|
|
2005-06-30 00:33:22 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${DISTNAME}
|
|
|
|
CONFIGURE_ENV+= CFLAGS="${CFLAGS} -fPIC -DPIC"
|
|
|
|
ALL_TARGET= swig
|
2002-02-14 04:23:04 +01:00
|
|
|
PLIST_SUB+= VER="${VER}"
|
|
|
|
|
2008-03-29 17:37:59 +01:00
|
|
|
WANT_LUA= yes
|
|
|
|
WANT_LUA_VER= 5.0+
|
|
|
|
|
2004-04-12 05:52:17 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2008-03-29 17:37:59 +01:00
|
|
|
.if ${HAVE_LUA:Mlua-5.*} != ""
|
|
|
|
USE_LUA= yes
|
|
|
|
LUA_COMPS= lua:build
|
|
|
|
CONFIGURE_ARGS+=--with-lua=${LUA_BINDIR}/lua \
|
|
|
|
--with-luaincl=${LUA_INCDIR} \
|
|
|
|
--with-lualib=${LUA_LIBDIR}
|
|
|
|
.endif
|
|
|
|
|
2008-07-07 17:52:52 +02:00
|
|
|
OCTAVE_VER_CMD= ${LOCALBASE}/bin/octave-config -v 2>/dev/null || ${TRUE}
|
2008-04-11 16:53:24 +02:00
|
|
|
|
2004-07-08 09:21:04 +02:00
|
|
|
post-patch:
|
2008-07-07 17:52:52 +02:00
|
|
|
${SETENV} OCTAVE_VER=$$(${OCTAVE_VER_CMD}) \
|
2008-03-29 17:37:59 +01:00
|
|
|
${REINPLACE_CMD} -e 's|$$RUBY |${RUBY} |; \
|
2008-03-10 02:21:42 +01:00
|
|
|
s|^PHP4CONFIG=.*$$|PHP4CONFIG=php-config|; \
|
2008-07-07 17:52:52 +02:00
|
|
|
s|OCTAVEDIR=".*"|OCTAVEDIR="${LOCALBASE}/include/octave-$${OCTAVE_VER}"|; \
|
2009-02-14 14:29:29 +01:00
|
|
|
s|MZSCHEME --mute-banner|MZSCHEME|; \
|
|
|
|
/^MZDYNOBJ/s|`$$|\| tail -n 1`|; \
|
2008-03-10 02:21:42 +01:00
|
|
|
' ${WRKSRC}/configure
|
2007-06-10 10:02:56 +02:00
|
|
|
${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \
|
|
|
|
${WRKSRC}/Lib/lua/luarun.swg
|
2004-07-08 09:21:04 +02:00
|
|
|
|
2005-06-30 00:33:22 +02:00
|
|
|
post-configure:
|
|
|
|
${REINPLACE_CMD} -e 's#null#&|| true#' ${WRKSRC}/Makefile
|
2004-02-13 15:51:30 +01:00
|
|
|
|
2005-06-30 00:33:22 +02:00
|
|
|
post-install:
|
2001-04-24 10:53:52 +02:00
|
|
|
${LN} -f ${PREFIX}/bin/swig ${PREFIX}/bin/swig${VER}
|
2008-07-07 17:52:52 +02:00
|
|
|
.if !defined(NOPORTEXAMPLES)
|
2005-09-24 18:32:55 +02:00
|
|
|
${MKDIR} ${EXAMPLESDIR}/${PORTVERSION}
|
|
|
|
cd ${WRKSRC}/Examples && ${FIND} . -type d \
|
|
|
|
-exec ${INSTALL} -d ${EXAMPLESDIR}/${PORTVERSION}/{} \;
|
|
|
|
cd ${WRKSRC}/Examples && ${FIND} . -type f \
|
|
|
|
-exec ${INSTALL_DATA} {} ${EXAMPLESDIR}/${PORTVERSION}/{} \;
|
2008-07-07 17:52:52 +02:00
|
|
|
.endif
|
|
|
|
.if !defined(NOPORTDOCS)
|
2005-09-24 18:32:55 +02:00
|
|
|
${MKDIR} ${DOCSDIR}/${PORTVERSION}
|
|
|
|
cd ${WRKSRC}/Doc && ${FIND} . -type d \
|
|
|
|
-exec ${INSTALL} -d ${DOCSDIR}/${PORTVERSION}/{} \;
|
|
|
|
cd ${WRKSRC}/Doc && ${FIND} . -type f \
|
|
|
|
-exec ${INSTALL_DATA} {} ${DOCSDIR}/${PORTVERSION}/{} \;
|
|
|
|
.endif
|
2000-06-16 23:52:40 +02:00
|
|
|
|
2008-07-07 17:52:52 +02:00
|
|
|
.if defined(MAINTAINER_MODE)
|
|
|
|
TMP_PREFIX= /tmp/${PKGNAME}
|
|
|
|
gen-pkg-plist:
|
|
|
|
${RM} -rf ${PLIST} ${TMP_PREFIX}
|
|
|
|
${MAKE} PLIST=pkg-plist PKG_DBDIR=${TMP_PREFIX}/pkgdb PREFIX=${TMP_PREFIX}/local clean all install
|
|
|
|
${PORTSDIR}/Tools/scripts/plist \
|
|
|
|
-d -m ${PORTSDIR}/Templates/BSD.local.dist ${TMP_PREFIX}/local | ${SED} '\
|
|
|
|
s,${DATADIR_REL},%%DATADIR%%,; \
|
|
|
|
s,${DOCSDIR_REL},%%DOCSDIR%%,; \
|
|
|
|
s,${EXAMPLESDIR_REL},%%EXAMPLESDIR%%,; \
|
|
|
|
/%%DOCSDIR%%/s,^,%%PORTDOCS%%,; \
|
|
|
|
/%%EXAMPLESDIR%%/s,^,%%PORTEXAMPLES%%,; \
|
|
|
|
s,${PORTVERSION},%%PORTVERSION%%,; \
|
|
|
|
s,${VER},%%VER%%, \
|
|
|
|
' > ${PLIST}
|
|
|
|
.endif
|
|
|
|
|
2004-04-12 05:52:17 +02:00
|
|
|
.include <bsd.port.post.mk>
|