public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/files/, app-arch/zstd/
@ 2016-10-03 23:45 Matthias Maier
  0 siblings, 0 replies; 6+ messages in thread
From: Matthias Maier @ 2016-10-03 23:45 UTC (permalink / raw
  To: gentoo-commits

commit:     08a6e00d545bb140b543c51ab1bf182f2e7fdf15
Author:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
AuthorDate: Mon Oct  3 23:21:13 2016 +0000
Commit:     Matthias Maier <tamiko <AT> gentoo <DOT> org>
CommitDate: Mon Oct  3 23:44:49 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08a6e00d

app-arch/zstd: version bump to 1.1.0, fix a a number of bugs:

 - respect "$(get_libdir)"
 - introduce USE=static-libs, bug #593634
 - do not compile library a second time, bug #594514
 - respect CC, bug #593630
 - prefix support
 - keyword for x86

Package-Manager: portage-2.3.0

 app-arch/zstd/Manifest                             |  1 +
 .../zstd/files/zstd-1.1.0-fix_build_system.patch   | 79 ++++++++++++++++++++++
 app-arch/zstd/zstd-1.1.0.ebuild                    | 30 ++++++++
 3 files changed, 110 insertions(+)

diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index 161aec2..afac251 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1 +1,2 @@
 DIST zstd-1.0.0.tar.gz 593430 SHA256 197e6ef74da878cbf72844f38461bb18129d144fd5221b3598e973ecda6f5963 SHA512 ba7b1c993656fa220dd8d4c8cd6b7999b0d7b59b4290d7767063f6c4bfbb81e04b9d9890dea4d223d48082ab253159209d6187dc7b42cafc28ebc738bfa17ace WHIRLPOOL 129bd4fb25eddcb63054ce171cc1051feffcae914661ef7c96f0147edfcaf489f4affbd7940e72aa3d742bd89068cb5074e61634d3480f8c178838d4fb4bf46d
+DIST zstd-1.1.0.tar.gz 716327 SHA256 61cbbd28ff78f658f0564c2ccc206ac1ac6abe7f2c65c9afdca74584a104ea51 SHA512 9fe72081d333b58d5c8f27f13bd01ab0d729984215b75690282770aa769aab6879b88177aa2b45d8ce2869bf1b360f3a828ca00aa3646a7cc57285a4e167d71f WHIRLPOOL f7e4eab8e7dada2dd0d3ab8eeba4f2b3f165476c4cacf1a609269cb8ed9bccd12c498f50e2aaf365d6c0167c0f2db2b6b6902a786ba98f169e4f0ea0b7ceacfe

diff --git a/app-arch/zstd/files/zstd-1.1.0-fix_build_system.patch b/app-arch/zstd/files/zstd-1.1.0-fix_build_system.patch
new file mode 100644
index 00000000..75531c4
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.1.0-fix_build_system.patch
@@ -0,0 +1,79 @@
+diff --git a/lib/Makefile b/lib/Makefile
+index 4fb8ed9..ec5436d 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -63,17 +63,17 @@ all: clean libzstd
+ 
+ libzstd: $(ZSTD_FILES)
+ 	@echo compiling static library
+-	@$(CC) $(FLAGS) -c $^
+-	@$(AR) rcs $@.a *.o
++	$(CC) $(FLAGS) -c $^
++	$(AR) rcs $@.a *.o
+ 	@echo compiling dynamic library $(LIBVER)
+-	@$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
++	$(CC) $(FLAGS) -shared $^ -fPIC $(SONAME_FLAGS) -o $@.$(SHARED_EXT_VER)
+ 	@echo creating versioned links
+-	@ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR)
+-	@ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT)
++	ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT_MAJOR)
++	ln -sf $@.$(SHARED_EXT_VER) $@.$(SHARED_EXT)
+ 
+ clean:
+-	@rm -f core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc
+-	@rm -f decompress/*.o
++	rm -f core *.o *.a *.gcda *.$(SHARED_EXT) *.$(SHARED_EXT).* libzstd.pc
++	rm -f decompress/*.o
+ 	@echo Cleaning library completed
+ 
+ #------------------------------------------------------------------------
+@@ -83,22 +83,22 @@ ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly
+ libzstd.pc:
+ libzstd.pc: libzstd.pc.in
+ 	@echo creating pkgconfig
+-	@sed -e 's|@PREFIX@|$(PREFIX)|' \
++	sed -e 's|@PREFIX@|$(PREFIX)|' \
+              -e 's|@LIBDIR@|$(LIBDIR)|' \
+              -e 's|@INCLUDEDIR@|$(INCLUDEDIR)|' \
+              -e 's|@VERSION@|$(VERSION)|' \
+              $< >$@
+ 
+-install: libzstd libzstd.pc
+-	@install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
+-	@install -m 755 libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
+-	@cp -a libzstd.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)
+-	@cp -a libzstd.$(SHARED_EXT) $(DESTDIR)$(LIBDIR)
+-	@cp -a libzstd.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
+-	@install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a
+-	@install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h
+-	@install -m 644 common/zbuff.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h
+-	@install -m 644 dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)/zdict.h
++install: libzstd.pc
++	install -d -m 755 $(DESTDIR)$(LIBDIR)/pkgconfig/ $(DESTDIR)$(INCLUDEDIR)/
++	install -m 755 libzstd.$(SHARED_EXT_VER) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_VER)
++	cp -a libzstd.$(SHARED_EXT_MAJOR) $(DESTDIR)$(LIBDIR)
++	cp -a libzstd.$(SHARED_EXT) $(DESTDIR)$(LIBDIR)
++	cp -a libzstd.pc $(DESTDIR)$(LIBDIR)/pkgconfig/
++	install -m 644 libzstd.a $(DESTDIR)$(LIBDIR)/libzstd.a
++	install -m 644 zstd.h $(DESTDIR)$(INCLUDEDIR)/zstd.h
++	install -m 644 common/zbuff.h $(DESTDIR)$(INCLUDEDIR)/zbuff.h
++	install -m 644 dictBuilder/zdict.h $(DESTDIR)$(INCLUDEDIR)/zdict.h
+ 	@echo zstd static and shared library installed
+ 
+ uninstall:
+diff --git a/programs/Makefile b/programs/Makefile
+index 6e78d0e..993d138 100644
+--- a/programs/Makefile
++++ b/programs/Makefile
+@@ -21,11 +21,7 @@ MANDIR  = $(PREFIX)/share/man/man1
+ 
+ ZSTDDIR = ../lib
+ 
+-ifeq ($(shell $(CC) -v 2>&1 | grep -c "gcc version "), 1)
+-ALIGN_LOOP = -falign-loops=32
+-else
+ ALIGN_LOOP =
+-endif
+ 
+ CPPFLAGS= -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/dictBuilder
+ CFLAGS ?= -O3

diff --git a/app-arch/zstd/zstd-1.1.0.ebuild b/app-arch/zstd/zstd-1.1.0.ebuild
new file mode 100644
index 00000000..bcfe360
--- /dev/null
+++ b/app-arch/zstd/zstd-1.1.0.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+DESCRIPTION="zstd fast compression library"
+HOMEPAGE="http://facebook.github.io/zstd/"
+SRC_URI="https://github.com/facebook/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="static-libs"
+
+PATCHES=( "${FILESDIR}/${P}-fix_build_system.patch" )
+
+src_compile() {
+	emake PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" zstd
+	cd lib &&
+		emake PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" libzstd
+}
+
+src_install() {
+	emake DESTDIR="${D}" \
+		PREFIX="${EROOT}usr" LIBDIR="${EROOT}usr/$(get_libdir)" install
+
+	! use static-libs &&
+		rm -f $ "${ED}usr/$(get_libdir)/libzstd.a"
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/files/, app-arch/zstd/
@ 2019-11-20 15:49 Lars Wendler
  0 siblings, 0 replies; 6+ messages in thread
From: Lars Wendler @ 2019-11-20 15:49 UTC (permalink / raw
  To: gentoo-commits

commit:     a1d7f9a6df4f818df3f203524d7c82cf2e4b3f7c
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Wed Nov 20 15:48:57 2019 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Wed Nov 20 15:49:28 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a1d7f9a6

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 <AT> 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 <AT> gentoo.org>

 app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch | 67 ++++++++++++++++++++++
 .../{zstd-1.4.4-r1.ebuild => zstd-1.4.4-r2.ebuild} |  4 ++
 2 files changed, 71 insertions(+)

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 00000000000..2fab9804c13
--- /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
similarity index 95%
rename from app-arch/zstd/zstd-1.4.4-r1.ebuild
rename to app-arch/zstd/zstd-1.4.4-r2.ebuild
index 15473437c99..4af98aeb8cd 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/files/, app-arch/zstd/
@ 2021-03-31  8:06 Mikle Kolyada
  0 siblings, 0 replies; 6+ messages in thread
From: Mikle Kolyada @ 2021-03-31  8:06 UTC (permalink / raw
  To: gentoo-commits

commit:     fe4310bcbcacb83aa15d13bb28919e6faea0f44b
Author:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
AuthorDate: Wed Mar 31 08:06:20 2021 +0000
Commit:     Mikle Kolyada <zlogene <AT> gentoo <DOT> org>
CommitDate: Wed Mar 31 08:06:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe4310bc

app-arch/zstd: Security cleanup

Bug: https://bugs.gentoo.org/774258
Package-Manager: Portage-3.0.17, Repoman-3.0.2
Signed-off-by: Mikle Kolyada <zlogene <AT> gentoo.org>

 app-arch/zstd/Manifest                             |   3 -
 app-arch/zstd/files/zstd-1.4.4-make43.patch        |  60 ------
 .../zstd/files/zstd-1.4.4-pkgconfig_libdir.patch   | 215 ---------------------
 app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch |  28 ---
 app-arch/zstd/zstd-1.4.4-r4.ebuild                 |  75 -------
 app-arch/zstd/zstd-1.4.5.ebuild                    |  73 -------
 app-arch/zstd/zstd-1.4.8-r1.ebuild                 |  69 -------
 7 files changed, 523 deletions(-)

diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index cd831a81e3e..f0e458f47e8 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1,4 +1 @@
-DIST zstd-1.4.4.tar.gz 1962617 BLAKE2B e21841a53b6c60703e5500cfc2a02923c4c3e57975aa57e1060310171e0d83d7c8eda1bd0510d5736db5c310d76847d2105ac5f614867fc3a9dc3086a035dfd7 SHA512 8209837e8eb14e474dfe21d5511085f46cef93b03ab77613fd41e7b8be652418231c38852669c8e0b55b78ad41ea2cb8008d0da122a83f8f27e32b5c86f045cf
-DIST zstd-1.4.5.tar.gz 1987927 BLAKE2B 1497d4e87040e5c71466468ebf1a57f4073666f2b005229925bc1d95a4b4fcb2a51d88bb79be20f21860e5750da42f8aac21d2997421d07ba37bd6bb12a28b55 SHA512 b03c497c3e0590c3d384cb856e3024f144b2bfac0d805d80e68deafa612c68237f12a2d657416d476a28059e80936c79f099fc42331464b417593895ea214387
-DIST zstd-1.4.8.tar.gz 1816546 BLAKE2B 950d03c408e9d3fc2081969553c46247a1b8c13a22542effbf70373625bbfeb2a810e0adf0e1c6180cef590e7a28487191b1a577982fddc7a00d1507b461efd5 SHA512 61ce5d61e24770e70c32680f32d58542d6a1b5cc65737256561d8e34c77a82c1d36c769c179da5ea8ed5ecb035b4a4af292b9717c65976172e282859a332137a
 DIST zstd-1.4.9.tar.gz 1834843 BLAKE2B 907f492bd023db9459bdc292a0bc4d1b6336d92dd7041eb2b36668589c20fcb98c411b85d78f92cd16d9b4a000d9c4125b5f966a5ca777034ae78210e639315b SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133

diff --git a/app-arch/zstd/files/zstd-1.4.4-make43.patch b/app-arch/zstd/files/zstd-1.4.4-make43.patch
deleted file mode 100644
index 679e0b791e3..00000000000
--- a/app-arch/zstd/files/zstd-1.4.4-make43.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-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_libdir.patch b/app-arch/zstd/files/zstd-1.4.4-pkgconfig_libdir.patch
deleted file mode 100644
index e8d745a56aa..00000000000
--- a/app-arch/zstd/files/zstd-1.4.4-pkgconfig_libdir.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-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/files/zstd-1.4.5-fix-uclibc-ng.patch b/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch
deleted file mode 100644
index e4c2335d199..00000000000
--- a/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 1dcc4787965aa8f4af48ed5a2154185750bbaff5 Mon Sep 17 00:00:00 2001
-From: Yann Collet <cyan@fb.com>
-Date: Mon, 13 Jul 2020 14:16:33 -0700
-Subject: [PATCH] fix uclibc's st_mtim
-
-reported and suggested by @ewildgoose (#1872)
----
- programs/platform.h | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/programs/platform.h b/programs/platform.h
-index 2b4b9f2d8..68be70bb3 100644
---- a/programs/platform.h
-+++ b/programs/platform.h
-@@ -102,6 +102,12 @@ extern "C" {
- #      define PLATFORM_POSIX_VERSION 1
- #    endif
- 
-+#    ifdef __UCLIBC__
-+#     ifndef __USE_MISC
-+#      define __USE_MISC /* enable st_mtim on uclibc */
-+#     endif
-+#    endif
-+
- #  else  /* non-unix target platform (like Windows) */
- #    define PLATFORM_POSIX_VERSION 0
- #  endif
-

