[118805] trunk/dports/lang/lua
ryandesign at macports.org
ryandesign at macports.org
Fri Apr 11 00:02:47 PDT 2014
Revision: 118805
https://trac.macports.org/changeset/118805
Author: ryandesign at macports.org
Date: 2014-04-11 00:02:47 -0700 (Fri, 11 Apr 2014)
Log Message:
-----------
lua: update to 5.2.3 (#42892); rework portfile
Modified Paths:
--------------
trunk/dports/lang/lua/Portfile
trunk/dports/lang/lua/files/patch-Makefile.diff
Added Paths:
-----------
trunk/dports/lang/lua/files/COPYRIGHT
trunk/dports/lang/lua/files/lua.pc
trunk/dports/lang/lua/files/patch-src-Makefile.diff
trunk/dports/lang/lua/files/patch-src-luaconf.h.diff
Removed Paths:
-------------
trunk/dports/lang/lua/files/patch-COPYRIGHT.diff
trunk/dports/lang/lua/files/patch-lua-5.2.2.pc.diff
trunk/dports/lang/lua/files/patch-src_Makefile.diff
Modified: trunk/dports/lang/lua/Portfile
===================================================================
--- trunk/dports/lang/lua/Portfile 2014-04-11 06:16:12 UTC (rev 118804)
+++ trunk/dports/lang/lua/Portfile 2014-04-11 07:02:47 UTC (rev 118805)
@@ -5,9 +5,8 @@
name lua
conflicts lua50
-set compat_version 5.2
-version ${compat_version}.2
-revision 1
+version 5.2.3
+set branch [join [lrange [split ${version} .] 0 1] .]
categories lang
license MIT
platforms darwin
@@ -18,12 +17,11 @@
extending applications. Lua is also frequently used as a general-purpose, \
standalone language.
-homepage http://www.lua.org
-master_sites ${homepage}/ftp/
+homepage http://www.lua.org/
+master_sites ${homepage}ftp/
-checksums ${distfiles} \
- sha1 0857e41e5579726a4cb96732e80d7aa47165eaf5 \
- rmd160 d17967150017e9b25a26c1ad527647cd0b9e598f
+checksums rmd160 b8714669c8c0f8272104effd8a9675921ddb2fa5 \
+ sha256 13c2fb97961381f7d06d5b5cea55b743c163800896fd5c5e2356201d3619002d
depends_lib port:readline
build.target macosx
@@ -31,43 +29,37 @@
test.run yes
test.env DYLD_LIBRARY_PATH=./lib
-patchfiles patch-COPYRIGHT.diff \
- patch-Makefile.diff \
- patch-src_Makefile.diff \
- patch-lua-${version}.pc.diff
+post-extract {
+ xinstall -m 0644 -W ${filespath} COPYRIGHT lua.pc ${worksrcpath}
+}
-patch.args -f
+patchfiles patch-Makefile.diff \
+ patch-src-Makefile.diff \
+ patch-src-luaconf.h.diff
post-patch {
- reinplace "s|/usr/local|${prefix}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/luaconf.h
- reinplace "s|/man/man1|/share/man/man1|g" ${worksrcpath}/Makefile
-
- # reinplace %VERSION% and %COMPAT_VERSION% after applying patch-dlopen.diff
- reinplace "s|%VERSION%|${version}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile
- reinplace "s|%COMPAT_VERSION%|${compat_version}|g" ${worksrcpath}/Makefile ${worksrcpath}/src/Makefile
-
- # reinplace %PREFIX% to fix @executable_path, cf. ticket no. 28726
- reinplace "s|%PREFIX%|${prefix}|g" ${worksrcpath}/src/Makefile
+ reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile ${worksrcpath}/src/luaconf.h
+ reinplace "s|@VERSION@|${version}|g" ${worksrcpath}/Makefile ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile
+ reinplace "s|@BRANCH@|${branch}|g" ${worksrcpath}/Makefile ${worksrcpath}/lua.pc ${worksrcpath}/src/Makefile
}
configure {
reinplace -E "/^MYLDFLAGS=/s|\$| ${configure.ldflags} [get_canonical_archflags]|" ${worksrcpath}/src/Makefile
reinplace -E "/^CFLAGS=/s|\$| ${configure.cflags} ${configure.cppflags} [get_canonical_archflags]|" ${worksrcpath}/src/Makefile
reinplace "s|CC= .*\$|CC= ${configure.cc}|" ${worksrcpath}/src/Makefile
- reinplace "s|@PREFIX@|${prefix}|" ${worksrcpath}/lua-${version}.pc
}
use_parallel_build no
destroot.target install INSTALL_TOP=${destroot}${prefix}
post-destroot {
- xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
- xinstall -m 0644 -W ${worksrcpath} COPYRIGHT README ${destroot}${prefix}/share/doc/${name}
- xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}/html
+ set docdir ${prefix}/share/doc/${subport}
+ xinstall -d -m 0755 ${destroot}${docdir}/html
+ xinstall -m 0644 -W ${worksrcpath} COPYRIGHT README ${destroot}${docdir}
foreach html [glob ${worksrcpath}/doc/*.html ${worksrcpath}/doc/*.gif] {
- xinstall -m 0644 ${html} ${destroot}${prefix}/share/doc/${name}/html
+ xinstall -m 0644 ${html} ${destroot}${docdir}/html
}
- xinstall -W ${worksrcpath} -m 0644 lua-${version}.pc ${destroot}${prefix}/lib/pkgconfig/lua.pc
+ xinstall -W ${worksrcpath} -m 0644 lua.pc ${destroot}${prefix}/lib/pkgconfig/
}
livecheck.type regex
Copied: trunk/dports/lang/lua/files/COPYRIGHT (from rev 118736, trunk/dports/lang/lua/files/patch-COPYRIGHT.diff)
===================================================================
--- trunk/dports/lang/lua/files/COPYRIGHT (rev 0)
+++ trunk/dports/lang/lua/files/COPYRIGHT 2014-04-11 07:02:47 UTC (rev 118805)
@@ -0,0 +1,32 @@
+Lua License
+-----------
+
+Lua is licensed under the terms of the MIT license reproduced below.
+This means that Lua is free software and can be used for both academic
+and commercial purposes at absolutely no cost.
+
+For details and rationale, see http://www.lua.org/license.html .
+
+===============================================================================
+
+Copyright (C) 1994-2013 Lua.org, PUC-Rio.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+===============================================================================
Copied: trunk/dports/lang/lua/files/lua.pc (from rev 117955, trunk/dports/lang/lua/files/patch-lua-5.2.2.pc.diff)
===================================================================
--- trunk/dports/lang/lua/files/lua.pc (rev 0)
+++ trunk/dports/lang/lua/files/lua.pc 2014-04-11 07:02:47 UTC (rev 118805)
@@ -0,0 +1,25 @@
+# lua.pc -- pkg-config data for Lua
+
+V= @BRANCH@
+R= @VERSION@
+
+# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
+prefix= @PREFIX@
+INSTALL_BIN= ${prefix}/bin
+INSTALL_INC= ${prefix}/include
+INSTALL_LIB= ${prefix}/lib
+INSTALL_MAN= ${prefix}/man/man1
+INSTALL_LMOD= ${prefix}/share/lua/${V}
+INSTALL_CMOD= ${prefix}/lib/lua/${V}
+
+# canonical vars
+exec_prefix=${prefix}
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: Lua
+Description: An Extensible Extension Language
+Version: ${R}
+Requires:
+Libs: -L${libdir} -llua -lm
+Cflags: -I${includedir}
Deleted: trunk/dports/lang/lua/files/patch-COPYRIGHT.diff
===================================================================
--- trunk/dports/lang/lua/files/patch-COPYRIGHT.diff 2014-04-11 06:16:12 UTC (rev 118804)
+++ trunk/dports/lang/lua/files/patch-COPYRIGHT.diff 2014-04-11 07:02:47 UTC (rev 118805)
@@ -1,37 +0,0 @@
---- COPYRIGHT.orig 1970-01-01 10:00:00.000000000 +1000
-+++ COPYRIGHT 2013-04-28 13:00:48.000000000 +1000
-@@ -0,0 +1,34 @@
-+Lua License
-+-----------
-+
-+Lua is licensed under the terms of the MIT license reproduced below.
-+This means that Lua is free software and can be used for both academic
-+and commercial purposes at absolutely no cost.
-+
-+For details and rationale, see http://www.lua.org/license.html .
-+
-+===============================================================================
-+
-+Copyright (C) 1994-2013 Lua.org, PUC-Rio.
-+
-+Permission is hereby granted, free of charge, to any person obtaining a copy
-+of this software and associated documentation files (the "Software"), to deal
-+in the Software without restriction, including without limitation the rights
-+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-+copies of the Software, and to permit persons to whom the Software is
-+furnished to do so, subject to the following conditions:
-+
-+The above copyright notice and this permission notice shall be included in
-+all copies or substantial portions of the Software.
-+
-+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-+THE SOFTWARE.
-+
-+===============================================================================
-+
-+(end of COPYRIGHT)
Modified: trunk/dports/lang/lua/files/patch-Makefile.diff
===================================================================
--- trunk/dports/lang/lua/files/patch-Makefile.diff 2014-04-11 06:16:12 UTC (rev 118804)
+++ trunk/dports/lang/lua/files/patch-Makefile.diff 2014-04-11 07:02:47 UTC (rev 118805)
@@ -1,5 +1,19 @@
---- Makefile.orig 2013-05-09 08:59:28.000000000 +0200
-+++ Makefile 2013-05-09 09:02:08.000000000 +0200
+--- Makefile.orig 2013-11-09 18:49:35.000000000 -0600
++++ Makefile 2014-03-17 16:17:56.000000000 -0500
+@@ -10,11 +10,11 @@
+ # so take care if INSTALL_TOP is not an absolute path. See the local target.
+ # You may want to make INSTALL_LMOD and INSTALL_CMOD consistent with
+ # LUA_ROOT, LUA_LDIR, and LUA_CDIR in luaconf.h.
+-INSTALL_TOP= /usr/local
++INSTALL_TOP= @PREFIX@
+ INSTALL_BIN= $(INSTALL_TOP)/bin
+ INSTALL_INC= $(INSTALL_TOP)/include
+ INSTALL_LIB= $(INSTALL_TOP)/lib
+-INSTALL_MAN= $(INSTALL_TOP)/man/man1
++INSTALL_MAN= $(INSTALL_TOP)/share/man/man1
+ INSTALL_LMOD= $(INSTALL_TOP)/share/lua/$V
+ INSTALL_CMOD= $(INSTALL_TOP)/lib/lua/$V
+
@@ -41,7 +41,7 @@
# What to install.
TO_BIN= lua luac
@@ -13,8 +27,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) && ln -s liblua.dylib liblua.%VERSION%.dylib
-+ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua.%COMPAT_VERSION%.dylib
++ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua. at VERSION@.dylib
++ cd $(INSTALL_LIB) && ln -s liblua.dylib liblua. at BRANCH@.dylib
uninstall:
cd src && cd $(INSTALL_BIN) && $(RM) $(TO_BIN)
Deleted: trunk/dports/lang/lua/files/patch-lua-5.2.2.pc.diff
===================================================================
--- trunk/dports/lang/lua/files/patch-lua-5.2.2.pc.diff 2014-04-11 06:16:12 UTC (rev 118804)
+++ trunk/dports/lang/lua/files/patch-lua-5.2.2.pc.diff 2014-04-11 07:02:47 UTC (rev 118805)
@@ -1,34 +0,0 @@
---- lua-5.2.2.pc.orig 2012-08-08 07:55:12.000000000 -0700
-+++ lua-5.2.2.pc 2012-08-08 07:55:02.000000000 -0700
-@@ -0,0 +1,31 @@
-+# lua.pc -- pkg-config data for Lua
-+
-+# vars from install Makefile
-+
-+# grep '^V=' ../Makefile
-+V= 5.2
-+# grep '^R=' ../Makefile
-+R= 5.2.2
-+
-+# grep '^INSTALL_.*=' ../Makefile | sed 's/INSTALL_TOP/prefix/'
-+prefix= @PREFIX@
-+INSTALL_BIN= ${prefix}/bin
-+INSTALL_INC= ${prefix}/include
-+INSTALL_LIB= ${prefix}/lib
-+INSTALL_MAN= ${prefix}/man/man1
-+INSTALL_LMOD= ${prefix}/share/lua/${V}
-+INSTALL_CMOD= ${prefix}/lib/lua/${V}
-+
-+# canonical vars
-+exec_prefix=${prefix}
-+libdir=${exec_prefix}/lib
-+includedir=${prefix}/include
-+
-+Name: Lua
-+Description: An Extensible Extension Language
-+Version: ${R}
-+Requires:
-+Libs: -L${libdir} -llua -lm
-+Cflags: -I${includedir}
-+
-+# (end of lua.pc)
Copied: trunk/dports/lang/lua/files/patch-src-Makefile.diff (from rev 117955, 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 2014-04-11 07:02:47 UTC (rev 118805)
@@ -0,0 +1,53 @@
+--- src/Makefile.orig 2013-11-11 05:45:49.000000000 -0600
++++ src/Makefile 2014-03-17 15:22:10.000000000 -0500
+@@ -29,6 +29,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 lctype.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
+@@ -43,8 +44,8 @@
+ LUAC_O= luac.o
+
+ ALL_O= $(BASE_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)
+
+ # Targets start here.
+ default: $(PLAT)
+@@ -56,14 +57,20 @@
+ a: $(ALL_A)
+
+ $(LUA_A): $(BASE_O)
++ @echo "Building static library"
+ $(AR) $@ $(BASE_O)
+ $(RANLIB) $@
+
++$(LUA_DYLIB): $(BASE_O)
++ @echo "Building dynamic library (dylib)"
++ $(CC) -o $@ $(MYLDFLAGS) -dynamiclib -install_name @PREFIX@/lib/liblua.dylib \
++ -compatibility_version @BRANCH@ -current_version @VERSION@ $^
++
+ $(LUA_T): $(LUA_O) $(LUA_A)
+- $(CC) -o $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
++ $(CC) -o $@ -L. $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua lua.c
+
+ $(LUAC_T): $(LUAC_O) $(LUA_A)
+- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
++ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_DYLIB) $(LIBS)
+
+ clean:
+ $(RM) $(ALL_T) $(ALL_O)
+@@ -106,7 +113,7 @@
+ $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
+
+ macosx:
+- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline" CC=cc
++ $(MAKE) $(ALL) SYSCFLAGS="-fno-common -DLUA_USE_MACOSX" SYSLIBS="-lreadline"
+
+ mingw:
+ $(MAKE) "LUA_A=lua52.dll" "LUA_T=lua.exe" \
Added: trunk/dports/lang/lua/files/patch-src-luaconf.h.diff
===================================================================
--- trunk/dports/lang/lua/files/patch-src-luaconf.h.diff (rev 0)
+++ trunk/dports/lang/lua/files/patch-src-luaconf.h.diff 2014-04-11 07:02:47 UTC (rev 118805)
@@ -0,0 +1,11 @@
+--- src/luaconf.h.orig 2013-04-12 13:48:47.000000000 -0500
++++ src/luaconf.h 2014-03-17 16:16:34.000000000 -0500
+@@ -100,7 +100,7 @@
+ #else /* }{ */
+
+ #define LUA_VDIR LUA_VERSION_MAJOR "." LUA_VERSION_MINOR "/"
+-#define LUA_ROOT "/usr/local/"
++#define LUA_ROOT "@PREFIX@/"
+ #define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR
+ #define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR
+ #define LUA_PATH_DEFAULT \
Deleted: trunk/dports/lang/lua/files/patch-src_Makefile.diff
===================================================================
--- trunk/dports/lang/lua/files/patch-src_Makefile.diff 2014-04-11 06:16:12 UTC (rev 118804)
+++ trunk/dports/lang/lua/files/patch-src_Makefile.diff 2014-04-11 07:02:47 UTC (rev 118805)
@@ -1,53 +0,0 @@
---- src/Makefile.orig 2013-05-09 09:04:29.000000000 +0200
-+++ src/Makefile 2013-05-09 09:29:32.000000000 +0200
-@@ -29,6 +29,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 lctype.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
-@@ -43,8 +44,8 @@
- LUAC_O= luac.o
-
- ALL_O= $(BASE_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)
-
- # Targets start here.
- default: $(PLAT)
-@@ -56,14 +57,20 @@
- a: $(ALL_A)
-
- $(LUA_A): $(BASE_O)
-+ @echo "Building static library"
- $(AR) $@ $(BASE_O)
- $(RANLIB) $@
-
-+$(LUA_DYLIB): $(BASE_O)
-+ @echo "Building dynamic library (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 $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
-+ $(CC) -o $@ -L. $(MYLDFLAGS) $(MYCFLAGS) $(LIBS) -llua lua.c
-
- $(LUAC_T): $(LUAC_O) $(LUA_A)
-- $(CC) -o $@ $(LDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
-+ $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_DYLIB) $(LIBS)
-
- clean:
- $(RM) $(ALL_T) $(ALL_O)
-@@ -106,7 +113,7 @@
- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
-
- macosx:
-- $(MAKE) $(ALL) SYSCFLAGS="-DLUA_USE_MACOSX" SYSLIBS="-lreadline"
-+ $(MAKE) $(ALL) SYSCFLAGS="-fno-common -DLUA_USE_MACOSX" SYSLIBS="-lreadline"
-
- mingw:
- $(MAKE) "LUA_A=lua52.dll" "LUA_T=lua.exe" \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140411/fb0f0aaf/attachment-0001.html>
More information about the macports-changes
mailing list