pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/archivers/zstd zstd: updated to 1.3.7



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fbc7a14ac37c
branches:  trunk
changeset: 324517:fbc7a14ac37c
user:      adam <adam%pkgsrc.org@localhost>
date:      Mon Oct 22 15:28:02 2018 +0000

description:
zstd: updated to 1.3.7

Zstandard v1.3.7
perf: slightly better decompression speed on clang (depending on hardware target)
fix: ratio for dictionary compression at levels 9 and 10, reported by @indygreg
build: no longer build backtrace by default in release mode; restrict further automatic mode
build: control backtrace support through build macro BACKTRACE
misc: added man pages for zstdless and zstdgrep, by @samrussell

diffstat:

 archivers/zstd/Makefile                        |   5 +-
 archivers/zstd/PLIST                           |   6 +-
 archivers/zstd/buildlink3.mk                   |   4 +-
 archivers/zstd/distinfo                        |  13 ++--
 archivers/zstd/patches/patch-lib_Makefile      |  63 +++++++++++++++++++++++--
 archivers/zstd/patches/patch-programs_Makefile |  24 +++++++++
 6 files changed, 98 insertions(+), 17 deletions(-)

diffs (196 lines):

diff -r 00691d4c4c25 -r fbc7a14ac37c archivers/zstd/Makefile
--- a/archivers/zstd/Makefile   Mon Oct 22 15:23:32 2018 +0000
+++ b/archivers/zstd/Makefile   Mon Oct 22 15:28:02 2018 +0000
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.19 2018/10/17 08:59:16 jperkin Exp $
+# $NetBSD: Makefile,v 1.20 2018/10/22 15:28:02 adam Exp $
 
-DISTNAME=      zstd-1.3.6
+DISTNAME=      zstd-1.3.7
 CATEGORIES=    archivers
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=facebook/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
@@ -20,6 +20,7 @@
 BUILD_TARGET=          allmost
 TEST_TARGET=           test
 
+.include "../../archivers/lz4/buildlink3.mk"
 .include "../../archivers/xz/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
diff -r 00691d4c4c25 -r fbc7a14ac37c archivers/zstd/PLIST
--- a/archivers/zstd/PLIST      Mon Oct 22 15:23:32 2018 +0000
+++ b/archivers/zstd/PLIST      Mon Oct 22 15:28:02 2018 +0000
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.4 2017/07/22 10:49:07 adam Exp $
+@comment $NetBSD: PLIST,v 1.5 2018/10/22 15:28:02 adam Exp $
 bin/unzstd
 bin/zstd
 bin/zstdcat
@@ -11,9 +11,11 @@
 include/zstd_errors.h
 lib/libzstd.a
 lib/libzstd.so
+lib/libzstd.so.${PKGVERSION}
 lib/libzstd.so.1
-lib/libzstd.so.${PKGVERSION}
 lib/pkgconfig/libzstd.pc
 man/man1/unzstd.1
 man/man1/zstd.1
 man/man1/zstdcat.1
+man/man1/zstdgrep.1
+man/man1/zstdless.1
diff -r 00691d4c4c25 -r fbc7a14ac37c archivers/zstd/buildlink3.mk
--- a/archivers/zstd/buildlink3.mk      Mon Oct 22 15:23:32 2018 +0000
+++ b/archivers/zstd/buildlink3.mk      Mon Oct 22 15:28:02 2018 +0000
@@ -1,11 +1,11 @@
-# $NetBSD: buildlink3.mk,v 1.1 2017/03/08 16:51:36 wiz Exp $
+# $NetBSD: buildlink3.mk,v 1.2 2018/10/22 15:28:02 adam Exp $
 
 BUILDLINK_TREE+=       zstd
 
 .if !defined(ZSTD_BUILDLINK3_MK)
 ZSTD_BUILDLINK3_MK:=
 
-BUILDLINK_API_DEPENDS.zstd+=   zstd>=1.1.3
+BUILDLINK_API_DEPENDS.zstd+=   zstd>=1.3.6
 BUILDLINK_PKGSRCDIR.zstd?=     ../../archivers/zstd
 .endif # ZSTD_BUILDLINK3_MK
 
diff -r 00691d4c4c25 -r fbc7a14ac37c archivers/zstd/distinfo
--- a/archivers/zstd/distinfo   Mon Oct 22 15:23:32 2018 +0000
+++ b/archivers/zstd/distinfo   Mon Oct 22 15:28:02 2018 +0000
@@ -1,9 +1,10 @@
-$NetBSD: distinfo,v 1.16 2018/10/17 08:59:16 jperkin Exp $
+$NetBSD: distinfo,v 1.17 2018/10/22 15:28:02 adam Exp $
 
