freebsd-ports/devel/swig13/Makefile
Rong-En Fan fe9f2ce3ee - Update the supported languages list in comment
- All supported language except lua can be found by configure script, so
  add proper instructions to let configure finds our lua installation.
  This fixes lua support.

Tested by:	Vlad GALU <dudu at dudu.ro>
2008-03-29 16:37:59 +00:00

68 lines
1.8 KiB
Makefile

# New ports collection makefile for: SWIG
# Date created: 19 April 1996
# Whom: jkh
#
# $FreeBSD$
#
PORTNAME= swig
PORTVERSION= 1.3.34
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
MAINTAINER= rafan@FreeBSD.org
COMMENT= Simplified Wrapper and Interface Generator
USE_AUTOTOOLS= autoconf:261:env libtool:15
VER= ${PORTVERSION:R}
PLIST_SUB+= PORTVERSION=${PORTVERSION}
# Supported languages: allegrocl c# clisp chicken guile java lua ocaml perl
# php pike python R ruby tcl
WRKSRC= ${WRKDIR}/${DISTNAME}
CONFIGURE_ENV+= CFLAGS="${CFLAGS} -fPIC -DPIC"
ALL_TARGET= swig
PLIST_SUB+= VER="${VER}"
WANT_LUA= yes
WANT_LUA_VER= 5.0+
.include <bsd.port.pre.mk>
.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
post-patch:
${REINPLACE_CMD} -e 's|$$RUBY |${RUBY} |; \
s|^PHP4CONFIG=.*$$|PHP4CONFIG=php-config|; \
' ${WRKSRC}/configure
${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \
${WRKSRC}/Lib/lua/luarun.swg
post-configure:
${REINPLACE_CMD} -e 's#null#&|| true#' ${WRKSRC}/Makefile
post-install:
${LN} -f ${PREFIX}/bin/swig ${PREFIX}/bin/swig${VER}
${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}/{} \;
.if !defined(NOPORTDOCS)
${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
.include <bsd.port.post.mk>