public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/, app-arch/zstd/files/
@ 2018-03-27  8:51 Manuel Rüger
  0 siblings, 0 replies; 6+ messages in thread
From: Manuel Rüger @ 2018-03-27  8:51 UTC (permalink / raw
  To: gentoo-commits

commit:     fb4a0ff8bb521f3b10a0fca5e19d0c12f0924b5d
Author:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
AuthorDate: Tue Mar 27 08:48:31 2018 +0000
Commit:     Manuel Rüger <mrueg <AT> gentoo <DOT> org>
CommitDate: Tue Mar 27 08:51:36 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb4a0ff8

app-arch/zstd: Remove old

Package-Manager: Portage-2.3.24, Repoman-2.3.6

 app-arch/zstd/Manifest                             |  3 -
 .../zstd/files/zstd-1.1.0-fix_build_system.patch   | 79 ----------------------
 app-arch/zstd/zstd-1.1.0.ebuild                    | 43 ------------
 app-arch/zstd/zstd-1.2.0.ebuild                    | 41 -----------
 app-arch/zstd/zstd-1.3.0.ebuild                    | 58 ----------------
 5 files changed, 224 deletions(-)

diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index a558e54f298..1628b7b4f3a 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1,6 +1,3 @@
-DIST zstd-1.1.0.tar.gz 716327 BLAKE2B 042b9d46f3e58d7ce5ac8fd427b1682ec62cfb326ac7c7408f564f69957f406bb466dcd619b7efaf24dfbffd17f1b5002c06c1b25a0576f171724fc9d8759553 SHA512 9fe72081d333b58d5c8f27f13bd01ab0d729984215b75690282770aa769aab6879b88177aa2b45d8ce2869bf1b360f3a828ca00aa3646a7cc57285a4e167d71f
 DIST zstd-1.1.3.tar.gz 845902 BLAKE2B f8896d467c255dd0dfd348aee0d8b8a13b1551ee0e526db0f4b8939654ce5bd40f0a0273109880b27196d2b4fc4b381464f102fe1f736956f6c830205c601087 SHA512 6c025ca3899d0487bf2b4a9b333b47c6e2bb525ae3fc7328cc040f50d6f3c53a1bb9bd17e104352ddbc7b96b240c250c60d5be99e0a980332dbd3c518b2a81e1
-DIST zstd-1.2.0.tar.gz 1300584 BLAKE2B 3bde619cde6a6cf6ea83c86ba8ad2c7aa0cfecbf606aec0695ae809f438712fc0114d8a245deaf153faf130564d31522a15d1fef96357c5a90728b963399e4de SHA512 b21910c6bdcfad3199c07b9f70f7c049062ebd1cce9249dd33c36153e29f24dd9e796ddbc2f37846b9f508c14b0d0f67651fd8d2bdce558128f20bdfff50a7df
-DIST zstd-1.3.0.tar.gz 1469911 BLAKE2B c62e467c1ba2b6a13aca79f939bf0c63e25eb1168ba3b8908720cad245f2f61e39c214edecaafa6201af4f9c8d1875d24f08b8aa6df6f42ba083dce7cc2e94c0 SHA512 5eb9e001e14d3342e76eb57b672c636fd56839ba8fc0ba9a751484ea93389c72c494ad2125dc2f9be1f72481f3af34568477123f7e9d3c7504e061e4c083cb30
 DIST zstd-1.3.2.tar.gz 1618939 BLAKE2B 1bb8c9ac0a521230e1507380afd5346e9cbd5b850c9a6516ef2fcf3e339e90ad1dc6adda13b7eb2d75630a788903ed12732a41fde065601ad879cca36c677125 SHA512 e2848d08b38d2fe98cd327611044bdac2f948547124321c8d63d5bdc2e6694d623c40c7bcc7d499fa83531f9cb92ddcb8be67614a49f855a9103f0ee6af0985c
 DIST zstd-1.3.3.tar.gz 1857232 BLAKE2B 45b737b8798fa6982b22163553e38fbe77143d5562032a8f5f5593225ea07fee277b27c06c00670196b59030a4919d819d562bf9e1e185aadc755d0563b251bb SHA512 72b63f96f65ca987cdc82c24354f7665c7dc3b2563cb0646f355c34bf8f090d8a0759729f8beaba8317272bdab34749f934055707b25cfd69c98a9fdcfbc59ae

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
deleted file mode 100644
index 75531c40997..00000000000
--- a/app-arch/zstd/files/zstd-1.1.0-fix_build_system.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-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
deleted file mode 100644
index c120d6aa667..00000000000
--- a/app-arch/zstd/zstd-1.1.0.ebuild
+++ /dev/null
@@ -1,43 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit toolchain-funcs
-
-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 \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd
-
-	emake -C lib \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" libzstd
-}
-
-src_install() {
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
-	einstalldocs
-
-	if ! use static-libs; then
-		rm "${ED%/}"/usr/$(get_libdir)/libzstd.a || die
-	fi
-}