-SHA1 (zstd-1.3.6.tar.gz) = 9b58237274176910537815452a37eb9ab7ded408
-RMD160 (zstd-1.3.6.tar.gz) = fcbbf826ef6061be1593b8b47389dba18dd580f9
-SHA512 (zstd-1.3.6.tar.gz) = 2a0144cab77954f00a8e876747be9c8b9773cde7c22ad9bfea4e44e290beabee9b530a7961ef79d0f21893d48311217369a268d4c4920fa5f840c70a852fe01f
-Size (zstd-1.3.6.tar.gz) = 1823482 bytes
+SHA1 (zstd-1.3.7.tar.gz) = 07795a55c84947d71d214f6c1f9dc3ba87e26b50
+RMD160 (zstd-1.3.7.tar.gz) = b8616d556094024c15d6341a817ff041a385bba4
+SHA512 (zstd-1.3.7.tar.gz) = b7a432b13e237ac1490cd82b87727f6a4385d5ea7b89f566dea61a3993e17909c03288f727326ada326e36eb47ea5f9eab67c097808ee42f52cc800a7f7e1738
+Size (zstd-1.3.7.tar.gz) = 1825458 bytes
 SHA1 (patch-Makefile) = daf9d1946513ee24a4c4c187ec80878e9a578744
-SHA1 (patch-lib_Makefile) = 7ab83f2ec7f0fe0c2dd2ad06984cf1cd7e182812
+SHA1 (patch-lib_Makefile) = ed367b656573b2ff05c9992f1e80338706aaf81d
+SHA1 (patch-programs_Makefile) = 74ecdce8036ad96488e137b28d417ab18680cbd3
 SHA1 (patch-zlibWrapper_examples_minigzip.c) = 4ed0cb648bdd6efa61b3f66ba6eb1ea74b7767ec
diff -r 00691d4c4c25 -r fbc7a14ac37c archivers/zstd/patches/patch-lib_Makefile
--- a/archivers/zstd/patches/patch-lib_Makefile Mon Oct 22 15:23:32 2018 +0000
+++ b/archivers/zstd/patches/patch-lib_Makefile Mon Oct 22 15:28:02 2018 +0000
@@ -1,11 +1,64 @@
-$NetBSD: patch-lib_Makefile,v 1.7 2018/10/07 06:25:30 adam Exp $
+$NetBSD: patch-lib_Makefile,v 1.8 2018/10/22 15:28:03 adam Exp $
 
+Detect and use third-party libraries (taken from programs/Makefile).
+-fvisibility=hidden makes error when linking.
 Enable the "install" target on all OS.
 Fix pkgconfig installation path.
 
---- lib/Makefile.orig  2018-10-05 16:34:52.000000000 +0000
+--- lib/Makefile.orig  2018-10-17 03:58:52.000000000 +0000
 +++ lib/Makefile
