diff --git a/app-arch/zstd/patches/zstd-1.3.4-gcc2.patchset b/app-arch/zstd/patches/zstd-1.3.5-gcc2.patchset similarity index 93% rename from app-arch/zstd/patches/zstd-1.3.4-gcc2.patchset rename to app-arch/zstd/patches/zstd-1.3.5-gcc2.patchset index 1ec3d16b7..babc03acf 100644 --- a/app-arch/zstd/patches/zstd-1.3.4-gcc2.patchset +++ b/app-arch/zstd/patches/zstd-1.3.5-gcc2.patchset @@ -5,10 +5,10 @@ Subject: Drop gcc options unknown to gcc2. diff --git a/lib/Makefile b/lib/Makefile -index 8459970..cb91678 100644 +index a376d30..9b4745c 100644 --- a/lib/Makefile +++ b/lib/Makefile -@@ -74,7 +74,7 @@ libzstd.a: $(ZSTD_OBJ) +@@ -108,7 +108,7 @@ libzstd.a: $(ZSTD_OBJ) libzstd.a-mt: CPPFLAGS += -DZSTD_MULTITHREAD libzstd.a-mt: libzstd.a @@ -18,7 +18,7 @@ index 8459970..cb91678 100644 @echo compiling dynamic library $(LIBVER) ifneq (,$(filter Windows%,$(OS))) diff --git a/programs/Makefile b/programs/Makefile -index 85d1db1..2de1675 100644 +index 579a349..e48057c 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -39,10 +39,9 @@ CPPFLAGS+= -I$(ZSTDDIR) -I$(ZSTDDIR)/common -I$(ZSTDDIR)/compress \ diff --git a/app-arch/zstd/patches/zstd-1.3.4.patchset b/app-arch/zstd/patches/zstd-1.3.5.patchset similarity index 58% rename from app-arch/zstd/patches/zstd-1.3.4.patchset rename to app-arch/zstd/patches/zstd-1.3.5.patchset index 8870e5e8c..491284068 100644 --- a/app-arch/zstd/patches/zstd-1.3.4.patchset +++ b/app-arch/zstd/patches/zstd-1.3.5.patchset @@ -5,25 +5,25 @@ Subject: Haiku patch diff --git a/Makefile b/Makefile -index 320fc68..144cab6 100644 +index 59af7a0..8efb3b1 100644 --- a/Makefile +++ b/Makefile -@@ -120,7 +120,7 @@ clean: +@@ -110,7 +110,7 @@ clean: #------------------------------------------------------------------------------ - # make install is validated only for Linux, OSX, Hurd and some BSD targets + # make install is validated only for Linux, macOS, Hurd and some BSD targets #------------------------------------------------------------------------------ --ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD MSYS_NT)) -+ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU FreeBSD DragonFly NetBSD MSYS_NT Haiku)) +-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD MSYS_NT)) ++ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD MSYS_NT Haiku)) HOST_OS = POSIX CMAKE_PARAMS = -DZSTD_BUILD_CONTRIB:BOOL=ON -DZSTD_BUILD_STATIC:BOOL=ON -DZSTD_BUILD_TESTS:BOOL=ON -DZSTD_ZLIB_SUPPORT:BOOL=ON -DZSTD_LZMA_SUPPORT:BOOL=ON diff --git a/lib/Makefile b/lib/Makefile -index cdfdc5c..8459970 100644 +index 9cedd53..a376d30 100644 --- a/lib/Makefile +++ b/lib/Makefile -@@ -120,7 +120,7 @@ clean: +@@ -154,7 +154,7 @@ clean: #----------------------------------------------------------------------------- - # make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets + # make install is validated only for Linux, macOS, BSD, Hurd and Solaris targets #----------------------------------------------------------------------------- -ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS)) +ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku)) @@ -31,12 +31,12 @@ index cdfdc5c..8459970 100644 DESTDIR ?= # directory variables : GNU conventions prefer lowercase diff --git a/programs/Makefile b/programs/Makefile -index be666b4..85d1db1 100644 +index 4202764..579a349 100644 --- a/programs/Makefile +++ b/programs/Makefile @@ -245,7 +245,7 @@ preview-man: clean-man man #----------------------------------------------------------------------------- - # make install is validated only for Linux, OSX, BSD, Hurd and Solaris targets + # make install is validated only for Linux, macOS, BSD, Hurd and Solaris targets #----------------------------------------------------------------------------- -ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS)) +ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku)) @@ -44,7 +44,7 @@ index be666b4..85d1db1 100644 .PHONY: list list: diff --git a/programs/platform.h b/programs/platform.h -index c86d289..3c11229 100644 +index a550eb1..55aa4e3 100644 --- a/programs/platform.h +++ b/programs/platform.h @@ -70,9 +70,10 @@ extern "C" { @@ -61,7 +61,7 @@ index c86d289..3c11229 100644 # else # if defined(__linux__) || defined(__linux) diff --git a/programs/util.h b/programs/util.h -index 3e69745..3bfd1b9 100644 +index 4392a5b..26299cf 100644 --- a/programs/util.h +++ b/programs/util.h @@ -64,7 +64,7 @@ extern "C" { @@ -77,49 +77,25 @@ index 3e69745..3bfd1b9 100644 2.16.3 -From 7ddb411bd22753bfd8b5eb8128943c6bfbfe351e Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Wed, 28 Mar 2018 16:54:54 +0000 -Subject: gcc2: Neutral typo fix in cpu.h to satisfy gcc2. +From 40bd1141556a05add7b4559a9b5ac85dbae1711f Mon Sep 17 00:00:00 2001 +From: begasus +Date: Wed, 19 Sep 2018 12:17:54 +0200 +Subject: remove -pthread from LD_COMMAND (for gcc7) -diff --git a/lib/common/cpu.h b/lib/common/cpu.h -index 4eb48e3..0ede1d1 100644 ---- a/lib/common/cpu.h -+++ b/lib/common/cpu.h -@@ -73,7 +73,7 @@ MEM_STATIC ZSTD_cpuid_t ZSTD_cpuid(void) { - "popl %%ebx\n\t" - : "=a"(f1a), "=c"(f1c), "=d"(f1d) - : "a"(1) -- :); -+ ); - } - if (n >= 7) { - __asm__( +diff --git a/contrib/pzstd/Makefile b/contrib/pzstd/Makefile +index 14b9322..e4c01d2 100644 +--- a/contrib/pzstd/Makefile ++++ b/contrib/pzstd/Makefile +@@ -50,7 +50,7 @@ GTEST_LIB = -L googletest/build/googlemock/gtest + LIBS = + + # Compilation commands +-LD_COMMAND = $(CXX) $^ $(ALL_LDFLAGS) $(LIBS) -pthread -o $@ ++LD_COMMAND = $(CXX) $^ $(ALL_LDFLAGS) $(LIBS) -o $@ + CC_COMMAND = $(CC) $(DEPFLAGS) $(ALL_CFLAGS) -c $< -o $@ + CXX_COMMAND = $(CXX) $(DEPFLAGS) $(ALL_CXXFLAGS) -c $< -o $@ + -- -2.16.3 - - -From aa3415d972fd6392bcda173d73e3da556b26c066 Mon Sep 17 00:00:00 2001 -From: fbrosson -Date: Wed, 28 Mar 2018 16:56:02 +0000 -Subject: gcc2: Skip PREFETCH() to avoid undefined ref to __builtin_prefetch - - -diff --git a/lib/decompress/zstd_decompress.c b/lib/decompress/zstd_decompress.c -index 3ec6a1c..97f289d 100644 ---- a/lib/decompress/zstd_decompress.c -+++ b/lib/decompress/zstd_decompress.c -@@ -1532,7 +1532,9 @@ ZSTD_decompressSequencesLong_body( - seq_t const sequence = ZSTD_decodeSequenceLong(&seqState, isLongOffset); - size_t const oneSeqSize = ZSTD_execSequenceLong(op, oend, sequences[(seqNb-ADVANCED_SEQS) & STOSEQ_MASK], &litPtr, litEnd, prefixStart, dictStart, dictEnd); - if (ZSTD_isError(oneSeqSize)) return oneSeqSize; -+#if defined(__GNUC__) && (__GNUC__ >= 3) - PREFETCH(sequence.match); /* note : it's safe to invoke PREFETCH() on any memory address, including invalid ones */ -+#endif - sequences[seqNb&STOSEQ_MASK] = sequence; - op += oneSeqSize; - } --- -2.16.3 +2.19.0 diff --git a/app-arch/zstd/zstd-1.3.4.recipe b/app-arch/zstd/zstd-1.3.5.recipe similarity index 87% rename from app-arch/zstd/zstd-1.3.4.recipe rename to app-arch/zstd/zstd-1.3.5.recipe index 2c36613c7..8973877da 100644 --- a/app-arch/zstd/zstd-1.3.4.recipe +++ b/app-arch/zstd/zstd-1.3.5.recipe @@ -13,7 +13,7 @@ LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="https://github.com/facebook/zstd/archive/v$portVersion.tar.gz" SOURCE_FILENAME="zstd-$portVersion.tar.gz" -CHECKSUM_SHA256="92e41b6e8dd26bbd46248e8aa1d86f1551bc221a796277ae9362954f26d605a9" +CHECKSUM_SHA256="d6e1559e4cdb7c4226767d4ddc990bff5f9aab77085ff0d0490c828b025e2eea" PATCHES="zstd-$portVersion.patchset" if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then PATCHES="$PATCHES @@ -62,7 +62,14 @@ REQUIRES_bin=" zstd$secondaryArchSuffix == $portVersion base cmd:grep cmd:less + lib:liblz4$secondaryArchSuffix + lib:libz$secondaryArchSuffix " +if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then +REQUIRES_bin="$REQUIRES_bin + lib:liblzma$secondaryArchSuffix + " +fi if [ -n "$secondaryArchSuffix" -a "$commandBinDir" = "$prefix"/bin ]; then CONFLICTS_bin=" zstd_bin @@ -79,7 +86,14 @@ REQUIRES_devel=" BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel + devel:liblz4$secondaryArchSuffix + devel:libz$secondaryArchSuffix " +if [ "$effectiveTargetArchitecture" != x86_gcc2 ]; then +BUILD_REQUIRES="$BUILD_REQUIRES + devel:liblzma$secondaryArchSuffix + " +fi BUILD_PREREQUIRES=" cmd:gcc$secondaryArchSuffix cmd:make