diff --git a/app-arch/zstd/zstd-1.4.4-r4.ebuild b/app-arch/zstd/zstd-1.4.4-r4.ebuild
deleted file mode 100644
index b361ae879fc..00000000000
--- a/app-arch/zstd/zstd-1.4.4-r4.ebuild
+++ /dev/null
@@ -1,75 +0,0 @@
-# Copyright 1999-2021 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 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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
-	"${FILESDIR}/${PN}-1.4.5-fix-uclibc-ng.patch" #741972
-)
-
-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
-}

diff --git a/app-arch/zstd/zstd-1.4.5.ebuild b/app-arch/zstd/zstd-1.4.5.ebuild
deleted file mode 100644
index e8a10f35729..00000000000
--- a/app-arch/zstd/zstd-1.4.5.ebuild
+++ /dev/null
@@ -1,73 +0,0 @@
-# Copyright 1999-2021 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 ~riscv s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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}-fix-uclibc-ng.patch" #741972
-)
-
-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
-}

diff --git a/app-arch/zstd/zstd-1.4.8-r1.ebuild b/app-arch/zstd/zstd-1.4.8-r1.ebuild
deleted file mode 100644
index a7b21ee6fe5..00000000000
--- a/app-arch/zstd/zstd-1.4.8-r1.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2021 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 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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}"
-
-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
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/files/, app-arch/zstd/
@ 2021-12-22  3:57 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2021-12-22  3:57 UTC (permalink / raw
  To: gentoo-commits

commit:     c8f63df394e7d5094bffa55d66a89501f8cb43b1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Dec 22 02:23:59 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Dec 22 02:23:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c8f63df3

app-arch/zstd: add 1.5.1

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/zstd/Manifest                             |  1 +
 .../zstd/files/zstd-1.5.1-respect-CFLAGS.patch     | 11 ++++
 app-arch/zstd/zstd-1.5.1.ebuild                    | 69 ++++++++++++++++++++++
 3 files changed, 81 insertions(+)

diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index 7950f8b80cac..3699570af10c 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1,2 +1,3 @@
 DIST zstd-1.4.9.tar.gz 1834843 BLAKE2B 907f492bd023db9459bdc292a0bc4d1b6336d92dd7041eb2b36668589c20fcb98c411b85d78f92cd16d9b4a000d9c4125b5f966a5ca777034ae78210e639315b SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133
 DIST zstd-1.5.0.tar.gz 1867111 BLAKE2B e503d17478b94128eb3ec578178f9d7023e941434dcc07790e12fd6c9933518f34fba5d7795ab7b145e4e499597644a6edd2830106649c5a749c962d5afe2f31 SHA512 25b657529a698eec891f92ff4a085d1fd95d2ff938ce52c8a4ff6163eb0b668ec642dd09e0db190652638cd92371006afa01d8e437437762c4097ad301675c33
+DIST zstd-1.5.1.tar.gz 1948539 BLAKE2B 2f82fb7872c49c41c8ccae17e343825dabceae3070266e49468c2019a1324758b825d7fc1bc3b62602b4d726538260258dc9134fa81d3c5e5085a8a1b531a8c5 SHA512 ed8ea0143b7bbd85afdcc8f95d44589a0903cff8375059836ebe577cc4b3ea49c0c756db6a3649655e478377f48b3120ef87dc768fd449bd4bfac786209bfd31

diff --git a/app-arch/zstd/files/zstd-1.5.1-respect-CFLAGS.patch b/app-arch/zstd/files/zstd-1.5.1-respect-CFLAGS.patch
new file mode 100644
index 000000000000..63f0f47459d9
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.5.1-respect-CFLAGS.patch
@@ -0,0 +1,11 @@
+--- a/lib/libzstd.mk
++++ b/lib/libzstd.mk
+@@ -78,8 +78,6 @@ else
+ endif
+   CFLAGS += -fno-stack-protector -fomit-frame-pointer -fno-ident \
+             -DDYNAMIC_BMI2=0 -DNDEBUG
+-else
+-  CFLAGS += -O3
+ endif
+ 
+ DEBUGLEVEL ?= 0

diff --git a/app-arch/zstd/zstd-1.5.1.ebuild b/app-arch/zstd/zstd-1.5.1.ebuild
new file mode 100644
index 000000000000..ee5d6e6b7871
--- /dev/null
+++ b/app-arch/zstd/zstd-1.5.1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit 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 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-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}"/${PN}-1.5.1-respect-CFLAGS.patch
+)
+
+src_prepare() {
+	default
+	multilib_copy_sources
+}
+
+mymake() {
+	emake \
+		CC="$(tc-getCC)" \
+		CXX="$(tc-getCXX)" \
+		AR="$(tc-getAR)" \
+		PREFIX="${EPREFIX}/usr" \
+		LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
+		V=1 \
+		"${@}"
+}
+
+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
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/files/, app-arch/zstd/
@ 2023-03-10 12:24 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2023-03-10 12:24 UTC (permalink / raw
  To: gentoo-commits

commit:     0d9fc63ebed2c44bb7912aab9b457c2f3b66b6c5
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 10 12:24:06 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 10 12:24:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0d9fc63e

app-arch/zstd: backport crash fix

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../zstd/files/zstd-1.5.4-crash-no-directory.patch | 115 +++++++++++++++++++++
 app-arch/zstd/zstd-1.5.4-r3.ebuild                 |  80 ++++++++++++++
 2 files changed, 195 insertions(+)

diff --git a/app-arch/zstd/files/zstd-1.5.4-crash-no-directory.patch b/app-arch/zstd/files/zstd-1.5.4-crash-no-directory.patch
new file mode 100644
index 000000000000..d64e1c1d34f0
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.5.4-crash-no-directory.patch
@@ -0,0 +1,115 @@
+https://github.com/facebook/zstd/issues/3523
+https://github.com/facebook/zstd/pull/3541
+
+From 50e8f55e7d5928af9c3411afdb4fbedb4d8f770d Mon Sep 17 00:00:00 2001
+From: "W. Felix Handte" <w@felixhandte.com>
+Date: Thu, 9 Mar 2023 12:46:37 -0500
+Subject: [PATCH 1/3] Fix Python 3.6 Incompatibility in CLI Tests
+
+--- a/tests/cli-tests/run.py
++++ b/tests/cli-tests/run.py
+@@ -535,7 +535,8 @@ def _run_script(self, script: str, cwd: str) -> None:
+             subprocess.run(
+                 args=[script],
+                 stdin=subprocess.DEVNULL,
+-                capture_output=True,
++                stdout=subprocess.PIPE,
++                stderr=subprocess.PIPE,
+                 cwd=cwd,
+                 env=env,
+                 check=True,
+
+From c4c3e11958aed4dc99ec22e3d31c405217575a8c Mon Sep 17 00:00:00 2001
+From: "W. Felix Handte" <w@felixhandte.com>
+Date: Thu, 9 Mar 2023 12:47:40 -0500
+Subject: [PATCH 2/3] Avoid Calling `setvbuf()` on Null File Pointer
+
+--- a/programs/fileio.c
++++ b/programs/fileio.c
+@@ -644,18 +644,24 @@ FIO_openDstFile(FIO_ctx_t* fCtx, FIO_prefs_t* const prefs,
+ #endif
+         if (f == NULL) {
+             DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
++        } else {
++            /* An increased buffer size can provide a significant performance
++             * boost on some platforms. Note that providing a NULL buf with a
++             * size that's not 0 is not defined in ANSI C, but is defined in an
++             * extension. There are three possibilities here:
++             * 1. Libc supports the extended version and everything is good.
++             * 2. Libc ignores the size when buf is NULL, in which case
++             *    everything will continue as if we didn't call `setvbuf()`.
++             * 3. We fail the call and execution continues but a warning
++             *    message might be shown.
++             * In all cases due execution continues. For now, I believe that
++             * this is a more cost-effective solution than managing the buffers
++             * allocations ourselves (will require an API change).
++             */
++            if (setvbuf(f, NULL, _IOFBF, 1 MB)) {
++                DISPLAYLEVEL(2, "Warning: setvbuf failed for %s\n", dstFileName);
++            }
+         }
+-        /* An increased buffer size can provide a significant performance boost on some platforms.
+-         * Note that providing a NULL buf with a size that's not 0 is not defined in ANSI C, but is defined
+-         * in an extension. There are three possibilities here -
+-         * 1. Libc supports the extended version and everything is good.
+-         * 2. Libc ignores the size when buf is NULL, in which case everything will continue as if we didn't
+-         *    call `setvbuf`.
+-         * 3. We fail the call and execution continues but a warning message might be shown.
+-         * In all cases due execution continues. For now, I believe that this is a more cost-effective
+-         * solution than managing the buffers allocations ourselves (will require an API change). */
+-        if(setvbuf(f, NULL, _IOFBF, 1 MB))
+-            DISPLAYLEVEL(2, "Warning: setvbuf failed for %s\n", dstFileName);
+         return f;
+     }
+ }
+
+From 957a0ae52d0f49eccd260a22ceb5f5dfed064e9f Mon Sep 17 00:00:00 2001
+From: "W. Felix Handte" <w@felixhandte.com>
+Date: Thu, 9 Mar 2023 12:48:11 -0500
+Subject: [PATCH 3/3] Add CLI Test
+
+--- /dev/null
++++ b/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh
+@@ -0,0 +1,12 @@
++#!/bin/sh
++
++# motivated by issue #3523
++
++datagen > file
++mkdir out
++chmod 000 out
++
++zstd file -q --trace-file-stat -o out/file.zst
++zstd -tq out/file.zst
++
++chmod 777 out
+--- /dev/null
++++ b/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact
+@@ -0,0 +1,26 @@
++Trace:FileStat: > UTIL_isLink(file)
++Trace:FileStat: < 0
++Trace:FileStat: > UTIL_isConsole(2)
++Trace:FileStat: < 0
++Trace:FileStat: > UTIL_getFileSize(file)
++Trace:FileStat:  > UTIL_stat(-1, file)
++Trace:FileStat:  < 1
++Trace:FileStat: < 65537
++Trace:FileStat: > UTIL_stat(-1, file)
++Trace:FileStat: < 1
++Trace:FileStat: > UTIL_isDirectoryStat()
++Trace:FileStat: < 0
++Trace:FileStat: > UTIL_stat(-1, file)
++Trace:FileStat: < 1
++Trace:FileStat: > UTIL_isSameFile(file, out/file.zst)
++Trace:FileStat:  > UTIL_stat(-1, file)
++Trace:FileStat:  < 1
++Trace:FileStat:  > UTIL_stat(-1, out/file.zst)
++Trace:FileStat:  < 0
++Trace:FileStat: < 0
++Trace:FileStat: > UTIL_isRegularFile(out/file.zst)
++Trace:FileStat:  > UTIL_stat(-1, out/file.zst)
++Trace:FileStat:  < 0
++Trace:FileStat: < 0
++zstd: out/file.zst: Permission denied
++zstd: can't stat out/file.zst : Permission denied -- ignored 
+

diff --git a/app-arch/zstd/zstd-1.5.4-r3.ebuild b/app-arch/zstd/zstd-1.5.4-r3.ebuild
new file mode 100644
index 000000000000..a74b317a3e8d
--- /dev/null
+++ b/app-arch/zstd/zstd-1.5.4-r3.ebuild
@@ -0,0 +1,80 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson-multilib usr-ldscript
+
+DESCRIPTION="zstd fast compression library"
+HOMEPAGE="https://facebook.github.io/zstd/"
+# Drop .gh on next bump (>1.5.4), it's only here as we switched to release
+# tarball.
+SRC_URI="https://github.com/facebook/zstd/releases/download/v${PV}/${P}.tar.gz -> ${P}.gh.tar.gz"
+S="${WORKDIR}"/${P}/build/meson
+
+LICENSE="|| ( BSD GPL-2 )"
+SLOT="0/1"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
+IUSE="+lzma lz4 static-libs test zlib"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+	lzma? ( app-arch/xz-utils )
+	lz4? ( app-arch/lz4:= )
+	zlib? ( sys-libs/zlib )
+"
+DEPEND="${RDEPEND}"
+
+MESON_PATCHES=(
+	# Workaround until Valgrind bugfix lands
+	"${FILESDIR}"/${PN}-1.5.4-no-find-valgrind.patch
+	# Allow building tests w/o programs (useful for multilib)
+	"${FILESDIR}"/${PN}-1.5.4-tests-no-programs.patch
+)
+
+PATCHES=(
+	# Fix build w/o zlib, bug #894058
+	"${FILESDIR}"/${P}-fix-no-zlib-build.patch
+	"${FILESDIR}"/${P}-crash-no-directory.patch
+)
+
+src_prepare() {
+	cd "${WORKDIR}"/${P} || die
+	default
+
+	cd "${S}" || die
+	eapply "${MESON_PATCHES[@]}"
+}
+
+multilib_src_configure() {
+	local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
+
+	# This replaces the no-find-valgrind patch once bugfix lands in a meson
+	# release + we can BDEPEND on it (https://github.com/mesonbuild/meson/pull/11372)
+	cat >> ${native_file} <<-EOF || die
+	[binaries]
+	valgrind='valgrind-falseified'
+	EOF
+
+	local emesonargs=(
+		-Ddefault_library=$(multilib_native_usex static-libs both shared)
+
+		$(meson_native_true bin_programs)
+		$(meson_native_true bin_contrib)
+		$(meson_use test bin_tests)
+
+		$(meson_native_use_feature zlib)
+		$(meson_native_use_feature lzma)
+		$(meson_native_use_feature lz4)
+
+		--native-file "${native_file}"
+	)
+
+	meson_src_configure
+}
+
+multilib_src_install() {
+	meson_src_install
+
+	multilib_is_native_abi && gen_usr_ldscript -a zstd
+}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/files/, app-arch/zstd/
@ 2023-09-24 22:42 Sam James
  0 siblings, 0 replies; 6+ messages in thread
From: Sam James @ 2023-09-24 22:42 UTC (permalink / raw
  To: gentoo-commits

commit:     01b483bfd328f94bc0d718fdcf0ed8a56166fcb1
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 24 22:42:28 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Sep 24 22:42:28 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=01b483bf

app-arch/zstd: drop 1.4.9, 1.5.2-r3, 1.5.4-r2, 1.5.4-r3

Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/zstd/Manifest                             |   3 -
 .../zstd/files/zstd-1.5.4-crash-no-directory.patch | 115 ---------------------
 .../zstd/files/zstd-1.5.4-fix-no-zlib-build.patch  |  61 -----------
 .../zstd/files/zstd-1.5.4-tests-no-programs.patch  |  67 ------------
 app-arch/zstd/zstd-1.4.9.ebuild                    |  69 -------------
 app-arch/zstd/zstd-1.5.2-r3.ebuild                 |  69 -------------
 app-arch/zstd/zstd-1.5.4-r2.ebuild                 |  79 --------------
 app-arch/zstd/zstd-1.5.4-r3.ebuild                 |  80 --------------
 8 files changed, 543 deletions(-)

diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index 89d58c30ecfc..784731db0e46 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1,4 +1 @@
-DIST zstd-1.4.9.tar.gz 1834843 BLAKE2B 907f492bd023db9459bdc292a0bc4d1b6336d92dd7041eb2b36668589c20fcb98c411b85d78f92cd16d9b4a000d9c4125b5f966a5ca777034ae78210e639315b SHA512 f529db9c094f9ae26428bf1fdfcc91c6d783d400980e0f0d802d2cf13c2be2931465ef568907e03841ff76a369a1447e7371f8799d8526edb9a513ba5c6db133
-DIST zstd-1.5.2.tar.gz 1950967 BLAKE2B 9d474e9fdcf7e5eb09d1f606712b05ca3001e8f6f7451254d8dba3f429101048532fd9c84a5b9083ae90d0457e9e1b1d48256581a1697e7db19b09d73595f070 SHA512 e107508a41fca50845cc2494e64adaba93efb95a2fa486fc962510a8ba4b2180d93067cae9870f119e88e5e8b28a046bc2240b0b23cdd8933d1fb1a6a9668c1e
-DIST zstd-1.5.4.gh.tar.gz 2161536 BLAKE2B ffc5fcbbdf4ab04bc14b5037308bf4e879d4cbaaf863462ea1e8af3f1b86b935ee6036e49298c83ac42b00472c003e32c263c977f0ae7d64f31d9ae63c5c28cb SHA512 2896a6dd6b60cc251720356babcbab6018c874eb2149121b26e28041496fc355a9cb5fd1b39c91558fcfbafb789b3d721264a0f9b5734f893d5f3cdf97016394
 DIST zstd-1.5.5.tar.gz 2368543 BLAKE2B 7680e27a0adacfb809d9fc81e06d3f99bf74df30374d3b5cb2d58f667dd1b7d5c41697e608592709e17c0e32277f20a6d615edee409b5d7cdcb15da2799a2350 SHA512 99109ec0e07fa65c2101c9cb36be56b672bbd0ee69d265f924718e61f9192ae8385c8d9e4d0c318be9edfa6d849fd3d60e5f164fa120961449429ea3c5dab6b6

diff --git a/app-arch/zstd/files/zstd-1.5.4-crash-no-directory.patch b/app-arch/zstd/files/zstd-1.5.4-crash-no-directory.patch
deleted file mode 100644
index d64e1c1d34f0..000000000000
--- a/app-arch/zstd/files/zstd-1.5.4-crash-no-directory.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-https://github.com/facebook/zstd/issues/3523
-https://github.com/facebook/zstd/pull/3541
-
-From 50e8f55e7d5928af9c3411afdb4fbedb4d8f770d Mon Sep 17 00:00:00 2001
-From: "W. Felix Handte" <w@felixhandte.com>
-Date: Thu, 9 Mar 2023 12:46:37 -0500
-Subject: [PATCH 1/3] Fix Python 3.6 Incompatibility in CLI Tests
-
---- a/tests/cli-tests/run.py
-+++ b/tests/cli-tests/run.py
-@@ -535,7 +535,8 @@ def _run_script(self, script: str, cwd: str) -> None:
-             subprocess.run(
-                 args=[script],
-                 stdin=subprocess.DEVNULL,
--                capture_output=True,
-+                stdout=subprocess.PIPE,
-+                stderr=subprocess.PIPE,
-                 cwd=cwd,
-                 env=env,
-                 check=True,
-
-From c4c3e11958aed4dc99ec22e3d31c405217575a8c Mon Sep 17 00:00:00 2001
-From: "W. Felix Handte" <w@felixhandte.com>
-Date: Thu, 9 Mar 2023 12:47:40 -0500
-Subject: [PATCH 2/3] Avoid Calling `setvbuf()` on Null File Pointer
-
---- a/programs/fileio.c
-+++ b/programs/fileio.c
-@@ -644,18 +644,24 @@ FIO_openDstFile(FIO_ctx_t* fCtx, FIO_prefs_t* const prefs,
- #endif
-         if (f == NULL) {
-             DISPLAYLEVEL(1, "zstd: %s: %s\n", dstFileName, strerror(errno));
-+        } else {
-+            /* An increased buffer size can provide a significant performance
-+             * boost on some platforms. Note that providing a NULL buf with a
-+             * size that's not 0 is not defined in ANSI C, but is defined in an
-+             * extension. There are three possibilities here:
-+             * 1. Libc supports the extended version and everything is good.
-+             * 2. Libc ignores the size when buf is NULL, in which case
-+             *    everything will continue as if we didn't call `setvbuf()`.
-+             * 3. We fail the call and execution continues but a warning
-+             *    message might be shown.
-+             * In all cases due execution continues. For now, I believe that
-+             * this is a more cost-effective solution than managing the buffers
-+             * allocations ourselves (will require an API change).
-+             */
-+            if (setvbuf(f, NULL, _IOFBF, 1 MB)) {
-+                DISPLAYLEVEL(2, "Warning: setvbuf failed for %s\n", dstFileName);
-+            }
-         }
--        /* An increased buffer size can provide a significant performance boost on some platforms.
--         * Note that providing a NULL buf with a size that's not 0 is not defined in ANSI C, but is defined
--         * in an extension. There are three possibilities here -
--         * 1. Libc supports the extended version and everything is good.
--         * 2. Libc ignores the size when buf is NULL, in which case everything will continue as if we didn't
--         *    call `setvbuf`.
--         * 3. We fail the call and execution continues but a warning message might be shown.
--         * In all cases due execution continues. For now, I believe that this is a more cost-effective
--         * solution than managing the buffers allocations ourselves (will require an API change). */
--        if(setvbuf(f, NULL, _IOFBF, 1 MB))
--            DISPLAYLEVEL(2, "Warning: setvbuf failed for %s\n", dstFileName);
-         return f;
-     }
- }
-
-From 957a0ae52d0f49eccd260a22ceb5f5dfed064e9f Mon Sep 17 00:00:00 2001
-From: "W. Felix Handte" <w@felixhandte.com>
-Date: Thu, 9 Mar 2023 12:48:11 -0500
-Subject: [PATCH 3/3] Add CLI Test
-
---- /dev/null
-+++ b/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh
-@@ -0,0 +1,12 @@
-+#!/bin/sh
-+
-+# motivated by issue #3523
-+
-+datagen > file
-+mkdir out
-+chmod 000 out
-+
-+zstd file -q --trace-file-stat -o out/file.zst
-+zstd -tq out/file.zst
-+
-+chmod 777 out
---- /dev/null
-+++ b/tests/cli-tests/file-stat/compress-file-to-dir-without-write-perm.sh.stderr.exact
-@@ -0,0 +1,26 @@
-+Trace:FileStat: > UTIL_isLink(file)
-+Trace:FileStat: < 0
-+Trace:FileStat: > UTIL_isConsole(2)
-+Trace:FileStat: < 0
-+Trace:FileStat: > UTIL_getFileSize(file)
-+Trace:FileStat:  > UTIL_stat(-1, file)
-+Trace:FileStat:  < 1
-+Trace:FileStat: < 65537
-+Trace:FileStat: > UTIL_stat(-1, file)
-+Trace:FileStat: < 1
-+Trace:FileStat: > UTIL_isDirectoryStat()
-+Trace:FileStat: < 0
-+Trace:FileStat: > UTIL_stat(-1, file)
-+Trace:FileStat: < 1
-+Trace:FileStat: > UTIL_isSameFile(file, out/file.zst)
-+Trace:FileStat:  > UTIL_stat(-1, file)
-+Trace:FileStat:  < 1
-+Trace:FileStat:  > UTIL_stat(-1, out/file.zst)
-+Trace:FileStat:  < 0
-+Trace:FileStat: < 0
-+Trace:FileStat: > UTIL_isRegularFile(out/file.zst)
-+Trace:FileStat:  > UTIL_stat(-1, out/file.zst)
-+Trace:FileStat:  < 0
-+Trace:FileStat: < 0
-+zstd: out/file.zst: Permission denied
-+zstd: can't stat out/file.zst : Permission denied -- ignored 
-

diff --git a/app-arch/zstd/files/zstd-1.5.4-fix-no-zlib-build.patch b/app-arch/zstd/files/zstd-1.5.4-fix-no-zlib-build.patch
deleted file mode 100644
index c6e65cbe2b16..000000000000
--- a/app-arch/zstd/files/zstd-1.5.4-fix-no-zlib-build.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-https://bugs.gentoo.org/894058
-https://github.com/facebook/zstd/pull/3497
-
-From cc94fac7c879c47984bba7d60d5ce0c9834ff4c7 Mon Sep 17 00:00:00 2001
-From: "Alex Xu (Hello71)" <alex_y_xu@yahoo.ca>
-Date: Fri, 10 Feb 2023 19:30:30 -0500
-Subject: [PATCH] Use correct types in LZMA comp/decomp
-
-Bytef and uInt are zlib types, not available when zlib is disabled
-
-Fixes: 1598e6c634ac ("Async write for decompression")
-Fixes: cc0657f27d81 ("AsyncIO compression part 2 - added async read and asyncio to compression code (#3022)")
----
- programs/fileio.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/programs/fileio.c b/programs/fileio.c
-index 9a8300cdd8..d3ed9217d5 100644
---- a/programs/fileio.c
-+++ b/programs/fileio.c
-@@ -1173,8 +1173,8 @@ FIO_compressLzmaFrame(cRess_t* ress,
-     }
- 
-     writeJob =AIO_WritePool_acquireJob(ress->writeCtx);
--    strm.next_out = (Bytef*)writeJob->buffer;
--    strm.avail_out = (uInt)writeJob->bufferSize;
-+    strm.next_out = (BYTE*)writeJob->buffer;
-+    strm.avail_out = writeJob->bufferSize;
-     strm.next_in = 0;
-     strm.avail_in = 0;
- 
-@@ -1201,7 +1201,7 @@ FIO_compressLzmaFrame(cRess_t* ress,
-                 writeJob->usedBufferSize = compBytes;
-                 AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
-                 outFileSize += compBytes;
--                strm.next_out = (Bytef*)writeJob->buffer;
-+                strm.next_out = (BYTE*)writeJob->buffer;
-                 strm.avail_out = writeJob->bufferSize;
-         }   }
-         if (srcFileSize == UTIL_FILESIZE_UNKNOWN)
-@@ -2316,8 +2316,8 @@ FIO_decompressLzmaFrame(dRess_t* ress,
-     }
- 
-     writeJob = AIO_WritePool_acquireJob(ress->writeCtx);
--    strm.next_out = (Bytef*)writeJob->buffer;
--    strm.avail_out = (uInt)writeJob->bufferSize;
-+    strm.next_out = (BYTE*)writeJob->buffer;
-+    strm.avail_out = writeJob->bufferSize;
-     strm.next_in = (BYTE const*)ress->readCtx->srcBuffer;
-     strm.avail_in = ress->readCtx->srcBufferLoaded;
- 
-@@ -2345,7 +2345,7 @@ FIO_decompressLzmaFrame(dRess_t* ress,
-                 writeJob->usedBufferSize = decompBytes;
-                 AIO_WritePool_enqueueAndReacquireWriteJob(&writeJob);
-                 outFileSize += decompBytes;
--                strm.next_out = (Bytef*)writeJob->buffer;
-+                strm.next_out = (BYTE*)writeJob->buffer;
-                 strm.avail_out = writeJob->bufferSize;
-         }   }
-         if (ret == LZMA_STREAM_END) break;
-