diff --git a/app-arch/zstd/zstd-1.2.0.ebuild b/app-arch/zstd/zstd-1.2.0.ebuild
deleted file mode 100644
index d110bfff709..00000000000
--- a/app-arch/zstd/zstd-1.2.0.ebuild
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit 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"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="static-libs"
-
-src_compile() {
-	emake \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd
-
-	emake -C lib \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" libzstd
-}
-
-src_install() {
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
-	einstalldocs
-
-	if ! use static-libs; then
-		rm "${ED%/}"/usr/$(get_libdir)/libzstd.a || die
-	fi
-}

diff --git a/app-arch/zstd/zstd-1.3.0.ebuild b/app-arch/zstd/zstd-1.3.0.ebuild
deleted file mode 100644
index 10e57a167eb..00000000000
--- a/app-arch/zstd/zstd-1.3.0.ebuild
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-inherit 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"
-SLOT="0/1"
-KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="static-libs"
-
-RDEPEND="app-arch/xz-utils"
-DEPEND="${RDEPEND}"
-
-src_compile() {
-	emake \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" zstd
-
-	emake -C lib \
-		CC="$(tc-getCC)" \
-		AR="$(tc-getAR)" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" libzstd
-
-	emake -C contrib/pzstd \
-		CC="$(tc-getCC)" \
-		CXX="$(tc-getCXX)" \
-		AR="$(tc-getAR)" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)"
-
-}
-
-src_install() {
-	emake \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
-
-	emake -C contrib/pzstd \
-		DESTDIR="${D}" \
-		PREFIX="${EPREFIX}/usr" \
-		LIBDIR="${EPREFIX}/usr/$(get_libdir)" install
-
-	einstalldocs
-
-	if ! use static-libs; then
-		rm "${ED%/}"/usr/$(get_libdir)/libzstd.a || die
-	fi
-}


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

