aboutsummaryrefslogtreecommitdiffstats
path: root/lang/tolua4
diff options
context:
space:
mode:
authorlinimon <linimon@FreeBSD.org>2006-09-15 16:17:11 +0800
committerlinimon <linimon@FreeBSD.org>2006-09-15 16:17:11 +0800
commitf2d8437c35c46dc1131c982c1f25abcd7d641fb3 (patch)
tree61136cc420c647223541df746f011f5307a7b184 /lang/tolua4
parent6c16383d95de00351d4ecaf674a95f310d209a6b (diff)
downloadfreebsd-ports-gnome-f2d8437c35c46dc1131c982c1f25abcd7d641fb3.tar.gz
freebsd-ports-gnome-f2d8437c35c46dc1131c982c1f25abcd7d641fb3.tar.zst
freebsd-ports-gnome-f2d8437c35c46dc1131c982c1f25abcd7d641fb3.zip
Modify these files to reflect bsd.lua.mk as tested on the cluster.
PR: ports/101612 Submitted by: alepulver Hat: portmgr
Diffstat (limited to 'lang/tolua4')
-rw-r--r--lang/tolua4/Makefile25
-rw-r--r--lang/tolua4/files/patch-config26
-rw-r--r--lang/tolua4/pkg-plist7
3 files changed, 21 insertions, 37 deletions
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