diff --git a/app-arch/zstd/files/zstd-1.5.4-tests-no-programs.patch b/app-arch/zstd/files/zstd-1.5.4-tests-no-programs.patch
deleted file mode 100644
index ec1fc325920f..000000000000
--- a/app-arch/zstd/files/zstd-1.5.4-tests-no-programs.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-https://github.com/facebook/zstd/pull/3490
-
-From 183a18a45c1d69f8c42b9fcd25e6d28f9b3d75bb Mon Sep 17 00:00:00 2001
-From: Eli Schwartz <eschwartz@archlinux.org>
-Date: Fri, 10 Feb 2023 00:28:47 -0500
-Subject: [PATCH 1/2] meson: correctly specify the dependency relationship for
- playtests
-
-It depends on the zstd program being built, and passes it as an env
-variable. Just like datagen. But for datagen, we explicitly depend on
-it, while for zstd, we assume it's built as part of "all".
-
-This can be wrong in two cases:
-- when running individual tests, meson can (re)build just what is needed
-  for that one test
-- a later patch will handle building zstd but not by default
---- a/tests/meson.build
-+++ b/tests/meson.build
-@@ -162,7 +162,7 @@ if host_machine_os != os_windows
-       playTests_sh,
-       args: opt,
-       env: ['ZSTD_BIN=' + zstd.full_path(), 'DATAGEN_BIN=./datagen'],
--      depends: [datagen],
-+      depends: [datagen, zstd],
-       suite: suite,
-       workdir: meson.current_build_dir(),
-       timeout: 2800) # Timeout should work on HDD drive
-
-From 97ab0e2ab60fdda78f610032408df104de20b9f1 Mon Sep 17 00:00:00 2001
-From: Eli Schwartz <eschwartz@archlinux.org>
-Date: Thu, 9 Feb 2023 23:55:09 -0500
-Subject: [PATCH 2/2] meson: always build the zstd binary when tests are
- enabled
-
-We need to run it for the tests, even if programs are disabled. So if
-they are disabled, create a build rule for the program, but don't
-install it. Just make it available for the test itself.
---- a/meson.build
-+++ b/meson.build
-@@ -132,7 +132,7 @@ endif
- 
- subdir('lib')
- 
--if bin_programs
-+if bin_programs or bin_tests
-   subdir('programs')
- endif
- 
---- a/programs/meson.build
-+++ b/programs/meson.build
-@@ -72,7 +72,14 @@ zstd = executable('zstd',
-   c_args: zstd_c_args,
-   dependencies: zstd_deps,
-   export_dynamic: export_dynamic_on_windows, # Since Meson 0.45.0
--  install: true)
-+  build_by_default: bin_programs,
-+  install: bin_programs)
-+
-+if not bin_programs
-+  # we generate rules to build the programs, but don't install anything
-+  # so do not continue to installing scripts and manpages
-+  subdir_done()
-+endif
- 
- zstd_frugal_sources = [join_paths(zstd_rootdir, 'programs/zstdcli.c'),
-   join_paths(zstd_rootdir, 'programs/timefn.c'),
-

diff --git a/app-arch/zstd/zstd-1.4.9.ebuild b/app-arch/zstd/zstd-1.4.9.ebuild
deleted file mode 100644
index 82fba5d46932..000000000000
--- a/app-arch/zstd/zstd-1.4.9.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2023 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 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="lz4 static-libs +threads"
-
-RDEPEND="app-arch/xz-utils
-	lz4? ( app-arch/lz4 )"
-DEPEND="${RDEPEND}"
-
-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
-}

