summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2019-11-20 16:48:57 +0100
committerLars Wendler <polynomial-c@gentoo.org>2019-11-20 16:49:28 +0100
commita1d7f9a6df4f818df3f203524d7c82cf2e4b3f7c (patch)
treeb7ca952f346030e6cdc91a033be1df3b0105733e /app-arch
parentsys-apps/acl: s390 stable wrt bug #700008 (diff)
downloadgentoo-a1d7f9a6df4f818df3f203524d7c82cf2e4b3f7c.tar.gz
gentoo-a1d7f9a6df4f818df3f203524d7c82cf2e4b3f7c.tar.bz2
gentoo-a1d7f9a6df4f818df3f203524d7c82cf2e4b3f7c.zip
app-arch/zstd: Revbump to fix libdir in pkgconfig file
Revert questionable upstream commit until they come with a hopefully better fix. Reported-by: Jan Ziak <0xe2.0x9a.0x9b@gmail.com> Upstream-bug: https://github.com/facebook/zstd/issues/1900 Bug: https://bugs.gentoo.org/700780 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
Diffstat (limited to 'app-arch')
-rw-r--r--app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch67
-rw-r--r--app-arch/zstd/zstd-1.4.4-r2.ebuild (renamed from app-arch/zstd/zstd-1.4.4-r1.ebuild)4
2 files changed, 71 insertions, 0 deletions
diff --git a/app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch b/app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch
new file mode 100644
index 000000000000..2fab9804c139
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch
@@ -0,0 +1,67 @@
+From a025c46969b76a10ce1618df4dbb11a09563c413 Mon Sep 17 00:00:00 2001
+From: Lars Wendler <polynomial-c@gentoo.org>
+Date: Wed, 20 Nov 2019 16:41:18 +0100
+Subject: [PATCH] Revert "In pkg-config File, Derive Lib and Include Dir from
+ Prefix at Use-Time"
+
+This reverts commit 74bd76c3ffb3837a3fefc055edbc347620447236.
+
+This breaks systems that use lib32 and/or lib64 instead of lib
+See https://github.com/facebook/zstd/issues/1900
+
+Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>
+---
+ build/cmake/lib/CMakeLists.txt | 3 ++-
+ lib/Makefile | 2 ++
+ lib/libzstd.pc.in | 5 ++---
+ 3 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt
+index 7adca875..77b389ca 100644
+--- a/build/cmake/lib/CMakeLists.txt
++++ b/build/cmake/lib/CMakeLists.txt
+@@ -134,10 +134,11 @@ if (UNIX)
+ # pkg-config
+ set(PREFIX "${CMAKE_INSTALL_PREFIX}")
+ set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
++ set(INCLUDEDIR "${CMAKE_INSTALL_FULL_INCLUDEDIR}")
+ set(VERSION "${zstd_VERSION_MAJOR}.${zstd_VERSION_MINOR}.${zstd_VERSION_PATCH}")
+ add_custom_target(libzstd.pc ALL
+ ${CMAKE_COMMAND} -DIN="${LIBRARY_DIR}/libzstd.pc.in" -DOUT="libzstd.pc"
+- -DPREFIX="${PREFIX}" -DVERSION="${VERSION}"
++ -DPREFIX="${PREFIX}" -DLIBDIR="${LIBDIR}" -DINCLUDEDIR="${INCLUDEDIR}" -DVERSION="${VERSION}"
+ -P "${CMAKE_CURRENT_SOURCE_DIR}/pkgconfig.cmake"
+ COMMENT "Creating pkg-config file")
+
+diff --git a/lib/Makefile b/lib/Makefile
+index fd1710cf..97375ad2 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -244,6 +244,8 @@ libzstd.pc:
+ libzstd.pc: libzstd.pc.in
+ @echo creating pkgconfig
+ @sed -e 's|@PREFIX@|$(PREFIX)|' \
++ -e 's|@LIBDIR@|$(LIBDIR)|' \
++ -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
+ -e 's|@VERSION@|$(VERSION)|' \
+ $< >$@
+
+diff --git a/lib/libzstd.pc.in b/lib/libzstd.pc.in
+index e7880be4..1d07b91f 100644
+--- a/lib/libzstd.pc.in
++++ b/lib/libzstd.pc.in
+@@ -3,9 +3,8 @@
+ # BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
+
+ prefix=@PREFIX@
+-exec_prefix=${prefix}
+-includedir=${prefix}/include
+-libdir=${exec_prefix}/lib
++libdir=@LIBDIR@
++includedir=@INCLUDEDIR@
+
+ Name: zstd
+ Description: fast lossless compression algorithm library
+--
+2.24.0
+
diff --git a/app-arch/zstd/zstd-1.4.4-r1.ebuild b/app-arch/zstd/zstd-1.4.4-r2.ebuild
index 15473437c99c..4af98aeb8cd8 100644
--- a/app-arch/zstd/zstd-1.4.4-r1.ebuild
+++ b/app-arch/zstd/zstd-1.4.4-r2.ebuild
@@ -18,6 +18,10 @@ RDEPEND="app-arch/xz-utils
lz4? ( app-arch/lz4 )"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}/${PN}-1.4.4-pkgconfig_fix.patch" #700780
+)
+
src_prepare() {
default
multilib_copy_sources