diff options
author | Emanuele Giaquinta <exg@gentoo.org> | 2006-10-07 11:31:48 +0000 |
---|---|---|
committer | Emanuele Giaquinta <exg@gentoo.org> | 2006-10-07 11:31:48 +0000 |
commit | c098274660920853cb24e5d9f572615ac462a2d8 (patch) | |
tree | 3c86de630ec2af76e460404a5d1de3ccbb652a6f /dev-lang | |
parent | Reassigning to crypt herd, approved by vapier, fix ebuild to actually work (diff) | |
download | gentoo-2-c098274660920853cb24e5d9f572615ac462a2d8.tar.gz gentoo-2-c098274660920853cb24e5d9f572615ac462a2d8.tar.bz2 gentoo-2-c098274660920853cb24e5d9f572615ac462a2d8.zip |
Version bump, fixes bugs #132417, #137582, #149911.
(Portage version: 2.1.2_pre2-r5)
Diffstat (limited to 'dev-lang')
-rw-r--r-- | dev-lang/lua/ChangeLog | 9 | ||||
-rw-r--r-- | dev-lang/lua/files/digest-lua-5.0.3 | 3 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.0.3-asneeded.patch | 11 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.0.3-ldflags.patch | 35 | ||||
-rw-r--r-- | dev-lang/lua/files/lua-5.0.3-linking.patch | 13 | ||||
-rw-r--r-- | dev-lang/lua/lua-5.0.3.ebuild | 111 |
6 files changed, 181 insertions, 1 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog index 4514f2551288..1ac26e45f399 100644 --- a/dev-lang/lua/ChangeLog +++ b/dev-lang/lua/ChangeLog @@ -1,6 +1,13 @@ # 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.44 2006/07/09 01:12:03 kumba Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.45 2006/10/07 11:31:48 exg Exp $ + +*lua-5.0.3 (07 Oct 2006) + + 07 Oct 2006; Emanuele Giaquinta <exg@gentoo.org> + +files/lua-5.0.3-asneeded.patch, +files/lua-5.0.3-ldflags.patch, + +files/lua-5.0.3-linking.patch, +lua-5.0.3.ebuild: + Version bump, fixes bugs #132417, #137582, #149911. 09 Jul 2006; Joshua Kinard <kumba@gentoo.org> lua-4.0.1.ebuild: Marking stable to satisfy elinks dep. diff --git a/dev-lang/lua/files/digest-lua-5.0.3 b/dev-lang/lua/files/digest-lua-5.0.3 new file mode 100644 index 000000000000..b3c83fe64eaa --- /dev/null +++ b/dev-lang/lua/files/digest-lua-5.0.3 @@ -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/lua-5.0.3-asneeded.patch b/dev-lang/lua/files/lua-5.0.3-asneeded.patch new file mode 100644 index 000000000000..71e1a10090a0 --- /dev/null +++ b/dev-lang/lua/files/lua-5.0.3-asneeded.patch @@ -0,0 +1,11 @@ +--- lua-5.0.3/Makefile.old 2006-10-04 15:21:15.116128747 +0200 ++++ lua-5.0.3/Makefile 2006-10-04 15:23:57.340019809 +0200 +@@ -39,7 +39,7 @@ + # shared libraries (for Linux) + so: + $(CC) $(LDFLAGS) -o lib/liblua.so.$V -shared -Wl,-soname,liblua.so.$V src/*.o +- $(CC) $(LDFLAGS) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.o ++ $(CC) $(LDFLAGS) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.o -L$(LIB) -llua $(EXTRA_LIBS) $(DLLIB) + cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so + + # binaries using shared libraries diff --git a/dev-lang/lua/files/lua-5.0.3-ldflags.patch b/dev-lang/lua/files/lua-5.0.3-ldflags.patch new file mode 100644 index 000000000000..5bb3dad7ea97 --- /dev/null +++ b/dev-lang/lua/files/lua-5.0.3-ldflags.patch @@ -0,0 +1,35 @@ +--- lua-5.0.3/Makefile.old 2006-10-04 13:23:13.253194162 +0200 ++++ lua-5.0.3/Makefile 2006-10-04 13:23:02.727331000 +0200 +@@ -38,8 +38,8 @@ + + # shared libraries (for Linux) + so: +- $(CC) -o lib/liblua.so.$V -shared -Wl,-soname,liblua.so.$V src/*.o +- $(CC) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.o ++ $(CC) $(LDFLAGS) -o lib/liblua.so.$V -shared -Wl,-soname,liblua.so.$V src/*.o ++ $(CC) $(LDFLAGS) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.o + cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so + + # binaries using shared libraries +--- lua-5.0.3/src/lua/Makefile.old 2006-10-04 13:07:11.250700357 +0200 ++++ lua-5.0.3/src/lua/Makefile 2006-10-04 13:22:29.323765252 +0200 +@@ -13,7 +13,7 @@ + all: $T + + $T: $(OBJS) $(LIB)/liblua.a $(LIB)/liblualib.a +- $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB) ++ $(CC) -o $@ $(MYLDFLAGS) $(LDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB) + + $(LIB)/liblua.a: + cd ..; $(MAKE) +--- lua-5.0.3/src/luac/Makefile.old 2006-10-04 13:07:28.039482100 +0200 ++++ lua-5.0.3/src/luac/Makefile 2006-10-04 13:22:45.059560684 +0200 +@@ -13,7 +13,7 @@ + all: $T + + $T: $(OBJS) $(LIB)/liblua.a $(LIB)/liblualib.a +- $(CC) -o $@ $(MYLDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB) ++ $(CC) -o $@ $(MYLDFLAGS) $(LDFLAGS) $(OBJS) -L$(LIB) -llua -llualib $(EXTRA_LIBS) $(DLLIB) + + # print.c needs opcode names from lopcodes.c + lopcodes.o: ../lopcodes.c ../lopcodes.h diff --git a/dev-lang/lua/files/lua-5.0.3-linking.patch b/dev-lang/lua/files/lua-5.0.3-linking.patch new file mode 100644 index 000000000000..784aa3d802b7 --- /dev/null +++ b/dev-lang/lua/files/lua-5.0.3-linking.patch @@ -0,0 +1,13 @@ +--- lua-5.0.3/Makefile.old 2006-10-04 12:03:57.117024736 +0200 ++++ lua-5.0.3/Makefile 2006-10-04 12:05:18.295969396 +0200 +@@ -38,8 +38,8 @@ + + # shared libraries (for Linux) + so: +- ld -o lib/liblua.so.$V -shared src/*.o +- ld -o lib/liblualib.so.$V -shared src/lib/*.o ++ $(CC) -o lib/liblua.so.$V -shared -Wl,-soname,liblua.so.$V src/*.o ++ $(CC) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.o + cd lib; ln -fs liblua.so.$V liblua.so; ln -fs liblualib.so.$V liblualib.so + + # binaries using shared libraries diff --git a/dev-lang/lua/lua-5.0.3.ebuild b/dev-lang/lua/lua-5.0.3.ebuild new file mode 100644 index 000000000000..262ea0e5d369 --- /dev/null +++ b/dev-lang/lua/lua-5.0.3.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2006 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.ebuild,v 1.1 2006/10/07 11:31:48 exg 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="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +IUSE="readline" + +RDEPEND="readline? ( sys-libs/readline )" +DEPEND="${RDEPEND}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-linking.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} -fPIC -DPIC:" \ + -e 's:^\(INSTALL_ROOT= \)/usr/local:\1$(DESTDIR)/usr:' \ + -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 + + [[ ${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 -ldl -lreadline\) # \(-lhistory -lcurses -lncurses\):\1 \2:' + fi + + cat >etc/lua.pc <<EOF +prefix=/usr +exec_prefix=\${prefix} +includedir=\${prefix}/include +libdir=\${exec_prefix}/$(get_libdir) +interpreter=\${exec_prefix}/bin/lua +compiler=\${exec_prefix}/bin/luac + +Name: Lua +Description: An extension programming language +Version: ${PV} +Cflags: -I\${includedir} +Libs: -L\${libdir} -llua -llualib -lm $(dlopen_lib) +EOF +} + +src_compile() { + emake || die "emake failed" + if use ppc-macos; then + emake dylib || die "emake dylib failed" + else + emake so || die "emake so failed" + fi + mv bin/lua test/lua.static + emake sobin || die "emake sobin failed" +} + +src_install() { + if use ppc-macos; then + make DESTDIR="${D}" install dylibinstall || die "make install dylibinstall failed" + else + make DESTDIR="${D}" install soinstall || die "make install soinstall failed" + fi + + dodoc HISTORY UPDATE + dohtml doc/*.html doc/*.gif + + for i in `find . -name README -exec dirname '{}' \;`; do + docinto ${i#.} + dodoc ${i}/README + done + + insinto /usr/share/lua + doins etc/compat.lua + insinto /usr/share/pixmaps + doins etc/lua.xpm + insinto /usr/$(get_libdir)/pkgconfig + doins etc/lua.pc +} + +src_test() { + local positive="bisect cf echo env factorial fib fibfor hello printf sieve sort trace-calls" + local negative="readonly undefined" + local test + + for test in ${positive}; do + test/lua.static test/${test}.lua || die "test $test failed" + done + + for test in ${negative}; do + test/lua.static test/${test}.lua && die "test $test failed" + done +} |