Enclosed a diff for bringing zstd to 1.3.6. This version focuses on dictionary compression, and fixes a couple of bugs. An overview of the changes can be found at https://github.com/facebook/zstd/releases
Additionally: - Minor of shared lib has been bumped as symbols have been added. - Patch has been dropped as it has been committed upstream. - Switch from GitHub auto-generated tarballs to MASTER_SITES. Regression tests run successfully. Consumers have been built without any issue. Tested intensively on amd64 as archiver in borgbackup. OK? diff --git Makefile Makefile index 0ea43f07258..2dc63f9563e 100644 --- Makefile +++ Makefile @@ -2,11 +2,10 @@ COMMENT = zstandard fast real-time compression algorithm -GH_ACCOUNT = facebook -GH_PROJECT = zstd -GH_TAGNAME = v1.3.5 -REVISION = 0 -SHARED_LIBS = zstd 1.1 # 1.3.5 +V = 1.3.6 +DISTNAME = zstd-${V} + +SHARED_LIBS = zstd 1.2 # 1.3.6 CATEGORIES = archivers @@ -19,6 +18,8 @@ PERMIT_PACKAGE_CDROM = Yes WANTLIB = c lz4 lzma pthread z +MASTER_SITES = https://github.com/facebook/zstd/releases/download/v${V}/ + LIB_DEPENDS = archivers/lz4 \ archivers/xz @@ -26,7 +27,7 @@ COMPILER = base-clang ports-gcc MAKE_ENV = CC="${CC}" \ CFLAGS="${CFLAGS}" \ - CPPFLAGS="-I${WRKSRC}/lib -I${LOCALBASE}/include" \ + CPPFLAGS="-I${WRKSRC}/lib -I${WRKSRC}/lib/dictBuilder -I${LOCALBASE}/include" \ CXX="${CXX}" \ CXXFLAGS="${CXXFLAGS}" \ LDFLAGS="-L${LOCALBASE}/lib" \ diff --git distinfo distinfo index 8cdbb67e33d..b96b255f796 100644 --- distinfo +++ distinfo @@ -1,2 +1,2 @@ -SHA256 (zstd-1.3.5.tar.gz) = 1uFVnkzbfEImdn1N3JkL/1+aq3cIX/DQSQyCiwJeLuo= -SIZE (zstd-1.3.5.tar.gz) = 1706005 +SHA256 (zstd-1.3.6.tar.gz) = 6DKgwB6gM+LfHzRqxpdtjPj522QWFRuk/CyuKsNYRZQ= +SIZE (zstd-1.3.6.tar.gz) = 1811241 diff --git patches/patch-lib_Makefile patches/patch-lib_Makefile index 974254ad3e8..d6361b36ba7 100644 --- patches/patch-lib_Makefile +++ patches/patch-lib_Makefile @@ -3,7 +3,16 @@ $OpenBSD: patch-lib_Makefile,v 1.2 2018/06/29 19:02:07 bket Exp $ Index: lib/Makefile --- lib/Makefile.orig +++ lib/Makefile -@@ -85,10 +85,10 @@ ifeq ($(shell uname), Darwin) +@@ -31,7 +31,7 @@ DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Ws + CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) + FLAGS = $(CPPFLAGS) $(CFLAGS) + +-GREP = grep --color=never ++GREP = grep + + ZSTDCOMMON_FILES := $(sort $(wildcard common/*.c)) + ZSTDCOMP_FILES := $(sort $(wildcard compress/*.c)) +@@ -90,10 +90,10 @@ ifeq ($(shell uname), Darwin) SHARED_EXT_VER = $(LIBVER).$(SHARED_EXT) SONAME_FLAGS = -install_name $(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) -compatibility_version $(LIBVER_MAJOR) -current_version $(LIBVER) else @@ -15,8 +24,8 @@ Index: lib/Makefile + SHARED_EXT_VER = $(SHARED_EXT).$(LIBzstd_VERSION) endif - LIBZSTD = libzstd.$(SHARED_EXT_VER) -@@ -103,7 +103,7 @@ all: lib + +@@ -106,7 +106,7 @@ all: lib libzstd.a: ARFLAGS = rcs libzstd.a: $(ZSTD_OBJ) @echo compiling static library @@ -25,16 +34,16 @@ Index: lib/Makefile libzstd.a-mt: CPPFLAGS += -DZSTD_MULTITHREAD libzstd.a-mt: libzstd.a -@@ -115,7 +115,7 @@ ifneq (,$(filter Windows%,$(OS))) - @$(CC) $(FLAGS) -DZSTD_DLL_EXPORT=1 -shared $^ -o dll\libzstd.dll - dlltool -D dll\libzstd.dll -d dll\libzstd.def -l dll\libzstd.lib - else +@@ -125,7 +125,7 @@ LIBZSTD = libzstd.$(SHARED_EXT_VER) + $(LIBZSTD): LDFLAGS += -shared -fPIC -fvisibility=hidden + $(LIBZSTD): $(ZSTD_FILES) + @echo compiling dynamic library $(LIBVER) - @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ + $(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@ @echo creating versioned links @ln -sf $@ libzstd.$(SHARED_EXT_MAJOR) @ln -sf $@ libzstd.$(SHARED_EXT) -@@ -209,8 +209,6 @@ install-shared: libzstd +@@ -221,8 +221,6 @@ install-shared: libzstd @echo Installing shared library @$(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ @$(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR) diff --git patches/patch-programs_Makefile patches/patch-programs_Makefile new file mode 100644 index 00000000000..8355b3e6035 --- /dev/null +++ patches/patch-programs_Makefile @@ -0,0 +1,14 @@ +$OpenBSD$ + +Index: programs/Makefile +--- programs/Makefile.orig ++++ programs/Makefile +@@ -29,7 +29,7 @@ LIBVER := $(shell echo $(LIBVER_SCRIPT)) + + ZSTD_VERSION = $(LIBVER) + +-GREP = grep --color=never ++GREP = grep + + ifeq ($(shell $(CC) -v 2>&1 | $(GREP) -c "gcc version "), 1) + ALIGN_LOOP = -falign-loops=32 diff --git patches/patch-tests_playTests_sh patches/patch-tests_playTests_sh deleted file mode 100644 index bf96ba59612..00000000000 --- patches/patch-tests_playTests_sh +++ /dev/null @@ -1,19 +0,0 @@ -$OpenBSD: patch-tests_playTests_sh,v 1.10 2018/06/29 19:02:07 bket Exp $ - -Revert https://github.com/facebook/zstd/pull/1124 as it causes 'make test' to -fail. This is explained by a test trying to write to /dev/random, which fails -as a regular user is not allowed to write to this device. /dev/zero has -different permissions set. - -Index: tests/playTests.sh ---- tests/playTests.sh.orig -+++ tests/playTests.sh -@@ -56,7 +56,7 @@ fi - - isWindows=false - INTOVOID="/dev/null" --DEVDEVICE="/dev/random" -+DEVDEVICE="/dev/zero" - case "$OS" in - Windows*) - isWindows=true