summaryrefslogtreecommitdiff
path: root/app-arch/zstd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-04-12 03:41:30 +0100
commit623ee73d661e5ed8475cb264511f683407d87365 (patch)
tree993eb27c93ec7a2d2d19550300d888fc1fed9e69 /app-arch/zstd
parentceeeb463cc1eef97fd62eaee8bf2196ba04bc384 (diff)
gentoo Easter resync : 12.04.2020
Diffstat (limited to 'app-arch/zstd')
-rw-r--r--app-arch/zstd/Manifest8
-rw-r--r--app-arch/zstd/files/zstd-1.4.4-make43.patch60
-rw-r--r--app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch67
-rw-r--r--app-arch/zstd/files/zstd-1.4.4-pkgconfig_libdir.patch215
-rw-r--r--app-arch/zstd/zstd-1.3.7-r1.ebuild2
-rw-r--r--app-arch/zstd/zstd-1.4.4-r3.ebuild (renamed from app-arch/zstd/zstd-1.4.4-r2.ebuild)11
-rw-r--r--app-arch/zstd/zstd-1.4.4-r4.ebuild74
7 files changed, 362 insertions, 75 deletions
diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index 4650a1496027..ac6010c0f538 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1,6 +1,8 @@
-AUX zstd-1.4.4-pkgconfig_fix.patch 2371 BLAKE2B 534be17dbd9886687b6d86a5bf808d674fda79492f59e1371147c1bbc2c102f98870c17bf451702edec7a7d4c01cba5ed975f0f1f03b1673ce0f108f5b6d353e SHA512 b7a9f10a878d52de87c599817e990d8dadf8fa7847ffc79c667842bf4d80c83c0a4e59d6321427aabe9ba02e93a58b1e86b49033dffb38dfba477997ad96ac59
+AUX zstd-1.4.4-make43.patch 3577 BLAKE2B 55e6e743b44f8ad9048d4ab94c7058b82fc3fdbcf7863dbd7fe1933c62f736bbfed1d57a1fbd26f24159bae96094b393e1067b0bf467aeb40a464c7b34e741c5 SHA512 800c6dd70c09705ad7eb3e031c451d6e9cf0a06b1a42f0fbb0e474e0873596641bb5e4c03681955ec883d34ffaa4aa8ae207f399c4753c0f6f05afe70f56254f
+AUX zstd-1.4.4-pkgconfig_libdir.patch 8322 BLAKE2B 2c7bcc57cbbf549919d0f7ce4538afd5ef8face1624b4bb348d77725aa22349e306614a8bd75666fae0308f05fc64645211dbc2f3fe4efaddf7027c845fd5d0d SHA512 e748145592281a218495076c44d081c994923605fff2f9561a04ad3a00ba38847e4855549610da4d91d50c4bd5198270482ae59277571e9723a46b967a088632
DIST zstd-1.3.7.tar.gz 1825458 BLAKE2B 2a689289ec70fd510575aecebf88ad763bd150e578d70d9fbb1678cba314c90a60339697232a5515990505e3c889aac92c3c2c4c3fc48e0d434b4dfd6cac9df1 SHA512 b7a432b13e237ac1490cd82b87727f6a4385d5ea7b89f566dea61a3993e17909c03288f727326ada326e36eb47ea5f9eab67c097808ee42f52cc800a7f7e1738
DIST zstd-1.4.4.tar.gz 1962617 BLAKE2B e21841a53b6c60703e5500cfc2a02923c4c3e57975aa57e1060310171e0d83d7c8eda1bd0510d5736db5c310d76847d2105ac5f614867fc3a9dc3086a035dfd7 SHA512 8209837e8eb14e474dfe21d5511085f46cef93b03ab77613fd41e7b8be652418231c38852669c8e0b55b78ad41ea2cb8008d0da122a83f8f27e32b5c86f045cf
-EBUILD zstd-1.3.7-r1.ebuild 1346 BLAKE2B 0b170be985174fd9be728938f0fa0b65734f273da0c24ea5f5d9baabe9f280601ec9a12d47a0dea7fb4765a4b775abdf12fa09105c160e5cd49dc549d3d289e9 SHA512 ecd75b82128de7566e391ea62afacf4667055b20b4c1c2f357a1c46bcb7eb0123e95b6b2b9f5c0da4d1f821a3b2c25142147172ea53e312958e2ee9d36c87d59
-EBUILD zstd-1.4.4-r2.ebuild 1443 BLAKE2B a3551c159df6a6aeca641aab738a796a225e4346d2f1e716508bb3244bf37120b6b16b391939a80394e1d4550d5672b79131226e58f6b21be38bbb2b6c765841 SHA512 3f39c47f535388a2c7e2c4abd7b366e6c7c2b1a26b6dac12d4f5139ad9a040b09518b7c17228d0e42487bac8ebcc077e835b5068ae1ec16447681191bed0512c
+EBUILD zstd-1.3.7-r1.ebuild 1344 BLAKE2B 9449557df432dd005393a76feddc4f1e0dd172dd20147b564689aaae6470b00df092d4539e716fb13e4003b87d91e6959e14db80e03535d1aa1c2c7514d32e05 SHA512 17c9c951a00c964deda47240c6bb9a55b5b43aea991dbd0f20936a9cc07d97548fba586d3131cc3f0805d9b2f335a18abe06ab9acfaff11ae4e8a166c022ff48
+EBUILD zstd-1.4.4-r3.ebuild 1558 BLAKE2B e60061922b9e01df894bf199cc7a0ddb8b999f7d44c84b3db332548d8732c32c948afa4301ae3383a59949a8f23ab7e83972b4eebdeb760ec14b86b2c8868d2f SHA512 1a862c0d9a7c4c8e04ee3c98e5ffba5ae85bf66163016c7d2a7332191e3bdf41444c194cc5bb08a6935fff890a3683a7881ec88f49c624e399580e920814e8e0
+EBUILD zstd-1.4.4-r4.ebuild 1787 BLAKE2B 31055fad1e85154c917617351915d0f4ea179a47df05a7105a983df94cd03cd465d4ad74cf57ff33b3c109c72b99aeb92b9c5b4e50076d2dc8a7b97322ea1296 SHA512 121a30b7c015181c56cbc107858cbe1fe2f478a57859a89e85e6f98f67eb32778ca8ce99fbe025538dc025815e2bc483bd37105f14bb0cf6eb15487f47157dc3
MISC metadata.xml 335 BLAKE2B b5522206853292786178f23747d3f8145cd21a9e1d9d545aea8ff424910d9f9ab6d35c66c098edac809baa4e87239d36d4d987308481b265fe30460d54f415b9 SHA512 9269829ff4dcad03a604ea00c7f9a3bcd937195b711ab52f813d39b8ebb921585293cb3cb97fbea75921df9a673d49c8a8b39dc13b54f9b171c08d6ac0c31bc6
diff --git a/app-arch/zstd/files/zstd-1.4.4-make43.patch b/app-arch/zstd/files/zstd-1.4.4-make43.patch
new file mode 100644
index 000000000000..679e0b791e33
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.4.4-make43.patch
@@ -0,0 +1,60 @@
+From 06a57cf57e3c4e887cadcf688e3081154f3f6db4 Mon Sep 17 00:00:00 2001
+From: Bimba Shrestha <bimbashrestha@fb.com>
+Date: Thu, 6 Feb 2020 14:10:51 -0800
+Subject: [PATCH] [build-issue] More portable header prefix usage (#) (#1987)
+
+* make 4.3 build issue fix
+
+* Changing header name and adding comment
+---
+ programs/Makefile | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/programs/Makefile b/programs/Makefile
+index b75314a8..a9ee3cb5 100644
+--- a/programs/Makefile
++++ b/programs/Makefile
+@@ -94,9 +94,12 @@ endif
+
+ VOID = /dev/null
+
++# Make 4.3 doesn't support '\#' anymore (https://lwn.net/Articles/810071/)
++NUM_SYMBOL := \#
++
+ # thread detection
+ NO_THREAD_MSG := ==> no threads, building without multithreading support
+-HAVE_PTHREAD := $(shell printf '\#include <pthread.h>\nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c)
++HAVE_PTHREAD := $(shell printf '$(NUM_SYMBOL)include <pthread.h>\nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c)
+ HAVE_THREAD := $(shell [ "$(HAVE_PTHREAD)" -eq "1" -o -n "$(filter Windows%,$(OS))" ] && echo 1 || echo 0)
+ ifeq ($(HAVE_THREAD), 1)
+ THREAD_MSG := ==> building with threading support
+@@ -108,7 +111,7 @@ endif
+
+ # zlib detection
+ NO_ZLIB_MSG := ==> no zlib, building zstd without .gz support
+-HAVE_ZLIB := $(shell printf '\#include <zlib.h>\nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c)
++HAVE_ZLIB := $(shell printf '$(NUM_SYMBOL)include <zlib.h>\nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c)
+ ifeq ($(HAVE_ZLIB), 1)
+ ZLIB_MSG := ==> building zstd with .gz compression support
+ ZLIBCPP = -DZSTD_GZCOMPRESS -DZSTD_GZDECOMPRESS
+@@ -119,7 +122,7 @@ endif
+
+ # lzma detection
+ NO_LZMA_MSG := ==> no liblzma, building zstd without .xz/.lzma support
+-HAVE_LZMA := $(shell printf '\#include <lzma.h>\nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c)
++HAVE_LZMA := $(shell printf '$(NUM_SYMBOL)include <lzma.h>\nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c)
+ ifeq ($(HAVE_LZMA), 1)
+ LZMA_MSG := ==> building zstd with .xz/.lzma compression support
+ LZMACPP = -DZSTD_LZMACOMPRESS -DZSTD_LZMADECOMPRESS
+@@ -130,7 +133,7 @@ endif
+
+ # lz4 detection
+ NO_LZ4_MSG := ==> no liblz4, building zstd without .lz4 support
+-HAVE_LZ4 := $(shell printf '\#include <lz4frame.h>\n\#include <lz4.h>\nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c)
++HAVE_LZ4 := $(shell printf '$(NUM_SYMBOL)include <lz4frame.h>\n\#include <lz4.h>\nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c)
+ ifeq ($(HAVE_LZ4), 1)
+ LZ4_MSG := ==> building zstd with .lz4 compression support
+ LZ4CPP = -DZSTD_LZ4COMPRESS -DZSTD_LZ4DECOMPRESS
+--
+2.24.1
+
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
deleted file mode 100644
index 2fab9804c139..000000000000
--- a/app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-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/files/zstd-1.4.4-pkgconfig_libdir.patch b/app-arch/zstd/files/zstd-1.4.4-pkgconfig_libdir.patch
new file mode 100644
index 000000000000..e8d745a56aa2
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.4.4-pkgconfig_libdir.patch
@@ -0,0 +1,215 @@
+From e668c9b52896e1cf92c99da3b01e3bdbbae77100 Mon Sep 17 00:00:00 2001
+From: "W. Felix Handte" <w@felixhandte.com>
+Date: Tue, 18 Feb 2020 10:50:38 -0500
+Subject: [PATCH 1/3] Fix pkg-config File Generation Again
+
+Revises #1851. Fixes #1900. Replaces #1930.
+
+Thanks to @orbea, @neheb, @Polynomial-C, and particularly @eli-schwartz for
+pointing out the problem and suggesting solutions.
+
+Tested with
+
+ ```
+ make -C lib clean libzstd.pc
+ cat lib/libzstd.pc
+
+ # should fail
+ make -C lib clean libzstd.pc LIBDIR=/foo
+ make -C lib clean libzstd.pc INCLUDEDIR=/foo
+ make -C lib clean libzstd.pc LIBDIR=/usr/localfoo
+ make -C lib clean libzstd.pc INCLUDEDIR=/usr/localfoo
+ make -C lib clean libzstd.pc LIBDIR=/usr/local/lib prefix=/foo
+ make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/include prefix=/foo
+
+ # should succeed
+ make -C lib clean libzstd.pc LIBDIR=/usr/local/foo
+ make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/foo
+ make -C lib clean libzstd.pc LIBDIR=/usr/local/
+ make -C lib clean libzstd.pc INCLUDEDIR=/usr/local/
+ make -C lib clean libzstd.pc LIBDIR=/usr/local
+ make -C lib clean libzstd.pc INCLUDEDIR=/usr/local
+ make -C lib clean libzstd.pc LIBDIR=/tmp/foo prefix=/tmp
+ make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp
+ make -C lib clean libzstd.pc LIBDIR=/tmp/foo prefix=/tmp/foo
+ make -C lib clean libzstd.pc INCLUDEDIR=/tmp/foo prefix=/tmp/foo
+
+ # should also succeed
+ make -C lib clean libzstd.pc prefix=/foo LIBDIR=/foo/bar INCLUDEDIR=/foo/
+ cat lib/libzstd.pc
+
+ mkdir out
+ cd out
+ cmake ../build/cmake
+ make
+ cat lib/libzstd.pc
+ ```
+---
+ build/cmake/lib/CMakeLists.txt | 5 +++--
+ lib/Makefile | 14 ++++++++++++--
+ lib/libzstd.pc.in | 4 ++--
+ 3 files changed, 17 insertions(+), 6 deletions(-)
+
+diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt
+index e92647bf1..29ff57aa0 100644
+--- a/build/cmake/lib/CMakeLists.txt
++++ b/build/cmake/lib/CMakeLists.txt
+@@ -134,11 +134,12 @@ endif ()
+ if (UNIX)
+ # pkg-config
+ set(PREFIX "${CMAKE_INSTALL_PREFIX}")
+- set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
++ set(LIBDIR "${CMAKE_INSTALL_LIBDIR}")
++ set(INCLUDEDIR "${CMAKE_INSTALL_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 fd1710cf1..dbd64994c 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -224,6 +224,16 @@ LIBDIR ?= $(libdir)
+ includedir ?= $(PREFIX)/include
+ INCLUDEDIR ?= $(includedir)
+
++PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -e "s@^$(exec_prefix)\\(/\\|$$\\)@@p")
++PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -e "s@^$(prefix)\\(/\\|$$\\)@@p")
++
++ifeq (,$(shell echo "$(LIBDIR)" | sed -n -e "\\@^$(exec_prefix)\\(/\\|$$\\)@ p"))
++$(error configured libdir ($(LIBDIR)) is outside of prefix ($(prefix)), can't generate pkg-config file)
++endif
++ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -e "\\@^$(prefix)\\(/\\|$$\\)@ p"))
++$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(exec_prefix)), can't generate pkg-config file)
++endif
++
+ ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly))
+ PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig
+ else
+@@ -239,11 +249,11 @@ endif
+ INSTALL_PROGRAM ?= $(INSTALL)
+ INSTALL_DATA ?= $(INSTALL) -m 644
+
+-
+-libzstd.pc:
+ libzstd.pc: libzstd.pc.in
+ @echo creating pkgconfig
+ @sed -e 's|@PREFIX@|$(PREFIX)|' \
++ -e 's|@LIBDIR@|$(PCLIBDIR)|' \
++ -e 's|@INCLUDEDIR@|$(PCINCDIR)|' \
+ -e 's|@VERSION@|$(VERSION)|' \
+ $< >$@
+
+diff --git a/lib/libzstd.pc.in b/lib/libzstd.pc.in
+index e7880be47..8ec0235ad 100644
+--- a/lib/libzstd.pc.in
++++ b/lib/libzstd.pc.in
+@@ -4,8 +4,8 @@
+
+ prefix=@PREFIX@
+ exec_prefix=${prefix}
+-includedir=${prefix}/include
+-libdir=${exec_prefix}/lib
++includedir=${prefix}/@INCLUDEDIR@
++libdir=${exec_prefix}/@LIBDIR@
+
+ Name: zstd
+ Description: fast lossless compression algorithm library
+
+From 73737231b95976f24b7b9bff96240976b11dcce0 Mon Sep 17 00:00:00 2001
+From: "W. Felix Handte" <w@felixhandte.com>
+Date: Tue, 18 Feb 2020 13:17:17 -0500
+Subject: [PATCH 2/3] Allow Manual Overriding of pkg-config Lib and Include
+ Dirs
+
+When the `PCLIBDIR` or `PCINCDIR` is non-empty (either because we succeeded
+in removing the prefix, or because it was manually set), we don't need to
+perform the check. This lets us trust users who go to the trouble of setting
+a manual override, rather than still blindly failing the make.
+
+They'll still be prefixed with `${prefix}/` / `${exec_prefix}/` in the
+pkg-config file though.
+---
+ lib/Makefile | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index dbd64994c..b067c11a2 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -227,12 +227,21 @@ INCLUDEDIR ?= $(includedir)
+ PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -e "s@^$(exec_prefix)\\(/\\|$$\\)@@p")
+ PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -e "s@^$(prefix)\\(/\\|$$\\)@@p")
+
++ifeq (,$(PCLIBDIR))
++# Additional prefix check is required, since the empty string is technically a
++# valid PCLIBDIR
+ ifeq (,$(shell echo "$(LIBDIR)" | sed -n -e "\\@^$(exec_prefix)\\(/\\|$$\\)@ p"))
+ $(error configured libdir ($(LIBDIR)) is outside of prefix ($(prefix)), can't generate pkg-config file)
+ endif
++endif
++
++ifeq (,$(PCINCDIR))
++# Additional prefix check is required, since the empty string is technically a
++# valid PCINCDIR
+ ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -e "\\@^$(prefix)\\(/\\|$$\\)@ p"))
+ $(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(exec_prefix)), can't generate pkg-config file)
+ endif
++endif
+
+ ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly))
+ PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig
+
+From e5ef935cf6160768e20cd73db3d9450aa8b7f8cf Mon Sep 17 00:00:00 2001
+From: "W. Felix Handte" <w@felixhandte.com>
+Date: Tue, 18 Feb 2020 13:40:58 -0500
+Subject: [PATCH 3/3] Fix Variable Capitalization
+
+---
+ lib/Makefile | 15 ++++++++-------
+ 1 file changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/lib/Makefile b/lib/Makefile
+index b067c11a2..db35207bb 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -219,27 +219,28 @@ DESTDIR ?=
+ prefix ?= /usr/local
+ PREFIX ?= $(prefix)
+ exec_prefix ?= $(PREFIX)
+-libdir ?= $(exec_prefix)/lib
++EXEC_PREFIX ?= $(exec_prefix)
++libdir ?= $(EXEC_PREFIX)/lib
+ LIBDIR ?= $(libdir)
+ includedir ?= $(PREFIX)/include
+ INCLUDEDIR ?= $(includedir)
+
+-PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -e "s@^$(exec_prefix)\\(/\\|$$\\)@@p")
+-PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -e "s@^$(prefix)\\(/\\|$$\\)@@p")
++PCLIBDIR ?= $(shell echo "$(LIBDIR)" | sed -n -e "s@^$(EXEC_PREFIX)\\(/\\|$$\\)@@p")
++PCINCDIR ?= $(shell echo "$(INCLUDEDIR)" | sed -n -e "s@^$(PREFIX)\\(/\\|$$\\)@@p")
+
+ ifeq (,$(PCLIBDIR))
+ # Additional prefix check is required, since the empty string is technically a
+ # valid PCLIBDIR
+-ifeq (,$(shell echo "$(LIBDIR)" | sed -n -e "\\@^$(exec_prefix)\\(/\\|$$\\)@ p"))
+-$(error configured libdir ($(LIBDIR)) is outside of prefix ($(prefix)), can't generate pkg-config file)
++ifeq (,$(shell echo "$(LIBDIR)" | sed -n -e "\\@^$(EXEC_PREFIX)\\(/\\|$$\\)@ p"))
++$(error configured libdir ($(LIBDIR)) is outside of prefix ($(PREFIX)), can't generate pkg-config file)
+ endif
+ endif
+
+ ifeq (,$(PCINCDIR))
+ # Additional prefix check is required, since the empty string is technically a
+ # valid PCINCDIR
+-ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -e "\\@^$(prefix)\\(/\\|$$\\)@ p"))
+-$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(exec_prefix)), can't generate pkg-config file)
++ifeq (,$(shell echo "$(INCLUDEDIR)" | sed -n -e "\\@^$(PREFIX)\\(/\\|$$\\)@ p"))
++$(error configured includedir ($(INCLUDEDIR)) is outside of exec_prefix ($(EXEC_PREFIX)), can't generate pkg-config file)
+ endif
+ endif
+
diff --git a/app-arch/zstd/zstd-1.3.7-r1.ebuild b/app-arch/zstd/zstd-1.3.7-r1.ebuild
index 381d7c89a8d1..17a59e2a5d70 100644
--- a/app-arch/zstd/zstd-1.3.7-r1.ebuild
+++ b/app-arch/zstd/zstd-1.3.7-r1.ebuild
@@ -11,7 +11,7 @@ SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="|| ( BSD GPL-2 )"
SLOT="0/1"
-KEYWORDS="~alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="lz4 static-libs"
RDEPEND="app-arch/xz-utils
diff --git a/app-arch/zstd/zstd-1.4.4-r2.ebuild b/app-arch/zstd/zstd-1.4.4-r3.ebuild
index 4af98aeb8cd8..d9f50e824921 100644
--- a/app-arch/zstd/zstd-1.4.4-r2.ebuild
+++ b/app-arch/zstd/zstd-1.4.4-r3.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
@@ -12,14 +12,15 @@ SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="|| ( BSD GPL-2 )"
SLOT="0/1"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="lz4 static-libs"
+IUSE="lz4 static-libs +threads"
RDEPEND="app-arch/xz-utils
lz4? ( app-arch/lz4 )"
DEPEND="${RDEPEND}"
PATCHES=(
- "${FILESDIR}/${PN}-1.4.4-pkgconfig_fix.patch" #700780
+ "${FILESDIR}/${P}-pkgconfig_libdir.patch" #700780
+ "${FILESDIR}/${P}-make43.patch" #708110
)
src_prepare() {
@@ -38,7 +39,9 @@ mymake() {
}
multilib_src_compile() {
- mymake -C lib libzstd libzstd.a libzstd.pc
+ local libzstd_targets=( libzstd{,.a}$(usex threads '-mt' '') )
+
+ mymake -C lib ${libzstd_targets[@]} libzstd.pc
if multilib_is_native_abi ; then
mymake HAVE_LZ4="$(usex lz4 1 0)" zstd
diff --git a/app-arch/zstd/zstd-1.4.4-r4.ebuild b/app-arch/zstd/zstd-1.4.4-r4.ebuild
new file mode 100644
index 000000000000..6fa907a2ecfd
--- /dev/null
+++ b/app-arch/zstd/zstd-1.4.4-r4.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit flag-o-matic multilib-minimal toolchain-funcs
+
+DESCRIPTION="zstd fast compression library"
+HOMEPAGE="https://facebook.github.io/zstd/"
+SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="lz4 static-libs +threads"
+
+RDEPEND="app-arch/xz-utils
+ lz4? ( app-arch/lz4 )"
+DEPEND="${RDEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-pkgconfig_libdir.patch" #700780
+ "${FILESDIR}/${P}-make43.patch" #708110
+)
+
+src_prepare() {
+ default
+ multilib_copy_sources
+
+ # Workaround #713940 / https://github.com/facebook/zstd/issues/2045
+ # where upstream build system does not add -pthread for Makefile-based
+ # build system.
+ use threads && append-flags $(test-flags-CCLD -pthread)
+}
+
+mymake() {
+ emake \
+ CC="$(tc-getCC)" \
+ CXX="$(tc-getCXX)" \
+ AR="$(tc-getAR)" \
+ PREFIX="${EPREFIX}/usr" \
+ LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+ "${@}"
+}
+
+multilib_src_compile() {
+ local libzstd_targets=( libzstd{,.a}$(usex threads '-mt' '') )
+
+ mymake -C lib ${libzstd_targets[@]} libzstd.pc
+
+ if multilib_is_native_abi ; then
+ mymake HAVE_LZ4="$(usex lz4 1 0)" zstd
+
+ mymake -C contrib/pzstd
+ fi
+}
+
+multilib_src_install() {
+ mymake -C lib DESTDIR="${D}" install
+
+ if multilib_is_native_abi ; then
+ mymake -C programs DESTDIR="${D}" install
+
+ mymake -C contrib/pzstd DESTDIR="${D}" install
+ fi
+}
+
+multilib_src_install_all() {
+ einstalldocs
+
+ if ! use static-libs; then
+ find "${ED}" -name "*.a" -delete || die
+ fi
+}