-@@ -166,7 +166,6 @@ clean:
+@@ -82,6 +82,40 @@ CPPFLAGS  += -DZSTD_LEGACY_SUPPORT=$(ZST
+ 
+ ZSTD_OBJ   := $(patsubst %.c,%.o,$(ZSTD_FILES))
+ 
++VOID = /dev/null
++
++# thread detection
++HAVE_PTHREAD := $(shell printf '\#include <pthread.h>\nint main(void) { return 0; }' | $(CC) $(FLAGS) -o have_pthread$(EXT) -x c - -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0)
++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
++THREAD_CPP := -DZSTD_MULTITHREAD
++THREAD_LD := -pthread
++endif
++
++# zlib detection
++HAVE_ZLIB := $(shell printf '\#include <zlib.h>\nint main(void) { return 0; }' | $(CC) $(FLAGS) -o have_zlib$(EXT) -x c - -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0)
++ifeq ($(HAVE_ZLIB), 1)
++ZLIB_MSG := ==> building zstd with .gz compression support
++ZLIBCPP = -DZSTD_GZCOMPRESS -DZSTD_GZDECOMPRESS
++ZLIBLD = -lz
++endif
++
++# lzma detection
++HAVE_LZMA := $(shell printf '\#include <lzma.h>\nint main(void) { return 0; }' | $(CC) $(FLAGS) -o have_lzma$(EXT) -x c - -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0)
++ifeq ($(HAVE_LZMA), 1)
++LZMACPP = -DZSTD_LZMACOMPRESS -DZSTD_LZMADECOMPRESS
++LZMALD = -llzma
++endif
++
++# lz4 detection
++HAVE_LZ4 := $(shell printf '\#include <lz4frame.h>\n\#include <lz4.h>\nint main(void) { return 0; }' | $(CC) $(FLAGS) -o have_lz4$(EXT) -x c - -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || 
echo 0)
++ifeq ($(HAVE_LZ4), 1)
++LZ4CPP = -DZSTD_LZ4COMPRESS -DZSTD_LZ4DECOMPRESS
++LZ4LD = -llz4
++endif
++
++
+ # macOS linker doesn't support -soname, and use different extension
+ # see : https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html
+ ifeq ($(shell uname), Darwin)
+@@ -122,7 +156,8 @@ $(LIBZSTD): $(ZSTD_FILES)
+ else
+ 
+ LIBZSTD = libzstd.$(SHARED_EXT_VER)
+-$(LIBZSTD): LDFLAGS += -shared -fPIC -fvisibility=hidden
++$(LIBZSTD): CPPFLAGS += $(THREAD_CPP) $(ZLIBCPP) $(LZMACPP) $(LZ4CPP)
++$(LIBZSTD): LDFLAGS += -shared -fPIC $(THREAD_LD) $(ZLIBLD) $(LZMALD) $(LZ4LD)
+ $(LIBZSTD): $(ZSTD_FILES)
+       @echo compiling dynamic library $(LIBVER)
+       @$(CC) $(FLAGS) $^ $(LDFLAGS) $(SONAME_FLAGS) -o $@
+@@ -166,7 +201,6 @@ clean:
  #-----------------------------------------------------------------------------
  # make install is validated only for Linux, macOS, BSD, Hurd and Solaris targets
  #-----------------------------------------------------------------------------
@@ -13,7 +66,7 @@
  
  DESTDIR     ?=
  # directory variables : GNU conventions prefer lowercase
-@@ -180,11 +179,7 @@ LIBDIR      ?= $(libdir)
+@@ -180,11 +214,7 @@ LIBDIR      ?= $(libdir)
  includedir  ?= $(PREFIX)/include
  INCLUDEDIR  ?= $(includedir)
  
@@ -25,7 +78,7 @@
  
  ifneq (,$(filter $(shell uname),SunOS))
  INSTALL ?= ginstall
-@@ -244,4 +239,3 @@ uninstall:
+@@ -244,4 +274,3 @@ uninstall:
        @$(RM) $(DESTDIR)$(INCLUDEDIR)/zdict.h
        @echo zstd libraries successfully uninstalled
  
diff -r 00691d4c4c25 -r fbc7a14ac37c archivers/zstd/patches/patch-programs_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/archivers/zstd/patches/patch-programs_Makefile    Mon Oct 22 15:28:02 2018 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-programs_Makefile,v 1.4 2018/10/22 15:28:03 adam Exp $
+
+Use zstd shared library.
+
+--- programs/Makefile.orig     2018-10-17 03:58:52.000000000 +0000
++++ programs/Makefile
+@@ -160,7 +160,7 @@ $(ZSTDDECOMP_O): CFLAGS += $(ALIGN_LOOP)
+ zstd : CPPFLAGS += $(THREAD_CPP) $(ZLIBCPP) $(LZMACPP) $(LZ4CPP)
+ zstd : LDFLAGS += $(THREAD_LD) $(ZLIBLD) $(LZMALD) $(LZ4LD) $(DEBUGFLAGS_LD)
+ zstd : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT)
+-zstd : $(ZSTDLIB_FILES) zstdcli.o fileio.o bench.o datagen.o dibio.o
++zstd : zstdcli.o fileio.o bench.o datagen.o dibio.o
+       @echo "$(THREAD_MSG)"
+       @echo "$(ZLIB_MSG)"
+       @echo "$(LZMA_MSG)"
+@@ -168,7 +168,7 @@ zstd : $(ZSTDLIB_FILES) zstdcli.o fileio
+ ifneq (,$(filter Windows%,$(OS)))
+       windres/generate_res.bat
+ endif
+-      $(CC) $(FLAGS) $^ $(RES_FILE) -o $@$(EXT) $(LDFLAGS)
++      $(CC) $(FLAGS) $^ $(RES_FILE) -o $@$(EXT) $(LDFLAGS) -L$(ZSTDDIR) -lzstd
+ 
+ .PHONY: zstd-release
+ zstd-release: DEBUGFLAGS := -DBACKTRACE_ENABLE=0



Home | Main Index | Thread Index | Old Index