commit:     4cb26782a730afbce21f172268fd93bf14702314
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri May  2 23:39:58 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri May  2 23:39:58 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4cb26782

net-libs/serf: don't add -L/usr/lib

.. which breaks with lld.

Closes: https://bugs.gentoo.org/938134
Thanks-to: Markus Peloquin <markus <AT> cs.wisc.edu>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/serf-1.3.10-multilib-link-path.patch     | 47 ++++++++++++++++++++++
 net-libs/serf/serf-1.3.10.ebuild                   |  5 ++-
 2 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/net-libs/serf/files/serf-1.3.10-multilib-link-path.patch 
b/net-libs/serf/files/serf-1.3.10-multilib-link-path.patch
new file mode 100644
index 000000000000..c97bc5cbc6e1
--- /dev/null
+++ b/net-libs/serf/files/serf-1.3.10-multilib-link-path.patch
@@ -0,0 +1,47 @@
+https://bugs.gentoo.org/938134#c1
+--- a/SConstruct
++++ b/SConstruct
+@@ -220,6 +220,7 @@
+ 
+ thisdir = os.getcwd()
+ libdir = '$LIBDIR'
++libdir_base = os.path.basename(str(env['LIBDIR']))
+ incdir = '$PREFIX/include/serf-$MAJOR'
+ 
+ # This version string is used in the dynamic library name, and for Mac OS X 
also
+@@ -334,7 +335,7 @@
+ 
+   env.Append(LIBS=[apr_libs, apu_libs])
+   if not env.get('SOURCE_LAYOUT', None):
+-    env.Append(LIBPATH=['$APR/lib', '$APU/lib'],
++    env.Append(LIBPATH=[os.path.join('$APR', libdir_base), 
os.path.join('$APU', libdir_base)],
+                CPPPATH=['$APR/include/apr-1', '$APU/include/apr-1'])
+   elif aprstatic:
+     env.Append(LIBPATH=['$APR/LibR','$APU/LibR'],
+@@ -347,7 +348,7 @@
+   env.Append(LIBS=['zlib.lib'])
+   if not env.get('SOURCE_LAYOUT', None):
+     env.Append(CPPPATH=['$ZLIB/include'],
+-               LIBPATH=['$ZLIB/lib'])
++               LIBPATH=[os.path.join('$ZLIB', libdir_base)])
+   else:
+     env.Append(CPPPATH=['$ZLIB'],
+                LIBPATH=['$ZLIB'])
+@@ -355,7 +356,7 @@
+   # openssl
+   if not env.get('SOURCE_LAYOUT', None):
+     env.Append(CPPPATH=['$OPENSSL/include/openssl'],
+-               LIBPATH=['$OPENSSL/lib'])
++               LIBPATH=[os.path.join('$OPENSSL', libdir_base)])
+   elif 0: # opensslstatic:
+     env.Append(CPPPATH=['$OPENSSL/inc32'],
+                LIBPATH=['$OPENSSL/out32'])
+@@ -396,7 +397,7 @@
+     apu_libs = ''
+ 
+   env.Append(CPPPATH=['$OPENSSL/include'])
+-  env.Append(LIBPATH=['$OPENSSL/lib'])
++  env.Append(LIBPATH=[os.path.join('$OPENSSL', libdir_base)])
+ 
+ 
+ # If build with gssapi, get its information and define SERF_HAVE_GSSAPI

diff --git a/net-libs/serf/serf-1.3.10.ebuild b/net-libs/serf/serf-1.3.10.ebuild
index 1d97d19ba29a..0b4768e30541 100644
--- a/net-libs/serf/serf-1.3.10.ebuild
+++ b/net-libs/serf/serf-1.3.10.ebuild
@@ -30,7 +30,10 @@ RDEPEND="
 DEPEND="${RDEPEND}"
 BDEPEND=">=dev-build/scons-2.3.0"
 
-PATCHES=( "${FILESDIR}"/${PN}-1.3.8-static-lib.patch )
+PATCHES=(
+       "${FILESDIR}"/${PN}-1.3.8-static-lib.patch
+       "${FILESDIR}"/${PN}-1.3.10-multilib-link-path.patch
+)
 
 src_prepare() {
        default

Reply via email to