summaryrefslogtreecommitdiff
path: root/net-print/libppd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-21 07:00:13 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-21 07:00:13 +0000
commit3faa6ebe0068b432ee5a9390c47ceca068ea7fe9 (patch)
treec571245b455a9a5dd80022270c5ac943532620b9 /net-print/libppd/files
parentee93fbc2bb111cf895ae00cc1877c68f0eafaf2a (diff)
gentoo auto-resync : 21:03:2024 - 07:00:13
Diffstat (limited to 'net-print/libppd/files')
-rw-r--r--net-print/libppd/files/libppd-2.0.0-slibtool.patch64
1 files changed, 64 insertions, 0 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])