[77328] trunk/dports/lang/lua
and.damore at macports.org
and.damore at macports.org
Sun Mar 27 08:30:33 PDT 2011
Revision: 77328
http://trac.macports.org/changeset/77328
Author: and.damore at macports.org
Date: 2011-03-27 08:30:29 -0700 (Sun, 27 Mar 2011)
Log Message:
-----------
port lua, split patch file, now installing both static and dynamic library, #18402 closed
Modified Paths:
--------------
trunk/dports/lang/lua/Portfile
Added Paths:
-----------
trunk/dports/lang/lua/files/patch-Makefile.diff
trunk/dports/lang/lua/files/patch-src_Makefile.diff
Removed Paths:
-------------
trunk/dports/lang/lua/files/patch-dlopen.diff
Modified: trunk/dports/lang/lua/Portfile
===================================================================
--- trunk/dports/lang/lua/Portfile 2011-03-27 10:56:44 UTC (rev 77327)
+++ trunk/dports/lang/lua/Portfile 2011-03-27 15:30:29 UTC (rev 77328)
@@ -25,7 +25,8 @@
test.run yes
test.env DYLD_LIBRARY_PATH=./lib
-patchfiles patch-dlopen.diff
+patchfiles patch-Makefile.diff \
+ patch-src_Makefile.diff
post-patch {
reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/luaconf.h
Added: trunk/dports/lang/lua/files/patch-Makefile.diff
===================================================================
--- trunk/dports/lang/lua/files/patch-Makefile.diff (rev 0)
+++ trunk/dports/lang/lua/files/patch-Makefile.diff 2011-03-27 15:30:29 UTC (rev 77328)
@@ -0,0 +1,22 @@
+--- Makefile.orig 2011-03-27 16:49:40.000000000 +0200
++++ Makefile 2011-03-27 16:52:46.000000000 +0200
+@@ -43,7 +43,7 @@
+ # What to install.
+ TO_BIN= lua luac
+ TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
+-TO_LIB= liblua.a
++TO_LIB= liblua.a liblua.dylib
+ TO_MAN= lua.1 luac.1
+
+ # Lua version and release.
+@@ -64,6 +64,10 @@
+ cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
+ cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
+ cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
++ cd $(INSTALL_LIB) && sudo ln -s liblua.a liblua.%VERSION%.a
++ cd $(INSTALL_LIB) && sudo ln -s liblua.a liblua.%COMPAT_VERSION%.a
++ cd $(INSTALL_LIB) && sudo ln -s liblua.dylib liblua.%VERSION%.dylib
++ cd $(INSTALL_LIB) && sudo ln -s liblua.dylib liblua.%COMPAT_VERSION%.dylib
+
+ ranlib:
+ cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
Deleted: trunk/dports/lang/lua/files/patch-dlopen.diff
===================================================================
--- trunk/dports/lang/lua/files/patch-dlopen.diff 2011-03-27 10:56:44 UTC (rev 77327)
+++ trunk/dports/lang/lua/files/patch-dlopen.diff 2011-03-27 15:30:29 UTC (rev 77328)
@@ -1,53 +0,0 @@
---- Makefile.orig 2008-08-11 19:40:48.000000000 -0500
-+++ Makefile 2011-03-19 23:15:33.000000000 -0500
-@@ -43,7 +43,7 @@
- # What to install.
- TO_BIN= lua luac
- TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
--TO_LIB= liblua.a
-+TO_LIB= liblua.%VERSION%.dylib
- TO_MAN= lua.1 luac.1
-
- # Lua version and release.
-@@ -64,6 +64,8 @@
- cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
- cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
- cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
-+ cd $(INSTALL_LIB) && sudo ln -s liblua.%VERSION%.dylib liblua.dylib
-+ cd $(INSTALL_LIB) && sudo ln -s liblua.%VERSION%.dylib liblua.%COMPAT_VERSION%.dylib
-
- ranlib:
- cd src && cd $(INSTALL_LIB) && $(RANLIB) $(TO_LIB)
---- src/Makefile.orig 2008-01-19 13:37:58.000000000 -0600
-+++ src/Makefile 2011-03-19 23:17:58.000000000 -0500
-@@ -22,7 +22,7 @@
-
- PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
-
--LUA_A= liblua.a
-+LUA_A= liblua.%VERSION%.dylib
- CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
- lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
- lundump.o lvm.o lzio.o
-@@ -50,9 +50,11 @@
- $(LUA_A): $(CORE_O) $(LIB_O)
- $(AR) $@ $?
- $(RANLIB) $@
-+ $(CC) -o $@ $(MYLDFLAGS) -dynamiclib -install_name %PREFIX%/lib/liblua.%COMPAT_VERSION%.dylib \
-+ -compatibility_version %COMPAT_VERSION% -current_version %VERSION% $^
-
- $(LUA_T): $(LUA_O) $(LUA_A)
-- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
-+ $(CC) -o $@ -L. $(MYLDFLAGS) $(MYCFLAGS) $(MYLIBS) -llua.%VERSION% lua.c
-
- $(LUAC_T): $(LUAC_O) $(LUA_A)
- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
-@@ -99,7 +101,7 @@
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
-
- macosx:
-- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
-+ $(MAKE) all MYCFLAGS="-fno-common -DLUA_USE_LINUX" MYLIBS="-lreadline"
- # use this on Mac OS X 10.3-
- # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
-
Added: trunk/dports/lang/lua/files/patch-src_Makefile.diff
===================================================================
--- trunk/dports/lang/lua/files/patch-src_Makefile.diff (rev 0)
+++ trunk/dports/lang/lua/files/patch-src_Makefile.diff 2011-03-27 15:30:29 UTC (rev 77328)
@@ -0,0 +1,53 @@
+--- src/Makefile.orig 2011-03-27 16:49:54.000000000 +0200
++++ src/Makefile 2011-03-27 16:55:30.000000000 +0200
+@@ -23,6 +23,7 @@
+ PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
+
+ LUA_A= liblua.a
++LUA_DYLIB= liblua.dylib
+ CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
+ lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
+ lundump.o lvm.o lzio.o
+@@ -36,8 +37,8 @@
+ LUAC_O= luac.o print.o
+
+ ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
+-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
+-ALL_A= $(LUA_A)
++ALL_T= $(LUA_DYLIB) $(LUA_A) $(LUA_T) $(LUAC_T)
++ALL_A= $(LUA_DYLIB) $(LUA_A)
+
+ default: $(PLAT)
+
+@@ -48,14 +49,20 @@
+ a: $(ALL_A)
+
+ $(LUA_A): $(CORE_O) $(LIB_O)
++ @echo "Building static library"
+ $(AR) $@ $?
+ $(RANLIB) $@
+
++$(LUA_DYLIB): $(CORE_O) $(LIB_O)
++ @echo "Building dylib"
++ $(CC) -o $@ $(MYLDFLAGS) -dynamiclib -install_name %PREFIX%/lib/liblua.dylib \
++ -compatibility_version %COMPAT_VERSION% -current_version %VERSION% $^
++
+ $(LUA_T): $(LUA_O) $(LUA_A)
+- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++ $(CC) -o $@ -L. $(MYLDFLAGS) $(MYCFLAGS) $(MYLIBS) -llua lua.c
+
+ $(LUAC_T): $(LUAC_O) $(LUA_A)
+- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
++ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_DYLIB) $(LIBS)
+
+ clean:
+ $(RM) $(ALL_T) $(ALL_O)
+@@ -99,7 +106,7 @@
+ $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
+
+ macosx:
+- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
++ $(MAKE) all MYCFLAGS="-fno-common -DLUA_USE_LINUX" MYLIBS="-lreadline"
+ # use this on Mac OS X 10.3-
+ # $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20110327/462a0b51/attachment.html>
More information about the macports-changes
mailing list