* [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
@ 2015-09-29 13:26 Mike Frysinger
0 siblings, 0 replies; 8+ messages in thread
From: Mike Frysinger @ 2015-09-29 13:26 UTC (permalink / raw
To: gentoo-commits
commit: 003eb41c3b2333941eaeee79c11b4a37d32ad9c6
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 29 13:22:50 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Tue Sep 29 13:23:15 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=003eb41c
sys-libs/zlib: drop old
sys-libs/zlib/Manifest | 5 -
sys-libs/zlib/files/zlib-1.2.1-build-fPIC.patch | 72 --------------
sys-libs/zlib/files/zlib-1.2.1-configure.patch | 103 ---------------------
sys-libs/zlib/files/zlib-1.2.1-fPIC.patch | 16 ----
sys-libs/zlib/files/zlib-1.2.1-glibc.patch | 12 ---
sys-libs/zlib/files/zlib-1.2.3-LDFLAGS.patch | 31 -------
sys-libs/zlib/files/zlib-1.2.3-build.patch | 66 -------------
sys-libs/zlib/files/zlib-1.2.3-mingw-implib.patch | 13 ---
sys-libs/zlib/files/zlib-1.2.3-r1-bsd-soname.patch | 15 ---
.../zlib/files/zlib-1.2.3-visibility-support.patch | 45 ---------
.../zlib/files/zlib-1.2.4-minizip-autotools.patch | 64 -------------
sys-libs/zlib/files/zlib-1.2.5-fbsd_chosts.patch | 15 ---
sys-libs/zlib/files/zlib-1.2.5-ldflags.patch | 22 -----
sys-libs/zlib/files/zlib-1.2.5-lfs-decls.patch | 15 ---
sys-libs/zlib/files/zlib-1.2.5.1-symlinks.patch | 33 -------
sys-libs/zlib/files/zlib-1.2.5.1-version.patch | 22 -----
sys-libs/zlib/zlib-1.2.3-r1.ebuild | 78 ----------------
sys-libs/zlib/zlib-1.2.5-r2.ebuild | 72 --------------
sys-libs/zlib/zlib-1.2.5.1-r1.ebuild | 76 ---------------
sys-libs/zlib/zlib-1.2.5.1-r2.ebuild | 100 --------------------
sys-libs/zlib/zlib-1.2.5.1.ebuild | 72 --------------
sys-libs/zlib/zlib-1.2.6.ebuild | 93 -------------------
sys-libs/zlib/zlib-1.2.7.ebuild | 99 --------------------
sys-libs/zlib/zlib-1.2.8.ebuild | 99 --------------------
24 files changed, 1238 deletions(-)
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
index 5ebb26a..860558b 100644
--- a/sys-libs/zlib/Manifest
+++ b/sys-libs/zlib/Manifest
@@ -1,6 +1 @@
-DIST zlib-1.2.3.tar.bz2 425209 SHA256 e3b9950851a19904d642c4dec518623382cf4d2ac24f70a76510c944330d28ca SHA512 edae735960279d92acf58e1f4095c6392a7c2059b8f1d2c46648fc608a0fb06b392db2d073f4973f5762c034ea66596e769b95b3d26ad963a086b9b2d09825f2 WHIRLPOOL e874b123296f5d77daf60617501b30f4beebccb64b3910c2539f75f6c194a2cf4885dc7a3904bf790e1651120ec33b55c48e95970dd6bfd6c4d0a2ea48d7d0f4
-DIST zlib-1.2.5.1.tar.gz 548499 SHA256 c1f24a64f808528293cf04ba09a2dffbc3dd65ad7ebcee4737124ff8923756da SHA512 fceaf55eee0b8029dd4e3a6098fd9b9909a172cead79a2d92cf5b98ced0433e4bacec1064282459fea7e387f0367f78ee6e487da74199ea36da32311455802b2 WHIRLPOOL 2a64b8cb42b0913cd8a417c02ae80edcccab8346c4c9b2bfe9e7ef0c8144ed20571e1516972bf77771abb070afe0bfecd28abb07160a1c2f5be4c764dc4d385f
-DIST zlib-1.2.5.tar.bz2 486374 SHA256 239aead2f22f16bfcfa6a6a5150dcbd6d6f2e4d1eaa8727b5769ea014120b307 SHA512 88e8aa4bd2f23233cc6c0f52e568c7d8d2c18a69170c2363b574fbe5c86ce352d0768178c3fde6372576c45e0fdf80537ebde773689e3ad8584baddb889d0ede WHIRLPOOL d660761c4f437dd6c20e5cd23e442672c77264e6dc639bbf749d253c2fffd6b9fd32a9a9df7f5e9c3ec791afebbf486b8a4d6e8bac35cd2d2371dba759bb83a7
-DIST zlib-1.2.6.tar.gz 557220 SHA256 21235e08552e6feba09ea5e8d750805b3391c62fb81c71a235c0044dc7a8a61b SHA512 f812ab3049fc2920a8da4649f6e60340ac365d58a0e76ace5219426aeb0759c0a474cfb2b9902cd0471158fa32a4d2c35692309d266e66013444bdced8ed00d9 WHIRLPOOL 9655627d9770b6850d33b18ef7dc349396454fc217b90d3f7c2ffdac028533ff741c3a70ee4280ef91baf67425d037e6559dcea1da4c568ca51df8e9b7ab6df3
-DIST zlib-1.2.7.tar.gz 560351 SHA256 fa9c9c8638efb8cb8ef5e4dd5453e455751e1c530b1595eed466e1be9b7e26c5 SHA512 b1c073ad26684e354f7c522c14655840592e03872bc0a94690f89cae2ff88f146fce1dad252ff27a889dac4a32ff9f8ab63ba940671f9da89e9ba3e19f1bf58d WHIRLPOOL 2f0bc05a9c14033adc33cdd14d1dce72a57c650304692141a89af26274b62ffa67d09afbc68562d07279f80e214e396b357f20094ecf4b9576bc200cafa01a6d
DIST zlib-1.2.8.tar.gz 571091 SHA256 36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d SHA512 ece209d4c7ec0cb58ede791444dc754e0d10811cbbdebe3df61c0fd9f9f9867c1c3ccd5f1827f847c005e24eef34fb5bf87b5d3f894d75da04f1797538290e4a WHIRLPOOL bcb6243f1a9370eafcea03c227938da1cc106c934193ce59ef4fbdca0167777b95c9baa376feb6d8d369023024a74de5df17c2b6ec5887cdb732ffc95808ef95
diff --git a/sys-libs/zlib/files/zlib-1.2.1-build-fPIC.patch b/sys-libs/zlib/files/zlib-1.2.1-build-fPIC.patch
deleted file mode 100644
index 86d05c8..0000000
--- a/sys-libs/zlib/files/zlib-1.2.1-build-fPIC.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- zlib-1.2.1/Makefile.in
-+++ zlib-1.2.1/Makefile.in
-@@ -49,6 +49,8 @@
- OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
- zutil.o inflate.o infback.o inftrees.o inffast.o
-
-+PIC_OBJS = $(OBJS:%.o=%.lo)
-+
- OBJA =
- # to use the asm code: make OBJA=match.o
-
-@@ -77,8 +79,11 @@
- mv _match.o match.o
- rm -f _match.s
-
--$(SHAREDLIBV): $(OBJS)
-- $(LDSHARED) -o $@ $(OBJS) -lc
-+%.lo: %.c
-+ $(CC) $(CFLAGS) -DPIC -fPIC -c $< -o $@
-+
-+$(SHAREDLIBV): $(PIC_OBJS)
-+ $(LDSHARED) -o $@ $(PIC_OBJS) -lc
- rm -f $(SHAREDLIB) $(SHAREDLIBM)
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIBM)
-@@ -89,13 +94,10 @@
- minigzip$(EXE): minigzip.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
--install: $(LIBS)
-+install-libs: $(LIBS)
- -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
-- -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
- -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
- -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi
-- cp zlib.h zconf.h $(includedir)
-- chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
- cp $(LIBS) $(libdir)
- cd $(libdir); chmod 755 $(LIBS)
- -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
-@@ -110,6 +112,11 @@
- # The ranlib in install is needed on NeXTSTEP which checks file times
- # ldconfig is for Linux
-
-+install: install-libs
-+ -@if [ ! -d $(includedir) ]; then mkdir $(includedir); fi
-+ cp zlib.h zconf.h $(includedir)
-+ chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
-+
- uninstall:
- cd $(includedir); \
- cd $(libdir); rm -f libz.a; \
-@@ -127,7 +127,7 @@
-
- mostlyclean: clean
- clean:
-- rm -f *.o *~ example$(EXE) minigzip$(EXE) \
-+ rm -f *.lo *.o *~ example$(EXE) minigzip$(EXE) \
- libz.* foo.gz so_locations \
- _match.s maketree contrib/infback9/*.o
-
---- zlib-1.2.1/configure
-+++ zlib-1.2.1/configure
-@@ -160,7 +160,7 @@
- if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
- test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
- CFLAGS="$SFLAGS"
-- LIBS="$SHAREDLIBV"
-+ LIBS="$LIBS $SHAREDLIBV"
- echo Building shared library $SHAREDLIBV with $CC.
- elif test -z "$old_cc" -a -z "$old_cflags"; then
- echo No shared library support.
diff --git a/sys-libs/zlib/files/zlib-1.2.1-configure.patch b/sys-libs/zlib/files/zlib-1.2.1-configure.patch
deleted file mode 100644
index 477fc5c..0000000
--- a/sys-libs/zlib/files/zlib-1.2.1-configure.patch
+++ /dev/null
@@ -1,103 +0,0 @@
---- configure.orig 2004-06-29 18:49:20.065187520 -0400
-+++ configure 2004-06-29 18:52:54.142642800 -0400
-@@ -160,8 +160,8 @@
- if test $shared -eq 1; then
- echo Checking for shared library support...
- # we must test in two steps (cc then ld), required at least on SunOS 4.x
-- if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
-- test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
-+ if ($CC -c $SFLAGS $test.c) 2>/dev/null &&
-+ ($LDSHARED -o $test$shared_ext $test.o) 2>/dev/null; then
- CFLAGS="$SFLAGS"
- LIBS="$LIBS $SHAREDLIBV"
- echo Building shared library $SHAREDLIBV with $CC.
-@@ -185,7 +185,7 @@
- #include <unistd.h>
- int main() { return 0; }
- EOF
--if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h
- echo "Checking for unistd.h... Yes."
- else
-@@ -208,7 +208,7 @@
- }
- EOF
-
--if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()"
-
- cat > $test.c <<EOF
-@@ -232,7 +232,7 @@
- }
- EOF
-
-- if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-+ if ($CC $CFLAGS -o $test $test.c) 2>/dev/null; then
- echo "Checking for vsnprintf() in stdio.h... Yes."
-
- cat >$test.c <<EOF
-@@ -257,7 +257,7 @@
- }
- EOF
-
-- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+ if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- echo "Checking for return value of vsnprintf()... Yes."
- else
- CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
-@@ -295,7 +295,7 @@
- }
- EOF
-
-- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+ if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- echo "Checking for return value of vsprintf()... Yes."
- else
- CFLAGS="$CFLAGS -DHAS_vsprintf_void"
-@@ -325,7 +325,7 @@
- }
- EOF
-
-- if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-+ if ($CC $CFLAGS -o $test $test.c) 2>/dev/null; then
- echo "Checking for snprintf() in stdio.h... Yes."
-
- cat >$test.c <<EOF
-@@ -344,7 +344,7 @@
- }
- EOF
-
-- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+ if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- echo "Checking for return value of snprintf()... Yes."
- else
- CFLAGS="$CFLAGS -DHAS_snprintf_void"
-@@ -376,7 +376,7 @@
- }
- EOF
-
-- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+ if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- echo "Checking for return value of sprintf()... Yes."
- else
- CFLAGS="$CFLAGS -DHAS_sprintf_void"
-@@ -392,7 +392,7 @@
- #include <errno.h>
- int main() { return 0; }
- EOF
--if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- echo "Checking for errno.h... Yes."
- else
- echo "Checking for errno.h... No."
-@@ -407,7 +407,7 @@
- return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
- }
- EOF
--if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+if ($CC -c $CFLAGS $test.c) 2>/dev/null; then
- CFLAGS="$CFLAGS -DUSE_MMAP"
- echo Checking for mmap support... Yes.
- else
diff --git a/sys-libs/zlib/files/zlib-1.2.1-fPIC.patch b/sys-libs/zlib/files/zlib-1.2.1-fPIC.patch
deleted file mode 100644
index 5ccbddf..0000000
--- a/sys-libs/zlib/files/zlib-1.2.1-fPIC.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- zlib-1.2.1/configure
-+++ zlib-1.2.1/configure
-@@ -73,7 +73,12 @@
-
- if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
- CC="$cc"
-- SFLAGS=${CFLAGS-"-fPIC -O3"}
-+ #SFLAGS=${CFLAGS-"-fPIC -O3"}
-+ # the above is horribly wrong on a few archs where -fPIC should ALWAYS be
-+ # used in the creation of shared libraries. without the following, the
-+ # shared lib test will sometimes fail even when shared libs -can- be created.
-+ SFLAGS=${CFLAGS-"-O3"}
-+ SFLAGS="${SFLAGS} -fPIC"
- CFLAGS="$cflags"
- case `(uname -s || echo unknown) 2>/dev/null` in
- Linux | linux | GNU | GNU/*)
diff --git a/sys-libs/zlib/files/zlib-1.2.1-glibc.patch b/sys-libs/zlib/files/zlib-1.2.1-glibc.patch
deleted file mode 100644
index db5e0df..0000000
--- a/sys-libs/zlib/files/zlib-1.2.1-glibc.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -urN zlib-1.2.1-old/Makefile.in zlib-1.2.1/Makefile.in
---- zlib-1.2.1-old/Makefile.in 2003-11-08 18:29:23.000000000 -0800
-+++ zlib-1.2.1/Makefile.in 2003-12-02 12:12:43.000000000 -0800
-@@ -78,7 +78,7 @@
- rm -f _match.s
-
- $(SHAREDLIBV): $(OBJS)
-- $(LDSHARED) -o $@ $(OBJS)
-+ $(LDSHARED) -o $@ $(OBJS) -lc
- rm -f $(SHAREDLIB) $(SHAREDLIBM)
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIBM)
diff --git a/sys-libs/zlib/files/zlib-1.2.3-LDFLAGS.patch b/sys-libs/zlib/files/zlib-1.2.3-LDFLAGS.patch
deleted file mode 100644
index 86da956..0000000
--- a/sys-libs/zlib/files/zlib-1.2.3-LDFLAGS.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- zlib-1.2.3/Makefile.in
-+++ zlib-1.2.3/Makefile.in
-@@ -24,7 +24,7 @@
- #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
- # -Wstrict-prototypes -Wmissing-prototypes
-
--LDFLAGS=libz.a
-+TEST_LDFLAGS=libz.a
- LDSHARED=$(CC)
- CPP=$(CC) -E
-
-@@ -83,16 +83,16 @@
- $(CC) $(CFLAGS) -DPIC -fPIC -c $< -o $@
-
- $(SHAREDLIBV): $(PIC_OBJS)
-- $(LDSHARED) -o $@ $(PIC_OBJS) -lc
-+ $(LDSHARED) -o $@ $(PIC_OBJS) -lc $(LDFLAGS)
- rm -f $(SHAREDLIB) $(SHAREDLIBM)
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIBM)
-
- example$(EXE): example.o $(LIBS)
-- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-+ $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) $(TEST_LDFLAGS)
-
- minigzip$(EXE): minigzip.o $(LIBS)
-- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-+ $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) $(TEST_LDFLAGS)
-
- install-libs: $(LIBS)
- -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
diff --git a/sys-libs/zlib/files/zlib-1.2.3-build.patch b/sys-libs/zlib/files/zlib-1.2.3-build.patch
deleted file mode 100644
index 10435b8..0000000
--- a/sys-libs/zlib/files/zlib-1.2.3-build.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- zlib-1.2.3/configure
-+++ zlib-1.2.3/configure
-@@ -23,7 +23,7 @@
- VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
- VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
- VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
--AR=${AR-"ar rc"}
-+AR=${AR-"ar"}
- RANLIB=${RANLIB-"ranlib"}
- prefix=${prefix-/usr/local}
- exec_prefix=${exec_prefix-'${prefix}'}
---- zlib-1.2.3/Makefile.in
-+++ zlib-1.2.3/Makefile.in
-@@ -70,7 +70,7 @@
- fi
-
- libz.a: $(OBJS) $(OBJA)
-- $(AR) $@ $(OBJS) $(OBJA)
-+ $(AR) rc $@ $(OBJS) $(OBJA)
- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
- match.o: match.S
---- zlib-1.2.3/win32/Makefile.gcc
-+++ zlib-1.2.3/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) -s
-
--AR = ar
-+AR ?= ar
- ARFLAGS = rcs
-
--RC = windres
-+RC ?= windres
- RCFLAGS = --define GCC_WINDRES
-
-+DLLWRAP ?= dllwrap
-+
- CP = cp -fp
- # If GNU install is available, replace $(CP) with install.
- INSTALL = $(CP)
-@@ -79,9 +81,8 @@
- $(IMPLIB): $(SHAREDLIB)
-
- $(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
-- dllwrap --driver-name $(CC) --def win32/zlib.def \
-+ $(DLLWRAP) --driver-name $(CC) --def win32/zlib.def \
- --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
-- strip $@
-
- example: example.o $(STATICLIB)
- $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
diff --git a/sys-libs/zlib/files/zlib-1.2.3-mingw-implib.patch b/sys-libs/zlib/files/zlib-1.2.3-mingw-implib.patch
deleted file mode 100644
index 9726237..0000000
--- a/sys-libs/zlib/files/zlib-1.2.3-mingw-implib.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-http://bugs.gentoo.org/288212
-
---- zlib-1.2.3/win32/Makefile.gcc
-+++ zlib-1.2.3/win32/Makefile.gcc
-@@ -25,7 +25,7 @@
-
- STATICLIB = libz.a
- SHAREDLIB = zlib1.dll
--IMPLIB = libzdll.a
-+IMPLIB = libz.dll.a
-
- #LOC = -DASMV
- #LOC = -DDEBUG -g
diff --git a/sys-libs/zlib/files/zlib-1.2.3-r1-bsd-soname.patch b/sys-libs/zlib/files/zlib-1.2.3-r1-bsd-soname.patch
deleted file mode 100644
index 872070b..0000000
--- a/sys-libs/zlib/files/zlib-1.2.3-r1-bsd-soname.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Generate a DT_SONAME on *BSD machines
-
-http://bugs.gentoo.org/123571
-
---- configure
-+++ configure
-@@ -80,7 +80,7 @@
- SFLAGS="${CFLAGS-"-O3"} -fPIC"
- CFLAGS="$cflags"
- case `(uname -s || echo unknown) 2>/dev/null` in
-- Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
-+ Linux | linux | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
- CYGWIN* | Cygwin* | cygwin* | OS/2* )
- EXE='.exe';;
- QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
diff --git a/sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch b/sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch
deleted file mode 100644
index ceb065e..0000000
--- a/sys-libs/zlib/files/zlib-1.2.3-visibility-support.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-Only export symbols that should be exported.
-
-Patch by Mike Frysinger
-
-http://bugs.gentoo.org/32764
-http://bugs.gentoo.org/149929
-
---- zlib-1.2.3/configure
-+++ zlib-1.2.3/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.3/zconf.in.h
-+++ zlib-1.2.3/zconf.in.h
-@@ -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
diff --git a/sys-libs/zlib/files/zlib-1.2.4-minizip-autotools.patch b/sys-libs/zlib/files/zlib-1.2.4-minizip-autotools.patch
deleted file mode 100644
index 81a62f0..0000000
--- a/sys-libs/zlib/files/zlib-1.2.4-minizip-autotools.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-sniped & improved from Fedora
-
---- zlib-1.2.4/contrib/minizip/configure.ac
-+++ zlib-1.2.4/contrib/minizip/configure.ac
-@@ -0,0 +1,12 @@
-+# -*- Autoconf -*-
-+# Process this file with autoconf to produce a configure script.
-+
-+AC_INIT([minizip], [@ZLIB_VER@], [bugzilla.redhat.com])
-+AC_CONFIG_SRCDIR([minigzip.c])
-+AM_INIT_AUTOMAKE([foreign])
-+LT_INIT
-+
-+AC_SUBST([HAVE_UNISTD_H], [0])
-+AC_CHECK_HEADER([unistd.h], [HAVE_UNISTD_H=1], [])
-+AC_CONFIG_FILES([Makefile minizip.pc])
-+AC_OUTPUT
---- zlib-1.2.4/contrib/minizip/Makefile.am
-+++ zlib-1.2.4/contrib/minizip/Makefile.am
-@@ -0,0 +1,28 @@
-+lib_LTLIBRARIES = libminizip.la
-+
-+libminizip_la_SOURCES = \
-+ ioapi.c \
-+ mztools.c \
-+ unzip.c \
-+ zip.c
-+
-+libminizip_la_CFLAGS = -I../.. -L../..
-+libminizip_la_LDFLAGS = -version-info 1:0:0 -lz
-+
-+minizip_includedir = $(includedir)/minizip
-+minizip_include_HEADERS = \
-+ crypt.h \
-+ ioapi.h \
-+ mztools.h \
-+ unzip.h \
-+ zip.h
-+
-+pkgconfigdir = $(libdir)/pkgconfig
-+pkgconfig_DATA = minizip.pc
-+
-+EXTRA_PROGRAMS = miniunzip minizip
-+
-+miniunzip_SOURCES = miniunz.c
-+miniunzip_LDADD = libminizip.la
-+
-+minizip_SOURCES = minizip.c
-+minizip_LDADD = libminizip.la
---- zlib-1.2.4/contrib/minizip/minizip.pc.in
-+++ zlib-1.2.4/contrib/minizip/minizip.pc.in
-@@ -0,0 +1,12 @@
-+prefix=@prefix@
-+exec_prefix=@exec_prefix@
-+libdir=@libdir@
-+includedir=@includedir@/minizip
-+
-+Name: minizip
-+Description: Minizip zip file manipulation library
-+Requires:
-+Version: @PACKAGE_VERSION@
-+Libs: -L${libdir} -lminizip
-+Libs.private: -lz
-+Cflags: -I${includedir}
diff --git a/sys-libs/zlib/files/zlib-1.2.5-fbsd_chosts.patch b/sys-libs/zlib/files/zlib-1.2.5-fbsd_chosts.patch
deleted file mode 100644
index 9b1f833..0000000
--- a/sys-libs/zlib/files/zlib-1.2.5-fbsd_chosts.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-accept freebsd targets
-
-http://bugs.gentoo.org/316841
-
---- zlib-1.2.5/configure
-+++ zlib-1.2.5/configure
-@@ -118,7 +118,7 @@
- uname=`(uname -s || echo unknown) 2>/dev/null`
- fi
- case "$uname" in
-- Linux* | linux* | GNU | GNU/* | *BSD | DragonFly) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
-+ Linux* | linux* | GNU | GNU/* | *BSD | DragonFly | freebsd* ) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map"} ;;
- CYGWIN* | Cygwin* | cygwin* | OS/2*)
- EXE='.exe' ;;
- MINGW*|mingw*)
diff --git a/sys-libs/zlib/files/zlib-1.2.5-ldflags.patch b/sys-libs/zlib/files/zlib-1.2.5-ldflags.patch
deleted file mode 100644
index dff534b..0000000
--- a/sys-libs/zlib/files/zlib-1.2.5-ldflags.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-http://bugs.gentoo.org/319661
-
-LDFLAGS is only used with the shared lib, so dont link against the static zlib
-
---- a/configure
-+++ b/configure
-@@ -19,7 +19,6 @@
- fi
-
- STATICLIB=libz.a
--LDFLAGS="${LDFLAGS} -L. ${STATICLIB}"
- VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
- VER3=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\\.[0-9]*\).*/\1/p' < zlib.h`
- VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
-@@ -174,7 +173,6 @@
- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so.1"} ;;
- OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
- CFLAGS=${CFLAGS-"-O -std1"}
-- LDFLAGS="${LDFLAGS} -Wl,-rpath,."
- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"} ;;
- OSF1*) SFLAGS=${CFLAGS-"-O -std1"}
- CFLAGS=${CFLAGS-"-O -std1"}
diff --git a/sys-libs/zlib/files/zlib-1.2.5-lfs-decls.patch b/sys-libs/zlib/files/zlib-1.2.5-lfs-decls.patch
deleted file mode 100644
index 8d73430..0000000
--- a/sys-libs/zlib/files/zlib-1.2.5-lfs-decls.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-http://bugs.gentoo.org/316377
-
-try to unbreak over-eager LFS logic in zlib header
-
---- zlib-1.2.5/zlib.h
-+++ zlib-1.2.5/zlib.h
-@@ -1578,7 +1578,7 @@
- # define gzoffset gzoffset64
- # define adler32_combine adler32_combine64
- # define crc32_combine crc32_combine64
--# ifdef _LARGEFILE64_SOURCE
-+# ifndef _LARGEFILE64_SOURCE
- ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
- ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
- ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
diff --git a/sys-libs/zlib/files/zlib-1.2.5.1-symlinks.patch b/sys-libs/zlib/files/zlib-1.2.5.1-symlinks.patch
deleted file mode 100644
index e747b01..0000000
--- a/sys-libs/zlib/files/zlib-1.2.5.1-symlinks.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From e41d99c135935b849e1e639632937829ff2000d8 Mon Sep 17 00:00:00 2001
-From: Mike Frysinger <vapier@gentoo.org>
-Date: Sun, 11 Sep 2011 14:32:53 -0400
-Subject: [PATCH] use relative symlinks for shared libs
-
-The DESTDIR should not be encoded into symlinks as it is only a
-temporary path. Further, since we install the symlinks into the
-same dir as the files, let's use relative links so that they can
-always resolve.
-
-Signed-off-by: Mike Frysinger <vapier@gentoo.org>
----
- Makefile.in | 4 ++--
- 1 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 861970d..299bd1d 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -176,8 +176,8 @@ install-libs: $(LIBS)
- chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV); \
- echo "chmod 755 $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV)"; \
- rm -f $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
-- ln -s $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
-- ln -s $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
-+ ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIB); \
-+ ln -s $(SHAREDLIBV) $(DESTDIR)$(sharedlibdir)/$(SHAREDLIBM); \
- ($(LDCONFIG) || true) >/dev/null 2>&1; \
- fi
- cp zlib.3 $(DESTDIR)$(man3dir)
---
-1.7.6
-
diff --git a/sys-libs/zlib/files/zlib-1.2.5.1-version.patch b/sys-libs/zlib/files/zlib-1.2.5.1-version.patch
deleted file mode 100644
index afaa1f0..0000000
--- a/sys-libs/zlib/files/zlib-1.2.5.1-version.patch
+++ /dev/null
@@ -1,22 +0,0 @@
-From 70386acb30b690fc9fcfdac9e01c8ca29ff20ef5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?T=C3=B6r=C3=B6k=20Edwin?= <edwintorok@gmail.com>
-Date: Sun, 11 Sep 2011 10:00:52 +0300
-Subject: [PATCH] fix ld error: unable to find version dependency `ZLIB_1.2.5'
-
----
- zlib.map | 2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
-diff --git a/zlib.map b/zlib.map
-index 65bcf17..f65a125 100644
---- a/zlib.map
-+++ b/zlib.map
-@@ -69,4 +69,4 @@ ZLIB_1.2.3.5 {
-
- ZLIB_1.2.5.1 {
- deflatePending;
--} ZLIB_1.2.5;
-+} ZLIB_1.2.3.5;
---
-1.7.5.4
-
diff --git a/sys-libs/zlib/zlib-1.2.3-r1.ebuild b/sys-libs/zlib/zlib-1.2.3-r1.ebuild
deleted file mode 100644
index ffbe773..0000000
--- a/sys-libs/zlib/zlib-1.2.3-r1.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils flag-o-matic toolchain-funcs multilib
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="http://www.zlib.net/"
-SRC_URI="http://www.gzip.org/zlib/${P}.tar.bz2
- http://www.zlib.net/${P}.tar.bz2"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
-IUSE=""
-
-RDEPEND=""
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${P}-build.patch
- epatch "${FILESDIR}"/${P}-visibility-support.patch #149929
- epatch "${FILESDIR}"/${PN}-1.2.1-glibc.patch
- epatch "${FILESDIR}"/${PN}-1.2.1-build-fPIC.patch
- epatch "${FILESDIR}"/${PN}-1.2.1-configure.patch #55434
- epatch "${FILESDIR}"/${PN}-1.2.1-fPIC.patch
- epatch "${FILESDIR}"/${PN}-1.2.3-r1-bsd-soname.patch #123571
- epatch "${FILESDIR}"/${PN}-1.2.3-LDFLAGS.patch #126718
- epatch "${FILESDIR}"/${PN}-1.2.3-mingw-implib.patch #288212
- sed -i -e '/ldconfig/d' Makefile*
-}
-
-src_compile() {
- tc-export AR CC RANLIB
- case ${CHOST} in
- *-mingw*|mingw*)
- export RC=${CHOST}-windres DLLWRAP=${CHOST}-dllwrap
- emake -f win32/Makefile.gcc prefix=/usr || die
- ;;
- *)
- # not an autoconf script, so cant use econf
- ./configure --shared --prefix=/usr --libdir=/$(get_libdir) || die
- emake || die
- ;;
- esac
-}
-
-src_install() {
- einstall libdir="${D}"/$(get_libdir) || die
- rm "${D}"/$(get_libdir)/libz.a
- insinto /usr/include
- doins zconf.h zlib.h
-
- doman zlib.3
- dodoc FAQ README ChangeLog algorithm.txt
-
- # we don't need the static lib in /lib
- # as it's only for compiling against
- dolib libz.a
-
- # all the shared libs go into /lib
- # for NFS based /usr
- case ${CHOST} in
- *-mingw*|mingw*)
- dobin zlib1.dll || die
- dolib libz.dll.a || die
- ;;
- *)
- into /
- dolib libz.so.${PV}
- ( cd "${D}"/$(get_libdir) ; chmod 755 libz.so.* )
- dosym libz.so.${PV} /$(get_libdir)/libz.so
- dosym libz.so.${PV} /$(get_libdir)/libz.so.1
- gen_usr_ldscript libz.so
- ;;
- esac
-}
diff --git a/sys-libs/zlib/zlib-1.2.5-r2.ebuild b/sys-libs/zlib/zlib-1.2.5-r2.ebuild
deleted file mode 100644
index efc81c6..0000000
--- a/sys-libs/zlib/zlib-1.2.5-r2.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils toolchain-funcs multilib
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="http://www.zlib.net/"
-SRC_URI="http://www.gzip.org/zlib/${P}.tar.bz2
- http://www.zlib.net/${P}.tar.bz2"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
-IUSE=""
-
-RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- # trust exit status of the compiler rather than stderr #55434
- # -if test "`(...) 2>&1`" = ""; then
- # +if (...) 2>/dev/null; then
- sed -i 's|\<test "`\([^"]*\) 2>&1`" = ""|\1 2>/dev/null|' configure || die
-
- epatch "${FILESDIR}"/${P}-ldflags.patch #319661
- epatch "${FILESDIR}"/${P}-lfs-decls.patch #316377
- epatch "${FILESDIR}"/${P}-fbsd_chosts.patch #316841
-}
-
-src_compile() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
- sed \
- -e 's|@prefix@|/usr|g' \
- -e 's|@exec_prefix@|${prefix}|g' \
- -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@includedir@|${prefix}/include|g' \
- -e 's|@VERSION@|'${PV}'|g' \
- zlib.pc.in > zlib.pc || die
- ;;
- *) # not an autoconf script, so can't use econf
- ./configure --shared --prefix=/usr --libdir=/usr/$(get_libdir) || die
- emake || die
- ;;
- esac
-}
-
-src_install() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc install \
- BINARY_PATH="${D}/usr/bin" \
- LIBRARY_PATH="${D}/usr/$(get_libdir)" \
- INCLUDE_PATH="${D}/usr/include" \
- SHARED_MODE=1 \
- || die
- insinto /usr/share/pkgconfig
- doins zlib.pc || die
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=: || die
- gen_usr_ldscript -a z
- ;;
- esac
-
- dodoc FAQ README ChangeLog doc/*.txt
-}
diff --git a/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild b/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild
deleted file mode 100644
index 369f93d..0000000
--- a/sys-libs/zlib/zlib-1.2.5.1-r1.ebuild
+++ /dev/null
@@ -1,76 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils toolchain-funcs multilib
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="http://www.zlib.net/"
-SRC_URI="http://www.gzip.org/zlib/${P}.tar.gz
- http://www.zlib.net/current/beta/${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
-IUSE=""
-
-RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- # trust exit status of the compiler rather than stderr #55434
- # -if test "`(...) 2>&1`" = ""; then
- # +if (...) 2>/dev/null; then
- sed -i 's|\<test "`\([^"]*\) 2>&1`" = ""|\1 2>/dev/null|' configure || die
-
- epatch "${FILESDIR}"/${P}-version.patch
- epatch "${FILESDIR}"/${P}-symlinks.patch
-}
-
-echoit() { echo "$@"; "$@"; }
-src_compile() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
- sed \
- -e 's|@prefix@|/usr|g' \
- -e 's|@exec_prefix@|${prefix}|g' \
- -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@includedir@|${prefix}/include|g' \
- -e 's|@VERSION@|'${PV}'|g' \
- zlib.pc.in > zlib.pc || die
- ;;
- *) # not an autoconf script, so can't use econf
- echoit ./configure --shared --prefix=/usr --libdir=/usr/$(get_libdir) || die
- emake || die
- ;;
- esac
-}
-
-src_install() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc install \
- BINARY_PATH="${D}/usr/bin" \
- LIBRARY_PATH="${D}/usr/$(get_libdir)" \
- INCLUDE_PATH="${D}/usr/include" \
- SHARED_MODE=1 \
- || die
- insinto /usr/share/pkgconfig
- doins zlib.pc || die
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=: || die
- gen_usr_ldscript -a z
- ;;
- esac
-
- # clean up namespace a little #383179
- # we do it here so we only have to tweak 2 files
- sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "${D}"/usr/include/*.h
-
- dodoc FAQ README ChangeLog doc/*.txt
-}
diff --git a/sys-libs/zlib/zlib-1.2.5.1-r2.ebuild b/sys-libs/zlib/zlib-1.2.5.1-r2.ebuild
deleted file mode 100644
index accca10..0000000
--- a/sys-libs/zlib/zlib-1.2.5.1-r2.ebuild
+++ /dev/null
@@ -1,100 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit autotools eutils toolchain-funcs multilib
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="http://www.zlib.net/"
-SRC_URI="http://www.gzip.org/zlib/${P}.tar.gz
- http://www.zlib.net/current/beta/${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
-IUSE="minizip static-libs"
-
-RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- # trust exit status of the compiler rather than stderr #55434
- # -if test "`(...) 2>&1`" = ""; then
- # +if (...) 2>/dev/null; then
- sed -i 's|\<test "`\([^"]*\) 2>&1`" = ""|\1 2>/dev/null|' configure || die
-
- epatch "${FILESDIR}"/${P}-version.patch
- epatch "${FILESDIR}"/${P}-symlinks.patch
- EPATCH_OPTS=-p1 epatch "${FILESDIR}"/${PN}-1.2.4-minizip-autotools.patch
- if use minizip ; then
- cd contrib/minizip
- sed -i "s:@ZLIB_VER@:${PV}:" configure.ac || die
- ln -s ../../minigzip.c || die
- eautoreconf
- fi
-}
-
-usex() { use $1 && echo ${2:-yes} || echo ${3:-no} ; }
-echoit() { echo "$@"; "$@"; }
-src_compile() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
- sed \
- -e 's|@prefix@|/usr|g' \
- -e 's|@exec_prefix@|${prefix}|g' \
- -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@includedir@|${prefix}/include|g' \
- -e 's|@VERSION@|'${PV}'|g' \
- zlib.pc.in > zlib.pc || die
- ;;
- *) # not an autoconf script, so can't use econf
- echoit ./configure --shared --prefix=/usr --libdir=/usr/$(get_libdir) || die
- emake || die
- ;;
- esac
- if use minizip ; then
- cd contrib/minizip
- econf $(use_enable static-libs static)
- emake || die
- fi
-}
-
-sed_macros() {
- # clean up namespace a little #383179
- # we do it here so we only have to tweak 2 files
- sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
-}
-src_install() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc install \
- BINARY_PATH="${D}/usr/bin" \
- LIBRARY_PATH="${D}/usr/$(get_libdir)" \
- INCLUDE_PATH="${D}/usr/include" \
- SHARED_MODE=1 \
- || die
- insinto /usr/share/pkgconfig
- doins zlib.pc || die
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=: || die
- gen_usr_ldscript -a z
- sed_macros "${D}"/usr/include/*.h
- ;;
- esac
-
- dodoc FAQ README ChangeLog doc/*.txt
-
- if use minizip ; then
- cd contrib/minizip
- emake install DESTDIR="${D}" || die
- sed_macros "${D}"/usr/include/minizip/*.h
- dodoc *.txt
- fi
-
- use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.{a,la}
-}
diff --git a/sys-libs/zlib/zlib-1.2.5.1.ebuild b/sys-libs/zlib/zlib-1.2.5.1.ebuild
deleted file mode 100644
index 7fff535..0000000
--- a/sys-libs/zlib/zlib-1.2.5.1.ebuild
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright 1999-2011 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-inherit eutils toolchain-funcs multilib
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="http://www.zlib.net/"
-SRC_URI="http://www.gzip.org/zlib/${P}.tar.gz
- http://www.zlib.net/current/beta/${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
-IUSE=""
-
-RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
- # trust exit status of the compiler rather than stderr #55434
- # -if test "`(...) 2>&1`" = ""; then
- # +if (...) 2>/dev/null; then
- sed -i 's|\<test "`\([^"]*\) 2>&1`" = ""|\1 2>/dev/null|' configure || die
-
- epatch "${FILESDIR}"/${P}-version.patch
- epatch "${FILESDIR}"/${P}-symlinks.patch
-}
-
-echoit() { echo "$@"; "$@"; }
-src_compile() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
- sed \
- -e 's|@prefix@|/usr|g' \
- -e 's|@exec_prefix@|${prefix}|g' \
- -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@includedir@|${prefix}/include|g' \
- -e 's|@VERSION@|'${PV}'|g' \
- zlib.pc.in > zlib.pc || die
- ;;
- *) # not an autoconf script, so can't use econf
- echoit ./configure --shared --prefix=/usr --libdir=/usr/$(get_libdir) || die
- emake || die
- ;;
- esac
-}
-
-src_install() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc install \
- BINARY_PATH="${D}/usr/bin" \
- LIBRARY_PATH="${D}/usr/$(get_libdir)" \
- INCLUDE_PATH="${D}/usr/include" \
- SHARED_MODE=1 \
- || die
- insinto /usr/share/pkgconfig
- doins zlib.pc || die
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=: || die
- gen_usr_ldscript -a z
- ;;
- esac
-
- dodoc FAQ README ChangeLog doc/*.txt
-}
diff --git a/sys-libs/zlib/zlib-1.2.6.ebuild b/sys-libs/zlib/zlib-1.2.6.ebuild
deleted file mode 100644
index 34683f7..0000000
--- a/sys-libs/zlib/zlib-1.2.6.ebuild
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-AUTOTOOLS_AUTO_DEPEND="no"
-inherit autotools eutils toolchain-funcs multilib
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="http://www.zlib.net/"
-SRC_URI="http://zlib.net/${P}.tar.gz
- http://www.gzip.org/zlib/${P}.tar.gz
- http://www.zlib.net/current/beta/${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-IUSE="minizip static-libs"
-
-DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
-RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- if use minizip ; then
- cd contrib/minizip
- eautoreconf
- fi
-}
-
-echoit() { echo "$@"; "$@"; }
-src_compile() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
- sed \
- -e 's|@prefix@|/usr|g' \
- -e 's|@exec_prefix@|${prefix}|g' \
- -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@includedir@|${prefix}/include|g' \
- -e 's|@VERSION@|'${PV}'|g' \
- zlib.pc.in > zlib.pc || die
- ;;
- *) # not an autoconf script, so can't use econf
- echoit ./configure --shared --prefix=/usr --libdir=/usr/$(get_libdir) || die
- emake || die
- ;;
- esac
- if use minizip ; then
- cd contrib/minizip
- econf $(use_enable static-libs static)
- emake || die
- fi
-}
-
-sed_macros() {
- # clean up namespace a little #383179
- # we do it here so we only have to tweak 2 files
- sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
-}
-src_install() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc install \
- BINARY_PATH="${D}/usr/bin" \
- LIBRARY_PATH="${D}/usr/$(get_libdir)" \
- INCLUDE_PATH="${D}/usr/include" \
- SHARED_MODE=1 \
- || die
- insinto /usr/share/pkgconfig
- doins zlib.pc || die
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=: || die
- gen_usr_ldscript -a z
- ;;
- esac
- sed_macros "${D}"/usr/include/*.h
-
- dodoc FAQ README ChangeLog doc/*.txt
-
- if use minizip ; then
- cd contrib/minizip
- emake install DESTDIR="${D}" || die
- sed_macros "${D}"/usr/include/minizip/*.h
- dodoc *.txt
- fi
-
- use static-libs || rm -f "${D}"/usr/$(get_libdir)/*.{a,la}
-}
diff --git a/sys-libs/zlib/zlib-1.2.7.ebuild b/sys-libs/zlib/zlib-1.2.7.ebuild
deleted file mode 100644
index 3155b6b..0000000
--- a/sys-libs/zlib/zlib-1.2.7.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-AUTOTOOLS_AUTO_DEPEND="no"
-inherit autotools toolchain-funcs multilib
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="http://www.zlib.net/"
-SRC_URI="http://zlib.net/${P}.tar.gz
- http://www.gzip.org/zlib/${P}.tar.gz
- http://www.zlib.net/current/beta/${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-IUSE="minizip static-libs"
-
-DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
-RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- if use minizip ; then
- cd contrib/minizip
- eautoreconf
- fi
-}
-
-echoit() { echo "$@"; "$@"; }
-src_compile() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
- sed \
- -e 's|@prefix@|/usr|g' \
- -e 's|@exec_prefix@|${prefix}|g' \
- -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@includedir@|${prefix}/include|g' \
- -e 's|@VERSION@|'${PV}'|g' \
- zlib.pc.in > zlib.pc || die
- ;;
- *) # not an autoconf script, so can't use econf
- local uname=$(/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
- echoit ./configure \
- --shared \
- --prefix=/usr \
- --libdir=/usr/$(get_libdir) \
- ${uname:+--uname=${uname}} \
- || die
- emake || die
- ;;
- esac
- if use minizip ; then
- cd contrib/minizip
- econf $(use_enable static-libs static)
- emake || die
- fi
-}
-
-sed_macros() {
- # clean up namespace a little #383179
- # we do it here so we only have to tweak 2 files
- sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
-}
-src_install() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc install \
- BINARY_PATH="${D}/usr/bin" \
- LIBRARY_PATH="${D}/usr/$(get_libdir)" \
- INCLUDE_PATH="${D}/usr/include" \
- SHARED_MODE=1 \
- || die
- insinto /usr/share/pkgconfig
- doins zlib.pc || die
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=: || die
- gen_usr_ldscript -a z
- ;;
- esac
- sed_macros "${D}"/usr/include/*.h
-
- dodoc FAQ README ChangeLog doc/*.txt
-
- if use minizip ; then
- cd contrib/minizip
- emake install DESTDIR="${D}" || die
- sed_macros "${D}"/usr/include/minizip/*.h
- dodoc *.txt
- fi
-
- use static-libs || rm -f "${D}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645
-}
diff --git a/sys-libs/zlib/zlib-1.2.8.ebuild b/sys-libs/zlib/zlib-1.2.8.ebuild
deleted file mode 100644
index af06d91..0000000
--- a/sys-libs/zlib/zlib-1.2.8.ebuild
+++ /dev/null
@@ -1,99 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-AUTOTOOLS_AUTO_DEPEND="no"
-inherit autotools toolchain-funcs multilib
-
-DESCRIPTION="Standard (de)compression library"
-HOMEPAGE="http://www.zlib.net/"
-SRC_URI="http://zlib.net/${P}.tar.gz
- http://www.gzip.org/zlib/${P}.tar.gz
- http://www.zlib.net/current/beta/${P}.tar.gz"
-
-LICENSE="ZLIB"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
-IUSE="minizip static-libs"
-
-DEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
-RDEPEND="!<dev-libs/libxml2-2.7.7" #309623
-
-src_unpack() {
- unpack ${A}
- cd "${S}"
-
- if use minizip ; then
- cd contrib/minizip
- eautoreconf
- fi
-}
-
-echoit() { echo "$@"; "$@"; }
-src_compile() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}- || die
- sed \
- -e 's|@prefix@|/usr|g' \
- -e 's|@exec_prefix@|${prefix}|g' \
- -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
- -e 's|@includedir@|${prefix}/include|g' \
- -e 's|@VERSION@|'${PV}'|g' \
- zlib.pc.in > zlib.pc || die
- ;;
- *) # not an autoconf script, so can't use econf
- local uname=$(/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
- echoit ./configure \
- --shared \
- --prefix=/usr \
- --libdir=/usr/$(get_libdir) \
- ${uname:+--uname=${uname}} \
- || die
- emake || die
- ;;
- esac
- if use minizip ; then
- cd contrib/minizip
- econf $(use_enable static-libs static)
- emake || die
- fi
-}
-
-sed_macros() {
- # clean up namespace a little #383179
- # we do it here so we only have to tweak 2 files
- sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
-}
-src_install() {
- case ${CHOST} in
- *-mingw*|mingw*)
- emake -f win32/Makefile.gcc install \
- BINARY_PATH="${D}/usr/bin" \
- LIBRARY_PATH="${D}/usr/$(get_libdir)" \
- INCLUDE_PATH="${D}/usr/include" \
- SHARED_MODE=1 \
- || die
- insinto /usr/share/pkgconfig
- doins zlib.pc || die
- ;;
-
- *)
- emake install DESTDIR="${D}" LDCONFIG=: || die
- gen_usr_ldscript -a z
- ;;
- esac
- sed_macros "${D}"/usr/include/*.h
-
- dodoc FAQ README ChangeLog doc/*.txt
-
- if use minizip ; then
- cd contrib/minizip
- emake install DESTDIR="${D}" || die
- sed_macros "${D}"/usr/include/minizip/*.h
- dodoc *.txt
- fi
-
- use static-libs || rm -f "${D}"/usr/$(get_libdir)/lib{z,minizip}.{a,la} #419645
-}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
@ 2022-01-28 7:53 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-01-28 7:53 UTC (permalink / raw
To: gentoo-commits
commit: bace9b48a6fe43bdf685f4aa81ca422130e2f807
Author: Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com>
AuthorDate: Thu Jan 20 19:15:59 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Jan 28 07:53:27 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bace9b48
sys-libs/zlib: add patch to fix configure AR/RANLIB/NM detection
This adds a patch from the zlib-devel ML to fix a minor
build inconsistency leading to GNU tools usage in LLVM
configured builds.
The reason we're adding it directly here is zlib upstream
takes forever to release new versions and there's not much
activity for some time (last release was in Jan 2017).
Closes: https://bugs.gentoo.org/831628
Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com>
Closes: https://github.com/gentoo/gentoo/pull/23888
Signed-off-by: Sam James <sam <AT> gentoo.org>
...2.11-configure-fix-AR-RANLIB-NM-detection.patch | 79 ++++++++++++++++++++++
sys-libs/zlib/zlib-1.2.11-r4.ebuild | 1 +
2 files changed, 80 insertions(+)
diff --git a/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch b/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
new file mode 100644
index 000000000000..68108a16fc3c
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
@@ -0,0 +1,79 @@
+From 9ce4e2e190cd382407eb3029b7127e378a7c9627 Mon Sep 17 00:00:00 2001
+From: Adrian Ratiu <adrian.ratiu@collabora.com>
+Date: Mon, 17 Jan 2022 10:49:58 +0200
+Subject: [PATCH] configure: fix AR/RANLIB/NM detection
+
+Taken from zlib-devel ML:
+https://madler.net/pipermail/zlib-devel_madler.net/2022-January/003322.html
+
+Bug: https://bugs.gentoo.org/831628
+
+Scenarios where ${CROSS_PREFIX}ar & co are set but not desired
+are possible, for example in ChromiumOS we use the GNU binutils
+tools & GCC to build glibc but LLVM/Clang is used for the rest
+of the system.
+
+This allows $AR/$RANLIB/$NM to override default CROSS_PREFIX
+tools so they can be set to llvm-ar/ranlib/nm.
+
+Suggested-by: Manoj Gupta <manojgupta@chromium.org>
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+ configure | 38 ++++++++++++++++++++++----------------
+ 1 file changed, 22 insertions(+), 16 deletions(-)
+
+diff --git a/configure b/configure
+index e974d1f..180cf09 100755
+--- a/configure
++++ b/configure
+@@ -46,25 +46,31 @@ VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.
+ VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
+
+ # establish commands for library building
+-if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- AR=${AR-"${CROSS_PREFIX}ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
+-else
+- AR=${AR-"ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++if [ -z "AR" ] ; then
++ if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ AR=${AR-"${CROSS_PREFIX}ar"}
++ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++ else
++ AR="ar"
++ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++ fi
+ fi
+ ARFLAGS=${ARFLAGS-"rc"}
+-if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
+- test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
+-else
+- RANLIB=${RANLIB-"ranlib"}
++if [ -z "RANLIB" ] ; then
++ if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
++ test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
++ else
++ RANLIB="ranlib"
++ fi
+ fi
+-if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- NM=${NM-"${CROSS_PREFIX}nm"}
+- test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
+-else
+- NM=${NM-"nm"}
++if [ -z "$NM" ] ; then
++ if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ NM=${"${CROSS_PREFIX}nm"}
++ test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
++ else
++ NM="nm"
++ fi
+ fi
+
+ # set defaults before processing command line options
+--
+2.34.1
+
diff --git a/sys-libs/zlib/zlib-1.2.11-r4.ebuild b/sys-libs/zlib/zlib-1.2.11-r4.ebuild
index bc2fe9834ee2..3b8524a12c6e 100644
--- a/sys-libs/zlib/zlib-1.2.11-r4.ebuild
+++ b/sys-libs/zlib/zlib-1.2.11-r4.ebuild
@@ -34,6 +34,7 @@ DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${PN}-1.2.11-fix-deflateParams-usage.patch
"${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch #658536
+ "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch #831628
)
src_prepare() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
@ 2022-03-11 15:18 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-03-11 15:18 UTC (permalink / raw
To: gentoo-commits
commit: de0d11e6108d577ba1305969615ac86c9296adb2
Author: Adrian Ratiu <adrian.ratiu <AT> collabora <DOT> com>
AuthorDate: Thu Jan 20 19:15:59 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 11 15:18:23 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=de0d11e6
sys-libs/zlib: add patch to fix configure AR/RANLIB/NM detection
This adds a patch from the zlib-devel ML to fix a minor
build inconsistency leading to GNU tools usage in LLVM
configured builds.
The reason we're adding it directly here is zlib upstream
takes forever to release new versions and there's not much
activity for some time (last release was in Jan 2017).
Closes: https://bugs.gentoo.org/831628
Signed-off-by: Adrian Ratiu <adrian.ratiu <AT> collabora.com>
Closes: https://github.com/gentoo/gentoo/pull/23888
Signed-off-by: Sam James <sam <AT> gentoo.org>
...2.11-configure-fix-AR-RANLIB-NM-detection.patch | 88 +++++++++++
sys-libs/zlib/zlib-1.2.11-r5.ebuild | 168 +++++++++++++++++++++
2 files changed, 256 insertions(+)
diff --git a/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch b/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
new file mode 100644
index 000000000000..1ab5b2f5dc81
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
@@ -0,0 +1,88 @@
+From 4232e67ee1440634af8209c7022dfc64cf862819 Mon Sep 17 00:00:00 2001
+From: Adrian Ratiu <adrian.ratiu@collabora.com>
+Date: Mon, 17 Jan 2022 10:49:58 +0200
+Subject: [PATCH v3] configure: fix AR/RANLIB/NM detection
+
+Taken from zlib-devel ML:
+https://madler.net/pipermail/zlib-devel_madler.net/2022-January/003322.html
+
+Bug: https://bugs.gentoo.org/831628
+
+Scenarios where ${CROSS_PREFIX}ar & co are set but not desired
+are possible, for example in ChromiumOS we use the GNU binutils
+tools & GCC to build glibc but LLVM/Clang is used for the rest
+of the system.
+
+This allows $AR/$RANLIB/$NM to override default CROSS_PREFIX
+tools so they can be set to llvm-ar/ranlib/nm.
+
+Suggested-by: Manoj Gupta <manojgupta@chromium.org>
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+
+Changes in v3:
+ * Whitespace style fixes
+ * Fixed top level variable tests (eg -z AR -> -z $AR)
+ * Review and testing as part of Gentoo PR:
+ https://github.com/gentoo/gentoo/pull/23888
+Changes in v2:
+ * Fixed a typo in the "unset NM" case
+---
+ configure | 38 ++++++++++++++++++++++----------------
+ 1 file changed, 22 insertions(+), 16 deletions(-)
+
+diff --git a/configure b/configure
+index e974d1f..045c616 100755
+--- a/configure
++++ b/configure
+@@ -46,25 +46,31 @@ VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.
+ VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < ${SRCDIR}zlib.h`
+
+ # establish commands for library building
+-if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- AR=${AR-"${CROSS_PREFIX}ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
+-else
+- AR=${AR-"ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++if [ -z "$AR" ]; then
++ if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ AR=${AR-"${CROSS_PREFIX}ar"}
++ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++ else
++ AR="ar"
++ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++ fi
+ fi
+ ARFLAGS=${ARFLAGS-"rc"}
+-if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
+- test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
+-else
+- RANLIB=${RANLIB-"ranlib"}
++if [ -z "$RANLIB" ]; then
++ if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
++ test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
++ else
++ RANLIB="ranlib"
++ fi
+ fi
+-if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- NM=${NM-"${CROSS_PREFIX}nm"}
+- test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
+-else
+- NM=${NM-"nm"}
++if [ -z "$NM" ]; then
++ if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ NM=${NM-"${CROSS_PREFIX}nm"}
++ test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
++ else
++ NM="nm"
++ fi
+ fi
+
+ # set defaults before processing command line options
+--
+2.35.0
+
diff --git a/sys-libs/zlib/zlib-1.2.11-r5.ebuild b/sys-libs/zlib/zlib-1.2.11-r5.ebuild
new file mode 100644
index 000000000000..aede59d32f2a
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.2.11-r5.ebuild
@@ -0,0 +1,168 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+AUTOTOOLS_AUTO_DEPEND="no"
+inherit autotools multilib-minimal usr-ldscript
+
+CYGWINPATCHES=(
+ "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.11-gzopen_w.patch -> ${PN}-1.2.11-cygwin-gzopen_w.patch"
+ "https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.7-minizip-cygwin.patch -> ${PN}-1.2.7-cygwin-minizip.patch"
+)
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="https://zlib.net/${P}.tar.gz
+ http://www.gzip.org/zlib/${P}.tar.gz
+ http://www.zlib.net/current/beta/${P}.tar.gz
+ elibc_Cygwin? ( ${CYGWINPATCHES[*]} )"
+
+LICENSE="ZLIB"
+SLOT="0/1" # subslot = SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
+IUSE="minizip static-libs"
+
+BDEPEND="minizip? ( ${AUTOTOOLS_DEPEND} )"
+# See #309623 for libxml2
+RDEPEND="
+ !<dev-libs/libxml2-2.7.7
+ !sys-libs/zlib-ng[compat]
+"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.2.11-fix-deflateParams-usage.patch
+ "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch #658536
+ "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch #831628
+)
+
+src_prepare() {
+ default
+
+ if use elibc_Cygwin ; then
+ local p
+ for p in "${CYGWINPATCHES[@]}" ; do
+ # Strip out the "... -> " from the array
+ eapply -p2 "${DISTDIR}/${p#*> }"
+ done
+ fi
+
+ if use minizip ; then
+ cd contrib/minizip || die
+ eautoreconf
+ fi
+
+ case ${CHOST} in
+ *-cygwin*)
+ # do not use _wopen, is a mingw symbol only
+ sed -i -e '/define WIDECHAR/d' "${S}"/gzguts.h || die
+ # zlib1.dll is the mingw name, need cygz.dll
+ # cygz.dll is loaded by toolchain, put into subdir
+ sed -i -e 's|zlib1.dll|win32/cygz.dll|' win32/Makefile.gcc || die
+ ;;
+ esac
+
+ case ${CHOST} in
+ *-mingw*|mingw*|*-cygwin*)
+ # uses preconfigured Makefile rather than configure script
+ multilib_copy_sources
+ ;;
+ esac
+}
+
+echoit() { echo "$@"; "$@"; }
+
+multilib_src_configure() {
+ case ${CHOST} in
+ *-mingw*|mingw*|*-cygwin*)
+ ;;
+ *)
+ local uname=$("${EPREFIX}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3) #347167
+ local myconf=(
+ --shared
+ --prefix="${EPREFIX}/usr"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ ${uname:+--uname=${uname}}
+ )
+ # not an autoconf script, so can't use econf
+ echoit "${S}"/configure "${myconf[@]}" || die
+ ;;
+ esac
+
+ if use minizip ; then
+ local minizipdir="contrib/minizip"
+ mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+ cd ${minizipdir} || die
+ ECONF_SOURCE="${S}/${minizipdir}" \
+ econf $(use_enable static-libs static)
+ fi
+}
+
+multilib_src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*|*-cygwin*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+ sed \
+ -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
+ -e 's|@exec_prefix@|${prefix}|g' \
+ -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@includedir@|${prefix}/include|g' \
+ -e 's|@VERSION@|'${PV}'|g' \
+ zlib.pc.in > zlib.pc || die
+ ;;
+ *)
+ emake
+ ;;
+ esac
+ use minizip && emake -C contrib/minizip
+}
+
+sed_macros() {
+ # clean up namespace a little #383179
+ # we do it here so we only have to tweak 2 files
+ sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
+}
+
+multilib_src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*|*-cygwin*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${ED}/usr/bin" \
+ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${ED}/usr/include" \
+ SHARED_MODE=1
+ # overwrites zlib.pc created from win32/Makefile.gcc #620136
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins zlib.pc
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=:
+ gen_usr_ldscript -a z
+ ;;
+ esac
+ sed_macros "${ED}"/usr/include/*.h
+
+ if use minizip ; then
+ emake -C contrib/minizip install DESTDIR="${D}"
+ sed_macros "${ED}"/usr/include/minizip/*.h
+ fi
+
+ if use minizip; then
+ # This might not exist if slibtool is used.
+ # https://bugs.gentoo.org/816756
+ rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
+ fi
+
+ if ! use static-libs ; then
+ # https://bugs.gentoo.org/419645
+ rm "${ED}"/usr/$(get_libdir)/libz.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc FAQ README ChangeLog doc/*.txt
+ use minizip && dodoc contrib/minizip/*.txt
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
@ 2022-03-28 7:28 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-03-28 7:28 UTC (permalink / raw
To: gentoo-commits
commit: 0a91cef90a3879f5fe3763a01c0f37c336bd1a6c
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Mar 28 07:27:31 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 28 07:28:03 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a91cef9
sys-libs/zlib: fix CC detection in configure
Notably fixes multilib (although it actually silently skipped
for me) in at least one way.
Closes: https://bugs.gentoo.org/836308
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../zlib-1.2.12-fix-CC-logic-in-configure.patch | 27 ++++++++++++++++++++++
sys-libs/zlib/zlib-1.2.12.ebuild | 4 ++++
2 files changed, 31 insertions(+)
diff --git a/sys-libs/zlib/files/zlib-1.2.12-fix-CC-logic-in-configure.patch b/sys-libs/zlib/files/zlib-1.2.12-fix-CC-logic-in-configure.patch
new file mode 100644
index 000000000000..da9455519b6f
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.12-fix-CC-logic-in-configure.patch
@@ -0,0 +1,27 @@
+From 95b9053f10710f9f881f4daec2f2e78da87560cf Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Mon, 28 Mar 2022 08:21:18 +0100
+Subject: [PATCH] Fix CC logic in configure
+
+In https://github.com/madler/zlib/commit/e9a52aa129efe3834383e415580716a7c4027f8d,
+the logic was changed to try check harder for GCC, but it dropped
+the default setting of cc=${CC}.
+
+This led to e.g. misdetection of inability to build shared libs
+for say, multilib cases (w/ CC being one thing (e.g. x86_64-unknown-linux-gnu-gcc -m32
+and then 'cc' used for shared libs being w/o -m32).
+
+Signed-off-by: Sam James <sam@gentoo.org>
+--- a/configure
++++ b/configure
+@@ -180,7 +180,10 @@ if test -z "$CC"; then
+ else
+ cc=${CROSS_PREFIX}cc
+ fi
++else
++ cc=${CC}
+ fi
++
+ cflags=${CFLAGS-"-O3"}
+ # to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
+ case "$cc" in
diff --git a/sys-libs/zlib/zlib-1.2.12.ebuild b/sys-libs/zlib/zlib-1.2.12.ebuild
index d43f2e1853c7..1a031b3c2526 100644
--- a/sys-libs/zlib/zlib-1.2.12.ebuild
+++ b/sys-libs/zlib/zlib-1.2.12.ebuild
@@ -36,6 +36,9 @@ PATCHES=(
# bug #831628
"${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
+
+ # Fix broken CC logic
+ "${FILESDIR}"/${PN}-1.2.12-fix-CC-logic-in-configure.patch
)
src_prepare() {
@@ -85,6 +88,7 @@ multilib_src_configure() {
*)
# bug #347167
local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3)
+
local myconf=(
--shared
--prefix="${EPREFIX}/usr"
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
@ 2022-11-23 4:25 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2022-11-23 4:25 UTC (permalink / raw
To: gentoo-commits
commit: bac67bd1ecdf620db1b0dc03b63e66d978ff7325
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 23 04:24:31 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Nov 23 04:24:31 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bac67bd1
sys-libs/zlib: fix build on sparc
Closes: https://bugs.gentoo.org/879883
Signed-off-by: Sam James <sam <AT> gentoo.org>
...-off-RWX-segment-warnings-on-sparc-system.patch | 56 ++++++++++++++++++++++
sys-libs/zlib/zlib-1.2.13-r1.ebuild | 9 +++-
2 files changed, 64 insertions(+), 1 deletion(-)
diff --git a/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch b/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
new file mode 100644
index 000000000000..48d58acaaf7f
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
@@ -0,0 +1,56 @@
+From 2ad2713e6cb9166dcede9a020f6913b8189ff0c6 Mon Sep 17 00:00:00 2001
+From: Sam James <sam@gentoo.org>
+Date: Wed, 23 Nov 2022 04:17:16 +0000
+Subject: [PATCH] Revert "Turn off RWX segment warnings on sparc systems."
+
+This breaks building on sparc with older binutils.
+
+This reverts commit 29fd715fd0bdaffee21e2d2d37be8c5a6ac67ee4.
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -22,7 +22,7 @@ CFLAGS=-O
+
+ SFLAGS=-O
+ LDFLAGS=
+-TEST_LDFLAGS=$(LDFLAGS) -L. libz.a
++TEST_LDFLAGS=-L. libz.a
+ LDSHARED=$(CC)
+ CPP=$(CC) -E
+
+@@ -288,10 +288,10 @@ minigzip$(EXE): minigzip.o $(STATICLIB)
+ $(CC) $(CFLAGS) -o $@ minigzip.o $(TEST_LDFLAGS)
+
+ examplesh$(EXE): example.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS) -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ example.o -L. $(SHAREDLIBV)
+
+ minigzipsh$(EXE): minigzip.o $(SHAREDLIBV)
+- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS) -L. $(SHAREDLIBV)
++ $(CC) $(CFLAGS) -o $@ minigzip.o -L. $(SHAREDLIBV)
+
+ example64$(EXE): example64.o $(STATICLIB)
+ $(CC) $(CFLAGS) -o $@ example64.o $(TEST_LDFLAGS)
+--- a/configure
++++ b/configure
+@@ -33,10 +33,7 @@ fi
+ # set command prefix for cross-compilation
+ if [ -n "${CHOST}" ]; then
+ uname=${CHOST}
+- mname=${CHOST}
+ CROSS_PREFIX="${CHOST}-"
+-else
+- mname=`(uname -a || echo unknown) 2>/dev/null`
+ fi
+
+ # destination name for static library
+@@ -223,10 +220,6 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
+ fi
+ case "$uname" in
+ Linux* | linux* | *-linux* | GNU | GNU/* | solaris*)
+- case "$mname" in
+- *sparc*)
+- LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;;
+- esac
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
+ *BSD | *bsd* | DragonFly)
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
diff --git a/sys-libs/zlib/zlib-1.2.13-r1.ebuild b/sys-libs/zlib/zlib-1.2.13-r1.ebuild
index ee60673a59b8..50b767a0ef31 100644
--- a/sys-libs/zlib/zlib-1.2.13-r1.ebuild
+++ b/sys-libs/zlib/zlib-1.2.13-r1.ebuild
@@ -6,7 +6,7 @@ EAPI=8
# Worth keeping an eye on 'develop' branch upstream for possible backports.
AUTOTOOLS_AUTO_DEPEND="no"
VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/madler.asc
-inherit autotools multilib-minimal usr-ldscript verify-sig
+inherit autotools multilib-minimal flag-o-matic usr-ldscript verify-sig
CYGWINPATCHES=(
"https://github.com/cygwinports/zlib/raw/22a3462cae33a82ad966ea0a7d6cbe8fc1368fec/1.2.11-gzopen_w.patch -> ${PN}-1.2.11-cygwin-gzopen_w.patch"
@@ -43,6 +43,9 @@ PATCHES=(
# Respect LDFLAGS during configure tests. Pending upstream
"${FILESDIR}"/${PN}-1.2.13-use-LDFLAGS-in-configure.patch
+
+ # Fix building on sparc with older binutils, we pass it in ebuild instead
+ "${FILESDIR}"/${PN}-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
)
src_prepare() {
@@ -85,6 +88,10 @@ src_prepare() {
echoit() { echo "$@"; "$@"; }
multilib_src_configure() {
+ # We pass manually instead of relying on the configure script/makefile
+ # because it would pass it even for older binutils.
+ use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments)
+
case ${CHOST} in
*-mingw*|mingw*|*-cygwin*)
;;
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
@ 2023-10-30 10:21 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2023-10-30 10:21 UTC (permalink / raw
To: gentoo-commits
commit: d9718dafa6ecd841f4364f2ee0039613f0b8efec
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 30 10:16:13 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Oct 30 10:19:02 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d9718daf
sys-libs/zlib: fix CVE-2023-45853
Bug: https://bugs.gentoo.org/916484
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../zlib/files/zlib-1.2.13-CVE-2023-45853.patch | 40 +++++
sys-libs/zlib/zlib-1.2.13-r2.ebuild | 184 +++++++++++++++++++++
sys-libs/zlib/zlib-1.3-r2.ebuild | 179 ++++++++++++++++++++
3 files changed, 403 insertions(+)
diff --git a/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch b/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch
new file mode 100644
index 000000000000..ecb5acecbb33
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.2.13-CVE-2023-45853.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/916484
+https://github.com/madler/zlib/pull/843
+https://github.com/madler/zlib/commit/73331a6a0481067628f065ffe87bb1d8f787d10c
+
+From 73331a6a0481067628f065ffe87bb1d8f787d10c Mon Sep 17 00:00:00 2001
+From: Hans Wennborg <hans@chromium.org>
+Date: Fri, 18 Aug 2023 11:05:33 +0200
+Subject: [PATCH] Reject overflows of zip header fields in minizip.
+
+This checks the lengths of the file name, extra field, and comment
+that would be put in the zip headers, and rejects them if they are
+too long. They are each limited to 65535 bytes in length by the zip
+format. This also avoids possible buffer overflows if the provided
+fields are too long.
+---
+ contrib/minizip/zip.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/contrib/minizip/zip.c b/contrib/minizip/zip.c
+index 3d3d4cadd..0446109b2 100644
+--- a/contrib/minizip/zip.c
++++ b/contrib/minizip/zip.c
+@@ -1043,6 +1043,17 @@ extern int ZEXPORT zipOpenNewFileInZip4_64(zipFile file, const char* filename, c
+ return ZIP_PARAMERROR;
+ #endif
+
++ // The filename and comment length must fit in 16 bits.
++ if ((filename!=NULL) && (strlen(filename)>0xffff))
++ return ZIP_PARAMERROR;
++ if ((comment!=NULL) && (strlen(comment)>0xffff))
++ return ZIP_PARAMERROR;
++ // The extra field length must fit in 16 bits. If the member also requires
++ // a Zip64 extra block, that will also need to fit within that 16-bit
++ // length, but that will be checked for later.
++ if ((size_extrafield_local>0xffff) || (size_extrafield_global>0xffff))
++ return ZIP_PARAMERROR;
++
+ zi = (zip64_internal*)file;
+
+ if (zi->in_opened_file_inzip == 1)
diff --git a/sys-libs/zlib/zlib-1.2.13-r2.ebuild b/sys-libs/zlib/zlib-1.2.13-r2.ebuild
new file mode 100644
index 000000000000..fbf50ae139d8
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.2.13-r2.ebuild
@@ -0,0 +1,184 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Worth keeping an eye on 'develop' branch upstream for possible backports.
+AUTOTOOLS_AUTO_DEPEND="no"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/madler.asc
+inherit autotools multilib-minimal flag-o-matic toolchain-funcs usr-ldscript verify-sig
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="https://zlib.net/${P}.tar.xz
+ https://zlib.net/fossils/${P}.tar.xz
+ https://zlib.net/current/beta/${P}.tar.xz
+ verify-sig? ( https://zlib.net/${P}.tar.xz.asc )"
+
+LICENSE="ZLIB"
+SLOT="0/1" # subslot = SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="minizip static-libs"
+
+RDEPEND="!sys-libs/zlib-ng[compat]"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ minizip? ( ${AUTOTOOLS_DEPEND} )
+ verify-sig? ( sec-keys/openpgp-keys-madler )
+"
+
+PATCHES=(
+ # Don't install unexpected & unused crypt.h header (which would clash with other pkgs)
+ # Pending upstream. bug #658536
+ "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch
+
+ # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628
+ "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
+
+ # Respect LDFLAGS during configure tests. Pending upstream
+ "${FILESDIR}"/${PN}-1.2.13-use-LDFLAGS-in-configure.patch
+
+ # Fix building on sparc with older binutils, we pass it in ebuild instead
+ "${FILESDIR}"/${PN}-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
+
+ # CVE-2023-45853 (bug #916484)
+ "${FILESDIR}"/${PN}-1.2.13-CVE-2023-45853.patch
+)
+
+src_prepare() {
+ default
+
+ if use minizip ; then
+ cd contrib/minizip || die
+ eautoreconf
+ fi
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ # Uses preconfigured Makefile rather than configure script
+ multilib_copy_sources
+
+ ;;
+ esac
+}
+
+echoit() { echo "$@"; "$@"; }
+
+multilib_src_configure() {
+ # We pass manually instead of relying on the configure script/makefile
+ # because it would pass it even for older binutils.
+ use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments)
+
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ ;;
+
+ *)
+ # bug #347167
+ local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3)
+
+ local myconf=(
+ --shared
+ --prefix="${EPREFIX}/usr"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ ${uname:+--uname=${uname}}
+ )
+
+ # Not an autoconf script, so can't use econf
+ echoit "${S}"/configure "${myconf[@]}" || die
+
+ ;;
+ esac
+
+ if use minizip ; then
+ local minizipdir="contrib/minizip"
+ mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+
+ cd ${minizipdir} || die
+ ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static)
+ fi
+}
+
+multilib_src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+ sed \
+ -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
+ -e 's|@exec_prefix@|${prefix}|g' \
+ -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@includedir@|${prefix}/include|g' \
+ -e 's|@VERSION@|'${PV}'|g' \
+ zlib.pc.in > zlib.pc || die
+ ;;
+
+ *)
+ emake
+
+ ;;
+ esac
+
+ use minizip && emake -C contrib/minizip
+}
+
+sed_macros() {
+ # Clean up namespace a little, bug #383179
+ # We do it here so we only have to tweak 2 files
+ sed -i -r 's:\<(O[FN])\>:_Z_\1:g' "$@" || die
+}
+
+multilib_src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${ED}/usr/bin" \
+ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${ED}/usr/include" \
+ SHARED_MODE=1
+
+ # Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins zlib.pc
+
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=:
+ gen_usr_ldscript -a z
+
+ ;;
+ esac
+
+ sed_macros "${ED}"/usr/include/*.h
+
+ if use minizip ; then
+ emake -C contrib/minizip install DESTDIR="${D}"
+ sed_macros "${ED}"/usr/include/minizip/*.h
+
+ # This might not exist if slibtool is used.
+ # bug #816756
+ rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
+ fi
+
+ if ! use static-libs ; then
+ # bug #419645
+ rm "${ED}"/usr/$(get_libdir)/libz.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc FAQ README ChangeLog doc/*.txt
+
+ if use minizip ; then
+ dodoc contrib/minizip/*.txt
+ doman contrib/minizip/*.1
+ fi
+}
diff --git a/sys-libs/zlib/zlib-1.3-r2.ebuild b/sys-libs/zlib/zlib-1.3-r2.ebuild
new file mode 100644
index 000000000000..89522d3657a8
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.3-r2.ebuild
@@ -0,0 +1,179 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Worth keeping an eye on 'develop' branch upstream for possible backports.
+AUTOTOOLS_AUTO_DEPEND="no"
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/madler.asc
+inherit autotools edo multilib-minimal flag-o-matic toolchain-funcs usr-ldscript verify-sig
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="
+ https://zlib.net/${P}.tar.xz
+ https://zlib.net/fossils/${P}.tar.xz
+ https://zlib.net/current/beta/${P}.tar.xz
+ https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz
+ verify-sig? (
+ https://zlib.net/${P}.tar.xz.asc
+ https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc
+ )
+"
+
+LICENSE="ZLIB"
+SLOT="0/1" # subslot = SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="minizip static-libs"
+
+RDEPEND="!sys-libs/zlib-ng[compat]"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ minizip? ( ${AUTOTOOLS_DEPEND} )
+ verify-sig? ( sec-keys/openpgp-keys-madler )
+"
+
+PATCHES=(
+ # Don't install unexpected & unused crypt.h header (which would clash with other pkgs)
+ # Pending upstream. bug #658536
+ "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch
+
+ # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628
+ "${FILESDIR}"/${PN}-1.2.11-configure-fix-AR-RANLIB-NM-detection.patch
+
+ # Respect LDFLAGS during configure tests. Pending upstream
+ "${FILESDIR}"/${PN}-1.2.13-use-LDFLAGS-in-configure.patch
+
+ # Fix building on sparc with older binutils, we pass it in ebuild instead
+ "${FILESDIR}"/${PN}-1.2.13-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
+
+ # CVE-2023-45853 (bug #916484)
+ "${FILESDIR}"/${PN}-1.2.13-CVE-2023-45853.patch
+)
+
+src_prepare() {
+ default
+
+ if use minizip ; then
+ cd contrib/minizip || die
+ eautoreconf
+ fi
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ # Uses preconfigured Makefile rather than configure script
+ multilib_copy_sources
+
+ ;;
+ esac
+}
+
+multilib_src_configure() {
+ # We pass manually instead of relying on the configure script/makefile
+ # because it would pass it even for older binutils.
+ use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments)
+
+ # ideally we want !tc-ld-is-bfd for best future-proofing, but it needs
+ # https://github.com/gentoo/gentoo/pull/28355
+ # mold needs this too but right now tc-ld-is-mold is also not available
+ if tc-ld-is-lld; then
+ append-ldflags -Wl,--undefined-version
+ fi
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ ;;
+
+ *)
+ # bug #347167
+ local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3)
+
+ local myconf=(
+ --shared
+ --prefix="${EPREFIX}/usr"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ ${uname:+--uname=${uname}}
+ )
+
+ # Not an autoconf script, so can't use econf
+ edo "${S}"/configure "${myconf[@]}"
+
+ ;;
+ esac
+
+ if use minizip ; then
+ local minizipdir="contrib/minizip"
+ mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+
+ cd ${minizipdir} || die
+ ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static)
+ fi
+}
+
+multilib_src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+ sed \
+ -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
+ -e 's|@exec_prefix@|${prefix}|g' \
+ -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@includedir@|${prefix}/include|g' \
+ -e 's|@VERSION@|'${PV}'|g' \
+ zlib.pc.in > zlib.pc || die
+ ;;
+
+ *)
+ emake
+
+ ;;
+ esac
+
+ use minizip && emake -C contrib/minizip
+}
+
+multilib_src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${ED}/usr/bin" \
+ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${ED}/usr/include" \
+ SHARED_MODE=1
+
+ # Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins zlib.pc
+
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=:
+ gen_usr_ldscript -a z
+
+ ;;
+ esac
+
+ if use minizip ; then
+ emake -C contrib/minizip install DESTDIR="${D}"
+
+ # This might not exist if slibtool is used.
+ # bug #816756
+ rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
+ fi
+
+ if ! use static-libs ; then
+ # bug #419645
+ rm "${ED}"/usr/$(get_libdir)/libz.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc FAQ README ChangeLog doc/*.txt
+
+ if use minizip ; then
+ dodoc contrib/minizip/*.txt
+ doman contrib/minizip/*.1
+ fi
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
@ 2024-01-24 8:05 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-01-24 8:05 UTC (permalink / raw
To: gentoo-commits
commit: 8c5c6c5165a5b5886ac6233e0d11ce9232118ff1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Jan 24 08:04:46 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Jan 24 08:04:53 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c5c6c51
sys-libs/zlib: add 1.3.1
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-libs/zlib/Manifest | 2 +
...-off-RWX-segment-warnings-on-sparc-system.patch | 17 ++
....3.1-configure-fix-AR-RANLIB-NM-detection.patch | 79 ++++++++++
.../zlib-1.3.1-use-LDFLAGS-in-configure.patch | 74 +++++++++
sys-libs/zlib/zlib-1.3.1.ebuild | 171 +++++++++++++++++++++
5 files changed, 343 insertions(+)
diff --git a/sys-libs/zlib/Manifest b/sys-libs/zlib/Manifest
index 95af1a3ddd57..74c4bb0f8222 100644
--- a/sys-libs/zlib/Manifest
+++ b/sys-libs/zlib/Manifest
@@ -1,2 +1,4 @@
+DIST zlib-1.3.1.tar.xz 1305740 BLAKE2B 42d109223801a493de6d52e7343403d7fc3234a6ca816425fe41ac9c18019b01b93841acd28a235e99f2256a6a17f93624e96b2ddb58d588c8190a6bedb82910 SHA512 1e8e70b362d64a233591906a1f50b59001db04ca14aaffad522198b04680be501736e7d536b4191e2f99767e7001ca486cd802362cca2be05d5d409b83ea732d
+DIST zlib-1.3.1.tar.xz.asc 235 BLAKE2B b135336ef55a0c4b8e219e760bbe04bad082c405246ce51a2b373c3dfba0b05cb1e6f539363972f4cabd8290be1db1fdb2fc47fb562c6c612a08d9393065f75b SHA512 d181e9772a8139b3b2f3f42b994a65a966101db35eb46b5c84021c5eb0cc3b4511eb5e9172c509483bd9f7015794b15cfca78ed0959bd91e8216dc12c1c6e668
DIST zlib-1.3.tar.xz 1295740 BLAKE2B 5fe0f32339267348a313f23a21e9588bdb180b7415be303c85f5f169444d019e5f176ef7322f6e64297c360acc2a6041c50e2f66d1860e5c392d8970990f176a SHA512 3868ac4da5842dd36c9dad794930675b9082ce15cbd099ddb79c0f6bd20a24aa8f33a123f378f26fe0ae02d91f31f2994dccaac565cedeaffed7b315e6ded2a2
DIST zlib-1.3.tar.xz.asc 235 BLAKE2B 5fe6ce952699a19e848d0a6e6c3622f934340068fdcd29afb35c74f3c8ae66d04de644800d10b38c743bb2f4852ba28f1a97313cb0e6e6f9b804cbca5289ebbb SHA512 8f3ce5c21938d6abc7e121d2939648a0ce2dc01a8ab4eb001d44eb159935dd0b4f5b5e371b3ecfc0ceb23689e2cefe002065968908503cde15b1bba08aff9db6
diff --git a/sys-libs/zlib/files/zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch b/sys-libs/zlib/files/zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
new file mode 100644
index 000000000000..5bfb8006c4bb
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
@@ -0,0 +1,17 @@
+https://bugs.gentoo.org/879883
+https://github.com/madler/zlib/issues/751
+
+This breaks building on sparc with older binutils.
+--- a/configure
++++ b/configure
+@@ -234,10 +234,6 @@ if test "$gcc" -eq 1 && ($cc -c $test.c) >> configure.log 2>&1; then
+ fi
+ case "$uname" in
+ Linux* | linux* | *-linux* | GNU | GNU/* | solaris*)
+- case "$mname" in
+- *sparc*)
+- LDFLAGS="${LDFLAGS} -Wl,--no-warn-rwx-segments" ;;
+- esac
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
+ *BSD | *bsd* | DragonFly)
+ LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
diff --git a/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch b/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch
new file mode 100644
index 000000000000..e1e5cf4b9196
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch
@@ -0,0 +1,79 @@
+From 7d7c0b3ede7d5c30e3cdc7c6fbb33c9d4499516a Mon Sep 17 00:00:00 2001
+From: Adrian Ratiu <adrian.ratiu@collabora.com>
+Date: Mon, 17 Jan 2022 10:49:58 +0200
+Subject: [PATCH] configure: fix AR/RANLIB/NM detection
+
+Taken from zlib-devel ML:
+https://madler.net/pipermail/zlib-devel_madler.net/2022-January/003322.html
+
+Bug: https://bugs.gentoo.org/831628
+
+Scenarios where ${CROSS_PREFIX}ar & co are set but not desired
+are possible, for example in ChromiumOS we use the GNU binutils
+tools & GCC to build glibc but LLVM/Clang is used for the rest
+of the system.
+
+This allows $AR/$RANLIB/$NM to override default CROSS_PREFIX
+tools so they can be set to llvm-ar/ranlib/nm.
+
+Suggested-by: Manoj Gupta <manojgupta@chromium.org>
+Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
+---
+ configure | 38 ++++++++++++++++++++++----------------
+ 1 file changed, 22 insertions(+), 16 deletions(-)
+
+diff --git a/configure b/configure
+index c55098a..2535e04 100755
+--- a/configure
++++ b/configure
+@@ -48,25 +48,31 @@ VER3=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\(\\.[0-9]\{1,\}\)\{1,2\}\).*/\1/p'`
+ VER1=`echo ${VER}|sed -n -e 's/\([0-9]\{1,\}\)\\..*/\1/p'`
+
+ # establish commands for library building
+-if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- AR=${AR-"${CROSS_PREFIX}ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
+-else
+- AR=${AR-"ar"}
+- test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++if [ -z "$AR" ]; then
++ if "${CROSS_PREFIX}ar" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ AR=${AR-"${CROSS_PREFIX}ar"}
++ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++ else
++ AR="ar"
++ test -n "${CROSS_PREFIX}" && echo Using ${AR} | tee -a configure.log
++ fi
+ fi
+ ARFLAGS=${ARFLAGS-"rc"}
+-if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
+- test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
+-else
+- RANLIB=${RANLIB-"ranlib"}
++if [ -z "$RANLIB" ]; then
++ if "${CROSS_PREFIX}ranlib" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ RANLIB=${RANLIB-"${CROSS_PREFIX}ranlib"}
++ test -n "${CROSS_PREFIX}" && echo Using ${RANLIB} | tee -a configure.log
++ else
++ RANLIB="ranlib"
++ fi
+ fi
+-if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
+- NM=${NM-"${CROSS_PREFIX}nm"}
+- test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
+-else
+- NM=${NM-"nm"}
++if [ -z "$NM" ]; then
++ if "${CROSS_PREFIX}nm" --version >/dev/null 2>/dev/null || test $? -lt 126; then
++ NM=${NM-"${CROSS_PREFIX}nm"}
++ test -n "${CROSS_PREFIX}" && echo Using ${NM} | tee -a configure.log
++ else
++ NM="nm"
++ fi
+ fi
+
+ # set defaults before processing command line options
+--
+2.43.0
+
diff --git a/sys-libs/zlib/files/zlib-1.3.1-use-LDFLAGS-in-configure.patch b/sys-libs/zlib/files/zlib-1.3.1-use-LDFLAGS-in-configure.patch
new file mode 100644
index 000000000000..2b1d70f7b6f6
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.3.1-use-LDFLAGS-in-configure.patch
@@ -0,0 +1,74 @@
+https://github.com/madler/zlib/pull/599
+
+Rebased version of:
+
+From 37c9730ba474d274f4cc6a974943eef95087b9f6 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 8 Mar 2022 22:38:47 -0800
+Subject: [PATCH] configure: Pass LDFLAGS to link tests
+
+LDFLAGS can contain critical flags without which linking wont succeed
+therefore ensure that all configure tests involving link time checks are
+using LDFLAGS on compiler commandline along with CFLAGS to ensure the
+tests perform correctly. Without this some tests may fail resulting in
+wrong confgure result, ending in miscompiling the package
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>k
+--- a/configure
++++ b/configure
+@@ -448,8 +448,8 @@ EOF
+ if test $shared -eq 1; then
+ echo Checking for shared library support... | tee -a configure.log
+ # we must test in two steps (cc then ld), required at least on SunOS 4.x
+- if try $CC -c $SFLAGS $test.c &&
+- try $LDSHARED $SFLAGS -o $test$shared_ext $test.o; then
++ if try $CC -c $SFLAGS $LDFLAGS $test.c &&
++ try $LDSHARED $SFLAGS $LDFLAGS -o $test$shared_ext $test.o; then
+ echo Building shared library $SHAREDLIBV with $CC. | tee -a configure.log
+ elif test -z "$old_cc" -a -z "$old_cflags"; then
+ echo No shared library support. | tee -a configure.log
+@@ -511,7 +511,7 @@ int main(void) {
+ }
+ EOF
+ fi
+- if try $CC $CFLAGS -o $test $test.c; then
++ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ sizet=`./$test`
+ echo "Checking for a pointer-size integer type..." $sizet"." | tee -a configure.log
+ CFLAGS="${CFLAGS} -DNO_SIZE_T=${sizet}"
+@@ -545,7 +545,7 @@ int main(void) {
+ return 0;
+ }
+ EOF
+- if try $CC $CFLAGS -o $test $test.c; then
++ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ echo "Checking for fseeko... Yes." | tee -a configure.log
+ else
+ CFLAGS="${CFLAGS} -DNO_FSEEKO"
+@@ -562,7 +562,7 @@ cat > $test.c <<EOF
+ #include <errno.h>
+ int main() { return strlen(strerror(errno)); }
+ EOF
+-if try $CC $CFLAGS -o $test $test.c; then
++if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ echo "Checking for strerror... Yes." | tee -a configure.log
+ else
+ CFLAGS="${CFLAGS} -DNO_STRERROR"
+@@ -669,7 +669,7 @@ int main()
+ return (mytest("Hello%d\n", 1));
+ }
+ EOF
+- if try $CC $CFLAGS -o $test $test.c; then
++ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ echo "Checking for vsnprintf() in stdio.h... Yes." | tee -a configure.log
+
+ echo >> configure.log
+@@ -759,7 +759,7 @@ int main()
+ }
+ EOF
+
+- if try $CC $CFLAGS -o $test $test.c; then
++ if try $CC $CFLAGS $LDFLAGS -o $test $test.c; then
+ echo "Checking for snprintf() in stdio.h... Yes." | tee -a configure.log
+
+ echo >> configure.log
diff --git a/sys-libs/zlib/zlib-1.3.1.ebuild b/sys-libs/zlib/zlib-1.3.1.ebuild
new file mode 100644
index 000000000000..f12a76540f6e
--- /dev/null
+++ b/sys-libs/zlib/zlib-1.3.1.ebuild
@@ -0,0 +1,171 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Worth keeping an eye on 'develop' branch upstream for possible backports.
+AUTOTOOLS_AUTO_DEPEND="no"
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/madler.asc
+inherit autotools edo multilib-minimal flag-o-matic usr-ldscript verify-sig
+
+DESCRIPTION="Standard (de)compression library"
+HOMEPAGE="https://zlib.net/"
+SRC_URI="
+ https://zlib.net/${P}.tar.xz
+ https://zlib.net/fossils/${P}.tar.xz
+ https://zlib.net/current/beta/${P}.tar.xz
+ https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz
+ verify-sig? (
+ https://zlib.net/${P}.tar.xz.asc
+ https://github.com/madler/zlib/releases/download/v${PV}/${P}.tar.xz.asc
+ )
+"
+
+LICENSE="ZLIB"
+SLOT="0/1" # subslot = SONAME
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
+IUSE="minizip static-libs"
+
+RDEPEND="!sys-libs/zlib-ng[compat]"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ minizip? ( ${AUTOTOOLS_DEPEND} )
+ verify-sig? ( sec-keys/openpgp-keys-madler )
+"
+
+PATCHES=(
+ # Don't install unexpected & unused crypt.h header (which would clash with other pkgs)
+ # Pending upstream. bug #658536
+ "${FILESDIR}"/${PN}-1.2.11-minizip-drop-crypt-header.patch
+
+ # Respect AR, RANLIB, NM during build. Pending upstream. bug #831628
+ "${FILESDIR}"/${PN}-1.3.1-configure-fix-AR-RANLIB-NM-detection.patch
+
+ # Respect LDFLAGS during configure tests. Pending upstream
+ "${FILESDIR}"/${PN}-1.3.1-use-LDFLAGS-in-configure.patch
+
+ # Fix building on sparc with older binutils, we pass it in ebuild instead
+ "${FILESDIR}"/${PN}-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
+)
+
+src_prepare() {
+ default
+
+ if use minizip ; then
+ cd contrib/minizip || die
+ eautoreconf
+ fi
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ # Uses preconfigured Makefile rather than configure script
+ multilib_copy_sources
+
+ ;;
+ esac
+}
+
+multilib_src_configure() {
+ # We pass manually instead of relying on the configure script/makefile
+ # because it would pass it even for older binutils.
+ use sparc && append-flags $(test-flags-CCLD -Wl,--no-warn-rwx-segments)
+
+ append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
+
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ ;;
+
+ *)
+ # bug #347167
+ local uname=$("${BROOT}"/usr/share/gnuconfig/config.sub "${CHOST}" | cut -d- -f3)
+
+ local myconf=(
+ --shared
+ --prefix="${EPREFIX}/usr"
+ --libdir="${EPREFIX}/usr/$(get_libdir)"
+ ${uname:+--uname=${uname}}
+ )
+
+ # Not an autoconf script, so can't use econf
+ edo "${S}"/configure "${myconf[@]}"
+
+ ;;
+ esac
+
+ if use minizip ; then
+ local minizipdir="contrib/minizip"
+ mkdir -p "${BUILD_DIR}/${minizipdir}" || die
+
+ cd ${minizipdir} || die
+ ECONF_SOURCE="${S}/${minizipdir}" econf $(use_enable static-libs static)
+ fi
+}
+
+multilib_src_compile() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc STRIP=true PREFIX=${CHOST}-
+ sed \
+ -e 's|@prefix@|'"${EPREFIX}"'/usr|g' \
+ -e 's|@exec_prefix@|${prefix}|g' \
+ -e 's|@libdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@sharedlibdir@|${exec_prefix}/'$(get_libdir)'|g' \
+ -e 's|@includedir@|${prefix}/include|g' \
+ -e 's|@VERSION@|'${PV}'|g' \
+ zlib.pc.in > zlib.pc || die
+ ;;
+
+ *)
+ emake
+
+ ;;
+ esac
+
+ use minizip && emake -C contrib/minizip
+}
+
+multilib_src_install() {
+ case ${CHOST} in
+ *-mingw*|mingw*)
+ emake -f win32/Makefile.gcc install \
+ BINARY_PATH="${ED}/usr/bin" \
+ LIBRARY_PATH="${ED}/usr/$(get_libdir)" \
+ INCLUDE_PATH="${ED}/usr/include" \
+ SHARED_MODE=1
+
+ # Overwrites zlib.pc created from win32/Makefile.gcc, bug #620136
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins zlib.pc
+
+ ;;
+
+ *)
+ emake install DESTDIR="${D}" LDCONFIG=:
+ gen_usr_ldscript -a z
+
+ ;;
+ esac
+
+ if use minizip ; then
+ emake -C contrib/minizip install DESTDIR="${D}"
+
+ # This might not exist if slibtool is used.
+ # bug #816756
+ rm -f "${ED}"/usr/$(get_libdir)/libminizip.la || die
+ fi
+
+ if ! use static-libs ; then
+ # bug #419645
+ rm "${ED}"/usr/$(get_libdir)/libz.a || die
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc FAQ README ChangeLog doc/*.txt
+
+ if use minizip ; then
+ dodoc contrib/minizip/*.txt
+ doman contrib/minizip/*.1
+ fi
+}
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/
@ 2024-03-04 2:24 Sam James
0 siblings, 0 replies; 8+ messages in thread
From: Sam James @ 2024-03-04 2:24 UTC (permalink / raw
To: gentoo-commits
commit: 743b110bffe25c0501ae5473ad8ad68253a14f29
Author: Alexey Sokolov <alexey+gentoo <AT> asokolov <DOT> org>
AuthorDate: Sun Mar 3 20:35:02 2024 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Mar 4 02:21:09 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=743b110b
sys-libs/zlib: respect AR on darwin
Closes: https://bugs.gentoo.org/924839
Signed-off-by: Alexey Sokolov <alexey+gentoo <AT> asokolov.org>
Signed-off-by: Sam James <sam <AT> gentoo.org>
...-1.3.1-configure-fix-AR-libtool-on-darwin.patch | 22 ++++++++++++++++++++++
sys-libs/zlib/zlib-1.3.1-r1.ebuild | 3 +++
2 files changed, 25 insertions(+)
diff --git a/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch b/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch
new file mode 100644
index 000000000000..4506e753ca2e
--- /dev/null
+++ b/sys-libs/zlib/files/zlib-1.3.1-configure-fix-AR-libtool-on-darwin.patch
@@ -0,0 +1,22 @@
+diff --color -ur zlib-1.3.1/configure zlib-1.3.1.new/configure
+--- zlib-1.3.1/configure 2024-01-21 02:29:31.000000000 +0000
++++ zlib-1.3.1.new/configure 2024-02-17 19:37:10.614600000 +0000
+@@ -265,14 +265,16 @@
+ SHAREDLIBV=libz.$VER$shared_ext
+ SHAREDLIBM=libz.$VER1$shared_ext
+ LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER3"}
++ if test -z ${AR}; then
+ if "${CROSS_PREFIX}libtool" -V 2>&1 | grep Apple > /dev/null; then
+ AR="${CROSS_PREFIX}libtool"
+ elif libtool -V 2>&1 | grep Apple > /dev/null; then
+ AR="libtool"
+ else
+ AR="/usr/bin/libtool"
+ fi
+- ARFLAGS="-o" ;;
++ ARFLAGS="-o"
++ fi ;;
+ *)
+ LDSHARED=${LDSHARED-"$cc -shared"} ;;
+ esac
+
diff --git a/sys-libs/zlib/zlib-1.3.1-r1.ebuild b/sys-libs/zlib/zlib-1.3.1-r1.ebuild
index fb44717aca45..d328fd643286 100644
--- a/sys-libs/zlib/zlib-1.3.1-r1.ebuild
+++ b/sys-libs/zlib/zlib-1.3.1-r1.ebuild
@@ -46,6 +46,9 @@ PATCHES=(
# Fix building on sparc with older binutils, we pass it in ebuild instead
"${FILESDIR}"/${PN}-1.3.1-Revert-Turn-off-RWX-segment-warnings-on-sparc-system.patch
+
+ # On Darwin, don't force /usr/bin/libtool as AR. bug #924839
+ "${FILESDIR}"/${PN}-1.3.1-configure-fix-AR-libtool-on-darwin.patch
)
src_prepare() {
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2024-03-04 2:24 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-29 13:26 [gentoo-commits] repo/gentoo:master commit in: sys-libs/zlib/, sys-libs/zlib/files/ Mike Frysinger
-- strict thread matches above, loose matches on Subject: below --
2022-01-28 7:53 Sam James
2022-03-11 15:18 Sam James
2022-03-28 7:28 Sam James
2022-11-23 4:25 Sam James
2023-10-30 10:21 Sam James
2024-01-24 8:05 Sam James
2024-03-04 2:24 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox