commit:     e5a6bfb643858febc9ff8509363099b67465e220
Author:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
AuthorDate: Fri Jun  5 13:35:31 2020 +0000
Commit:     Tobias Klausmann <klausman <AT> gentoo <DOT> org>
CommitDate: Fri Jun  5 13:35:31 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5a6bfb6

dev-libs/zlog: Remove .a files from build and install

Closes: https://bugs.gentoo.org/534172
Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Tobias Klausmann <klausman <AT> gentoo.org>

 dev-libs/zlog/files/zlog_no_static_lib.patch       | 59 ++++++++++++++++++++++
 .../{zlog-1.2.14.ebuild => zlog-1.2.14-r1.ebuild}  |  3 +-
 2 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/dev-libs/zlog/files/zlog_no_static_lib.patch 
b/dev-libs/zlog/files/zlog_no_static_lib.patch
new file mode 100644
index 00000000000..3f45f5648dd
--- /dev/null
+++ b/dev-libs/zlog/files/zlog_no_static_lib.patch
@@ -0,0 +1,59 @@
+--- src/makefile.orig  2020-06-05 15:29:43.926423440 +0200
++++ src/makefile       2020-06-05 15:30:26.266501492 +0200
+@@ -43,8 +43,6 @@
+ DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(ZLOG_MAJOR)
+ DYLIBNAME=$(LIBNAME).$(DYLIBSUFFIX)
+ DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) 
$(LDFLAGS)
+-STLIBNAME=$(LIBNAME).$(STLIBSUFFIX)
+-STLIB_MAKE_CMD=ar rcs $(STLIBNAME)
+ 
+ # Installation related variables
+ PREFIX?=/usr/local
+@@ -78,7 +76,6 @@
+   # not to mention dynamic linker .a preference...
+   DYLIB_MAKE_CMD=$(CC) -shared -Wl,-G,-b64 -maix64 -pthread -o $(DYLIBNAME) 
$(LDFLAGS)
+   REAL_CFLAGS+= -maix64
+-  STLIB_MAKE_CMD=OBJECT_MODE=64 ar rcs $(STLIBNAME) $(DYLIB_MAJOR_NAME)
+ endif
+ 
+ all: $(DYLIBNAME) $(BINS)
+@@ -139,21 +136,17 @@
+       cp -f $(DYLIBNAME) $(DYLIB_MAJOR_NAME)
+       cp -f $(DYLIBNAME) $(DYLIB_MINOR_NAME)
+ 
+-$(STLIBNAME): $(OBJ)
+-      $(STLIB_MAKE_CMD) $(OBJ)
+-
+ dynamic: $(DYLIBNAME)
+-static: $(STLIBNAME)
+ 
+ # Binaries:
+-zlog-chk-conf: zlog-chk-conf.o $(STLIBNAME) $(DYLIBNAME)
++zlog-chk-conf: zlog-chk-conf.o $(DYLIBNAME)
+       $(CC) -o $@ zlog-chk-conf.o -L. -lzlog $(REAL_LDFLAGS)
+ 
+ .c.o:
+       $(CC) -std=c99 -pedantic -c $(REAL_CFLAGS) $<
+ 
+ clean:
+-      rm -rf $(DYLIBNAME) $(STLIBNAME) $(BINS) *.o *.gcda *.gcno *.gcov 
$(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
++      rm -rf $(DYLIBNAME) $(BINS) *.o *.gcda *.gcno *.gcov 
$(DYLIB_MINOR_NAME) $(DYLIB_MAJOR_NAME)
+ 
+ dep:
+       $(CC) -MM *.c
+@@ -171,14 +164,13 @@
+ 
+ INSTALL?= cp -a
+ 
+-install: $(DYLIBNAME) $(STLIBNAME)
++install: $(DYLIBNAME)
+       mkdir -p $(INSTALL_INCLUDE_PATH) $(INSTALL_LIBRARY_PATH) 
$(INSTALL_BINARY_PATH)
+       $(INSTALL) zlog.h $(INSTALL_INCLUDE_PATH)
+       $(INSTALL) zlog-chk-conf $(INSTALL_BINARY_PATH)
+       $(INSTALL) $(DYLIBNAME) $(INSTALL_LIBRARY_PATH)/$(DYLIB_MINOR_NAME)
+       cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MINOR_NAME) 
$(DYLIB_MAJOR_NAME)
+       cd $(INSTALL_LIBRARY_PATH) && ln -sf $(DYLIB_MAJOR_NAME) $(DYLIBNAME)
+-      $(INSTALL) $(STLIBNAME) $(INSTALL_LIBRARY_PATH)
+ 
+ 32bit:
+       @echo ""

diff --git a/dev-libs/zlog/zlog-1.2.14.ebuild 
b/dev-libs/zlog/zlog-1.2.14-r1.ebuild
similarity index 87%
rename from dev-libs/zlog/zlog-1.2.14.ebuild
rename to dev-libs/zlog/zlog-1.2.14-r1.ebuild
index 66b2ba8509c..741717bc2d8 100644
--- a/dev-libs/zlog/zlog-1.2.14.ebuild
+++ b/dev-libs/zlog/zlog-1.2.14-r1.ebuild
@@ -3,7 +3,7 @@
 
 EAPI=6
 
-inherit toolchain-funcs
+inherit toolchain-funcs eutils
 
 DESCRIPTION="A reliable, thread safe, clear-model, pure C logging library."
 HOMEPAGE="http://hardysimpson.github.io/zlog/";
@@ -16,6 +16,7 @@ IUSE="test"
 RESTRICT="!test? ( test )"
 
 src_compile() {
+       epatch "${FILESDIR}/zlog_no_static_lib.patch" || die
        emake CC="$(tc-getCC)"
 }
 

Reply via email to