aboutsummaryrefslogtreecommitdiffstats
path: root/lang/tolua
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/tolua
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/tolua')
-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
4 files changed, 21 insertions, 62 deletions
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