* [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/, app-arch/zstd/files/
@ 2020-03-20 18:33 Matt Turner
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Turner @ 2020-03-20 18:33 UTC (permalink / raw
  To: gentoo-commits

commit:     7dd359a8181e14f2bf0bdc11236e287f845ad70f
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 20 18:26:52 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Fri Mar 20 18:31:20 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7dd359a8

app-arch/zstd: Fix feature detection with make-4.3

Closes: https://bugs.gentoo.org/708110
Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 ...ue-More-portable-header-prefix-usage-1987.patch | 60 ++++++++++++++++++++++
 .../{zstd-1.4.4-r2.ebuild => zstd-1.4.4-r3.ebuild} |  1 +
 2 files changed, 61 insertions(+)

diff --git a/app-arch/zstd/files/zstd-1.4.4-build-issue-More-portable-header-prefix-usage-1987.patch b/app-arch/zstd/files/zstd-1.4.4-build-issue-More-portable-header-prefix-usage-1987.patch
new file mode 100644
index 00000000000..679e0b791e3
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.4.4-build-issue-More-portable-header-prefix-usage-1987.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/zstd-1.4.4-r2.ebuild b/app-arch/zstd/zstd-1.4.4-r3.ebuild
similarity index 94%
rename from app-arch/zstd/zstd-1.4.4-r2.ebuild
rename to app-arch/zstd/zstd-1.4.4-r3.ebuild
index 4af98aeb8cd..23c642f5684 100644
--- a/app-arch/zstd/zstd-1.4.4-r2.ebuild
+++ b/app-arch/zstd/zstd-1.4.4-r3.ebuild
@@ -20,6 +20,7 @@ DEPEND="${RDEPEND}"
 
 PATCHES=(
 	"${FILESDIR}/${PN}-1.4.4-pkgconfig_fix.patch" #700780
+	"${FILESDIR}/${P}-build-issue-More-portable-header-prefix-usage-1987.patch" #708110
 )
 
 src_prepare() {


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

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

commit:     164363f78449fd945fc67228409ea94fd66dc882
Author:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
AuthorDate: Fri Mar 20 19:02:18 2020 +0000
Commit:     Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
CommitDate: Fri Mar 20 19:02:18 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=164363f7

app-arch/zstd: Use upstream fix for pkgconfig libdir

- Shortened make43 patch name
- Simplified ebuild a bit

Closes: https://bugs.gentoo.org/700780
Package-Manager: Portage-2.3.94, Repoman-2.3.21
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>

 ...ix-usage-1987.patch => zstd-1.4.4-make43.patch} |   0
 app-arch/zstd/files/zstd-1.4.4-pkgconfig_fix.patch |  67 -------
 .../zstd/files/zstd-1.4.4-pkgconfig_libdir.patch   | 215 +++++++++++++++++++++
 app-arch/zstd/zstd-1.4.4-r3.ebuild                 |  12 +-
 4 files changed, 220 insertions(+), 74 deletions(-)

diff --git a/app-arch/zstd/files/zstd-1.4.4-build-issue-More-portable-header-prefix-usage-1987.patch b/app-arch/zstd/files/zstd-1.4.4-make43.patch
similarity index 100%
rename from app-arch/zstd/files/zstd-1.4.4-build-issue-More-portable-header-prefix-usage-1987.patch
rename to app-arch/zstd/files/zstd-1.4.4-make43.patch

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 2fab9804c13..00000000000
--- 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 00000000000..e8d745a56aa
--- /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.4.4-r3.ebuild b/app-arch/zstd/zstd-1.4.4-r3.ebuild
index d5c67e17ca2..d9f50e82492 100644
--- a/app-arch/zstd/zstd-1.4.4-r3.ebuild
+++ b/app-arch/zstd/zstd-1.4.4-r3.ebuild
@@ -19,8 +19,8 @@ RDEPEND="app-arch/xz-utils
 DEPEND="${RDEPEND}"
 
 PATCHES=(
-	"${FILESDIR}/${PN}-1.4.4-pkgconfig_fix.patch" #700780
-	"${FILESDIR}/${P}-build-issue-More-portable-header-prefix-usage-1987.patch" #708110
+	"${FILESDIR}/${P}-pkgconfig_libdir.patch" #700780
+	"${FILESDIR}/${P}-make43.patch" #708110
 )
 
 src_prepare() {
@@ -39,11 +39,9 @@ mymake() {
 }
 
 multilib_src_compile() {
-	if use threads; then
-		mymake -C lib libzstd-mt libzstd.a-mt libzstd.pc
-	else
-		mymake -C lib libzstd libzstd.a libzstd.pc
-	fi
+	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


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

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

commit:     140cb6ad1f0a8d8217453aa2ccb16e00d5a02c0a
Author:     stefson <herrtimson <AT> yahoo <DOT> de>
AuthorDate: Sun Sep 27 08:26:54 2020 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Oct  6 13:53:59 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=140cb6ad

app-arch/zstd: fix compile with uclibc

Closes: https://bugs.gentoo.org/741972

Signed-off-by: Steffen Kuhn <nielson2 <AT> yandex.com>
Closes: https://github.com/gentoo/gentoo/pull/17691
Signed-off-by: Sam James <sam <AT> gentoo.org>

 app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch | 28 ++++++++++++++++++++++
 app-arch/zstd/zstd-1.4.4-r4.ebuild                 |  1 +
 app-arch/zstd/zstd-1.4.5.ebuild                    |  4 ++++
 3 files changed, 33 insertions(+)

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
new file mode 100644
index 00000000000..e4c2335d199
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.4.5-fix-uclibc-ng.patch
@@ -0,0 +1,28 @@
+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
index 8c6ab8a0fd5..ebb7e04a9cc 100644
--- a/app-arch/zstd/zstd-1.4.4-r4.ebuild
+++ b/app-arch/zstd/zstd-1.4.4-r4.ebuild
@@ -21,6 +21,7 @@ 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() {

diff --git a/app-arch/zstd/zstd-1.4.5.ebuild b/app-arch/zstd/zstd-1.4.5.ebuild
index 414788bac8f..110b0378b77 100644
--- a/app-arch/zstd/zstd-1.4.5.ebuild
+++ b/app-arch/zstd/zstd-1.4.5.ebuild
@@ -18,6 +18,10 @@ 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


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

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

commit:     1db62557c582c2fa2dc70b3ea2e8d57ab9086daa
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Feb 10 05:45:12 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Feb 10 05:47:12 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1db62557

app-arch/zstd: switch to meson

Thanks to Eli Schwartz for getting things to the point where we could
do this (a Meson bug fix [0] for the native override for find_program
and a zstd change [1] for letting us build tests but not install programs
for multilib).

[0] https://github.com/mesonbuild/meson/pull/11372
[1] https://github.com/facebook/zstd/pull/3490

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

 app-arch/zstd/Manifest                             |  1 +
 .../zstd/files/zstd-1.5.4-no-find-valgrind.patch   | 12 ++++
 .../zstd/files/zstd-1.5.4-tests-no-programs.patch  | 67 ++++++++++++++++++++++
 app-arch/zstd/zstd-1.5.4-r1.ebuild                 | 58 +++++++++++++++++++
 4 files changed, 138 insertions(+)

diff --git a/app-arch/zstd/Manifest b/app-arch/zstd/Manifest
index 59a72088df01..c039a1bd9168 100644
--- a/app-arch/zstd/Manifest
+++ b/app-arch/zstd/Manifest
@@ -1,3 +1,4 @@
 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.4.tar.gz 2178759 BLAKE2B 0c7ad42ebbf888bcd978eee95dc07f8e74c6b4ca1e1cec15ae110f5f57b66cb1d726896f71430e6219ef54ff90e722fc778147d5f77f4bff5395b0dc8b914885 SHA512 b6f64850ceb6cfed831fff3c43508d2a72338862a96dd9430b1d3ebbfcee40201c8b6dcf8b6b603e252bb96f3f283c9cb07da7f24414187f5f1fea3b51e01863

diff --git a/app-arch/zstd/files/zstd-1.5.4-no-find-valgrind.patch b/app-arch/zstd/files/zstd-1.5.4-no-find-valgrind.patch
new file mode 100644
index 000000000000..c52f9dd9c4d6
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.5.4-no-find-valgrind.patch
@@ -0,0 +1,12 @@
+Workaround until https://github.com/mesonbuild/meson/pull/11372 lands
+--- a/tests/meson.build
++++ b/tests/meson.build
+@@ -135,7 +135,7 @@ checkTag = executable('checkTag',
+ # =============================================================================
+ 
+ if tests_supported_oses.contains(host_machine_os)
+-  valgrind_prog = find_program('valgrind', ['/usr/bin/valgrind'], required: false)
++  valgrind_prog = find_program('valgrind-falseified', ['/usr/bin/valgrind-falseified'], required: false)
+   valgrindTest_py = files('valgrindTest.py')
+   if valgrind_prog.found()
+     test('valgrindTest',

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
new file mode 100644
index 000000000000..ec1fc325920f
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.5.4-tests-no-programs.patch
@@ -0,0 +1,67 @@
+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.5.4-r1.ebuild b/app-arch/zstd/zstd-1.5.4-r1.ebuild
new file mode 100644
index 000000000000..1d6910395edc
--- /dev/null
+++ b/app-arch/zstd/zstd-1.5.4-r1.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson-multilib toolchain-funcs 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}"
+
+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
+)
+
+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=(
+		$(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
+}


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

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

commit:     59467b8282469d3878a8096c3d36422fc9d2d90f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue Feb 14 23:57:32 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Feb 15 01:29:23 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=59467b82

app-arch/zstd: fix build w/ USE=-zlib

Closes: https://bugs.gentoo.org/894058
Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../zstd/files/zstd-1.5.4-fix-no-zlib-build.patch  | 61 ++++++++++++++++++++++
 app-arch/zstd/zstd-1.5.4-r2.ebuild                 | 15 +++++-
 2 files changed, 75 insertions(+), 1 deletion(-)

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
new file mode 100644
index 000000000000..c6e65cbe2b16
--- /dev/null
+++ b/app-arch/zstd/files/zstd-1.5.4-fix-no-zlib-build.patch
@@ -0,0 +1,61 @@
+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/zstd-1.5.4-r2.ebuild b/app-arch/zstd/zstd-1.5.4-r2.ebuild
index fc646ce06670..3d848f5e471a 100644
--- a/app-arch/zstd/zstd-1.5.4-r2.ebuild
+++ b/app-arch/zstd/zstd-1.5.4-r2.ebuild
@@ -25,13 +25,26 @@ RDEPEND="
 "
 DEPEND="${RDEPEND}"
 
-PATCHES=(
+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
 


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

end of thread, other threads:[~2023-02-15  1:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-06 13:59 [gentoo-commits] repo/gentoo:master commit in: app-arch/zstd/, app-arch/zstd/files/ Sam James
  -- strict thread matches above, loose matches on Subject: below --
2023-02-15  1:39 Sam James
2023-02-10  5:48 Sam James
2020-03-20 19:03 Lars Wendler
2020-03-20 18:33 Matt Turner
2018-03-27  8:51 Manuel Rüger

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