summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEmanuele Giaquinta <exg@gentoo.org>2006-10-15 15:54:10 +0000
committerEmanuele Giaquinta <exg@gentoo.org>2006-10-15 15:54:10 +0000
commitcf37d8b76d5d168816a00145b2cec0ca37e781c7 (patch)
tree09aed64528126b2260b030ee972ac291ebcbd0e2 /dev-lang/lua
parentPatch to give a soname to libmpeg3.so, bug #132381, thanks to Dick Marinus (diff)
downloadhistorical-cf37d8b76d5d168816a00145b2cec0ca37e781c7.tar.gz
historical-cf37d8b76d5d168816a00145b2cec0ca37e781c7.tar.bz2
historical-cf37d8b76d5d168816a00145b2cec0ca37e781c7.zip
Proper support for PIC.
Package-Manager: portage-2.1.2_pre3-r1
Diffstat (limited to 'dev-lang/lua')
-rw-r--r--dev-lang/lua/ChangeLog8
-rw-r--r--dev-lang/lua/files/lua-5.0.3-asneeded.patch6
-rw-r--r--dev-lang/lua/files/lua-5.0.3-ldflags.patch8
-rw-r--r--dev-lang/lua/files/lua-5.0.3-shared.patch49
-rw-r--r--dev-lang/lua/lua-5.0.3.ebuild6
5 files changed, 66 insertions, 11 deletions
diff --git a/dev-lang/lua/ChangeLog b/dev-lang/lua/ChangeLog
index 062c26d69614..c5b5a25eb849 100644
--- a/dev-lang/lua/ChangeLog
+++ b/dev-lang/lua/ChangeLog
@@ -1,6 +1,12 @@
# 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.47 2006/10/14 10:44:03 exg Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/ChangeLog,v 1.48 2006/10/15 15:54:10 exg Exp $
+
+ 15 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, +files/lua-5.0.3-shared.patch,
+ lua-5.0.3.ebuild:
+ Proper support for PIC.
14 Oct 2006; Emanuele Giaquinta <exg@gentoo.org>
files/lua-5.0.3-asneeded.patch, lua-5.0.3.ebuild:
diff --git a/dev-lang/lua/files/lua-5.0.3-asneeded.patch b/dev-lang/lua/files/lua-5.0.3-asneeded.patch
index b47f2dfffeaa..fa7c3dc8c036 100644
--- a/dev-lang/lua/files/lua-5.0.3-asneeded.patch
+++ b/dev-lang/lua/files/lua-5.0.3-asneeded.patch
@@ -3,9 +3,9 @@
@@ -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 lib/liblua.so.$V $(EXTRA_LIBS) $(DLLIB)
+ $(CC) $(LDFLAGS) -o lib/liblua.so.$V -shared -Wl,-soname,liblua.so.$V src/*.lo
+- $(CC) $(LDFLAGS) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.lo
++ $(CC) $(LDFLAGS) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.lo lib/liblua.so.$V $(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
index 5bb3dad7ea97..f01b0ff1b43a 100644
--- a/dev-lang/lua/files/lua-5.0.3-ldflags.patch
+++ b/dev-lang/lua/files/lua-5.0.3-ldflags.patch
@@ -4,10 +4,10 @@
# 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
+- $(CC) -o lib/liblua.so.$V -shared -Wl,-soname,liblua.so.$V src/*.lo
+- $(CC) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.lo
++ $(CC) $(LDFLAGS) -o lib/liblua.so.$V -shared -Wl,-soname,liblua.so.$V src/*.lo
++ $(CC) $(LDFLAGS) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.lo
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-shared.patch b/dev-lang/lua/files/lua-5.0.3-shared.patch
new file mode 100644
index 000000000000..a516afd3be94
--- /dev/null
+++ b/dev-lang/lua/files/lua-5.0.3-shared.patch
@@ -0,0 +1,49 @@
+--- 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/*.lo
++ $(CC) -o lib/liblualib.so.$V -shared -Wl,-soname,liblualib.so.$V src/lib/*.lo
+ 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/Makefile.old 2006-10-08 18:11:47.797976922 +0200
++++ lua-5.0.3/src/Makefile 2006-10-08 19:31:46.505995222 +0200
+@@ -67,9 +67,14 @@
+ lvm.h \
+ lzio.h
+
++SOBJS=$(OBJS:.o=.lo)
++
++%.lo: %.c
++ $(CC) $(CFLAGS) -fPIC -DPIC -o $@ -c $<
++
+ T= $(LIB)/liblua.a
+
+-all: $T
++all: $T $(SOBJS)
+
+ $T: $(OBJS)
+ $(AR) $@ $(OBJS)
+--- lua-5.0.3/src/lib/Makefile.old 2006-10-08 18:15:26.441697217 +0200
++++ lua-5.0.3/src/lib/Makefile 2006-10-08 19:32:13.781586082 +0200
+@@ -9,9 +9,14 @@
+ OBJS= lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o ltablib.o lstrlib.o loadlib.o
+ SRCS= lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c ltablib.c lstrlib.c loadlib.c
+
++SOBJS=$(OBJS:.o=.lo)
++
++%.lo: %.c
++ $(CC) $(CFLAGS) -fPIC -DPIC -o $@ -c $<
++
+ T= $(LIB)/liblualib.a
+
+-all: $T
++all: $T $(SOBJS)
+
+ $T: $(OBJS)
+ $(AR) $@ $(OBJS)
diff --git a/dev-lang/lua/lua-5.0.3.ebuild b/dev-lang/lua/lua-5.0.3.ebuild
index 5a988b096356..e52d31d8e448 100644
--- a/dev-lang/lua/lua-5.0.3.ebuild
+++ b/dev-lang/lua/lua-5.0.3.ebuild
@@ -1,6 +1,6 @@
# 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.3 2006/10/14 10:44:03 exg Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/lua/lua-5.0.3.ebuild,v 1.4 2006/10/15 15:54:10 exg Exp $
inherit eutils portability
@@ -20,14 +20,14 @@ src_unpack() {
unpack ${A}
cd "${S}"
- epatch "${FILESDIR}"/${P}-linking.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} -fPIC -DPIC:" \
+ -e "s:^\(MYCFLAGS= \)-O2:\1${CFLAGS}:" \
-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:'