diff options
author | orbea <orbea@riseup.net> | 2024-03-16 08:10:05 -0700 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-21 02:23:06 +0000 |
commit | 7be0a28087f6666aeba8065c639ddc7ea2316fa6 (patch) | |
tree | d751eb3945c4556a124618170e6fee115360d02c /net-print | |
parent | media-libs/libopenraw: remove typo (diff) | |
download | gentoo-7be0a28087f6666aeba8065c639ddc7ea2316fa6.tar.gz gentoo-7be0a28087f6666aeba8065c639ddc7ea2316fa6.tar.bz2 gentoo-7be0a28087f6666aeba8065c639ddc7ea2316fa6.zip |
net-print/libppd: fix undefined references
Closes: https://bugs.gentoo.org/920273
Upstream-PR: https://github.com/OpenPrinting/libppd/pull/32
Upstream-Commit: https://github.com/OpenPrinting/libppd/commit/a040f26f3ca103c8ae7706d91ae157dca0974c49
Signed-off-by: orbea <orbea@riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/35780
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-print')
-rw-r--r-- | net-print/libppd/files/libppd-2.0.0-slibtool.patch | 64 | ||||
-rw-r--r-- | net-print/libppd/libppd-2.0.0.ebuild | 8 |
2 files changed, 70 insertions, 2 deletions
diff --git a/net-print/libppd/files/libppd-2.0.0-slibtool.patch b/net-print/libppd/files/libppd-2.0.0-slibtool.patch new file mode 100644 index 000000000000..5491ac1fd896 --- /dev/null +++ b/net-print/libppd/files/libppd-2.0.0-slibtool.patch @@ -0,0 +1,64 @@ +https://github.com/OpenPrinting/libppd/pull/32 +https://github.com/OpenPrinting/libppd/commit/a040f26f3ca103c8ae7706d91ae157dca0974c49 + +From e614c21b82a2f85487fe406a8bf4a2c9064501f8 Mon Sep 17 00:00:00 2001 +From: Eli Schwartz <eschwartz93@gmail.com> +Date: Mon, 18 Dec 2023 22:28:21 -0500 +Subject: [PATCH] build: fix failure to correctly link to zlib + +Checking for the header is NOT sufficient when utilizing its shared +library symbols. Look it up with pkg-config explicitly, and explicitly +add it to ensure that at runtime, libppd has its own DT_NEEDED +dependency on libz.so; if libppd successfully links at all -- not a +given, if -Wl,-no-undefined is used -- then it *may* transitively get +libz.so from its recursive dependencies, but this is no guarantee at +all. + +Fixes failure to build discovered at https://bugs.gentoo.org/920273 +--- + Makefile.am | 2 ++ + configure.ac | 8 +++++++- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 7aed422b..c44aa3e0 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -120,9 +120,11 @@ libppd_la_SOURCES = \ + $(pkgppddefs_DATA) + libppd_la_LIBADD = \ + $(LIBCUPSFILTERS_LIBS) \ ++ $(ZLIB_LIBS) \ + $(CUPS_LIBS) + libppd_la_CFLAGS = \ + $(LIBCUPSFILTERS_CFLAGS) \ ++ $(ZLIB_CFLAGS) \ + $(CUPS_CFLAGS) + libppd_la_CXXFLAGS = \ + $(libppd_la_CFLAGS) +diff --git a/configure.ac b/configure.ac +index 66927d80..7d8a459b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -164,6 +164,13 @@ AC_SUBST(CUPS_STATEDIR) + # ======================== + PKG_CHECK_MODULES([LIBCUPSFILTERS], [libcupsfilters]) + ++# ============== ++# Check for zlib ++# ============== ++PKG_CHECK_MODULES([ZLIB], [zlib], ,[ ++ AC_CHECK_HEADER([zlib.h]) ++ AC_CHECK_LIB([z], [deflateInit])]) ++ + # ============================================================ + # Check for whether we want to install the testppdfile utility + # ============================================================ +@@ -220,7 +227,6 @@ AC_CHECK_HEADERS([stdlib.h]) + AC_CHECK_HEADERS([sys/stat.h]) + AC_CHECK_HEADERS([sys/types.h]) + AC_CHECK_HEADERS([unistd.h]) +-AC_CHECK_HEADERS([zlib.h]) + AC_CHECK_HEADERS([endian.h]) + AC_CHECK_HEADERS([dirent.h]) + AC_CHECK_HEADERS([sys/ioctl.h]) diff --git a/net-print/libppd/libppd-2.0.0.ebuild b/net-print/libppd/libppd-2.0.0.ebuild index df36f78825c6..763f0c6558a3 100644 --- a/net-print/libppd/libppd-2.0.0.ebuild +++ b/net-print/libppd/libppd-2.0.0.ebuild @@ -3,7 +3,7 @@ EAPI=8 -inherit libtool +inherit autotools DESCRIPTION="Legacy library for PPD files, split out of cups-filters" HOMEPAGE="https://github.com/OpenPrinting/libppd" @@ -31,9 +31,13 @@ BDEPEND=" virtual/pkgconfig " +PATCHES=( + "${FILESDIR}"/${P}-slibtool.patch +) + src_prepare() { default - elibtoolize + eautoreconf } src_configure() { |