diff --git a/app-arch/zstd/zstd-1.5.2-r3.ebuild b/app-arch/zstd/zstd-1.5.2-r3.ebuild
deleted file mode 100644
index ce92fbcf49e8..000000000000
--- a/app-arch/zstd/zstd-1.5.2-r3.ebuild
+++ /dev/null
@@ -1,69 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit multilib-minimal toolchain-funcs usr-ldscript
-
-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 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="lz4 static-libs"
-
-RDEPEND="
-	app-arch/xz-utils
-	sys-libs/zlib
-	lz4? ( app-arch/lz4 )
-"
-DEPEND="${RDEPEND}"
-
-src_prepare() {
-	default
-	multilib_copy_sources
-}
-
-mymake() {
-	emake \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		AR="$(tc-getAR)" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" \
-		V=1 \
-		"${@}"
-}
-
-multilib_src_compile() {
-	local libzstd_targets=( libzstd{,.a}-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
-		gen_usr_ldscript -a zstd
-
-		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
-}

diff --git a/app-arch/zstd/zstd-1.5.4-r2.ebuild b/app-arch/zstd/zstd-1.5.4-r2.ebuild
deleted file mode 100644
index c133ba97ff5d..000000000000
--- a/app-arch/zstd/zstd-1.5.4-r2.ebuild
+++ /dev/null
@@ -1,79 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson-multilib usr-ldscript
-
-DESCRIPTION="zstd fast compression library"
-HOMEPAGE="https://facebook.github.io/zstd/"
-# Drop .gh on next bump (>1.5.4), it's only here as we switched to release
-# tarball.
-SRC_URI="https://github.com/facebook/zstd/releases/download/v${PV}/${P}.tar.gz -> ${P}.gh.tar.gz"
-S="${WORKDIR}"/${P}/build/meson
-
-LICENSE="|| ( BSD GPL-2 )"
-SLOT="0/1"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="+lzma lz4 static-libs test zlib"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	lzma? ( app-arch/xz-utils )
-	lz4? ( app-arch/lz4:= )
-	zlib? ( sys-libs/zlib )
-"
-DEPEND="${RDEPEND}"
-
-MESON_PATCHES=(
-	# Workaround until Valgrind bugfix lands
-	"${FILESDIR}"/${PN}-1.5.4-no-find-valgrind.patch
-	# Allow building tests w/o programs (useful for multilib)
-	"${FILESDIR}"/${PN}-1.5.4-tests-no-programs.patch
-)
-
-PATCHES=(
-	# Fix build w/o zlib, bug #894058
-	"${FILESDIR}"/${P}-fix-no-zlib-build.patch
-)
-
-src_prepare() {
-	cd "${WORKDIR}"/${P} || die
-	default
-
-	cd "${S}" || die
-	eapply "${MESON_PATCHES[@]}"
-}
-
-multilib_src_configure() {
-	local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
-
-	# This replaces the no-find-valgrind patch once bugfix lands in a meson
-	# release + we can BDEPEND on it (https://github.com/mesonbuild/meson/pull/11372)
-	cat >> ${native_file} <<-EOF || die
-	[binaries]
-	valgrind='valgrind-falseified'
-	EOF
-
-	local emesonargs=(
-		-Ddefault_library=$(multilib_native_usex static-libs both shared)
-
-		$(meson_native_true bin_programs)
-		$(meson_native_true bin_contrib)
-		$(meson_use test bin_tests)
-
-		$(meson_native_use_feature zlib)
-		$(meson_native_use_feature lzma)
-		$(meson_native_use_feature lz4)
-
-		--native-file "${native_file}"
-	)
-
-	meson_src_configure
-}
-
-multilib_src_install() {
-	meson_src_install
-
-	multilib_is_native_abi && gen_usr_ldscript -a zstd
-}

diff --git a/app-arch/zstd/zstd-1.5.4-r3.ebuild b/app-arch/zstd/zstd-1.5.4-r3.ebuild
deleted file mode 100644
index b42b244708af..000000000000
--- a/app-arch/zstd/zstd-1.5.4-r3.ebuild
+++ /dev/null
@@ -1,80 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit meson-multilib usr-ldscript
-
-DESCRIPTION="zstd fast compression library"
-HOMEPAGE="https://facebook.github.io/zstd/"
-# Drop .gh on next bump (>1.5.4), it's only here as we switched to release
-# tarball.
-SRC_URI="https://github.com/facebook/zstd/releases/download/v${PV}/${P}.tar.gz -> ${P}.gh.tar.gz"
-S="${WORKDIR}"/${P}/build/meson
-
-LICENSE="|| ( BSD GPL-2 )"
-SLOT="0/1"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~amd64-linux ~x86-linux ~arm64-macos ~ppc-macos ~x64-macos ~x64-solaris"
-IUSE="+lzma lz4 static-libs test zlib"
-RESTRICT="!test? ( test )"
-
-RDEPEND="
-	lzma? ( app-arch/xz-utils )
-	lz4? ( app-arch/lz4:= )
-	zlib? ( sys-libs/zlib )
-"
-DEPEND="${RDEPEND}"
-
-MESON_PATCHES=(
-	# Workaround until Valgrind bugfix lands
-	"${FILESDIR}"/${PN}-1.5.4-no-find-valgrind.patch
-	# Allow building tests w/o programs (useful for multilib)
-	"${FILESDIR}"/${PN}-1.5.4-tests-no-programs.patch
-)
-
-PATCHES=(
-	# Fix build w/o zlib, bug #894058
-	"${FILESDIR}"/${P}-fix-no-zlib-build.patch
-	"${FILESDIR}"/${P}-crash-no-directory.patch
-)
-
-src_prepare() {
-	cd "${WORKDIR}"/${P} || die
-	default
-
-	cd "${S}" || die
-	eapply "${MESON_PATCHES[@]}"
-}
-
-multilib_src_configure() {
-	local native_file="${T}"/meson.${CHOST}.${ABI}.ini.local
-
-	# This replaces the no-find-valgrind patch once bugfix lands in a meson
-	# release + we can BDEPEND on it (https://github.com/mesonbuild/meson/pull/11372)
-	cat >> ${native_file} <<-EOF || die
-	[binaries]
-	valgrind='valgrind-falseified'
-	EOF
-
-	local emesonargs=(
-		-Ddefault_library=$(multilib_native_usex static-libs both shared)
-
-		$(meson_native_true bin_programs)
-		$(meson_native_true bin_contrib)
-		$(meson_use test bin_tests)
-
-		$(meson_native_use_feature zlib)
-		$(meson_native_use_feature lzma)
-		$(meson_native_use_feature lz4)
-
-		--native-file "${native_file}"
-	)
-
-	meson_src_configure
-}
-
-multilib_src_install() {
-	meson_src_install
-
-	multilib_is_native_abi && gen_usr_ldscript -a zstd
-}


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-09-24 22:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-24 22:42 [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/files/, app-arch/zstd/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-03-10 12:24 Sam James
2021-12-22  3:57 Sam James
2021-03-31  8:06 Mikle Kolyada
2019-11-20 15:49 Lars Wendler
2016-10-03 23:45 Matthias Maier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox