aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--astro/celestia/Makefile10
-rw-r--r--devel/lua-filename/Makefile16
-rw-r--r--devel/lua-filename/pkg-descr6
-rw-r--r--devel/lua-filename/pkg-plist3
-rw-r--r--devel/lua-gettext/Makefile18
-rw-r--r--devel/lua-gettext/files/Makefile4
-rw-r--r--devel/lua-gettext/pkg-plist6
-rw-r--r--devel/lua-posix/Makefile15
-rw-r--r--devel/lua-posix/files/patch-Makefile24
-rw-r--r--devel/lua-posix/pkg-plist6
-rw-r--r--devel/lua-pty/Makefile23
-rw-r--r--devel/lua-pty/files/Makefile4
-rw-r--r--devel/lua50-app/Makefile20
-rw-r--r--devel/lua50-app/pkg-plist3
-rw-r--r--devel/lua50-compat51/Makefile20
-rw-r--r--devel/lua50-compat51/distinfo6
-rw-r--r--devel/lua50-compat51/files/Makefile7
-rw-r--r--devel/lua50-compat51/pkg-plist3
-rw-r--r--devel/lua50-dfui/Makefile23
-rw-r--r--devel/lua50-dfui/files/patch-Makefile10
-rw-r--r--devel/lua50-dfui/pkg-plist6
-rw-r--r--devel/lua50-filename/Makefile16
-rw-r--r--devel/lua50-filename/pkg-descr6
-rw-r--r--devel/lua50-filename/pkg-plist3
-rw-r--r--devel/lua50-gettext/Makefile18
-rw-r--r--devel/lua50-gettext/files/Makefile4
-rw-r--r--devel/lua50-gettext/pkg-plist6
-rw-r--r--devel/lua50-posix/Makefile15
-rw-r--r--devel/lua50-posix/files/patch-Makefile24
-rw-r--r--devel/lua50-posix/pkg-plist6
-rw-r--r--devel/lua50-pty/Makefile23
-rw-r--r--devel/lua50-pty/files/Makefile4
-rw-r--r--games/enigma/Makefile18
-rw-r--r--games/fillets-ng/Makefile7
-rw-r--r--games/stratagus/Makefile58
-rw-r--r--games/stratagus/files/patch-aa11
-rw-r--r--games/stratagus/files/patch-configure4
-rw-r--r--games/stratagus/pkg-message12
-rw-r--r--games/xmoto/Makefile25
-rw-r--r--lang/lua/Makefile52
-rw-r--r--lang/lua/pkg-plist81
-rw-r--r--lang/lua4/Makefile96
-rw-r--r--lang/lua4/files/patch-aa19
-rw-r--r--lang/lua4/pkg-plist84
-rw-r--r--lang/lua50/Makefile94
-rw-r--r--lang/lua50/pkg-plist89
-rw-r--r--lang/ruby-lua4/Makefile15
-rw-r--r--lang/ruby-lua4/pkg-plist2
-rw-r--r--lang/tolua++/Makefile8
-rw-r--r--lang/tolua++/files/patch-config_posix.py14
-rw-r--r--lang/tolua++50/Makefile8
-rw-r--r--lang/tolua++50/files/patch-config_posix.py14
-rw-r--r--lang/tolua/Makefile24
-rw-r--r--lang/tolua/files/patch-Makefile22
-rw-r--r--lang/tolua/files/patch-config30
-rw-r--r--lang/tolua/pkg-plist7
-rw-r--r--lang/tolua4/Makefile25
-rw-r--r--lang/tolua4/files/patch-config26
-rw-r--r--lang/tolua4/pkg-plist7
-rw-r--r--lang/tolua50/Makefile24
-rw-r--r--lang/tolua50/files/patch-Makefile22
-rw-r--r--lang/tolua50/files/patch-config30
-rw-r--r--lang/tolua50/pkg-plist7
-rw-r--r--mail/imapfilter/Makefile34
-rw-r--r--mail/imapfilter/files/patch-configure73
-rw-r--r--net-p2p/verlihub-plugins/Makefile17
-rw-r--r--textproc/ruby-xml-script/Makefile9
-rw-r--r--www/elinks/Makefile4
-rw-r--r--www/lighttpd/Makefile4
-rw-r--r--x11-wm/ion-2/Makefile7
-rw-r--r--x11-wm/ion-2/files/patch-rules.mk4
-rw-r--r--x11-wm/ion-2/files/patch-system.mk20
-rw-r--r--x11-wm/ion-3/Makefile2
-rw-r--r--x11-wm/ion-3/files/patch-system.mk20
-rw-r--r--x11-wm/ion-3ds/Makefile2
-rw-r--r--x11-wm/ion-3ds/files/patch-system.mk20
-rw-r--r--x11-wm/ion3/Makefile7
-rw-r--r--x11-wm/ion3/files/patch-rules.mk4
-rw-r--r--x11-wm/ion3/files/patch-system.mk20
79 files changed, 810 insertions, 730 deletions
diff --git a/astro/celestia/Makefile b/astro/celestia/Makefile
index 18f8c76151e2..7dd2e7b31608 100644
--- a/astro/celestia/Makefile
+++ b/astro/celestia/Makefile
@@ -26,9 +26,9 @@ WANT_GNOME= yes
USE_X_PREFIX= yes
CONFIGURE_ARGS= --program-prefix=""
-CONFIGURE_ENV= \
- LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib -lm ${PTHREAD_LIBS}" \
- CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include ${PTHREAD_CFLAGS}"
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CPPFLAGS= -I${X11BASE}/include -I${LOCALBASE}/include ${PTHREAD_CFLAGS}
+LDFLAGS= -L${X11BASE}/lib -L${LOCALBASE}/lib -lm ${PTHREAD_LIBS}
UI_LIST= glut gtk gnome
CELESTIA_UI?= glut
@@ -77,8 +77,10 @@ IGNORE= does not compile on FreeBSD 4.x
.endif
.if defined(WITH_LUA)
-LIB_DEPENDS+= lua.5:${PORTSDIR}/lang/lua50
+USE_LUA= 5.0
CONFIGURE_ARGS+= --with-lua
+CPPFLAGS+= -I${LUA_INCDIR}
+LDFLAGS+= -L${LUA_LIBDIR}
.endif
pre-patch:
diff --git a/devel/lua-filename/Makefile b/devel/lua-filename/Makefile
index 7b97eb46dc89..c885a92d2c12 100644
--- a/devel/lua-filename/Makefile
+++ b/devel/lua-filename/Makefile
@@ -5,23 +5,25 @@
# $FreeBSD$
#
-PORTNAME= lua50-filename
+PORTNAME= filename
PORTVERSION= 1.2
CATEGORIES= devel
MASTER_SITES= http://cvs.bsdinstaller.org/cgi-bin/cvsweb.cgi/installer/src/lib/lua/filename/
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= filename.lua?rev=${PORTVERSION}
-EXTRACT_ONLY=
+EXTRACT_ONLY= #
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= Filename-manipulating functions for Lua 5.0.x
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-
-NO_WRKSUBDIR= yes
+USE_LUA= 5.0
NO_BUILD= yes
+NO_WRKSUBDIR= yes
+
+PLIST_FILES= %%LUA_MODSHAREDIR%%/filename.lua
do-install:
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${DISTDIR}/${DISTFILES} ${PREFIX}/share/lua/5.0/${DISTFILES:C/\?.*$//}
+ ${INSTALL_DATA} ${DISTDIR}/${DISTFILES} \
+ ${LUA_MODSHAREDIR}/${DISTFILES:C/\?.*$//}
.include <bsd.port.mk>
diff --git a/devel/lua-filename/pkg-descr b/devel/lua-filename/pkg-descr
index 1235fd14c6ba..ce9fcc2f3ddb 100644
--- a/devel/lua-filename/pkg-descr
+++ b/devel/lua-filename/pkg-descr
@@ -1,3 +1,3 @@
-Package of routines for manipulating filenames.
-Also contains convenience functions for querying the
-status of files in the filesystem named by those filenames.
+Package of routines for manipulating filenames. Also contains convenience
+functions for querying the status of files in the filesystem named by those
+filenames.
diff --git a/devel/lua-filename/pkg-plist b/devel/lua-filename/pkg-plist
index af8e59d4d461..e69de29bb2d1 100644
--- a/devel/lua-filename/pkg-plist
+++ b/devel/lua-filename/pkg-plist
@@ -1,3 +0,0 @@
-share/lua/5.0/filename.lua
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
diff --git a/devel/lua-gettext/Makefile b/devel/lua-gettext/Makefile
index 2a0edadba437..83fabe59eb6d 100644
--- a/devel/lua-gettext/Makefile
+++ b/devel/lua-gettext/Makefile
@@ -9,22 +9,21 @@ PORTNAME= gettext
PORTVERSION= 1.5
CATEGORIES= devel
MASTER_SITES= http://cvs.bsdinstaller.org/cgi-bin/cvsweb.cgi/installer/src/lib/lua/gettext/
-PKGNAMEPREFIX= lua50-
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= lua_gettext.c?rev=${CVER} gettext.lua?rev=${LVER}
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= Gettext ibinding for Lua 5.0.x
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-
+USE_LUA= 5.0
USE_GETTEXT= yes
-LIBDIR= ${PREFIX}/lib/lua/5.0
-
CVER= 1.15
LVER= ${PORTVERSION}
+PLIST_FILES= %%LUA_MODSHAREDIR%%/gettext.lua \
+ %%LUA_MODLIBDIR%%/lgettext.so
+
do-extract:
${MKDIR} ${WRKSRC}
.for file in ${DISTFILES}
@@ -33,10 +32,7 @@ do-extract:
${CP} ${FILESDIR}/Makefile ${WRKSRC}
do-install:
- ${MKDIR} ${PREFIX}/lib/lua/5.0
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${WRKSRC}/gettext.lua ${PREFIX}/share/lua/5.0/
- ${MKDIR} ${PREFIX}/lib/lua/5.0
- ${INSTALL_PROGRAM} ${WRKSRC}/lgettext.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_DATA} ${WRKSRC}/gettext.lua ${LUA_MODSHAREDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/lgettext.so ${LUA_MODLIBDIR}
.include <bsd.port.mk>
diff --git a/devel/lua-gettext/files/Makefile b/devel/lua-gettext/files/Makefile
index 2c9a05d63bf4..d04118bfa4d1 100644
--- a/devel/lua-gettext/files/Makefile
+++ b/devel/lua-gettext/files/Makefile
@@ -5,7 +5,7 @@ SHLIB_NAME= lgettext.so
SRCS= lua_gettext.c
-CFLAGS+= -I${PREFIX}/include
-LDFLAGS+= -L${PREFIX}/lib -lintl
+CFLAGS+= -I${LOCALBASE}/include -I${LUA_INCDIR}
+LDFLAGS+= -L${LOCALBASE}/lib -lintl
.include <bsd.lib.mk>
diff --git a/devel/lua-gettext/pkg-plist b/devel/lua-gettext/pkg-plist
index ac660e2fdd80..e69de29bb2d1 100644
--- a/devel/lua-gettext/pkg-plist
+++ b/devel/lua-gettext/pkg-plist
@@ -1,6 +0,0 @@
-lib/lua/5.0/lgettext.so
-share/lua/5.0/gettext.lua
-@dirrmtry lib/lua/5.0
-@dirrmtry lib/lua
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
diff --git a/devel/lua-posix/Makefile b/devel/lua-posix/Makefile
index 238bcaf406ba..37ec1872664c 100644
--- a/devel/lua-posix/Makefile
+++ b/devel/lua-posix/Makefile
@@ -5,23 +5,24 @@
# $FreeBSD$
#
-PORTNAME= lua50-posix
+PORTNAME= posix
PORTVERSION= 5.0
CATEGORIES= devel
MASTER_SITES= http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.0/
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= lposix.tar.gz
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= A POSIX layer for Lua
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-
+USE_LUA= 5.0
WRKSRC= ${WRKDIR}/posix
+PLIST_FILES= %%LUA_MODSHAREDIR%%/posix.lua \
+ %%LUA_MODLIBDIR%%/lposix.so
+
do-install:
- @ ${MKDIR} ${PREFIX}/share/lua/5.0
- @ ${INSTALL_DATA} ${WRKSRC}/posix.lua ${PREFIX}/share/lua/5.0
- @ ${MKDIR} ${PREFIX}/lib/lua/5.0
- @ ${INSTALL_PROGRAM} ${WRKSRC}/lposix.so ${PREFIX}/lib/lua/5.0
+ @${INSTALL_DATA} ${WRKSRC}/posix.lua ${LUA_MODSHAREDIR}
+ @${INSTALL_PROGRAM} ${WRKSRC}/lposix.so ${LUA_MODLIBDIR}
.include <bsd.port.mk>
diff --git a/devel/lua-posix/files/patch-Makefile b/devel/lua-posix/files/patch-Makefile
index 8c8f05bddff7..b0eb70640eb4 100644
--- a/devel/lua-posix/files/patch-Makefile
+++ b/devel/lua-posix/files/patch-Makefile
@@ -1,20 +1,30 @@
---- Makefile.orig Mon Mar 27 12:25:04 2006
-+++ Makefile Mon Mar 27 12:43:24 2006
-@@ -1,7 +1,7 @@
+--- Makefile.orig Wed Nov 5 21:26:49 2003
++++ Makefile Mon Aug 7 00:38:38 2006
+@@ -1,13 +1,13 @@
# makefile for POSIX library for Lua
# change these to reflect your Lua installation
-LUA= /tmp/lhf/lua-5.0
+-LUAINC= $(LUA)/include
+-LUALIB= $(LUA)/lib
+-LUABIN= $(LUA)/bin
+LUA= ${PREFIX}
- LUAINC= $(LUA)/include
- LUALIB= $(LUA)/lib
- LUABIN= $(LUA)/bin
++LUAINC= $(LUA_INCDIR)
++LUALIB= $(LUA_LIBDIR)
++LUABIN= $(LUA_BINDIR)
+
+ # no need to change anything below here
+-CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
++CFLAGS+= -fPIC $(INCS) $(WARN) -O2 $G
+ WARN= -pedantic -Wall
+ INCS= -I$(LUAINC)
+
@@ -21,7 +21,7 @@
all: test
test: $T
- $(LUABIN)/lua -l$(MYNAME) test.lua
-+ LD_PRELOAD=${PREFIX}/lib/liblua.so:${PREFIX}/lib/liblualib.so $(LUABIN)/lua -l$(MYNAME) test.lua
++ LD_PRELOAD=${LUA_LIBDIR}/liblua.so:${LUA_LIBDIR}/liblualib.so $(LUABIN)/lua -l$(MYNAME) test.lua
$T: $(OBJS)
$(CC) -o $@ -shared $(OBJS)
diff --git a/devel/lua-posix/pkg-plist b/devel/lua-posix/pkg-plist
index 036b7a2881f3..e69de29bb2d1 100644
--- a/devel/lua-posix/pkg-plist
+++ b/devel/lua-posix/pkg-plist
@@ -1,6 +0,0 @@
-share/lua/5.0/posix.lua
-lib/lua/5.0/lposix.so
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
-@dirrmtry lib/lua/5.0
-@dirrmtry lib/lua
diff --git a/devel/lua-pty/Makefile b/devel/lua-pty/Makefile
index 9ed7a77557a7..b80cb3f86806 100644
--- a/devel/lua-pty/Makefile
+++ b/devel/lua-pty/Makefile
@@ -10,18 +10,20 @@ PORTVERSION= 1.25
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= philip
-PKGNAMEPREFIX= lua50-
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= pty.lua?rev=1.2 pty.c?rev=1.25
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= Pty (pseudo-terminal) bindings for Lua 5.0.x
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50 \
- ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50 \
- ${LOCALBASE}/share/lua/5.0/compat-5.1.lua:${PORTSDIR}/devel/lua50-compat51
+USE_LUA= 5.0
+LUA_COMPS= lua compat51
-COMPAT_SRC= `(cd ${PORTSDIR}/devel/lua50-compat51 && make -V WRKSRC)`
+COMPAT_SRC!= `(cd ${PORTSDIR}/devel/lua50-compat51 && ${MAKE} -V WRKSRC)`
+MAKE_ENV= COMPATDIR="${COMPAT_SRC}"
+
+PLIST_FILES= %%LUA_MODSHAREDIR%%/pty.lua \
+ %%LUA_MODLIBDIR%%/lpty.so
do-extract:
@${MKDIR} ${WRKSRC}
@@ -30,13 +32,8 @@ do-extract:
.endfor
@${CP} ${FILESDIR}/Makefile ${WRKSRC}
-post-patch:
- @${REINPLACE_CMD} -e "s|%%COMPATDIR%%|${COMPAT_SRC}|" ${WRKSRC}/Makefile
-
do-install:
- ${MKDIR} ${PREFIX}/lib/lua/5.0
- ${INSTALL_PROGRAM} ${WRKSRC}/lpty.so ${PREFIX}/lib/lua/5.0
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${WRKSRC}/pty.lua ${PREFIX}/share/lua/5.0
+ ${INSTALL_PROGRAM} ${WRKSRC}/lpty.so ${LUA_MODLIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/pty.lua ${LUA_MODSHAREDIR}
.include <bsd.port.mk>
diff --git a/devel/lua-pty/files/Makefile b/devel/lua-pty/files/Makefile
index 99df27729cd8..e6a0fb23c49f 100644
--- a/devel/lua-pty/files/Makefile
+++ b/devel/lua-pty/files/Makefile
@@ -3,9 +3,9 @@
SHLIB= pty
SHLIB_NAME= lpty.so
-SRCS= pty.c %%COMPATDIR%%/compat-5.1.c
+SRCS= pty.c ${COMPATDIR}/compat-5.1.c
-CFLAGS+= -I${PREFIX}/include
+CFLAGS+= -I${LUA_INCDIR}
LDFLAGS+= -L/usr/lib -lutil
.include <bsd.lib.mk>
diff --git a/devel/lua50-app/Makefile b/devel/lua50-app/Makefile
index ea99ea2fe84d..1cd45b312b5f 100644
--- a/devel/lua50-app/Makefile
+++ b/devel/lua50-app/Makefile
@@ -9,24 +9,22 @@ PORTNAME= app
PORTVERSION= 1.70
CATEGORIES= devel
MASTER_SITES= http://cvs.bsdinstaller.org/cgi-bin/cvsweb.cgi/installer/src/lib/lua/app/
-PKGNAMEPREFIX= lua50-
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= app.lua?rev=${PORTVERSION}
-EXTRACT_ONLY=
+EXTRACT_ONLY= #
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= App framework for Lua 5.0.x
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50 \
- ${LOCALBASE}/share/lua/5.0/posix.lua:${PORTSDIR}/devel/lua50-posix \
- ${LOCALBASE}/share/lua/5.0/filename.lua:${PORTSDIR}/devel/lua50-filename \
- ${LOCALBASE}/share/lua/5.0/pty.lua:${PORTSDIR}/devel/lua50-pty
-
-NO_WRKSUBDIR= yes
+USE_LUA= 5.0
+LUA_COMPS= filename posix pty
NO_BUILD= yes
+NO_WRKSUBDIR= yes
+
+PLIST_FILES= %%LUA_MODSHAREDIR%%/app.lua
do-install:
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${DISTDIR}/${DISTFILES} ${PREFIX}/share/lua/5.0/${DISTFILES:C/\?.*$//}
+ ${INSTALL_DATA} ${DISTDIR}/${DISTFILES} \
+ ${LUA_MODSHAREDIR}/${DISTFILES:C/\?.*$//}
.include <bsd.port.mk>
diff --git a/devel/lua50-app/pkg-plist b/devel/lua50-app/pkg-plist
index b99520e61d1b..e69de29bb2d1 100644
--- a/devel/lua50-app/pkg-plist
+++ b/devel/lua50-app/pkg-plist
@@ -1,3 +0,0 @@
-share/lua/5.0/app.lua
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
diff --git a/devel/lua50-compat51/Makefile b/devel/lua50-compat51/Makefile
index a4b7d5a7b8dc..3c4b46315e56 100644
--- a/devel/lua50-compat51/Makefile
+++ b/devel/lua50-compat51/Makefile
@@ -5,31 +5,31 @@
# $FreeBSD$
#
-PORTNAME= lua50-compat51
+PORTNAME= compat
PORTVERSION= ${CVER}.${CREV}
CATEGORIES= devel
MASTER_SITES= http://luaforge.net/frs/download.php/1410/
-DISTNAME= compat-${CVER}${CREV}.tar.gz
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= Lua 5.1 package compatibility layer for Lua 5.0.x
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
+USE_LUA= 5.0
+WRKSRC= ${WRKDIR}/compat-${CVER}${CREV}
-CONFLICTS= luasocket-2.0
+MAKE_ENV= CVER="${CVER}"
+PLIST_FILES= %%LUA_MODSHAREDIR%%/compat-${CVER}.lua \
+ %%LUA_MODLIBDIR%%/lcompat-${CVER}.so
-# Update these values when there is a new release
+# Update these values when there is a new release.
CVER= 5.1
CREV= r5
-WRKSRC= ${WRKDIR}/compat-${CVER}${CREV}
-LIBDIR= ${PREFIX}/lib
-
post-extract:
@${CP} ${FILESDIR}/Makefile ${WRKSRC}
do-install:
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${WRKSRC}/compat-5.1.lua ${PREFIX}/share/lua/5.0
+ ${INSTALL_DATA} ${WRKSRC}/compat-${CVER}.lua ${LUA_MODSHAREDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/lcompat-${CVER}.so ${LUA_MODLIBDIR}
.include <bsd.port.mk>
diff --git a/devel/lua50-compat51/distinfo b/devel/lua50-compat51/distinfo
index 0ebef78581ca..30d3a11b502e 100644
--- a/devel/lua50-compat51/distinfo
+++ b/devel/lua50-compat51/distinfo
@@ -1,3 +1,3 @@
-MD5 (compat-5.1r5.tar.gz.tar.gz) = 30d50d173ab236e96c4b969347163eb7
-SHA256 (compat-5.1r5.tar.gz.tar.gz) = 93262ad793552c338b825e6b67c903063aa07625952ef643d126ae60949c8ab6
-SIZE (compat-5.1r5.tar.gz.tar.gz) = 2977
+MD5 (compat-5.1.r5.tar.gz) = 30d50d173ab236e96c4b969347163eb7
+SHA256 (compat-5.1.r5.tar.gz) = 93262ad793552c338b825e6b67c903063aa07625952ef643d126ae60949c8ab6
+SIZE (compat-5.1.r5.tar.gz) = 2977
diff --git a/devel/lua50-compat51/files/Makefile b/devel/lua50-compat51/files/Makefile
index 3f62c9d29785..229ab6e7c892 100644
--- a/devel/lua50-compat51/files/Makefile
+++ b/devel/lua50-compat51/files/Makefile
@@ -1,9 +1,10 @@
# $FreeBSD$
-LIB= lua-compat-5.1
+SHLIB= compat-${CVER}
+SHLIB_NAME= lcompat-${CVER}.so
-SRCS= compat-5.1.c
+SRCS= compat-${CVER}.c
-CFLAGS+= -I${PREFIX}/include
+CFLAGS+= -I${LUA_INCDIR}
.include <bsd.lib.mk>
diff --git a/devel/lua50-compat51/pkg-plist b/devel/lua50-compat51/pkg-plist
index e33a638ee2e3..e69de29bb2d1 100644
--- a/devel/lua50-compat51/pkg-plist
+++ b/devel/lua50-compat51/pkg-plist
@@ -1,3 +0,0 @@
-share/lua/5.0/compat-5.1.lua
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
diff --git a/devel/lua50-dfui/Makefile b/devel/lua50-dfui/Makefile
index 6901938edb6f..340e3779d5fd 100644
--- a/devel/lua50-dfui/Makefile
+++ b/devel/lua50-dfui/Makefile
@@ -10,29 +10,28 @@ PORTVERSION= 0.1.20050901
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= philip
-PKGNAMEPREFIX= lua50-
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTNAME= lua-dfui-0.1.20050901
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= DFUI binding for Lua 5.0.x
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50 \
- ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
+BUILD_DEPENDS= ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
LIB_DEPENDS= dfui4.4:${PORTSDIR}/devel/libdfui
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50 \
- ${LOCALBASE}/share/lua/5.0/compat-5.1.lua:${PORTSDIR}/devel/lua50-compat51 \
- ${LOCALBASE}/share/lua/5.0/posix.lua:${PORTSDIR}/devel/lua50-posix
USE_BZIP2= yes
+USE_LUA= 5.0
+LUA_COMPS= compat51 posix
WRKSRC= ${WRKDIR}/lua-dfui-${PORTVERSION}
-COMPAT_SRC= `(cd ${PORTSDIR}/devel/lua50-compat51 && make -V WRKSRC)`
-MAKE_ENV= COMPAT=${COMPAT_SRC}
+COMPAT_SRC= `(cd ${PORTSDIR}/devel/lua50-compat51 && ${MAKE} -V WRKSRC)`
+MAKE_ENV= COMPAT="${COMPAT_SRC}"
+
+PLIST_FILES= %%LUA_MODLIBDIR%%/ldfui.so \
+ %%LUA_MODSHAREDIR%%/dfui.lua
do-install:
- ${MKDIR} ${PREFIX}/lib/lua/5.0
- ${INSTALL_PROGRAM} ${WRKSRC}/ldfui.so ${PREFIX}/lib/lua/5.0
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${WRKSRC}/dfui.lua ${PREFIX}/share/lua/5.0
+ ${INSTALL_PROGRAM} ${WRKSRC}/ldfui.so ${LUA_MODLIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/dfui.lua ${LUA_MODSHAREDIR}
.include <bsd.port.mk>
diff --git a/devel/lua50-dfui/files/patch-Makefile b/devel/lua50-dfui/files/patch-Makefile
index 6aea08024f70..22b843452367 100644
--- a/devel/lua50-dfui/files/patch-Makefile
+++ b/devel/lua50-dfui/files/patch-Makefile
@@ -1,5 +1,5 @@
---- Makefile.orig Tue Apr 18 13:49:53 2006
-+++ Makefile Tue Apr 18 13:54:23 2006
+--- Makefile.orig Mon Apr 17 21:40:11 2006
++++ Makefile Mon Aug 7 13:22:22 2006
@@ -1,11 +1,6 @@
# Makefile for luadfui.
# $Id: Makefile,v 1.13 2005/08/26 22:44:37 cpressey Exp $
@@ -18,13 +18,13 @@
CFLAGS+= ${WARNS} -fPIC
-CFLAGS+= -I${LUA}/include -I${COMPAT} -I../../libdfui
-CFLAGS+= -I/usr/local/include -I/usr/pkg/include
-+CFLAGS+= -I${COMPAT} -I${PREFIX}/include/dfui4
-+CFLAGS+= -I${PREFIX}/include
++CFLAGS+= -I${COMPAT} -I${LOCALBASE}/include/dfui4
++CFLAGS+= -I${LUA_INCDIR}
CFLAGS+= ${EXTRA_CFLAGS}
-LDFLAGS+= -L../../libdfui -L../../libaura -L${LUA}/lib/
-LDFLAGS+= -L/usr/local/lib -L/usr/pkg/lib
-LDFLAGS+= -ldfui -laura -lm -llua50 -llualib50
-+LDFLAGS+= -L${PREFIX}/lib
++LDFLAGS+= -L${LOCALBASE}/lib -L${LUA_LIBDIR}
+LDFLAGS+= -ldfui4 -laura3 -lm -llua -llualib
all: ${LIB}
diff --git a/devel/lua50-dfui/pkg-plist b/devel/lua50-dfui/pkg-plist
index 3d7f51fde599..e69de29bb2d1 100644
--- a/devel/lua50-dfui/pkg-plist
+++ b/devel/lua50-dfui/pkg-plist
@@ -1,6 +0,0 @@
-lib/lua/5.0/ldfui.so
-share/lua/5.0/dfui.lua
-@dirrmtry lib/lua/5.0
-@dirrmtry lib/lua
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
diff --git a/devel/lua50-filename/Makefile b/devel/lua50-filename/Makefile
index 7b97eb46dc89..c885a92d2c12 100644
--- a/devel/lua50-filename/Makefile
+++ b/devel/lua50-filename/Makefile
@@ -5,23 +5,25 @@
# $FreeBSD$
#
-PORTNAME= lua50-filename
+PORTNAME= filename
PORTVERSION= 1.2
CATEGORIES= devel
MASTER_SITES= http://cvs.bsdinstaller.org/cgi-bin/cvsweb.cgi/installer/src/lib/lua/filename/
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= filename.lua?rev=${PORTVERSION}
-EXTRACT_ONLY=
+EXTRACT_ONLY= #
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= Filename-manipulating functions for Lua 5.0.x
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-
-NO_WRKSUBDIR= yes
+USE_LUA= 5.0
NO_BUILD= yes
+NO_WRKSUBDIR= yes
+
+PLIST_FILES= %%LUA_MODSHAREDIR%%/filename.lua
do-install:
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${DISTDIR}/${DISTFILES} ${PREFIX}/share/lua/5.0/${DISTFILES:C/\?.*$//}
+ ${INSTALL_DATA} ${DISTDIR}/${DISTFILES} \
+ ${LUA_MODSHAREDIR}/${DISTFILES:C/\?.*$//}
.include <bsd.port.mk>
diff --git a/devel/lua50-filename/pkg-descr b/devel/lua50-filename/pkg-descr
index 1235fd14c6ba..ce9fcc2f3ddb 100644
--- a/devel/lua50-filename/pkg-descr
+++ b/devel/lua50-filename/pkg-descr
@@ -1,3 +1,3 @@
-Package of routines for manipulating filenames.
-Also contains convenience functions for querying the
-status of files in the filesystem named by those filenames.
+Package of routines for manipulating filenames. Also contains convenience
+functions for querying the status of files in the filesystem named by those
+filenames.
diff --git a/devel/lua50-filename/pkg-plist b/devel/lua50-filename/pkg-plist
index af8e59d4d461..e69de29bb2d1 100644
--- a/devel/lua50-filename/pkg-plist
+++ b/devel/lua50-filename/pkg-plist
@@ -1,3 +0,0 @@
-share/lua/5.0/filename.lua
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
diff --git a/devel/lua50-gettext/Makefile b/devel/lua50-gettext/Makefile
index 2a0edadba437..83fabe59eb6d 100644
--- a/devel/lua50-gettext/Makefile
+++ b/devel/lua50-gettext/Makefile
@@ -9,22 +9,21 @@ PORTNAME= gettext
PORTVERSION= 1.5
CATEGORIES= devel
MASTER_SITES= http://cvs.bsdinstaller.org/cgi-bin/cvsweb.cgi/installer/src/lib/lua/gettext/
-PKGNAMEPREFIX= lua50-
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= lua_gettext.c?rev=${CVER} gettext.lua?rev=${LVER}
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= Gettext ibinding for Lua 5.0.x
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-
+USE_LUA= 5.0
USE_GETTEXT= yes
-LIBDIR= ${PREFIX}/lib/lua/5.0
-
CVER= 1.15
LVER= ${PORTVERSION}
+PLIST_FILES= %%LUA_MODSHAREDIR%%/gettext.lua \
+ %%LUA_MODLIBDIR%%/lgettext.so
+
do-extract:
${MKDIR} ${WRKSRC}
.for file in ${DISTFILES}
@@ -33,10 +32,7 @@ do-extract:
${CP} ${FILESDIR}/Makefile ${WRKSRC}
do-install:
- ${MKDIR} ${PREFIX}/lib/lua/5.0
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${WRKSRC}/gettext.lua ${PREFIX}/share/lua/5.0/
- ${MKDIR} ${PREFIX}/lib/lua/5.0
- ${INSTALL_PROGRAM} ${WRKSRC}/lgettext.so ${PREFIX}/lib/lua/5.0/
+ ${INSTALL_DATA} ${WRKSRC}/gettext.lua ${LUA_MODSHAREDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/lgettext.so ${LUA_MODLIBDIR}
.include <bsd.port.mk>
diff --git a/devel/lua50-gettext/files/Makefile b/devel/lua50-gettext/files/Makefile
index 2c9a05d63bf4..d04118bfa4d1 100644
--- a/devel/lua50-gettext/files/Makefile
+++ b/devel/lua50-gettext/files/Makefile
@@ -5,7 +5,7 @@ SHLIB_NAME= lgettext.so
SRCS= lua_gettext.c
-CFLAGS+= -I${PREFIX}/include
-LDFLAGS+= -L${PREFIX}/lib -lintl
+CFLAGS+= -I${LOCALBASE}/include -I${LUA_INCDIR}
+LDFLAGS+= -L${LOCALBASE}/lib -lintl
.include <bsd.lib.mk>
diff --git a/devel/lua50-gettext/pkg-plist b/devel/lua50-gettext/pkg-plist
index ac660e2fdd80..e69de29bb2d1 100644
--- a/devel/lua50-gettext/pkg-plist
+++ b/devel/lua50-gettext/pkg-plist
@@ -1,6 +0,0 @@
-lib/lua/5.0/lgettext.so
-share/lua/5.0/gettext.lua
-@dirrmtry lib/lua/5.0
-@dirrmtry lib/lua
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
diff --git a/devel/lua50-posix/Makefile b/devel/lua50-posix/Makefile
index 238bcaf406ba..37ec1872664c 100644
--- a/devel/lua50-posix/Makefile
+++ b/devel/lua50-posix/Makefile
@@ -5,23 +5,24 @@
# $FreeBSD$
#
-PORTNAME= lua50-posix
+PORTNAME= posix
PORTVERSION= 5.0
CATEGORIES= devel
MASTER_SITES= http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/5.0/
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= lposix.tar.gz
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= A POSIX layer for Lua
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50
-
+USE_LUA= 5.0
WRKSRC= ${WRKDIR}/posix
+PLIST_FILES= %%LUA_MODSHAREDIR%%/posix.lua \
+ %%LUA_MODLIBDIR%%/lposix.so
+
do-install:
- @ ${MKDIR} ${PREFIX}/share/lua/5.0
- @ ${INSTALL_DATA} ${WRKSRC}/posix.lua ${PREFIX}/share/lua/5.0
- @ ${MKDIR} ${PREFIX}/lib/lua/5.0
- @ ${INSTALL_PROGRAM} ${WRKSRC}/lposix.so ${PREFIX}/lib/lua/5.0
+ @${INSTALL_DATA} ${WRKSRC}/posix.lua ${LUA_MODSHAREDIR}
+ @${INSTALL_PROGRAM} ${WRKSRC}/lposix.so ${LUA_MODLIBDIR}
.include <bsd.port.mk>
diff --git a/devel/lua50-posix/files/patch-Makefile b/devel/lua50-posix/files/patch-Makefile
index 8c8f05bddff7..b0eb70640eb4 100644
--- a/devel/lua50-posix/files/patch-Makefile
+++ b/devel/lua50-posix/files/patch-Makefile
@@ -1,20 +1,30 @@
---- Makefile.orig Mon Mar 27 12:25:04 2006
-+++ Makefile Mon Mar 27 12:43:24 2006
-@@ -1,7 +1,7 @@
+--- Makefile.orig Wed Nov 5 21:26:49 2003
++++ Makefile Mon Aug 7 00:38:38 2006
+@@ -1,13 +1,13 @@
# makefile for POSIX library for Lua
# change these to reflect your Lua installation
-LUA= /tmp/lhf/lua-5.0
+-LUAINC= $(LUA)/include
+-LUALIB= $(LUA)/lib
+-LUABIN= $(LUA)/bin
+LUA= ${PREFIX}
- LUAINC= $(LUA)/include
- LUALIB= $(LUA)/lib
- LUABIN= $(LUA)/bin
++LUAINC= $(LUA_INCDIR)
++LUALIB= $(LUA_LIBDIR)
++LUABIN= $(LUA_BINDIR)
+
+ # no need to change anything below here
+-CFLAGS= -fPIC $(INCS) $(WARN) -O2 $G
++CFLAGS+= -fPIC $(INCS) $(WARN) -O2 $G
+ WARN= -pedantic -Wall
+ INCS= -I$(LUAINC)
+
@@ -21,7 +21,7 @@
all: test
test: $T
- $(LUABIN)/lua -l$(MYNAME) test.lua
-+ LD_PRELOAD=${PREFIX}/lib/liblua.so:${PREFIX}/lib/liblualib.so $(LUABIN)/lua -l$(MYNAME) test.lua
++ LD_PRELOAD=${LUA_LIBDIR}/liblua.so:${LUA_LIBDIR}/liblualib.so $(LUABIN)/lua -l$(MYNAME) test.lua
$T: $(OBJS)
$(CC) -o $@ -shared $(OBJS)
diff --git a/devel/lua50-posix/pkg-plist b/devel/lua50-posix/pkg-plist
index 036b7a2881f3..e69de29bb2d1 100644
--- a/devel/lua50-posix/pkg-plist
+++ b/devel/lua50-posix/pkg-plist
@@ -1,6 +0,0 @@
-share/lua/5.0/posix.lua
-lib/lua/5.0/lposix.so
-@dirrmtry share/lua/5.0
-@dirrmtry share/lua
-@dirrmtry lib/lua/5.0
-@dirrmtry lib/lua
diff --git a/devel/lua50-pty/Makefile b/devel/lua50-pty/Makefile
index 9ed7a77557a7..b80cb3f86806 100644
--- a/devel/lua50-pty/Makefile
+++ b/devel/lua50-pty/Makefile
@@ -10,18 +10,20 @@ PORTVERSION= 1.25
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= philip
-PKGNAMEPREFIX= lua50-
+PKGNAMEPREFIX= ${LUA_PKGNAMEPREFIX}
DISTFILES= pty.lua?rev=1.2 pty.c?rev=1.25
MAINTAINER= andrew+ports@fubar.geek.nz
COMMENT= Pty (pseudo-terminal) bindings for Lua 5.0.x
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50 \
- ${NONEXISTENT}:${PORTSDIR}/devel/lua50-compat51:extract
-RUN_DEPENDS= ${LOCALBASE}/include/lua.h:${PORTSDIR}/lang/lua50 \
- ${LOCALBASE}/share/lua/5.0/compat-5.1.lua:${PORTSDIR}/devel/lua50-compat51
+USE_LUA= 5.0
+LUA_COMPS= lua compat51
-COMPAT_SRC= `(cd ${PORTSDIR}/devel/lua50-compat51 && make -V WRKSRC)`
+COMPAT_SRC!= `(cd ${PORTSDIR}/devel/lua50-compat51 && ${MAKE} -V WRKSRC)`
+MAKE_ENV= COMPATDIR="${COMPAT_SRC}"
+
+PLIST_FILES= %%LUA_MODSHAREDIR%%/pty.lua \
+ %%LUA_MODLIBDIR%%/lpty.so
do-extract:
@${MKDIR} ${WRKSRC}
@@ -30,13 +32,8 @@ do-extract:
.endfor
@${CP} ${FILESDIR}/Makefile ${WRKSRC}
-post-patch:
- @${REINPLACE_CMD} -e "s|%%COMPATDIR%%|${COMPAT_SRC}|" ${WRKSRC}/Makefile
-
do-install:
- ${MKDIR} ${PREFIX}/lib/lua/5.0
- ${INSTALL_PROGRAM} ${WRKSRC}/lpty.so ${PREFIX}/lib/lua/5.0
- ${MKDIR} ${PREFIX}/share/lua/5.0
- ${INSTALL_DATA} ${WRKSRC}/pty.lua ${PREFIX}/share/lua/5.0
+ ${INSTALL_PROGRAM} ${WRKSRC}/lpty.so ${LUA_MODLIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/pty.lua ${LUA_MODSHAREDIR}
.include <bsd.port.mk>
diff --git a/devel/lua50-pty/files/Makefile b/devel/lua50-pty/files/Makefile
index 99df27729cd8..e6a0fb23c49f 100644
--- a/devel/lua50-pty/files/Makefile
+++ b/devel/lua50-pty/files/Makefile
@@ -3,9 +3,9 @@
SHLIB= pty
SHLIB_NAME= lpty.so
-SRCS= pty.c %%COMPATDIR%%/compat-5.1.c
+SRCS= pty.c ${COMPATDIR}/compat-5.1.c
-CFLAGS+= -I${PREFIX}/include
+CFLAGS+= -I${LUA_INCDIR}
LDFLAGS+= -L/usr/lib -lutil
.include <bsd.lib.mk>
diff --git a/games/enigma/Makefile b/games/enigma/Makefile
index 5e35d45dc76d..8c33648d3237 100644
--- a/games/enigma/Makefile
+++ b/games/enigma/Makefile
@@ -15,21 +15,23 @@ DISTNAME= enigma-${PORTVERSION}
MAINTAINER= anholt@FreeBSD.org
COMMENT= Enigma is a reimplementation of Oxyd, a puzzle game
-BUILD_DEPENDS= ${LOCALBASE}/bin/tolua:${PORTSDIR}/lang/tolua4
-LIB_DEPENDS= zipios.0:${PORTSDIR}/archivers/zipios++ \
- lua.4:${PORTSDIR}/lang/lua4
+LIB_DEPENDS= zipios.0:${PORTSDIR}/archivers/zipios++
USE_GCC= 3.4
-
-GNU_CONFIGURE= yes
-USE_XLIB= yes
USE_GMAKE= yes
USE_GETTEXT= yes
+USE_LUA= 4.0
+LUA_COMPS= lua tolua
USE_SDL= gfx image mixer sdl ttf
+USE_XLIB= yes
+GNU_CONFIGURE= yes
CONFIGURE_ARGS= --target="" \
--with-libintl-prefix="${LOCALBASE}"
-CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" \
- CXXFLAGS="${PTHREAD_CFLAGS} -I${X11BASE}/include"
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ LDFLAGS="${LDFLAGS}"
+CPPFLAGS= -I${LOCALBASE}/include -I${LUA_INCDIR}
+CXXFLAGS= -I${X11BASE}/include ${PTHREAD_CFLAGS}
+LDFLAGS= -L${LOCALBASE}/lib -L${LUA_LIBDIR} ${PTHREAD_LIBS}
MAN6= enigma.6
diff --git a/games/fillets-ng/Makefile b/games/fillets-ng/Makefile
index b17c1f06a775..92286143fbc0 100644
--- a/games/fillets-ng/Makefile
+++ b/games/fillets-ng/Makefile
@@ -19,15 +19,16 @@ EXTRACT_ONLY= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
MAINTAINER= amdmi3@mail.ru
COMMENT= A wonderful puzzle game
-LIB_DEPENDS= lua.5:${PORTSDIR}/lang/lua50
-
USE_SDL= sdl mixer image ttf
+USE_LUA= 5.0
USE_GMAKE= yes
GNU_CONFIGURE= yes
-CONFIGURE_ENV= SDL_CONFIG="${SDL_CONFIG}"
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --datadir="${DATADIR}" --with-lua="${LOCALBASE}"
+CPPFLAGS= -I${LUA_INCDIR}
+LDFLAGS= -L${LUA_LIBDIR}
OPTIONS= FRIBIDI "Enable fribidi support" off
diff --git a/games/stratagus/Makefile b/games/stratagus/Makefile
index a61f51b833f5..55a8cacfe212 100644
--- a/games/stratagus/Makefile
+++ b/games/stratagus/Makefile
@@ -16,32 +16,21 @@ DISTNAME= ${PORTNAME}-${PORTVERSION}-src
MAINTAINER= tlp@liquidx.org
COMMENT= Free cross-platform real-time strategy gaming engine
-LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png \
- lua.5:${PORTSDIR}/lang/lua50
+LIB_DEPENDS= png.5:${PORTSDIR}/graphics/png
+USE_GMAKE= yes
+USE_LUA= 5.0
USE_SDL= yes
USE_XLIB= yes
-USE_GMAKE= yes
-
-WRKSRC= ${WRKDIR}/stratagus-040702
-
GNU_CONFIGURE= yes
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CPPFLAGS= -I${LOCALBASE}/include -I${X11BASE}/include -I${LUA_INCDIR}
+LDFLAGS= -L${LOCALBASE}/lib -L${X11BASE}/lib -L${LUA_LIBDIR}
+WRKSRC= ${WRKDIR}/stratagus-040702
-.if defined(WITH_OPENGL)
-CONFIGURE_ARGS+= --with-opengl
-.endif
-
-.if defined(WITHOUT_VORBIS)
-CONFIGURE_ARGS+= --without-ogg
-.else
-LIB_DEPENDS+= vorbisfile.4:${PORTSDIR}/audio/libvorbis
-.endif
-
-.if defined(WITHOUT_MIKMOD)
-CONFIGURE_ARGS+= --without-mikmod
-.else
-LIB_DEPENDS+= mikmod.2:${PORTSDIR}/audio/libmikmod
-.endif
+OPTIONS= OPENGL "Enable OpenGL support" on \
+ MIKMOD "Enable Mikmod support" off \
+ VORBIS "Enable Ogg Vorbis support" off
PLIST_FILES= bin/stratagus
@@ -51,20 +40,21 @@ PLIST_FILES= bin/stratagus
IGNORE= does not run properly on FreeBSD 4.x
.endif
-pre-everything::
- @${ECHO_MSG} ""
- @${ECHO_MSG} "Stratagus has the following tunable option(s):"
- @${ECHO_MSG} ""
- @${ECHO_MSG} " WITH_OPENGL=yes Builds Stratagus with OpenGL"
- @${ECHO_MSG} ""
- @${ECHO_MSG} " WITHOUT_VORBIS=yes Turns off Ogg Vorbis support"
- @${ECHO_MSG} " WITHOUT_MIKMOD=yes Turns off Mikmod support"
- @${ECHO_MSG} ""
+.if defined(WITH_OPENGL)
+CONFIGURE_ARGS+=--with-opengl
+.endif
+
+.if defined(WITH_MIKMOD)
+LIB_DEPENDS+= mikmod.2:${PORTSDIR}/audio/libmikmod
+.else
+CONFIGURE_ARGS+=--without-mikmod
+.endif
-post-configure:
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/Makefile
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/Rules.make
- @${REINPLACE_CMD} -e 's|/usr/X11R6|${X11BASE}|' ${WRKSRC}/Rules.make
+.if defined(WITH_VORBIS)
+LIB_DEPENDS+= vorbisfile.4:${PORTSDIR}/audio/libvorbis
+.else
+CONFIGURE_ARGS+=--without-ogg
+.endif
post-install:
@${CAT} ${PKGMESSAGE}
diff --git a/games/stratagus/files/patch-aa b/games/stratagus/files/patch-aa
index 18c88c4db0a5..e69de29bb2d1 100644
--- a/games/stratagus/files/patch-aa
+++ b/games/stratagus/files/patch-aa
@@ -1,11 +0,0 @@
---- Rules.make.in.orig Thu Jul 1 00:03:00 2004
-+++ Rules.make.in Thu Jul 1 00:04:55 2004
-@@ -55,7 +55,8 @@
- @OGG_CFLAGS@ @MAD_CFLAGS@ @FLAC_CFLAGS@ @CDAUDIO_CFLAGS@ \
- @MIKMOD_CFLAGS@ @LUA_CFLAGS@ $(CCL) \
- $(COMP_CFLAGS) @PLATFORM@ \
-- -I/usr/local/include
-+ -I/usr/local/include \
-+ -I/usr/X11R6/include
-
- CTAGSFLAGS=-i defptvS -a -f
diff --git a/games/stratagus/files/patch-configure b/games/stratagus/files/patch-configure
index 9f4328894777..4384cc74fdf4 100644
--- a/games/stratagus/files/patch-configure
+++ b/games/stratagus/files/patch-configure
@@ -1,5 +1,5 @@
---- configure.orig Fri Jul 2 03:46:35 2004
-+++ configure Tue Nov 2 21:31:50 2004
+--- ./configure.orig Thu Jul 1 22:46:35 2004
++++ ./configure Mon Jul 17 19:23:06 2006
@@ -3229,9 +3229,6 @@
VIDEO_LIBS="$VIDEO_LIBS -lwsock32 -lws2_32 -lmingwex -lgmon"
fi
diff --git a/games/stratagus/pkg-message b/games/stratagus/pkg-message
index 4e617f7236dc..869d6ea6909c 100644
--- a/games/stratagus/pkg-message
+++ b/games/stratagus/pkg-message
@@ -1,9 +1,9 @@
--------------------------------------------------------------------------------
-NOTE: This is only the engine. If you wish to play a game that uses the
-Stratagus engine, you must manually download the Stratagus game data.
+------------------------------------------------------------------------------
+NOTE: This is only the engine. If you wish to play a game that uses the
+Stratagus engine, you must manually download the Stratagus game data.
-You can use the 'games/wargus' port to extract data from a legal copy of
-Warcraft 2 (original DOS version required, won't work with the battle.net
+You can use the 'games/wargus' port to extract data from a legal copy of
+Warcraft 2 (original DOS version required, won't work with the battle.net
edition).
For more information, please take a look at the following URL:
@@ -11,4 +11,4 @@ For more information, please take a look at the following URL:
http://stratagus.sourceforge.net/games.shtml
Enjoy!
--------------------------------------------------------------------------------
+------------------------------------------------------------------------------
diff --git a/games/xmoto/Makefile b/games/xmoto/Makefile
index e83a7902b6cb..07bc5fdb09f5 100644
--- a/games/xmoto/Makefile
+++ b/games/xmoto/Makefile
@@ -18,19 +18,19 @@ COMMENT= Challenging 2D motocross platform game
LIB_DEPENDS= vorbis.3:${PORTSDIR}/audio/libvorbis \
png.5:${PORTSDIR}/graphics/png \
jpeg.9:${PORTSDIR}/graphics/jpeg
-BUILD_DEPENDS= ${X11BASE}/lib/libode.a:${PORTSDIR}/devel/ode \
- ${LOCALBASE}/include/lua.hpp:${PORTSDIR}/lang/lua
+BUILD_DEPENDS= ${X11BASE}/lib/libode.a:${PORTSDIR}/devel/ode
GNU_CONFIGURE= yes
USE_GMAKE= yes
USE_GL= yes
+USE_LUA= 5.1
USE_SDL= sdl mixer
USE_DOS2UNIX= src/*.cpp src/*.h
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
-CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib" \
- CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
- SDL_CONFIG="${SDL_CONFIG}"
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CPPFLAGS= -I${LOCALBASE}/include -I${X11BASE}/include -I${LUA_INCDIR}
+LDFLAGS= -L${LOCALBASE}/lib -L${X11BASE}/lib -L${LUA_LIBDIR}
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
@@ -45,13 +45,14 @@ LIB_DEPENDS+= curl.3:${PORTSDIR}/ftp/curl
.endif
post-patch:
- @${REINPLACE_CMD} -e 's|SDL/|SDL11/|' ${WRKSRC}/src/VCommon.h
- @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' ${WRKSRC}/src/image/tim_memory_crt.cpp
- @${REINPLACE_CMD} -e 's|endian.h|sys/endian.h|' ${WRKSRC}/src/VCommon.h
- @${REINPLACE_CMD} -e '/LIBS/ s|\(-lSDL_mixer\)|\1 `${SDL_CONFIG} --libs`|' ${WRKSRC}/configure
-.if !defined(WITH_CURL)
- @${REINPLACE_CMD} -e 's|test $$ac_cv_lib_curl_curl_easy_init = yes|false|' ${WRKSRC}/configure
-.endif
+ @${REINPLACE_CMD} -e 's|SDL/||; s|endian.h|sys/endian.h|' \
+ ${WRKSRC}/src/VCommon.h
+ @${REINPLACE_CMD} -e 's|malloc.h|stdlib.h|' \
+ ${WRKSRC}/src/image/tim_memory_crt.cpp
+ @${REINPLACE_CMD} -e \
+ '/LIBS/ s|\(-lSDL_mixer\)|`${SDL_CONFIG} --libs` \1| ; \
+ s|test $$ac_cv_lib_curl_curl_easy_init = yes|false|' \
+ ${WRKSRC}/configure
.if !defined(NOPORTDOCS)
post-install:
diff --git a/lang/lua/Makefile b/lang/lua/Makefile
index 35540a42841c..96de7f0e5f3a 100644
--- a/lang/lua/Makefile
+++ b/lang/lua/Makefile
@@ -19,20 +19,58 @@ MASTER_SITES= http://www.lua.org/ftp/ \
MAINTAINER= him@richardkiss.com
COMMENT= Small, compilable scripting language providing easy access to C code
-MAN1= lua.1 luac.1
+USE_LUA= 5.1
+LUA_COMPS= # only define variables
+ALL_TARGET= bsd
-MAKE_ARGS= bsd
+MAN1= lua-${LUA_VER}.1 luac-${LUA_VER}.1
+DOCSDIR= ${PREFIX}/share/doc/${LUA_SUBDIR}
+LATEST_LINK= ${LUA_SUBDIR}
-CONFLICTS= lua-4* lua-5.0*
+LUA_BIN= lua luac
+LUA_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
+LUA_MAN= ${LUA_BIN:S/$/.1/}
post-patch:
- @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/Makefile
+ @${REINPLACE_CMD} -Ee \
+ 's|^(CC=).*|\1 ${CC}| ; \
+ s|^(CFLAGS=)|\1 ${CFLAGS}| ; \
+ s|/usr/local|${PREFIX}|' \
+ ${WRKSRC}/Makefile ${WRKSRC}/src/Makefile
-post-install:
+post-build:
+ @${RM} -f ${WRKSRC}/test/lua ${WRKSRC}/test/luac
+
+do-install:
+# Programs.
+ ${MKDIR} ${LUA_BINDIR}
+.for f in ${LUA_BIN}
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/${f} ${LUA_BINDIR}
+ ${LN} -sf ${LUA_SUBDIR}/${f} ${PREFIX}/bin/${f}-${LUA_VER}
+.endfor
+# Include files.
+ ${MKDIR} ${LUA_INCDIR}
+.for f in ${LUA_INC}
+ ${INSTALL_DATA} ${WRKSRC}/src/${f} ${LUA_INCDIR}
+.endfor
+# Libraries.
+ ${MKDIR} ${LUA_LIBDIR}
+ ${INSTALL_DATA} ${WRKSRC}/src/liblua.a ${LUA_LIBDIR}
+# Manual pages.
+.for f in ${LUA_MAN}
+ ${INSTALL_MAN} ${WRKSRC}/doc/${f} \
+ ${PREFIX}/man/man1/${f:C/.1$//}-${LUA_VER}.1
+.endfor
+# Documentation.
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.css *.gif ${DOCSDIR}
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+ cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif ${DOCSDIR}
+ ${CP} -r ${WRKSRC}/etc ${WRKSRC}/test ${DOCSDIR}
.endif
+# Module directories.
+ ${MKDIR} ${LUA_MODLIBDIR}
+ ${MKDIR} ${LUA_MODSHAREDIR}
.if ${MACHINE_ARCH:L} == "amd64"
CFLAGS+= -fPIC
diff --git a/lang/lua/pkg-plist b/lang/lua/pkg-plist
index 0e1c8d85a72b..9655c72683b5 100644
--- a/lang/lua/pkg-plist
+++ b/lang/lua/pkg-plist
@@ -1,22 +1,59 @@
-@exec mkdir -p %D/lib/lua/5.1
-@exec mkdir -p %D/share/lua/5.1
-%%DOCSDIR%%/contents.html
-%%DOCSDIR%%/logo.gif
-%%DOCSDIR%%/lua.css
-%%DOCSDIR%%/lua.html
-%%DOCSDIR%%/luac.html
-%%DOCSDIR%%/manual.html
-%%DOCSDIR%%/readme.html
-bin/lua
-bin/luac
-include/lauxlib.h
-include/lua.h
-include/lua.hpp
-include/luaconf.h
-include/lualib.h
-lib/liblua.a
-@dirrm %%DOCSDIR%%
-@dirrm share/lua/5.1
-@dirrm share/lua
-@dirrm lib/lua/5.1
-@dirrm lib/lua
+@exec mkdir -p %D/share/lua/%%LUA_VER%%
+@exec mkdir -p %D/lib/lua/%%LUA_VER%%
+bin/lua-%%LUA_VER%%
+%%LUA_BINDIR%%/lua
+%%LUA_BINDIR%%/luac
+bin/luac-%%LUA_VER%%
+%%LUA_INCDIR%%/lauxlib.h
+%%LUA_INCDIR%%/lua.h
+%%LUA_INCDIR%%/lua.hpp
+%%LUA_INCDIR%%/luaconf.h
+%%LUA_INCDIR%%/lualib.h
+%%LUA_LIBDIR%%/liblua.a
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/contents.html
+%%PORTDOCS%%%%DOCSDIR%%/etc/Makefile
+%%PORTDOCS%%%%DOCSDIR%%/etc/README
+%%PORTDOCS%%%%DOCSDIR%%/etc/all.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.hpp
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.ico
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.pc
+%%PORTDOCS%%%%DOCSDIR%%/etc/luavs.bat
+%%PORTDOCS%%%%DOCSDIR%%/etc/min.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/noparser.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/strict.lua
+%%PORTDOCS%%%%DOCSDIR%%/logo.gif
+%%PORTDOCS%%%%DOCSDIR%%/lua.html
+%%PORTDOCS%%%%DOCSDIR%%/luac.html
+%%PORTDOCS%%%%DOCSDIR%%/manual.html
+%%PORTDOCS%%%%DOCSDIR%%/readme.html
+%%PORTDOCS%%%%DOCSDIR%%/test/README
+%%PORTDOCS%%%%DOCSDIR%%/test/bisect.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/cf.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/echo.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/env.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/factorial.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/fib.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/fibfor.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/globals.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/hello.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/life.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/luac.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/printf.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/readonly.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/sieve.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/sort.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/table.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/trace-calls.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/trace-globals.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/xd.lua
+@dirrm share/lua/%%LUA_VER%%
+@dirrmtry share/lua
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/test
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/etc
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%LUA_LIBDIR%%
+@dirrm lib/lua/%%LUA_VER%%
+@dirrmtry lib/lua
+@dirrm %%LUA_INCDIR%%
+@dirrm %%LUA_BINDIR%%
diff --git a/lang/lua4/Makefile b/lang/lua4/Makefile
index 5e4e66968dba..352031b6da5c 100644
--- a/lang/lua4/Makefile
+++ b/lang/lua4/Makefile
@@ -17,40 +17,74 @@ MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/lua/ \
MAINTAINER= him@richardkiss.com
COMMENT= Small, compilable scripting language providing easy access to C code
-LATEST_LINK= lua4
-MAN1= luac.1
-WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
+USE_LDCONFIG= yes
+USE_LUA= 4.0
+LUA_COMPS= # only define variables
ALL_TARGET= all so
-INSTALLS_SHLIB= YES
-CONFLICTS= lua-5*
+MAN1= lua-${LUA_VER}.1 luac-${LUA_VER}.1
+DOCSDIR= ${PREFIX}/share/doc/${LUA_SUBDIR}
+LATEST_LINK= ${LUA_SUBDIR}
-do-install:
- @ ${MKDIR} ${PREFIX}/share/doc/lua
- @ ${INSTALL_PROGRAM} ${WRKSRC}/bin/lua ${PREFIX}/bin
- @ ${INSTALL_PROGRAM} ${WRKSRC}/bin/luac ${PREFIX}/bin
- @ ${INSTALL_MAN} ${WRKSRC}/doc/luac.1 ${PREFIX}/man/man1/luac.1
- @ ${INSTALL_DATA} ${WRKSRC}/doc/idx.html ${PREFIX}/share/doc/lua
- @ ${INSTALL_DATA} ${WRKSRC}/doc/index.html ${PREFIX}/share/doc/lua
- @ ${INSTALL_DATA} ${WRKSRC}/doc/luac.html ${PREFIX}/share/doc/lua
- @ ${INSTALL_DATA} ${WRKSRC}/doc/manual.html ${PREFIX}/share/doc/lua
- @ ${INSTALL_DATA} ${WRKSRC}/include/lua.h ${PREFIX}/include
- @ ${INSTALL_DATA} ${WRKSRC}/include/luadebug.h ${PREFIX}/include
- @ ${INSTALL_DATA} ${WRKSRC}/include/lualib.h ${PREFIX}/include
- @ ${INSTALL_DATA} ${WRKSRC}/include/lauxlib.h ${PREFIX}/include
- @ ${INSTALL_DATA} ${WRKSRC}/lib/liblua.a ${PREFIX}/lib
- @ ${INSTALL_DATA} ${WRKSRC}/lib/liblua.so.4.0 ${PREFIX}/lib/liblua.so.4
- @ ${LN} -s ${PREFIX}/lib/liblua.so.4 ${PREFIX}/lib/liblua.so
- @ ${INSTALL_DATA} ${WRKSRC}/lib/liblualib.a ${PREFIX}/lib
- @ ${INSTALL_DATA} ${WRKSRC}/lib/liblualib.so.4.0 ${PREFIX}/lib/liblualib.so.4
- @ ${LN} -s ${PREFIX}/lib/liblualib.so.4 ${PREFIX}/lib/liblualib.so
-
-post-install:
- @${STRIP_CMD} ${PREFIX}/bin/lua
- @${STRIP_CMD} ${PREFIX}/bin/luac
-
-.if ${MACHINE_ARCH:L} == "amd64"
+LUA_BIN= lua luac
+LUA_LIB= lua lualib
+LUA_MAN= ${LUA_BIN:S/$/.1/}
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
CFLAGS+= -fPIC
.endif
-.include <bsd.port.mk>
+post-patch:
+ @${REINPLACE_CMD} -Ee \
+ 's|^#(POPEN=.*)|\1|; \
+ s|^(CC=).*|\1 ${CC}|; \
+ s|^(CFLAGS=) -O2 (.*)|\1 ${CFLAGS} \2|; \
+ s|^(V=)[[:digit:]]\.0|\1 ${LUA_VER}|' \
+ ${WRKSRC}/config
+ @${REINPLACE_CMD} -Ee 's|(ld -o lib/(liblua(lib)?)\.so\.\$$V)|\1 -soname=\2-${LUA_VER}.so.${LUA_VER_SH}|' \
+ ${WRKSRC}/${MAKEFILE}
+
+post-build:
+ @${RM} -f ${WRKSRC}/test/lua ${WRKSRC}/test/luac
+
+do-install:
+# Programs.
+ ${MKDIR} ${LUA_BINDIR}
+.for f in ${LUA_BIN}
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${LUA_BINDIR}
+ ${LN} -sf ${LUA_SUBDIR}/${f} ${PREFIX}/bin/${f}-${LUA_VER}
+.endfor
+# Include files.
+ ${MKDIR} ${LUA_INCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/include/*.h ${LUA_INCDIR}
+# Libraries.
+ ${MKDIR} ${LUA_LIBDIR}
+.for f in ${LUA_LIB}
+ ${INSTALL_PROGRAM} ${WRKSRC}/lib/lib${f}.a ${LUA_LIBDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/lib/lib${f}.so \
+ ${LUA_LIBDIR}/lib${f}-${LUA_VER}.so.${LUA_VER_SH}
+ @${LN} -sf lib${f}-${LUA_VER}.so.${LUA_VER_SH} ${LUA_LIBDIR}/lib${f}.so
+ @${LN} -sf ${LUA_SUBDIR}/lib${f}-${LUA_VER}.so.${LUA_VER_SH} \
+ ${PREFIX}/lib
+ @${LN} -sf lib${f}-${LUA_VER}.so.${LUA_VER_SH} \
+ ${PREFIX}/lib/lib${f}-${LUA_VER}.so
+.endfor
+# Manual pages.
+.for f in ${LUA_MAN}
+ ${INSTALL_MAN} ${WRKSRC}/doc/${f} \
+ ${PREFIX}/man/man1/${f:C/.1$//}-${LUA_VER}.1
+.endfor
+# Documentation.
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+ cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif ${DOCSDIR}
+ ${CP} -r ${WRKSRC}/etc ${WRKSRC}/test ${DOCSDIR}
+.endif
+# Module directories.
+ ${MKDIR} ${LUA_MODSHAREDIR}
+ ${MKDIR} ${LUA_MODLIBDIR}
+
+.include <bsd.port.post.mk>
diff --git a/lang/lua4/files/patch-aa b/lang/lua4/files/patch-aa
index 44a4a2a5d1bc..e69de29bb2d1 100644
--- a/lang/lua4/files/patch-aa
+++ b/lang/lua4/files/patch-aa
@@ -1,19 +0,0 @@
---- config Mon Nov 6 12:28:20 2000
-+++ config.new Tue Jan 2 15:51:57 2001
-@@ -28,7 +28,6 @@
- # ------------------------------------------------------------------ C compiler
-
- # You need an ANSI C compiler. gcc is a popular one.
--CC= gcc
- WARN= -ansi -pedantic -Wall
-
- # On IRIX, cc is a good ANSI compiler.
-@@ -93,7 +93,7 @@
- INCS= -I$(INC) $(EXTRA_INCS)
- DEFS= $(COMPAT) $(NUMBER) $(OLD_ANSI) $(EXTRA_DEFS)
-
--CFLAGS= -O2 $(WARN) $(INCS) $(DEFS)
-+CFLAGS+= $(WARN) $(INCS) $(DEFS)
-
- V=4.0
-
diff --git a/lang/lua4/pkg-plist b/lang/lua4/pkg-plist
index 752a182ae672..a243c69536fb 100644
--- a/lang/lua4/pkg-plist
+++ b/lang/lua4/pkg-plist
@@ -1,17 +1,77 @@
-bin/lua
-bin/luac
-include/lauxlib.h
-include/lua.h
-include/luadebug.h
-include/lualib.h
-lib/liblua.a
-lib/liblua.so
-lib/liblua.so.4
-lib/liblualib.a
-lib/liblualib.so
-lib/liblualib.so.4
+@exec mkdir -p %D/share/lua/%%LUA_VER%%
+@exec mkdir -p %D/lib/lua/%%LUA_VER%%
+bin/lua-%%LUA_VER%%
+%%LUA_BINDIR%%/lua
+%%LUA_BINDIR%%/luac
+bin/luac-%%LUA_VER%%
+%%LUA_INCDIR%%/lauxlib.h
+%%LUA_INCDIR%%/lua.h
+%%LUA_INCDIR%%/luadebug.h
+%%LUA_INCDIR%%/lualib.h
+lib/liblua-%%LUA_VER%%.so
+lib/liblua-%%LUA_VER%%.so.%%LUA_VER_SH%%
+lib/liblualib-%%LUA_VER%%.so
+lib/liblualib-%%LUA_VER%%.so.0
+%%LUA_LIBDIR%%/liblua-%%LUA_VER%%.so.%%LUA_VER_SH%%
+%%LUA_LIBDIR%%/liblua.a
+%%LUA_LIBDIR%%/liblua.so
+%%LUA_LIBDIR%%/liblualib-%%LUA_VER%%.so.%%LUA_VER_SH%%
+%%LUA_LIBDIR%%/liblualib.a
+%%LUA_LIBDIR%%/liblualib.so
+%%PORTDOCS%%%%DOCSDIR%%/etc/Makefile
+%%PORTDOCS%%%%DOCSDIR%%/etc/README
+%%PORTDOCS%%%%DOCSDIR%%/etc/bin2c.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/def.lua
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.ico
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.magic
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.xpm
+%%PORTDOCS%%%%DOCSDIR%%/etc/min.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/setfallback.lua
+%%PORTDOCS%%%%DOCSDIR%%/etc/stdcall.lua
+%%PORTDOCS%%%%DOCSDIR%%/etc/trace.c
+%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/idx.html
%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/logo.gif
+%%PORTDOCS%%%%DOCSDIR%%/lua.html
%%PORTDOCS%%%%DOCSDIR%%/luac.html
%%PORTDOCS%%%%DOCSDIR%%/manual.html
+%%PORTDOCS%%%%DOCSDIR%%/readme.html
+%%PORTDOCS%%%%DOCSDIR%%/test/README
+%%PORTDOCS%%%%DOCSDIR%%/test/bisect.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/cf-for.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/cf.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/examples/ps/hilbert.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/examples/ps/ps.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/examples/www/README
+%%PORTDOCS%%%%DOCSDIR%%/test/examples/www/db.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/examples/www/staff.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/examples/www/template.html
+%%PORTDOCS%%%%DOCSDIR%%/test/factorial.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/fib.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/globals.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/hello.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/life.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/lisp.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/old.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/qp.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/save.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/sort.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/table.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/trace-calls.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/trace-globals.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/undefined.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/webform.lua
+@dirrm share/lua/%%LUA_VER%%
+@dirrmtry share/lua
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/test/examples/www
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/test/examples/ps
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/test/examples
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/test
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/etc
%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%LUA_LIBDIR%%
+@dirrm lib/lua/%%LUA_VER%%
+@dirrmtry lib/lua
+@dirrm %%LUA_INCDIR%%
+@dirrm %%LUA_BINDIR%%
diff --git a/lang/lua50/Makefile b/lang/lua50/Makefile
index 253e5b3e9593..ac91303c9422 100644
--- a/lang/lua50/Makefile
+++ b/lang/lua50/Makefile
@@ -19,36 +19,76 @@ MASTER_SITES= http://www.lua.org/ftp/ \
MAINTAINER= him@richardkiss.com
COMMENT= Small, compilable scripting language providing easy access to C code
-LATEST_LINK= lua50
-MAN1= lua.1 luac.1
+USE_LDCONFIG= yes
+USE_LUA= 5.0
+LUA_COMPS= # only define variables
ALL_TARGET= all so
-INSTALL_TARGET= install soinstall
-INSTALLS_SHLIB= YES
-
-CONFLICTS= lua-4* lua-5.1*
-
-do-configure:
- ${REINPLACE_CMD} \
- -e 's|^\(MYCFLAGS=\).*$$|\1 ${CFLAGS}|' \
- -e 's|^\(LOADLIB=\).*$$|\1 -DUSE_DLOPEN=1|' \
- -e 's|^\(CC=\).*$$|\1 ${CC}|' \
- -e 's|^\(STRIP=\).*$$|\1 ${STRIP_CMD}|' \
- -e 's|^\(INSTALL_ROOT=\).*$$|\1 ${PREFIX}|' \
- -e 's|^\(INSTALL_EXEC=\).*$$|\1 ${INSTALL_PROGRAM}|' \
- -e 's|^\(INSTALL_DATA=\).*$$|\1 ${INSTALL_DATA}|' \
- -e 's|^#\(USERCONF.*READLINE.*\)$$|\1|' \
- -e 's|^\(EXTRA_LIBS=\).*$$|\1 -lm -lreadline -lhistory -lncurses|' \
- -e 's|V=5.0|V=5|' \
- ${WRKSRC}/config
-post-install:
-.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif ${DOCSDIR}
-.endif
+MAN1= lua-${LUA_VER}.1 luac-${LUA_VER}.1
+DOCSDIR= ${PREFIX}/share/doc/${LUA_SUBDIR}
+LATEST_LINK= ${LUA_SUBDIR}
-.if ${MACHINE_ARCH:L} == "amd64"
+LUA_BIN= lua luac
+LUA_LIB= lua lualib
+LUA_MAN= ${LUA_BIN:S/$/.1/}
+
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
CFLAGS+= -fPIC
.endif
-.include <bsd.port.mk>
+post-patch:
+ @${REINPLACE_CMD} -Ee \
+ 's|^(MYCFLAGS=).*|\1 ${CFLAGS}|; \
+ s|^(LOADLIB=).*|\1 -DUSE_DLOPEN=1|; \
+ s|^(CC=).*|\1 ${CC}|; \
+ s|^#(USERCONF.*READLINE.*)|\1|; \
+ s|^(EXTRA_LIBS=).*|\1 -lm -lreadline -lhistory -lncurses|; \
+ s|^(V=[[:digit:]])\.0|\1|' \
+ ${WRKSRC}/config
+ @${REINPLACE_CMD} -Ee 's|(ld -o lib/(liblua(lib)?)\.so\.\$$V)|\1 -soname=\2-${LUA_VER}.so.${LUA_VER_SH}|' \
+ ${WRKSRC}/${MAKEFILE}
+
+post-build:
+ @${RM} -f ${WRKSRC}/test/lua ${WRKSRC}/test/luac
+
+do-install:
+# Programs.
+ ${MKDIR} ${LUA_BINDIR}
+.for f in ${LUA_BIN}
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/${f} ${LUA_BINDIR}
+ ${LN} -sf ${LUA_SUBDIR}/${f} ${PREFIX}/bin/${f}-${LUA_VER}
+.endfor
+# Include files.
+ ${MKDIR} ${LUA_INCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/include/*.h ${LUA_INCDIR}
+# Libraries.
+ ${MKDIR} ${LUA_LIBDIR}
+.for f in ${LUA_LIB}
+ ${INSTALL_PROGRAM} ${WRKSRC}/lib/lib${f}.a ${LUA_LIBDIR}
+ ${INSTALL_PROGRAM} ${WRKSRC}/lib/lib${f}.so \
+ ${LUA_LIBDIR}/lib${f}-${LUA_VER}.so.${LUA_VER_SH}
+ @${LN} -sf lib${f}-${LUA_VER}.so.${LUA_VER_SH} ${LUA_LIBDIR}/lib${f}.so
+ @${LN} -sf ${LUA_SUBDIR}/lib${f}-${LUA_VER}.so.${LUA_VER_SH} \
+ ${PREFIX}/lib
+ @${LN} -sf lib${f}-${LUA_VER}.so.${LUA_VER_SH} \
+ ${PREFIX}/lib/lib${f}-${LUA_VER}.so
+.endfor
+# Manual pages.
+.for f in ${LUA_MAN}
+ ${INSTALL_MAN} ${WRKSRC}/doc/${f} \
+ ${PREFIX}/man/man1/${f:C/.1$//}-${LUA_VER}.1
+.endfor
+# Documentation.
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${DOCSDIR}
+ ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
+ cd ${WRKSRC}/doc && ${INSTALL_DATA} *.html *.gif ${DOCSDIR}
+ ${CP} -r ${WRKSRC}/etc ${WRKSRC}/test ${DOCSDIR}
+.endif
+# Module directories.
+ ${MKDIR} ${LUA_MODLIBDIR}
+ ${MKDIR} ${LUA_MODSHAREDIR}
+
+.include <bsd.port.post.mk>
diff --git a/lang/lua50/pkg-plist b/lang/lua50/pkg-plist
index ce4ed92536d9..8ed37a9a4bc4 100644
--- a/lang/lua50/pkg-plist
+++ b/lang/lua50/pkg-plist
@@ -1,18 +1,71 @@
-bin/lua
-bin/luac
-include/lauxlib.h
-include/lua.h
-include/lualib.h
-lib/liblua.a
-lib/liblua.so
-lib/liblua.so.5
-lib/liblualib.a
-lib/liblualib.so
-lib/liblualib.so.5
-%%DOCSDIR%%/contents.html
-%%DOCSDIR%%/logo.gif
-%%DOCSDIR%%/lua.html
-%%DOCSDIR%%/luac.html
-%%DOCSDIR%%/manual.html
-%%DOCSDIR%%/readme.html
-@dirrm %%DOCSDIR%%
+@exec mkdir -p %D/share/lua/%%LUA_VER%%
+@exec mkdir -p %D/lib/lua/%%LUA_VER%%
+bin/lua-%%LUA_VER%%
+%%LUA_BINDIR%%/lua
+%%LUA_BINDIR%%/luac
+bin/luac-%%LUA_VER%%
+%%LUA_INCDIR%%/lauxlib.h
+%%LUA_INCDIR%%/lua.h
+%%LUA_INCDIR%%/lualib.h
+lib/liblua-%%LUA_VER%%.so
+lib/liblua-%%LUA_VER%%.so.%%LUA_VER_SH%%
+lib/liblualib-%%LUA_VER%%.so
+lib/liblualib-%%LUA_VER%%.so.%%LUA_VER_SH%%
+%%LUA_LIBDIR%%/liblua-%%LUA_VER%%.so.%%LUA_VER_SH%%
+%%LUA_LIBDIR%%/liblua.a
+%%LUA_LIBDIR%%/liblua.so
+%%LUA_LIBDIR%%/liblualib-%%LUA_VER%%.so.%%LUA_VER_SH%%
+%%LUA_LIBDIR%%/liblualib.a
+%%LUA_LIBDIR%%/liblualib.so
+%%PORTDOCS%%%%DOCSDIR%%/README
+%%PORTDOCS%%%%DOCSDIR%%/contents.html
+%%PORTDOCS%%%%DOCSDIR%%/etc/Makefile
+%%PORTDOCS%%%%DOCSDIR%%/etc/README
+%%PORTDOCS%%%%DOCSDIR%%/etc/bin2c.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/compat.lua
+%%PORTDOCS%%%%DOCSDIR%%/etc/doall.lua
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.ico
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.magic
+%%PORTDOCS%%%%DOCSDIR%%/etc/lua.xpm
+%%PORTDOCS%%%%DOCSDIR%%/etc/luser_number.h
+%%PORTDOCS%%%%DOCSDIR%%/etc/luser_tests.h
+%%PORTDOCS%%%%DOCSDIR%%/etc/min.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/noparser.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/saconfig.c
+%%PORTDOCS%%%%DOCSDIR%%/etc/trace.c
+%%PORTDOCS%%%%DOCSDIR%%/logo.gif
+%%PORTDOCS%%%%DOCSDIR%%/lua.html
+%%PORTDOCS%%%%DOCSDIR%%/luac.html
+%%PORTDOCS%%%%DOCSDIR%%/manual.html
+%%PORTDOCS%%%%DOCSDIR%%/readme.html
+%%PORTDOCS%%%%DOCSDIR%%/test/README
+%%PORTDOCS%%%%DOCSDIR%%/test/bisect.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/cf.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/echo.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/env.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/factorial.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/fib.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/fibfor.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/globals.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/hello.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/life.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/luac.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/printf.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/readonly.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/sieve.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/sort.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/table.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/trace-calls.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/trace-globals.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/undefined.lua
+%%PORTDOCS%%%%DOCSDIR%%/test/xd.lua
+@dirrm share/lua/%%LUA_VER%%
+@dirrmtry share/lua
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/test
+%%PORTDOCS%%@dirrm %%DOCSDIR%%/etc
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+@dirrm %%LUA_LIBDIR%%
+@dirrm lib/lua/%%LUA_VER%%
+@dirrmtry lib/lua
+@dirrm %%LUA_INCDIR%%
+@dirrm %%LUA_BINDIR%%
diff --git a/lang/ruby-lua4/Makefile b/lang/ruby-lua4/Makefile
index a123e4cd649a..cadd68d71d47 100644
--- a/lang/ruby-lua4/Makefile
+++ b/lang/ruby-lua4/Makefile
@@ -11,28 +11,33 @@ CATEGORIES= lang ruby
MASTER_SITES= ${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR= knu
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
-PKGNAMESUFFIX= 4
DISTNAME= ruby${PORTNAME}-${PORTVERSION}
DIST_SUBDIR= ruby
MAINTAINER= ports@FreeBSD.org
COMMENT= A Ruby extension to make Lua script language as a class
-LIB_DEPENDS= lua.4:${PORTSDIR}/lang/lua4
-
-CONFLICTS= ${RUBY_PKGNAMEPREFIX}lua5-[0-9]*
-
+USE_LUA= 4.0
USE_ZIP= yes
USE_RUBY= yes
USE_RUBY_EXTCONF= yes
RUBY_EXTCONF= luaconf.rb
+RUBY_MODNAME= ${PORTNAME}-${LUA_VER}
NO_WRKSUBDIR= yes
INSTALL_TARGET= site-install
EXAMPLES= html_ssi_lua.rb test_*
+post-patch:
+ @${REINPLACE_CMD} -Ee 's/[[:<:]](lua(lib)?)[[:>:]]/\1-${LUA_VER}/' \
+ ${WRKSRC}/${RUBY_EXTCONF}
+
+post-configure:
+ @${REINPLACE_CMD} -Ee 's|^(CPPFLAGS =.*)|\1 -I${LUA_INCDIR}|' \
+ ${WRKSRC}/${MAKEFILE}
+
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${RUBY_MODEXAMPLESDIR}
diff --git a/lang/ruby-lua4/pkg-plist b/lang/ruby-lua4/pkg-plist
index dff815fb1d93..ca609f492d67 100644
--- a/lang/ruby-lua4/pkg-plist
+++ b/lang/ruby-lua4/pkg-plist
@@ -1,4 +1,4 @@
-%%RUBY_SITEARCHLIBDIR%%/lua.so
+%%RUBY_SITEARCHLIBDIR%%/lua-%%LUA_VER%%.so
%%PORTDOCS%%%%RUBY_MODDOCDIR%%/rubylua.txt
%%PORTDOCS%%@dirrm %%RUBY_MODDOCDIR%%
%%PORTDOCS%%%%RUBY_MODEXAMPLESDIR%%/html_ssi_lua.rb
diff --git a/lang/tolua++/Makefile b/lang/tolua++/Makefile
index e6d1d950c890..5df222084a30 100644
--- a/lang/tolua++/Makefile
+++ b/lang/tolua++/Makefile
@@ -9,7 +9,7 @@ PORTNAME= tolua++
PORTVERSION= 1.0.4
CATEGORIES= lang devel
MASTER_SITES= http://www.codenix.com/~tolua/
-DISTNAME= tolua++-current
+DISTFILES= tolua++-current${EXTRACT_SUFX}
MAINTAINER= aaron@FreeBSD.org
COMMENT= An extended version of tolua, a tool to integrate C/C++ code with Lua
@@ -22,6 +22,12 @@ USE_BZIP2= yes
INSTALLS_SHLIB= yes
NO_BUILD= yes
+post-patch:
+.for f in LOCALBASE LUA_VER LUA_INCDIR LUA_LIBDIR
+ @${REINPLACE_CMD} -i "" -e 's|%%${f}%%|${${f}}|g' \
+ ${WRKSRC}/config_posix.py
+.endfor
+
do-build:
@cd ${WRKSRC} && scons
diff --git a/lang/tolua++/files/patch-config_posix.py b/lang/tolua++/files/patch-config_posix.py
index f6771d7e4d4c..3d001f49dd63 100644
--- a/lang/tolua++/files/patch-config_posix.py
+++ b/lang/tolua++/files/patch-config_posix.py
@@ -1,18 +1,20 @@
---- config_posix.py.orig Thu Jan 20 20:01:08 2005
-+++ config_posix.py Wed Jan 18 11:05:32 2006
+--- ./config_posix.py.orig Fri Jan 21 00:01:08 2005
++++ ./config_posix.py Sun Aug 27 14:25:40 2006
@@ -5,7 +5,7 @@
# flags for the compiler
#CCFLAGS = []
-CCFLAGS = ['-O2', '-ansi', '-Wall']
-+CCFLAGS = ['-O2', '-ansi', '-Wall', '-I/usr/local/include']
++CCFLAGS = ['-O2', '-ansi', '-Wall', '-I%%LOCALBASE%%/include', '-I%%LUA_INCDIR%%']
# this is the default directory for installation. Files will be installed on
# <prefix>/bin, <prefix>/lib and <prefix>/include when you run 'scons install'
-@@ -17,5 +17,5 @@
+@@ -16,6 +16,6 @@
+ prefix = '/usr/local'
# libraries
- LIBS = ['lua', 'lualib', 'm']
+-LIBS = ['lua', 'lualib', 'm']
-
-+LINKFLAGS = ['-L/usr/local/lib']
++LIBS = ['lua-%%LUA_VER%%', 'lualib-%%LUA_VER%%', 'm']
++LINKFLAGS = ['-L%%LOCALBASE%%/lib', '-L%%LUA_LIBDIR%%']
diff --git a/lang/tolua++50/Makefile b/lang/tolua++50/Makefile
index e6d1d950c890..5df222084a30 100644
--- a/lang/tolua++50/Makefile
+++ b/lang/tolua++50/Makefile
@@ -9,7 +9,7 @@ PORTNAME= tolua++
PORTVERSION= 1.0.4
CATEGORIES= lang devel
MASTER_SITES= http://www.codenix.com/~tolua/
-DISTNAME= tolua++-current
+DISTFILES= tolua++-current${EXTRACT_SUFX}
MAINTAINER= aaron@FreeBSD.org
COMMENT= An extended version of tolua, a tool to integrate C/C++ code with Lua
@@ -22,6 +22,12 @@ USE_BZIP2= yes
INSTALLS_SHLIB= yes
NO_BUILD= yes
+post-patch:
+.for f in LOCALBASE LUA_VER LUA_INCDIR LUA_LIBDIR
+ @${REINPLACE_CMD} -i "" -e 's|%%${f}%%|${${f}}|g' \
+ ${WRKSRC}/config_posix.py
+.endfor
+
do-build:
@cd ${WRKSRC} && scons
diff --git a/lang/tolua++50/files/patch-config_posix.py b/lang/tolua++50/files/patch-config_posix.py
index f6771d7e4d4c..3d001f49dd63 100644
--- a/lang/tolua++50/files/patch-config_posix.py
+++ b/lang/tolua++50/files/patch-config_posix.py
@@ -1,18 +1,20 @@
---- config_posix.py.orig Thu Jan 20 20:01:08 2005
-+++ config_posix.py Wed Jan 18 11:05:32 2006
+--- ./config_posix.py.orig Fri Jan 21 00:01:08 2005
++++ ./config_posix.py Sun Aug 27 14:25:40 2006
@@ -5,7 +5,7 @@
# flags for the compiler
#CCFLAGS = []
-CCFLAGS = ['-O2', '-ansi', '-Wall']
-+CCFLAGS = ['-O2', '-ansi', '-Wall', '-I/usr/local/include']
++CCFLAGS = ['-O2', '-ansi', '-Wall', '-I%%LOCALBASE%%/include', '-I%%LUA_INCDIR%%']
# this is the default directory for installation. Files will be installed on
# <prefix>/bin, <prefix>/lib and <prefix>/include when you run 'scons install'
-@@ -17,5 +17,5 @@
+@@ -16,6 +16,6 @@
+ prefix = '/usr/local'
# libraries
- LIBS = ['lua', 'lualib', 'm']
+-LIBS = ['lua', 'lualib', 'm']
-
-+LINKFLAGS = ['-L/usr/local/lib']
++LIBS = ['lua-%%LUA_VER%%', 'lualib-%%LUA_VER%%', 'm']
++LINKFLAGS = ['-L%%LOCALBASE%%/lib', '-L%%LUA_LIBDIR%%']
diff --git a/lang/tolua/Makefile b/lang/tolua/Makefile
index 02c083a00bda..6e07b3331eff 100644
--- a/lang/tolua/Makefile
+++ b/lang/tolua/Makefile
@@ -15,15 +15,25 @@ MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/users/celes/tolua/ \
MAINTAINER= edwin@mavetju.org
COMMENT= toLua: accessing C/C++ code from Lua
-LIB_DEPENDS= lua:${PORTSDIR}/lang/lua50
-
-WRKSRC= ${WRKDIR}/${PORTNAME}-5.0
USE_GMAKE= yes
-CONFLICTS= tolua4-.*
+USE_LUA= 5.0
+WRKSRC= ${WRKDIR}/${PORTNAME}-5.0
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|make|$${MAKE}|' ${WRKSRC}/${MAKEFILE}
+ @${REINPLACE_CMD} -Ee \
+ 's|^(CC=).*|\1 ${CC}|; \
+ s|^(CCPP=).*|\1 ${CXX}|; \
+ s|^(LUA=).*|\1 ${LOCALBASE}|; \
+ s|^(LUA(INC\|LIB)=).*|\1 $${LUA_\2DIR}|; \
+ s|^(CPPFLAGS)(=.*)|\1+\2 -lstdc++|; \
+ s|^(CFLAGS)(=.*)|\1+\2|;' \
+ ${WRKSRC}/config
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/include/tolua.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKSRC}/lib/libtolua.a ${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua ${LUA_BINDIR}
+ ${LN} -sf ${LUA_SUBDIR}/tolua ${PREFIX}/bin/tolua-${LUA_VER}
+ ${INSTALL_DATA} ${WRKSRC}/include/tolua.h ${LUA_INCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/lib/libtolua.a ${LUA_LIBDIR}
.include <bsd.port.mk>
diff --git a/lang/tolua/files/patch-Makefile b/lang/tolua/files/patch-Makefile
index ea3d00107550..e69de29bb2d1 100644
--- a/lang/tolua/files/patch-Makefile
+++ b/lang/tolua/files/patch-Makefile
@@ -1,22 +0,0 @@
---- Makefile.orig Thu Jul 31 23:27:52 2003
-+++ Makefile Sun Nov 21 18:50:08 2004
-@@ -1,13 +1,13 @@
- # makefile for tolua hierarchy
-
- tolua:
-- cd src/lib; make all
-- cd src/bin; make all
-+ cd src/lib; ${MAKE} all
-+ cd src/bin; ${MAKE} all
-
- tests:
-- cd src/tests; make all
-+ cd src/tests; ${MAKE} all
-
- all clean klean:
-- cd src/lib; make $@
-- cd src/bin; make $@
-- cd src/tests; make $@
-+ cd src/lib; ${MAKE} $@
-+ cd src/bin; ${MAKE} $@
-+ cd src/tests; ${MAKE} $@
diff --git a/lang/tolua/files/patch-config b/lang/tolua/files/patch-config
index 1bd699de6573..e69de29bb2d1 100644
--- a/lang/tolua/files/patch-config
+++ b/lang/tolua/files/patch-config
@@ -1,30 +0,0 @@
---- config.orig Tue Jun 8 06:09:19 2004
-+++ config Sun Nov 21 19:24:24 2004
-@@ -3,8 +3,9 @@
- # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================
-
- # you need an ANSI C compiler. gcc is a popular one.
--CC= gcc
--CCPP = g++
-+#CC= ${CC}
-+CC = cc
-+CCPP = c++
- WARN= -ansi -Wall
-
- # on SGI's, cc is ANSI.
-@@ -22,6 +23,7 @@
-
- # set lua path
- LUA=/usr/local/lua-5.0
-+LUA=${LOCALBASE}
- LUAINC=$(LUA)/include
- LUALIB=$(LUA)/lib
-
-@@ -30,5 +32,5 @@
- INC= -I$(TOLUA)/include -I$(LUAINC)
- LIB= -L$(TOLUA)/lib -L$(LUALIB)
-
--CFLAGS= -O2 $(WARN) $(INC)
--CPPFLAGS= -O2 $(WARN) $(INC)
-+CFLAGS+= -O2 $(WARN) $(INC)
-+CPPFLAGS+= -O2 $(WARN) $(INC) -lstdc++
diff --git a/lang/tolua/pkg-plist b/lang/tolua/pkg-plist
index 488452014d8f..ef0070c93b27 100644
--- a/lang/tolua/pkg-plist
+++ b/lang/tolua/pkg-plist
@@ -1,3 +1,4 @@
-bin/tolua
-lib/libtolua.a
-include/tolua.h
+%%LUA_BINDIR%%/tolua
+bin/tolua-%%LUA_VER%%
+%%LUA_LIBDIR%%/libtolua.a
+%%LUA_INCDIR%%/tolua.h
diff --git a/lang/tolua4/Makefile b/lang/tolua4/Makefile
index 9330f0722101..c0534a2dd6b6 100644
--- a/lang/tolua4/Makefile
+++ b/lang/tolua4/Makefile
@@ -6,7 +6,7 @@
# $FreeBSD$
#
-PORTNAME= tolua4
+PORTNAME= tolua
PORTVERSION= 4.0a
CATEGORIES= lang
MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/users/celes/tolua/ \
@@ -16,15 +16,24 @@ DISTNAME= tolua-4.0a
MAINTAINER= edwin@mavetju.org
COMMENT= toLua: accessing C/C++ code from Lua
-LIB_DEPENDS= lua.4:${PORTSDIR}/lang/lua4
-
-WRKSRC= ${WRKDIR}/tolua
USE_GMAKE= yes
-CONFLICTS= tolua-5.*
+USE_LUA= 4.0
+WRKSRC= ${WRKDIR}/tolua
+
+LATEST_LINK= ${PORTNAME}${LUA_VER_STR}
+
+post-patch:
+ @${REINPLACE_CMD} -Ee \
+ 's|^(CC=).*|\1 ${CC}|; \
+ s|^(LUA=).*|\1 ${LOCALBASE}|; \
+ s|^(LUA(INC\|LIB)=.*)|\1/lua${LUA_VER_STR}|; \
+ s|^(CFLAGS)(=.*)|\1+\2|;' \
+ ${WRKSRC}/config
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/include/tolua.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKSRC}/lib/libtolua.a ${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua ${LUA_BINDIR}
+ ${LN} -sf ${LUA_SUBDIR}/tolua ${PREFIX}/bin/tolua-${LUA_VER}
+ ${INSTALL_DATA} ${WRKSRC}/include/tolua.h ${LUA_INCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/lib/libtolua.a ${LUA_LIBDIR}
.include <bsd.port.mk>
diff --git a/lang/tolua4/files/patch-config b/lang/tolua4/files/patch-config
index 1786f1f143e2..e69de29bb2d1 100644
--- a/lang/tolua4/files/patch-config
+++ b/lang/tolua4/files/patch-config
@@ -1,26 +0,0 @@
---- config.orig Sun Nov 21 20:12:01 2004
-+++ config Sun Nov 21 20:12:39 2004
-@@ -3,7 +3,7 @@
- # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================
-
- # you need an ANSI C compiler. gcc is a popular one.
--CC= gcc
-+#CC= gcc
- WARN= -ansi -Wall
-
- # on SGI's, cc is ANSI.
-@@ -20,7 +20,7 @@
- AR= ar rcu
-
- # set lua path
--LUA=/usr/local/lua
-+LUA=${LOCALBASE}
- LUAINC=$(LUA)/include
- LUALIB=$(LUA)/lib
-
-@@ -29,4 +29,4 @@
- INC= -I$(LUAINC) -I$(TOLUA)/include
- LIB= -L$(LUALIB)
-
--CFLAGS= -O2 $(WARN) $(INC)
-+CFLAGS+= -O2 $(WARN) $(INC)
diff --git a/lang/tolua4/pkg-plist b/lang/tolua4/pkg-plist
index 488452014d8f..6348f5bce05b 100644
--- a/lang/tolua4/pkg-plist
+++ b/lang/tolua4/pkg-plist
@@ -1,3 +1,4 @@
-bin/tolua
-lib/libtolua.a
-include/tolua.h
+%%LUA_BINDIR%%/tolua
+bin/tolua-%%LUA_VER%%
+%%LUA_INCDIR%%/tolua.h
+%%LUA_LIBDIR%%/libtolua.a
diff --git a/lang/tolua50/Makefile b/lang/tolua50/Makefile
index 02c083a00bda..6e07b3331eff 100644
--- a/lang/tolua50/Makefile
+++ b/lang/tolua50/Makefile
@@ -15,15 +15,25 @@ MASTER_SITES= ftp://ftp.tecgraf.puc-rio.br/pub/users/celes/tolua/ \
MAINTAINER= edwin@mavetju.org
COMMENT= toLua: accessing C/C++ code from Lua
-LIB_DEPENDS= lua:${PORTSDIR}/lang/lua50
-
-WRKSRC= ${WRKDIR}/${PORTNAME}-5.0
USE_GMAKE= yes
-CONFLICTS= tolua4-.*
+USE_LUA= 5.0
+WRKSRC= ${WRKDIR}/${PORTNAME}-5.0
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|make|$${MAKE}|' ${WRKSRC}/${MAKEFILE}
+ @${REINPLACE_CMD} -Ee \
+ 's|^(CC=).*|\1 ${CC}|; \
+ s|^(CCPP=).*|\1 ${CXX}|; \
+ s|^(LUA=).*|\1 ${LOCALBASE}|; \
+ s|^(LUA(INC\|LIB)=).*|\1 $${LUA_\2DIR}|; \
+ s|^(CPPFLAGS)(=.*)|\1+\2 -lstdc++|; \
+ s|^(CFLAGS)(=.*)|\1+\2|;' \
+ ${WRKSRC}/config
do-install:
- ${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua ${PREFIX}/bin
- ${INSTALL_DATA} ${WRKSRC}/include/tolua.h ${PREFIX}/include
- ${INSTALL_DATA} ${WRKSRC}/lib/libtolua.a ${PREFIX}/lib
+ ${INSTALL_PROGRAM} ${WRKSRC}/bin/tolua ${LUA_BINDIR}
+ ${LN} -sf ${LUA_SUBDIR}/tolua ${PREFIX}/bin/tolua-${LUA_VER}
+ ${INSTALL_DATA} ${WRKSRC}/include/tolua.h ${LUA_INCDIR}
+ ${INSTALL_DATA} ${WRKSRC}/lib/libtolua.a ${LUA_LIBDIR}
.include <bsd.port.mk>
diff --git a/lang/tolua50/files/patch-Makefile b/lang/tolua50/files/patch-Makefile
index ea3d00107550..e69de29bb2d1 100644
--- a/lang/tolua50/files/patch-Makefile
+++ b/lang/tolua50/files/patch-Makefile
@@ -1,22 +0,0 @@
---- Makefile.orig Thu Jul 31 23:27:52 2003
-+++ Makefile Sun Nov 21 18:50:08 2004
-@@ -1,13 +1,13 @@
- # makefile for tolua hierarchy
-
- tolua:
-- cd src/lib; make all
-- cd src/bin; make all
-+ cd src/lib; ${MAKE} all
-+ cd src/bin; ${MAKE} all
-
- tests:
-- cd src/tests; make all
-+ cd src/tests; ${MAKE} all
-
- all clean klean:
-- cd src/lib; make $@
-- cd src/bin; make $@
-- cd src/tests; make $@
-+ cd src/lib; ${MAKE} $@
-+ cd src/bin; ${MAKE} $@
-+ cd src/tests; ${MAKE} $@
diff --git a/lang/tolua50/files/patch-config b/lang/tolua50/files/patch-config
index 1bd699de6573..e69de29bb2d1 100644
--- a/lang/tolua50/files/patch-config
+++ b/lang/tolua50/files/patch-config
@@ -1,30 +0,0 @@
---- config.orig Tue Jun 8 06:09:19 2004
-+++ config Sun Nov 21 19:24:24 2004
-@@ -3,8 +3,9 @@
- # == CHANGE THE SETTINGS BELOW TO SUIT YOUR ENVIRONMENT ======================
-
- # you need an ANSI C compiler. gcc is a popular one.
--CC= gcc
--CCPP = g++
-+#CC= ${CC}
-+CC = cc
-+CCPP = c++
- WARN= -ansi -Wall
-
- # on SGI's, cc is ANSI.
-@@ -22,6 +23,7 @@
-
- # set lua path
- LUA=/usr/local/lua-5.0
-+LUA=${LOCALBASE}
- LUAINC=$(LUA)/include
- LUALIB=$(LUA)/lib
-
-@@ -30,5 +32,5 @@
- INC= -I$(TOLUA)/include -I$(LUAINC)
- LIB= -L$(TOLUA)/lib -L$(LUALIB)
-
--CFLAGS= -O2 $(WARN) $(INC)
--CPPFLAGS= -O2 $(WARN) $(INC)
-+CFLAGS+= -O2 $(WARN) $(INC)
-+CPPFLAGS+= -O2 $(WARN) $(INC) -lstdc++
diff --git a/lang/tolua50/pkg-plist b/lang/tolua50/pkg-plist
index 488452014d8f..ef0070c93b27 100644
--- a/lang/tolua50/pkg-plist
+++ b/lang/tolua50/pkg-plist
@@ -1,3 +1,4 @@
-bin/tolua
-lib/libtolua.a
-include/tolua.h
+%%LUA_BINDIR%%/tolua
+bin/tolua-%%LUA_VER%%
+%%LUA_LIBDIR%%/libtolua.a
+%%LUA_INCDIR%%/tolua.h
diff --git a/mail/imapfilter/Makefile b/mail/imapfilter/Makefile
index 5f41a032bce3..41b1d2569d56 100644
--- a/mail/imapfilter/Makefile
+++ b/mail/imapfilter/Makefile
@@ -13,35 +13,39 @@ MASTER_SITES= http://imapfilter.hellug.gr/source/
MAINTAINER= stefan@FreeBSD.org
COMMENT= IMAP mail filtering utility
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.hpp:${PORTSDIR}/lang/lua
-
USE_BZIP2= yes
+USE_LUA= 5.1
USE_OPENSSL= yes
HAS_CONFIGURE= yes
CONFIGURE_ARGS= -d ${PREFIX} -s ${DATADIR}
+CPPFLAGS= -I${LOCALBASE}/include -I${LUA_INCDIR}
+LDFLAGS= -L${LOCALBASE}/lib -L${LUA_LIBDIR}
MAN1= imapfilter.1
MAN5= imapfilter_config.5
PORTDOCS= LICENSE NEWS README
PLIST_FILES= bin/imapfilter \
- ${DATADIR:S%${PREFIX}/%%}/interface.lua \
- ${DATADIR:S%${PREFIX}/%%}/auxiliary.lua \
- ${EXAMPLESDIR:S%${PREFIX}/%%}/sample.config.lua \
- ${EXAMPLESDIR:S%${PREFIX}/%%}/sample.extend.lua
-PLIST_DIRS= ${DATADIR:S%${PREFIX}/%%} ${EXAMPLESDIR:S%${PREFIX}/%%}
+ %%DATADIR%%/interface.lua \
+ %%DATADIR%%/auxiliary.lua \
+ %%EXAMPLESDIR%%/sample.config.lua \
+ %%EXAMPLESDIR%%/sample.extend.lua
+PLIST_DIRS= %%DATADIR%% %%EXAMPLESDIR%%
post-patch:
- ${REINPLACE_CMD} -e "s,%%PREFIX%%,${PREFIX},g" ${WRKSRC}/configure
- ${REINPLACE_CMD} -e "s,%%LOCALBASE%%,${LOCALBASE},g" ${WRKSRC}/configure
+ @${REINPLACE_CMD} -Ee \
+ 's|^(incdirs=).*|\1"${CPPFLAGS}"| ; \
+ s|^(libdirs=).*|\1"${LDFLAGS}"| ; \
+ s|^(mycflags=).*|\1"${CFLAGS}"| ; \
+ s|-llualib||' \
+ ${WRKSRC}/configure
post-install:
${STRIP_CMD} ${PREFIX}/bin/imapfilter
- @${MKDIR} ${DATADIR}
- cd ${WRKSRC} && ${INSTALL_DATA} interface.lua \
- auxiliary.lua ${DATADIR}
- @${MKDIR} ${EXAMPLESDIR}
- cd ${WRKSRC} && ${INSTALL_DATA} sample.config.lua \
- sample.extend.lua ${EXAMPLESDIR}
+ @${MKDIR} ${DATADIR} ${EXAMPLESDIR}
+ cd ${WRKSRC} && \
+ ${INSTALL_DATA} interface.lua auxiliary.lua ${DATADIR} && \
+ ${INSTALL_DATA} sample.config.lua sample.extend.lua \
+ ${EXAMPLESDIR}
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
diff --git a/mail/imapfilter/files/patch-configure b/mail/imapfilter/files/patch-configure
index 4e6b39d8b00b..e69de29bb2d1 100644
--- a/mail/imapfilter/files/patch-configure
+++ b/mail/imapfilter/files/patch-configure
@@ -1,73 +0,0 @@
---- configure.orig Thu Mar 9 23:58:22 2006
-+++ configure Fri May 26 21:52:12 2006
-@@ -2,7 +2,7 @@
-
- # Default values
-
--destdir="/usr/local"
-+destdir="%%PREFIX%%"
- bindir="$destdir/bin"
- sharedir="$destdir/share/imapfilter"
- mandir="$destdir/man"
-@@ -10,13 +10,13 @@
- ssltls="yes"
- crammd5="yes"
-
--incdirs="-I/usr/local/include"
--libdirs="-L/usr/local/lib"
-+incdirs="-I%%LOCALBASE%%/include"
-+libdirs="-L%%LOCALBASE%%/lib"
-
- mycflags="-Wall -O"
- myldflags=""
-
--libs="-lm -llua -llualib"
-+libs="-lm -llua"
- libssl="-lssl"
- libcrypto="-lcrypto"
-
-@@ -145,16 +145,16 @@
- SHAREDIR = $sharedir
- MANDIR = $mandir
-
-+INST_BIN = \$(BSD_INSTALL_PROGRAM)
-+INST_DOC = \$(BSD_INSTALL_MAN)
-+
- INCDIRS = $incdirs
- LIBDIRS = $libdirs
-
--MYCFLAGS = $mycflags
--MYLDFLAGS = $myldflags
--
- DEFS = $defs
-
--CFLAGS = \$(MYCFLAGS) \$(DEFS) \$(INCDIRS)
--LDFLAGS = \$(MYLDFLAGS) \$(LIBDIRS)
-+CFLAGS += \$(DEFS) \$(INCDIRS)
-+LDFLAGS += \$(LIBDIRS)
-
- LIBS = $libs
-
-@@ -184,19 +184,9 @@
- imapfilter.o: version.h
-
- install: \$(BIN)
-- if test ! -d \$(BINDIR); then mkdir -p \$(BINDIR); fi
-- cp -f \$(BIN) \$(BINDIR) && chmod 0755 \$(BINDIR)/\$(BIN)
-- if test ! -d \$(SHAREDIR); then mkdir -p \$(SHAREDIR); fi
-- cp -f \$(INTERFACE_LUA) \$(SHAREDIR) && \\
-- chmod 0644 \$(SHAREDIR)/\$(INTERFACE_LUA)
-- cp -f \$(AUXILIARY_LUA) \$(SHAREDIR) && \\
-- chmod 0644 \$(SHAREDIR)/\$(AUXILIARY_LUA)
-- if test ! -d \$(MANDIR)/man1; then mkdir -p \$(MANDIR)/man1; fi
-- cp -f \$(MAN_BIN) \$(MANDIR)/man1 && \\
-- chmod 0644 \$(MANDIR)/man1/\$(MAN_BIN)
-- if test ! -d \$(MANDIR)/man5; then mkdir -p \$(MANDIR)/man5; fi
-- cp -f \$(MAN_CONFIG) \$(MANDIR)/man5 && \\
-- chmod 0644 \$(MANDIR)/man5/\$(MAN_CONFIG)
-+ \$(INST_BIN) \$(BIN) \$(BINDIR)
-+ \$(INST_DOC) \$(MAN_BIN) \$(MANDIR)/man1
-+ \$(INST_DOC) \$(MAN_CONFIG) \$(MANDIR)/man5
-
- deinstall:
- rm -f \$(BINDIR)/\$(BIN) \$(SHAREDIR)/\$(INTERFACE_LUA) \\
diff --git a/net-p2p/verlihub-plugins/Makefile b/net-p2p/verlihub-plugins/Makefile
index 3f170a029d17..ee493491f001 100644
--- a/net-p2p/verlihub-plugins/Makefile
+++ b/net-p2p/verlihub-plugins/Makefile
@@ -16,17 +16,18 @@ MAINTAINER= hurbold@yahoo.com
COMMENT= Plugins for the Verlihub Linux/Unix Direct Connect Hub Software
BUILD_DEPENDS= ${LOCALBASE}/bin/verlihub:${PORTSDIR}/net-p2p/verlihub
-LIB_DEPENDS= lua.5:${PORTSDIR}/lang/lua50
WRKSRC= ${WRKDIR}/vh_plugins-0.1
USE_GMAKE= yes
+USE_LUA= 5.0
+USE_GCC= 3.3
GNU_CONFIGURE= yes
INSTALLS_SHLIB= yes
LDCONFIG_DIRS= %%PREFIX%%/include/verlihub
-CONFIGURE_ENV+= CPPFLAGS="-I${LOCALBASE}/include -I${LOCALBASE}/include/verlihub -I${LOCALBASE}/include/mysql"
-
-DATADIR= ${PREFIX}/share/${PORTNAME}
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
+CPPFLAGS= -I${LOCALBASE}/include -I${LOCALBASE}/include/verlihub -I${LOCALBASE}/include/mysql -I${LUA_INCDIR}
+LDFLAGS= -L${LUA_LIBDIR}
post-install:
@${MKDIR} ${DATADIR}
@@ -45,14 +46,6 @@ post-install:
.include <bsd.port.pre.mk>
-.if ${OSVERSION} < 502010
-USE_GCC= 3.3
-.endif
-
-.if ${OSVERSION} > 502126
-BROKEN= Does not compile with gcc 3.4
-.endif
-
.if ${PERL_LEVEL} < 500800
IGNORE= requires perl 5.8 or later. Install lang/perl5.8 and try again
.endif
diff --git a/textproc/ruby-xml-script/Makefile b/textproc/ruby-xml-script/Makefile
index 087554cf8bfd..bca691dcb596 100644
--- a/textproc/ruby-xml-script/Makefile
+++ b/textproc/ruby-xml-script/Makefile
@@ -16,9 +16,10 @@ DIST_SUBDIR= ruby
MAINTAINER= ports@FreeBSD.org
COMMENT= A Ruby module for scripting an XML stream using an ASP-like notation
-RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/js.so:${PORTSDIR}/lang/ruby-js \
- ${RUBY_SITEARCHLIBDIR}/lua.so:${PORTSDIR}/lang/ruby-lua4
+RUN_DEPENDS= ${RUBY_SITEARCHLIBDIR}/js.so:${PORTSDIR}/lang/ruby-js
+USE_LUA= 4.0
+LUA_COMPS= ruby
USE_RUBY= yes
USE_RUBY_SETUP= yes
@@ -28,6 +29,10 @@ DOCS= AUTHORS \
README
EXAMPLES= tests/*
+post-patch:
+ @${REINPLACE_CMD} -Ee 's|(language/lua)|\1-${LUA_VER}|' \
+ ${WRKSRC}/lib/xml/script/lua/compiler.rb
+
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${RUBY_MODEXAMPLESDIR}
diff --git a/www/elinks/Makefile b/www/elinks/Makefile
index dfc521f0941f..7ea3ff7f9634 100644
--- a/www/elinks/Makefile
+++ b/www/elinks/Makefile
@@ -74,8 +74,10 @@ CONFIGURE_ARGS+= --without-guile
.endif
.if defined(WITH_LUASCRIPT)
-LIB_DEPENDS+= lua:${PORTSDIR}/lang/lua50
+USE_LUA= 5.0
CONFIGURE_ARGS+= --with-lua
+CPPFLAGS+= -I${LUA_INCDIR}
+LDFLAGS+= -L${LUA_LIBDIR}
.else
CONFIGURE_ARGS+= --without-lua
.endif
diff --git a/www/lighttpd/Makefile b/www/lighttpd/Makefile
index 6d7ccb94afbb..764563be7cbb 100644
--- a/www/lighttpd/Makefile
+++ b/www/lighttpd/Makefile
@@ -64,9 +64,9 @@ CONFIGURE_ARGS+= --disable-ipv6
.endif
.if defined(WITH_CML)
-LIB_DEPENDS+= lua.5:${PORTSDIR}/lang/lua50
+USE_LUA= 5.0
CONFIGURE_ARGS+= --with-lua
-CONFIGURE_ENV+= CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L/${LOCALBASE}/lib
+CONFIGURE_ENV+= CPPFLAGS="-I${LUA_INCDIR}" LDFLAGS="-L${LUA_LIBDIR}"
.endif
SUB_LIST+= REQUIRE="${_REQUIRE}"
diff --git a/x11-wm/ion-2/Makefile b/x11-wm/ion-2/Makefile
index 5bdd1fc06fdd..265f3aaa118f 100644
--- a/x11-wm/ion-2/Makefile
+++ b/x11-wm/ion-2/Makefile
@@ -15,15 +15,14 @@ MASTER_SITES= http://modeemi.fi/~tuomov/ion/dl/
MAINTAINER= anthony.ginepro@laposte.net
COMMENT= Ion is a tiling tabbed window manager
-LIB_DEPENDS= lua.5:${PORTSDIR}/lang/lua50
-
CONFLICTS= ion-2002* ion-devel-* pwm-*
-GNU_CONFIGURE= yes
-USE_AUTOTOOLS= libtool:15 libltdl:15
USE_X_PREFIX= yes
+USE_AUTOTOOLS= libtool:15 libltdl:15
+USE_LUA= 5.0
USE_GMAKE= yes
MAKE_ENV= DEFINES="${IONDEFINES}"
+GNU_CONFIGURE= yes
.if !defined(WITH_MULTIBYTE)
IONDEFINES+= -DCF_NO_MB_SUPPORT
diff --git a/x11-wm/ion-2/files/patch-rules.mk b/x11-wm/ion-2/files/patch-rules.mk
index 0dbc8606502d..5e7292efdd52 100644
--- a/x11-wm/ion-2/files/patch-rules.mk
+++ b/x11-wm/ion-2/files/patch-rules.mk
@@ -1,5 +1,5 @@
---- rules.mk Wed Apr 7 09:15:54 2004
-+++ rules.mk.bsd Sun Apr 11 12:55:10 2004
+--- ./rules.mk.orig Thu Jul 29 00:10:32 2004
++++ ./rules.mk Mon Jul 17 21:50:19 2006
@@ -91,6 +91,7 @@
module_install:
$(INSTALLDIR) $(MODULEDIR)
diff --git a/x11-wm/ion-2/files/patch-system.mk b/x11-wm/ion-2/files/patch-system.mk
index 37e33a105ee9..80061f5ff69e 100644
--- a/x11-wm/ion-2/files/patch-system.mk
+++ b/x11-wm/ion-2/files/patch-system.mk
@@ -1,5 +1,5 @@
---- system.mk.orig Tue Jun 1 16:35:23 2004
-+++ system.mk Sat Jun 5 13:27:08 2004
+--- ./system.mk.orig Thu Jul 29 00:10:32 2004
++++ ./system.mk Mon Jul 17 21:53:01 2006
@@ -7,7 +7,7 @@
## Installation paths
##
@@ -33,15 +33,23 @@
# The following should do it if you have manually installed libtool 1.5 in
# $(LIBTOOLDIR).
-@@ -72,7 +72,7 @@
+@@ -72,11 +72,11 @@
# If you have installed Lua 5.0 from the official tarball without changing
# paths, this should do it.
-LUA_DIR=/usr/local
+-LUA_LIBS = -L$(LUA_DIR)/lib -R$(LUA_DIR)/lib -llua -llualib
+-LUA_INCLUDES = -I$(LUA_DIR)/include
+-LUA=$(LUA_DIR)/bin/lua
+-LUAC=$(LUA_DIR)/bin/luac
+LUA_DIR=$(LOCALBASE)
- LUA_LIBS = -L$(LUA_DIR)/lib -R$(LUA_DIR)/lib -llua -llualib
- LUA_INCLUDES = -I$(LUA_DIR)/include
- LUA=$(LUA_DIR)/bin/lua
++LUA_LIBS = -L$(LUA_LIBDIR) -R$(LUA_LIBDIR) -llua -llualib
++LUA_INCLUDES = -I$(LUA_INCDIR)
++LUA=$(LUA_BINDIR)/lua
++LUAC=$(LUA_BINDIR)/luac
+
+ # If you are using the Debian packages, the following settings should be
+ # what you want.
@@ -90,7 +90,7 @@
## X libraries, includes and options
##
diff --git a/x11-wm/ion-3/Makefile b/x11-wm/ion-3/Makefile
index 42f99ece8fc0..c9c3ffef7b4b 100644
--- a/x11-wm/ion-3/Makefile
+++ b/x11-wm/ion-3/Makefile
@@ -13,12 +13,12 @@ MASTER_SITES= http://modeemi.fi/~tuomov/dl/
MAINTAINER= ed@fxq.nl
COMMENT= The development version of the Ion window manager
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.hpp:${PORTSDIR}/lang/lua
RUN_DEPENDS= run-mailcap:${PORTSDIR}/misc/mime-support
USE_X_PREFIX= yes
USE_GETTEXT= yes
USE_GMAKE= yes
+USE_LUA= 5.1
MAKE_ENV= DEFINES="${IONDEFINES}"
.if !defined(WITH_XINERAMA)
diff --git a/x11-wm/ion-3/files/patch-system.mk b/x11-wm/ion-3/files/patch-system.mk
index 1b438949e5a0..24bf426e3ea4 100644
--- a/x11-wm/ion-3/files/patch-system.mk
+++ b/x11-wm/ion-3/files/patch-system.mk
@@ -1,5 +1,5 @@
---- system.mk.orig Thu May 18 16:06:53 2006
-+++ system.mk Fri May 19 13:19:25 2006
+--- ./system.mk.orig Wed May 24 13:23:51 2006
++++ ./system.mk Mon Jul 17 18:15:24 2006
@@ -7,7 +7,7 @@
## Installation paths
##
@@ -27,15 +27,23 @@
##
-@@ -56,7 +56,7 @@
+@@ -56,11 +56,11 @@
# If you have installed Lua 5.1 from the official tarball without changing
# paths, this should do it.
-LUA_DIR=/usr/local
+-LUA_LIBS = -L$(LUA_DIR)/lib -llua
+-LUA_INCLUDES = -I$(LUA_DIR)/include
+-LUA=$(LUA_DIR)/bin/lua
+-LUAC=$(LUA_DIR)/bin/luac
+LUA_DIR=$(LOCALBASE)
- LUA_LIBS = -L$(LUA_DIR)/lib -llua
- LUA_INCLUDES = -I$(LUA_DIR)/include
- LUA=$(LUA_DIR)/bin/lua
++LUA_LIBS = -L$(LUA_LIBDIR) -llua
++LUA_INCLUDES = -I$(LUA_INCDIR)
++LUA=$(LUA_BINDIR)/lua
++LUAC=$(LUA_BINDIR)/luac
+
+ # If you are using the Debian packages, the following settings should be
+ # what you want.
@@ -74,7 +74,7 @@
## X libraries, includes and options
##
diff --git a/x11-wm/ion-3ds/Makefile b/x11-wm/ion-3ds/Makefile
index 42f99ece8fc0..c9c3ffef7b4b 100644
--- a/x11-wm/ion-3ds/Makefile
+++ b/x11-wm/ion-3ds/Makefile
@@ -13,12 +13,12 @@ MASTER_SITES= http://modeemi.fi/~tuomov/dl/
MAINTAINER= ed@fxq.nl
COMMENT= The development version of the Ion window manager
-BUILD_DEPENDS= ${LOCALBASE}/include/lua.hpp:${PORTSDIR}/lang/lua
RUN_DEPENDS= run-mailcap:${PORTSDIR}/misc/mime-support
USE_X_PREFIX= yes
USE_GETTEXT= yes
USE_GMAKE= yes
+USE_LUA= 5.1
MAKE_ENV= DEFINES="${IONDEFINES}"
.if !defined(WITH_XINERAMA)
diff --git a/x11-wm/ion-3ds/files/patch-system.mk b/x11-wm/ion-3ds/files/patch-system.mk
index 1b438949e5a0..24bf426e3ea4 100644
--- a/x11-wm/ion-3ds/files/patch-system.mk
+++ b/x11-wm/ion-3ds/files/patch-system.mk
@@ -1,5 +1,5 @@
---- system.mk.orig Thu May 18 16:06:53 2006
-+++ system.mk Fri May 19 13:19:25 2006
+--- ./system.mk.orig Wed May 24 13:23:51 2006
++++ ./system.mk Mon Jul 17 18:15:24 2006
@@ -7,7 +7,7 @@
## Installation paths
##
@@ -27,15 +27,23 @@
##
-@@ -56,7 +56,7 @@
+@@ -56,11 +56,11 @@
# If you have installed Lua 5.1 from the official tarball without changing
# paths, this should do it.
-LUA_DIR=/usr/local
+-LUA_LIBS = -L$(LUA_DIR)/lib -llua
+-LUA_INCLUDES = -I$(LUA_DIR)/include
+-LUA=$(LUA_DIR)/bin/lua
+-LUAC=$(LUA_DIR)/bin/luac
+LUA_DIR=$(LOCALBASE)
- LUA_LIBS = -L$(LUA_DIR)/lib -llua
- LUA_INCLUDES = -I$(LUA_DIR)/include
- LUA=$(LUA_DIR)/bin/lua
++LUA_LIBS = -L$(LUA_LIBDIR) -llua
++LUA_INCLUDES = -I$(LUA_INCDIR)
++LUA=$(LUA_BINDIR)/lua
++LUAC=$(LUA_BINDIR)/luac
+
+ # If you are using the Debian packages, the following settings should be
+ # what you want.
@@ -74,7 +74,7 @@
## X libraries, includes and options
##
diff --git a/x11-wm/ion3/Makefile b/x11-wm/ion3/Makefile
index 5bdd1fc06fdd..265f3aaa118f 100644
--- a/x11-wm/ion3/Makefile
+++ b/x11-wm/ion3/Makefile
@@ -15,15 +15,14 @@ MASTER_SITES= http://modeemi.fi/~tuomov/ion/dl/
MAINTAINER= anthony.ginepro@laposte.net
COMMENT= Ion is a tiling tabbed window manager
-LIB_DEPENDS= lua.5:${PORTSDIR}/lang/lua50
-
CONFLICTS= ion-2002* ion-devel-* pwm-*
-GNU_CONFIGURE= yes
-USE_AUTOTOOLS= libtool:15 libltdl:15
USE_X_PREFIX= yes
+USE_AUTOTOOLS= libtool:15 libltdl:15
+USE_LUA= 5.0
USE_GMAKE= yes
MAKE_ENV= DEFINES="${IONDEFINES}"
+GNU_CONFIGURE= yes
.if !defined(WITH_MULTIBYTE)
IONDEFINES+= -DCF_NO_MB_SUPPORT
diff --git a/x11-wm/ion3/files/patch-rules.mk b/x11-wm/ion3/files/patch-rules.mk
index 0dbc8606502d..5e7292efdd52 100644
--- a/x11-wm/ion3/files/patch-rules.mk
+++ b/x11-wm/ion3/files/patch-rules.mk
@@ -1,5 +1,5 @@
---- rules.mk Wed Apr 7 09:15:54 2004
-+++ rules.mk.bsd Sun Apr 11 12:55:10 2004
+--- ./rules.mk.orig Thu Jul 29 00:10:32 2004
++++ ./rules.mk Mon Jul 17 21:50:19 2006
@@ -91,6 +91,7 @@
module_install:
$(INSTALLDIR) $(MODULEDIR)
diff --git a/x11-wm/ion3/files/patch-system.mk b/x11-wm/ion3/files/patch-system.mk
index 37e33a105ee9..80061f5ff69e 100644
--- a/x11-wm/ion3/files/patch-system.mk
+++ b/x11-wm/ion3/files/patch-system.mk
@@ -1,5 +1,5 @@
---- system.mk.orig Tue Jun 1 16:35:23 2004
-+++ system.mk Sat Jun 5 13:27:08 2004
+--- ./system.mk.orig Thu Jul 29 00:10:32 2004
++++ ./system.mk Mon Jul 17 21:53:01 2006
@@ -7,7 +7,7 @@
## Installation paths
##
@@ -33,15 +33,23 @@
# The following should do it if you have manually installed libtool 1.5 in
# $(LIBTOOLDIR).
-@@ -72,7 +72,7 @@
+@@ -72,11 +72,11 @@
# If you have installed Lua 5.0 from the official tarball without changing
# paths, this should do it.
-LUA_DIR=/usr/local
+-LUA_LIBS = -L$(LUA_DIR)/lib -R$(LUA_DIR)/lib -llua -llualib
+-LUA_INCLUDES = -I$(LUA_DIR)/include
+-LUA=$(LUA_DIR)/bin/lua
+-LUAC=$(LUA_DIR)/bin/luac
+LUA_DIR=$(LOCALBASE)
- LUA_LIBS = -L$(LUA_DIR)/lib -R$(LUA_DIR)/lib -llua -llualib
- LUA_INCLUDES = -I$(LUA_DIR)/include
- LUA=$(LUA_DIR)/bin/lua
++LUA_LIBS = -L$(LUA_LIBDIR) -R$(LUA_LIBDIR) -llua -llualib
++LUA_INCLUDES = -I$(LUA_INCDIR)
++LUA=$(LUA_BINDIR)/lua
++LUAC=$(LUA_BINDIR)/luac
+
+ # If you are using the Debian packages, the following settings should be
+ # what you want.
@@ -90,7 +90,7 @@
## X libraries, includes and options
##