summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-03-16 00:35:11 +0000
committerMike Frysinger <vapier@gentoo.org>2010-03-16 00:35:11 +0000
commit9eba0033ee43a38f48cba7de156c9d3c831d6297 (patch)
tree6288a7c61cbbf64441fe4cc76a6a0fb095efd07a /sys-libs/zlib/files
parentAdd fix from upstream for username handling with rsh. (diff)
downloadgentoo-2-9eba0033ee43a38f48cba7de156c9d3c831d6297.tar.gz
gentoo-2-9eba0033ee43a38f48cba7de156c9d3c831d6297.tar.bz2
gentoo-2-9eba0033ee43a38f48cba7de156c9d3c831d6297.zip
Version bump #309623 by Samuli Suominen.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs/zlib/files')
-rw-r--r--sys-libs/zlib/files/zlib-1.2.4-LDFLAGS.patch49
-rw-r--r--sys-libs/zlib/files/zlib-1.2.4-build.patch34
-rw-r--r--sys-libs/zlib/files/zlib-1.2.4-visibility-support.patch45
3 files changed, 128 insertions, 0 deletions
diff --git a/sys-libs/zlib/files/zlib-1.2.4-LDFLAGS.patch b/sys-libs/zlib/files/zlib-1.2.4-LDFLAGS.patch
new file mode 100644
index 000000000000..8b128bee1fed
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.4-LDFLAGS.patch
@@ -0,0 +1,49 @@
+respect LDFLAGS !
+
+--- zlib-1.2.4/Makefile.in
++++ zlib-1.2.4/Makefile.in
+@@ -26,7 +26,6 @@
+
+ SFLAGS=-O
+
+-LDFLAGS=-L. libz.a
+ LDSHARED=$(CC)
+ CPP=$(CC) -E
+
+@@ -134,29 +133,29 @@
+ -@mv objs/$*.o $@
+
+ $(SHAREDLIBV): $(PIC_OBJS)
+- $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc
++ $(LDSHARED) $(SFLAGS) -o $@ $(PIC_OBJS) -lc $(LDFLAGS)
+ rm -f $(SHAREDLIB) $(SHAREDLIBM)
+ ln -s $@ $(SHAREDLIB)
+ ln -s $@ $(SHAREDLIBM)
+ -@rmdir objs
+
+ example$(EXE): example.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ -L. $^ $(LDFLAGS)
+
+ minigzip$(EXE): minigzip.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ -L. $^ $(LDFLAGS)
+
+ examplesh$(EXE): example.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ -L. $^ $(LDFLAGS)
+
+ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ -L. $^ $(LDFLAGS)
+
+ example64$(EXE): example64.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ example64.o $(LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ -L. $^ $(LDFLAGS)
+
+ minigzip64$(EXE): minigzip64.o $(STATICLIB)
+- $(CC) $(CFLAGS) -o $@ minigzip64.o $(LDFLAGS)
++ $(CC) $(CFLAGS) -o $@ -L. $^ $(LDFLAGS)
+
+ install-libs: $(LIBS)
+ -@if [ ! -d $(DESTDIR)$(exec_prefix) ]; then mkdir -p $(DESTDIR)$(exec_prefix); fi
diff --git a/sys-libs/zlib/files/zlib-1.2.4-build.patch b/sys-libs/zlib/files/zlib-1.2.4-build.patch
new file mode 100644
index 000000000000..52b398cef055
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.4-build.patch
@@ -0,0 +1,34 @@
+--- zlib-1.2.4/win32/Makefile.gcc
++++ zlib-1.2.4/win32/Makefile.gcc
+@@ -30,21 +30,23 @@
+ #LOC = -DASMV
+ #LOC = -DDEBUG -g
+
+-CC = gcc
+-CFLAGS = $(LOC) -O3 -Wall
++CC ?= gcc
++CFLAGS ?= $(LOC) -O3 -Wall
+
+-AS = $(CC)
+-ASFLAGS = $(LOC) -Wall
++AS ?= $(CC)
++ASFLAGS ?= $(LOC) -Wall
+
+ LD = $(CC)
+-LDFLAGS = $(LOC) -s
++LDFLAGS ?= $(LOC)
+
+-AR = ar
++AR ?= ar
+ ARFLAGS = rcs
+
+-RC = windres
++RC ?= windres
+ RCFLAGS = --define GCC_WINDRES
+
++DLLWRAP ?= dllwrap
++
+-STRIP = strip
++STRIP = #
+
+ CP = cp -fp
diff --git a/sys-libs/zlib/files/zlib-1.2.4-visibility-support.patch b/sys-libs/zlib/files/zlib-1.2.4-visibility-support.patch
new file mode 100644
index 000000000000..78c902abde6d
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.4-visibility-support.patch
@@ -0,0 +1,45 @@
+Only export symbols that should be exported.
+
+Patch by Mike Frysinger
+
+http://bugs.gentoo.org/32764
+http://bugs.gentoo.org/149929
+
+--- zlib-1.2.4/configure
++++ zlib-1.2.4/configure
+@@ -209,6 +209,20 @@
+ fi
+
+ cat > $test.c <<EOF
++int foo __attribute__ ((visibility ("hidden")));
++int main()
++{
++ return 0;
++}
++EOF
++if ($CC -c -fvisibility=hidden $CFLAGS $test.c) 2>/dev/null; then
++ CFLAGS="$CFLAGS -DHAS_attribute_visibility -fvisibility=hidden"
++ echo "Checking for attribute(visibility) support... Yes."
++else
++ echo "Checking for attribute(visibility) support... No."
++fi
++
++cat > $test.c <<EOF
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include "zconf.h"
+--- zlib-1.2.4/zconf.h.in
++++ zlib-1.2.4/zconf.h.in
+@@ -244,7 +244,11 @@
+ #endif
+
+ #ifndef ZEXTERN
+-# define ZEXTERN extern
++# if defined(ZLIB_INTERNAL) && defined(HAS_attribute_visibility)
++# define ZEXTERN extern __attribute__ ((visibility("default")))
++# else
++# define ZEXTERN extern
++# endif
+ #endif
+ #ifndef ZEXPORT
+ # define ZEXPORT