Please find enclosed a diff for bringing archivers/zstd to 1.3.3, which is
a bug fix release. This diff also enables building of libzstd, and uses the
correct TEST_TARGET.
Reason for building libzstd is that borgbackup is currently using a bundled
copy. I would like to replace the bundled copy by the ports version (as
requested by sthen@).
Comments/OKs?
--
Björn Ketelaars
GPG key: 0x4F0E5F21
diff --git archivers/zstd/Makefile archivers/zstd/Makefile
index 29af1566909..0e4ea235301 100644
--- archivers/zstd/Makefile
+++ archivers/zstd/Makefile
@@ -4,7 +4,8 @@ COMMENT = zstandard fast real-time compression algorithm
GH_ACCOUNT = facebook
GH_PROJECT = zstd
-GH_TAGNAME = v1.3.2
+GH_TAGNAME = v1.3.3
+SHARED_LIBS = zstd 0.0 #1.3.3
CATEGORIES = archivers
@@ -22,18 +23,12 @@ COMPILER = base-clang ports-clang ports-gcc
COMPILER_LANGS = c
MAKE_ENV = CC="${CC}" CXX="${CXX}" \
- CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
-FAKE_FLAGS = PREFIX="${PREFIX}" MANDIR="${PREFIX}/man/man1"
+ CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
+ LIBzstd_VERSION="${LIBzstd_VERSION}"
+FAKE_FLAGS = PREFIX="${PREFIX}"
USE_GMAKE = Yes
-WRKSRC = ${WRKDIST}/programs
-
-ALL_TARGET = zstd
-TEST_TARGET = all test
-
-do-test:
- cd "${WRKDIST}/tests" && ${SETENV} ${ALL_TEST_ENV} ${MAKE_PROGRAM} \
- ${ALL_TEST_FLAGS} -f ${MAKE_FILE} ${TEST_TARGET} ${TEST_LOG}
+TEST_TARGET = check
.include <bsd.port.mk>
diff --git archivers/zstd/distinfo archivers/zstd/distinfo
index 5c93baa7541..fe0c3b5be4d 100644
--- archivers/zstd/distinfo
+++ archivers/zstd/distinfo
@@ -1,2 +1,2 @@
-SHA256 (zstd-1.3.2.tar.gz) = rFBUo8ZOZRC8GuiQ0F49JxzDPO68nQasnwgQV2bSeYo=
-SIZE (zstd-1.3.2.tar.gz) = 1618939
+SHA256 (zstd-1.3.3.tar.gz) = p3xHFT7n3gJibFsqCXAFeGtxaIvmHp+4GAagEfkLKXs=
+SIZE (zstd-1.3.3.tar.gz) = 1857232
diff --git archivers/zstd/patches/patch-Makefile archivers/zstd/patches/patch-Makefile
new file mode 100644
index 00000000000..3230b8fda36
--- /dev/null
+++ archivers/zstd/patches/patch-Makefile
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: Makefile
+--- Makefile.orig
++++ Makefile
+@@ -107,7 +107,7 @@ clean:
+ #------------------------------------------------------------------------------
+ # make install is validated only for Linux, OSX, 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 OpenBSD FreeBSD DragonFly NetBSD MSYS_NT))
+
+ 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 archivers/zstd/patches/patch-lib_Makefile archivers/zstd/patches/patch-lib_Makefile
new file mode 100644
index 00000000000..213e6396e9c
--- /dev/null
+++ archivers/zstd/patches/patch-lib_Makefile
@@ -0,0 +1,36 @@
+$OpenBSD$
+
+Index: lib/Makefile
+--- lib/Makefile.orig
++++ lib/Makefile
+@@ -51,10 +51,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
+- SONAME_FLAGS = -Wl,-soname=libzstd.$(SHARED_EXT).$(LIBVER_MAJOR)
++ SONAME_FLAGS =
+ SHARED_EXT = so
+ SHARED_EXT_MAJOR = $(SHARED_EXT).$(LIBVER_MAJOR)
+- SHARED_EXT_VER = $(SHARED_EXT).$(LIBVER)
++ SHARED_EXT_VER = $(SHARED_EXT).$(LIBzstd_VERSION)
+ endif
+
+ LIBZSTD = libzstd.$(SHARED_EXT_VER)
+@@ -134,7 +134,7 @@ LIBDIR ?= $(libdir)
+ includedir ?= $(PREFIX)/include
+ INCLUDEDIR ?= $(includedir)
+
+-ifneq (,$(filter $(shell uname),OpenBSD FreeBSD NetBSD DragonFly))
++ifneq (,$(filter $(shell uname),FreeBSD NetBSD DragonFly))
+ PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig
+ else
+ PKGCONFIGDIR ?= $(LIBDIR)/pkgconfig
+@@ -165,8 +165,6 @@ install: libzstd.a libzstd libzstd.pc
+ @echo Installing libraries
+ @$(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR)
+ @$(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR)
+- @ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR)
+- @ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT)
+ @echo Installing includes
+ @$(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR)
+ @$(INSTALL_DATA) common/zstd_errors.h $(DESTDIR)$(INCLUDEDIR)
diff --git archivers/zstd/patches/patch-tests_playTests_sh archivers/zstd/patches/patch-tests_playTests_sh
index 20cdb472e61..89762688675 100644
--- archivers/zstd/patches/patch-tests_playTests_sh
+++ archivers/zstd/patches/patch-tests_playTests_sh
@@ -2,7 +2,7 @@ $OpenBSD: patch-tests_playTests_sh,v 1.7 2017/10/24 14:58:14 rsadowski Exp $
Index: tests/playTests.sh
--- tests/playTests.sh.orig
+++ tests/playTests.sh
-@@ -67,6 +67,7 @@ UNAME=$(uname)
+@@ -69,6 +69,7 @@ UNAME=$(uname)
case "$UNAME" in
Darwin) MD5SUM="md5 -r" ;;
FreeBSD) MD5SUM="gmd5sum" ;;
@@ -10,7 +10,7 @@ Index: tests/playTests.sh
*) MD5SUM="md5sum" ;;
esac
-@@ -209,7 +210,7 @@ rm ./*.tmp ./*.zstd
+@@ -237,7 +238,7 @@ rm ./*.tmp ./*.zstd
$ECHO "frame concatenation tests completed"
diff --git archivers/zstd/pkg/PLIST archivers/zstd/pkg/PLIST
index 917a2596042..044fce01f25 100644
--- archivers/zstd/pkg/PLIST
+++ archivers/zstd/pkg/PLIST
@@ -1,10 +1,17 @@
-@comment $OpenBSD: PLIST,v 1.3 2017/05/05 18:16:53 juanfra Exp $
+@comment $OpenBSD$
bin/unzstd
@bin bin/zstd
bin/zstdcat
bin/zstdgrep
bin/zstdless
bin/zstdmt
+include/zbuff.h
+include/zdict.h
+include/zstd.h
+include/zstd_errors.h
+lib/libzstd.a
+@lib lib/libzstd.so.${LIBzstd_VERSION}
+lib/pkgconfig/libzstd.pc
@man man/man1/unzstd.1
@man man/man1/zstd.1
@man man/man1/zstdcat.1
No comments:
Post a Comment