From de2cc9af506c7c89ad0c5827be87cf5e95ee8e7e Mon Sep 17 00:00:00 2001 From: Matti Bickel Date: Sat, 13 Jan 2007 14:28:52 +0000 Subject: [PATCH] removing old version, adding slotted versions Package-Manager: portage-2.1.1-r2 --- dev-lang/lua/ChangeLog | 12 +- dev-lang/lua/files/digest-lua-5.0.3-r1 | 3 + dev-lang/lua/files/digest-lua-5.1.1-r1 | 3 + dev-lang/lua/files/lua-5.1.1-Makefile.patch | 138 ++++++++++++++++++ .../lua/files/lua-5.1.1-make_static.patch | 4 +- dev-lang/lua/lua-5.0.3-r1.ebuild | 129 ++++++++++++++++ dev-lang/lua/lua-5.1.1-r1.ebuild | 101 +++++++++++++ dev-lang/lua/metadata.xml | 4 +- 8 files changed, 388 insertions(+), 6 deletions(-) create mode 100644 dev-lang/lua/files/digest-lua-5.0.3-r1 create mode 100644 dev-lang/lua/files/digest-lua-5.1.1-r1 create mode 100644 dev-lang/lua/files/lua-5.1.1-Makefile.patch create mode 100644 dev-lang/lua/lua-5.0.3-r1.ebuild create mode 100644 dev-lang/lua/lua-5.1.1-r1.ebuild diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog index 3d741ac1144a..10b7cf435e3d 100644 --- a/dev-lang/lua/ChangeLog +++ b/dev-lang/lua/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for dev-lang/lua -# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.58 2006/12/27 01:47:14 redhatter Exp $ +# Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.59 2007/01/13 14:28:52 mabi Exp $ + +*lua-5.1.1-r1 (10 Jan 2007) +*lua-5.0.3-r1 (10 Jan 2007) + + 10 Jan 2007; Matti Bickel -files/lua-4.0-config.patch, + +files/lua-5.1.1-Makefile.patch, files/lua-5.1.1-make_static.patch, + -lua-4.0.1.ebuild, +lua-5.0.3-r1.ebuild, +lua-5.1.1-r1.ebuild: + Remove old version, add slotted versions of lua 27 Dec 2006; Stuart Longland lua-5.0.2.ebuild: Marked v5.0.2 stable on mips as per bug #150072 diff --git a/dev-lang/lua/files/digest-lua-5.0.3-r1 b/dev-lang/lua/files/digest-lua-5.0.3-r1 new file mode 100644 index 000000000000..b3c83fe64eaa --- /dev/null +++ b/dev-lang/lua/files/digest-lua-5.0.3-r1 @@ -0,0 +1,3 @@ +MD5 feee27132056de2949ce499b0ef4c480 lua-5.0.3.tar.gz 191384 +RMD160 cb3ed4320b438d73c8ff6c93a02275c9fb461883 lua-5.0.3.tar.gz 191384 +SHA256 1193a61b0e08acaa6eee0eecf29709179ee49c71baebc59b682a25c3b5a45671 lua-5.0.3.tar.gz 191384 diff --git a/dev-lang/lua/files/digest-lua-5.1.1-r1 b/dev-lang/lua/files/digest-lua-5.1.1-r1 new file mode 100644 index 000000000000..5a0845c161bb --- /dev/null +++ b/dev-lang/lua/files/digest-lua-5.1.1-r1 @@ -0,0 +1,3 @@ +MD5 22f4f912f20802c11006fe9b84d5c461 lua-5.1.1.tar.gz 207810 +RMD160 0b9cc31cca1a0f4c2ebb62f177dc157677953a4c lua-5.1.1.tar.gz 207810 +SHA256 c5daeed0a75d8e4dd2328b7c7a69888247868154acbda69110e97d4a6e17d1f0 lua-5.1.1.tar.gz 207810 diff --git a/dev-lang/lua/files/lua-5.1.1-Makefile.patch b/dev-lang/lua/files/lua-5.1.1-Makefile.patch new file mode 100644 index 000000000000..6b95e03e7813 --- /dev/null +++ b/dev-lang/lua/files/lua-5.1.1-Makefile.patch @@ -0,0 +1,138 @@ +--- Makefile.orig 2006-06-02 12:53:38.000000000 +0200 ++++ Makefile 2007-01-13 00:03:46.000000000 +0100 +@@ -7,25 +7,29 @@ + # Your platform. See PLATS for possible values. + PLAT= none + ++# Lua version and release. ++V= 5.1 ++R= 5.1.1 ++ + # Where to install. The installation starts in the src directory, so take care + # if INSTALL_TOP is not an absolute path. (Man pages are installed from the + # doc directory.) + # + INSTALL_TOP= /usr/local + INSTALL_BIN= $(INSTALL_TOP)/bin +-INSTALL_INC= $(INSTALL_TOP)/include ++INSTALL_INC= $(INSTALL_TOP)/include/lua-$V + 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 + + # How to install. You may prefer "install" instead of "cp" if you have it. + # To remove debug information from binaries, use "install -s" in INSTALL_EXEC. + # +-INSTALL_EXEC= $(CP) +-INSTALL_DATA= $(CP) +-#INSTALL_EXEC= $(INSTALL) -m 0755 +-#INSTALL_DATA= $(INSTALL) -m 0644 ++#INSTALL_EXEC= $(CP) ++#INSTALL_DATA= $(CP) ++INSTALL_EXEC= $(INSTALL) -m 0755 ++INSTALL_DATA= $(INSTALL) -m 0644 + + # Utilities. + CP= cp +@@ -40,22 +44,18 @@ + PLATS= aix ansi bsd generic linux macosx mingw posix solaris + + # What to install. +-TO_BIN= lua luac ++TO_BIN= lua-$V luac-$V + TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp +-TO_LIB= liblua.a ++TO_LIB= liblua-$V.a + TO_MAN= lua.1 luac.1 + +-# Lua version and release. +-V= 5.1 +-R= 5.1.1 +- + all: $(PLAT) + + $(PLATS) clean: + cd src && $(MAKE) $@ + + test: dummy +- src/lua test/hello.lua ++ src/lua-$V test/hello.lua + + install: dummy + cd src && $(MKDIR) -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) +@@ -127,3 +127,22 @@ + .PHONY: all $(PLATS) clean test install local none dummy echo pecho lecho newer + + # (end of Makefile) ++ ++# Use libtool for binary installs, etc. ++ ++export $V ++export LIBTOOL = libtool --quiet --tag=CC ++# See libtool manual about how to set this ++ ++gentoo_clean: ++ cd src; $(MAKE) $@ ++ ++gentoo_test: gentoo_linux ++ test/lua.static test/hello.lua ++ ++gentoo_install: ++ mkdir -p $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) $(TO_LIB:%.a=%.la) $(INSTALL_LIB) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB) ++ cd src; $(LIBTOOL) --mode=install $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN) ++ cd src; $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC) +--- lua-5.1.1.orig/src/Makefile 2006-03-22 01:41:49.000000000 +0100 ++++ /var/tmp/portage/lua-5.1.1-r1/work/lua-5.1.1/src/Makefile 2007-01-12 23:40:15.000000000 +0100 +@@ -29,10 +29,10 @@ + LIB_O= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \ + lstrlib.o loadlib.o linit.o + +-LUA_T= lua ++LUA_T= lua-$V + LUA_O= lua.o + +-LUAC_T= luac ++LUAC_T= luac-$V + LUAC_O= luac.o print.o + + ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O) +@@ -176,3 +176,35 @@ + ltm.h lzio.h lmem.h lopcodes.h lundump.h + + # (end of Makefile) ++ ++export LIBTOOL = libtool --quiet --tag=CC ++ ++# The following rules use libtool for compiling and linking in order to ++# provide shared library support. ++ ++LIB_NAME = liblua-$V.la ++LIB_OBJS = $(CORE_O:.o=.lo) $(LIB_O:.o=.lo) ++ ++%.lo %.o: %.c ++ $(LIBTOOL) --mode=compile $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $< ++ ++$(LIB_NAME): $(LIB_OBJS) ++ $(LIBTOOL) --mode=link $(CC) \ ++ -rpath $(RPATH) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) ++ ++$(LIB_NAME:.la=.a): $(LIB_OBJS) ++ $(LIBTOOL) --mode=link $(CC) -static -o $(LIB_NAME:.la=.a) $(LIB_OBJS) ++ ++$(LUA_T): $(LUA_O) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -Wl,-E -o $@ $(LUA_O) $(LUA_LIBS) -llua-$V ++ ++lua_test: $(LUA_O) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) ++ ++$(LUAC_T): $(LUAC_O) $(LIB_NAME) ++ $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) ++ ++gentoo_clean: ++ $(LIBTOOL) --mode=clean $(RM) $(ALL_O:.o=.lo) $(LIB_NAME) $(LUA_T) $(LUAC_T) ++ ++gentoo_all: $(LIB_NAME) $(LIB_NAME:.la=.a) $(LUA_T) lua_test $(LUAC_T) diff --git a/dev-lang/lua/files/lua-5.1.1-make_static.patch b/dev-lang/lua/files/lua-5.1.1-make_static.patch index 53c5bd1a9cf8..502109d1708d 100644 --- a/dev-lang/lua/files/lua-5.1.1-make_static.patch +++ b/dev-lang/lua/files/lua-5.1.1-make_static.patch @@ -4,9 +4,9 @@ diff -ru lua-5.1.1.orig/src/Makefile lua-5.1.1/src/Makefile @@ -196,7 +196,7 @@ -rpath $(RPATH) -o $(LIB_NAME) $(LIB_OBJS) $(LIB_LIBS) - lua: $(LUA_O) $(LIB_NAME) + $(LUA_T): $(LUA_O) $(LIB_NAME) - $(LIBTOOL) --mode=link $(CC) -Wl,-E -o $@ $(LUA_O) $(LUA_LIBS) -llua + $(LIBTOOL) --mode=link $(CC) -static -Wl,-E -o $@ $(LUA_O) $(LIB_NAME) $(LUA_LIBS) - luac: $(LUAC_O) $(LIB_NAME) + $(LUAC_T): $(LUAC_O) $(LIB_NAME) $(LIBTOOL) --mode=link $(CC) -static -o $@ $(LUAC_O) $(LIB_NAME) diff --git a/dev-lang/lua/lua-5.0.3-r1.ebuild b/dev-lang/lua/lua-5.0.3-r1.ebuild new file mode 100644 index 000000000000..d35fcd1006f1 --- /dev/null +++ b/dev-lang/lua/lua-5.0.3-r1.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.0.3-r1.ebuild,v 1.1 2007/01/13 14:28:52 mabi Exp $ + +inherit eutils portability + +DESCRIPTION="A powerful light-weight programming language designed for extending applications" +HOMEPAGE="http://www.lua.org/" +SRC_URI="http://www.lua.org/ftp/${P}.tar.gz" + +LICENSE="MIT" +SLOT="1" +KEYWORDS="~ppc ~ppc64 ~x86" +IUSE="readline" + +RDEPEND="readline? ( sys-libs/readline ) + dev-lang/lua-wrapper + !=dev-lang/lua-5.0.3 + !=dev-lang/lua-5.0.2" +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-destdir.patch + epatch "${FILESDIR}"/${P}-dylib.patch + epatch "${FILESDIR}"/${P}-shared.patch + epatch "${FILESDIR}"/${P}-ldflags.patch + epatch "${FILESDIR}"/${P}-asneeded.patch + + sed -i config \ + -e 's:^#\(LOADLIB= -DUSE_DLOPEN=1\):\1:' \ + -e 's:^#\(POPEN= -DUSE_POPEN=1\)$:\1:' \ + -e "s:^\(MYCFLAGS= \)-O2:\1${CFLAGS}:" \ + -e 's:^\(INSTALL_ROOT= \)/usr/local:\1/usr:' \ + -e 's:^\(INSTALL_INC= $(INSTALL_ROOT)/include\):\1/lua-5.0:' \ + -e "s:^\(INSTALL_LIB= \$(INSTALL_ROOT)/\)lib:\1$(get_libdir):" \ + -e 's:^\(INSTALL_MAN= $(INSTALL_ROOT)\)/man/man1:\1/share/man/man1:' + + sed -i -e 's/^\(install: all\) strip/\1/' Makefile + + # Version the lua binarys/lib + sed -i src/lua/Makefile \ + -e 's:^\(T= $(BIN)/lua\):\1-5.0:' \ + -e 's:llua :llua-5.0 :' \ + -e 's:llualib:llualib-5.0:' + sed -i src/luac/Makefile \ + -e 's:^\(T= $(BIN)/luac\):\1-5.0:' \ + -e 's:llua :llua-5.0 :' \ + -e 's:llualib:llualib-5.0:' + sed -i -e 's:^\(T= $(LIB)/liblua\).a:\1-5.0.a:' src/Makefile + sed -i -e 's:^\(T= $(LIB)/liblualib\).a:\1-5.0.a:' src/lib/Makefile + + [[ ${ELIBC} != *BSD ]] && sed -i -e 's:^#\(DLLIB= -ldl\):\1:' config + + use ppc-macos || sed -i -e 's:^#\(MYLDFLAGS= -Wl,-E\):\1:' config + + sed -i -e 's:\(/README\)\("\):\1.gz\2:g' doc/readme.html + + if use readline ; then + sed -i config \ + -e "s:^#\(USERCONF=-DLUA_USERCONFIG='\"\$(LUA)/etc/saconfig.c\"' -DUSE_READLINE\):\1:" \ + -e 's:^\(EXTRA_LIBS= -lm\)$:\1 -lreadline:' + fi + + cat >etc/lua-5.0.pc < /dev/null || die "test $test failed" + done + + for test in ${negative}; do + test/lua.static test/${test}.lua &> /dev/null && die "test $test failed" + done +} diff --git a/dev-lang/lua/metadata.xml b/dev-lang/lua/metadata.xml index b35b976369c3..2e1ee3df1f9a 100644 --- a/dev-lang/lua/metadata.xml +++ b/dev-lang/lua/metadata.xml @@ -3,7 +3,7 @@ no-herd - mabi@gentoo.org - Matti Bickel + mabi@gentoo.org + Matti Bickel -- 2.26.2