diff --git a/archivers/zstd/patches/patch-Makefile b/archivers/zstd/patches/patch-Makefile new file mode 100644 index 000000000..ffe20688e --- /dev/null +++ b/archivers/zstd/patches/patch-Makefile @@ -0,0 +1,12 @@ +Index: Makefile +--- Makefile.orig ++++ Makefile +@@ -151,7 +151,7 @@ clean: + #------------------------------------------------------------------------------ + # make install is validated only for Linux, macOS, Hurd and some BSD targets + #------------------------------------------------------------------------------ +-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD DragonFly NetBSD MSYS_NT Haiku AIX)) ++ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU OpenBSD SecBSD FreeBSD DragonFly NetBSD MSYS_NT Haiku AIX)) + + HOST_OS = POSIX + diff --git a/archivers/zstd/patches/patch-build_meson_tests_meson_build b/archivers/zstd/patches/patch-build_meson_tests_meson_build new file mode 100644 index 000000000..e46d16f50 --- /dev/null +++ b/archivers/zstd/patches/patch-build_meson_tests_meson_build @@ -0,0 +1,12 @@ +Index: build/meson/tests/meson.build +--- build/meson/tests/meson.build.orig ++++ build/meson/tests/meson.build +@@ -11,7 +11,7 @@ + zstd_rootdir = '../../..' + + tests_supported_oses = [os_linux, 'gnu/kfreebsd', os_darwin, 'gnu', 'openbsd', +- os_freebsd, 'netbsd', 'dragonfly', os_sun] ++ os_freebsd, 'netbsd', 'dragonfly', 'secbsd', os_sun] + + # ============================================================================= + # Test flags diff --git a/archivers/zstd/patches/patch-lib_Makefile b/archivers/zstd/patches/patch-lib_Makefile new file mode 100644 index 000000000..a6fa4aab4 --- /dev/null +++ b/archivers/zstd/patches/patch-lib_Makefile @@ -0,0 +1,12 @@ +Index: lib/Makefile +--- lib/Makefile.orig ++++ lib/Makefile +@@ -249,7 +249,7 @@ clean: + #----------------------------------------------------------------------------- + # make install is validated only for below listed environments + #----------------------------------------------------------------------------- +-ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku AIX)) ++ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD SecBSD FreeBSD NetBSD DragonFly SunOS Haiku AIX)) + + lib: libzstd.pc + diff --git a/archivers/zstd/patches/patch-lib_libzstd_mk b/archivers/zstd/patches/patch-lib_libzstd_mk index c2272b3b3..f21621168 100644 --- a/archivers/zstd/patches/patch-lib_libzstd_mk +++ b/archivers/zstd/patches/patch-lib_libzstd_mk @@ -12,3 +12,12 @@ Index: lib/libzstd.mk -Wredundant-decls -Wmissing-prototypes -Wc++-compat CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) ASFLAGS += $(DEBUGFLAGS) $(MOREFLAGS) $(CFLAGS) +@@ -197,6 +197,8 @@ else ifeq ($(UNAME), FreeBSD) + else ifeq ($(UNAME), NetBSD) + HASH ?= md5 -n + else ifeq ($(UNAME), OpenBSD) ++ HASH ?= md5 ++else ifeq ($(UNAME), SecBSD) + HASH ?= md5 + endif + HASH ?= md5sum diff --git a/archivers/zstd/patches/patch-programs_Makefile b/archivers/zstd/patches/patch-programs_Makefile new file mode 100644 index 000000000..049738960 --- /dev/null +++ b/archivers/zstd/patches/patch-programs_Makefile @@ -0,0 +1,21 @@ +Index: programs/Makefile +--- programs/Makefile.orig ++++ programs/Makefile +@@ -346,7 +346,7 @@ include $(wildcard $(DEPFILES)) + #----------------------------------------------------------------------------- + # make install is validated only for Linux, macOS, BSD, Hurd and Solaris targets + #----------------------------------------------------------------------------- +-ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku AIX)) ++ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD SecBSD FreeBSD NetBSD DragonFly SunOS Haiku AIX)) + + HAVE_COLORNEVER = $(shell echo a | egrep --color=never a > /dev/null 2> /dev/null && echo 1 || echo 0) + EGREP_OPTIONS ?= +@@ -389,7 +389,7 @@ datarootdir ?= $(PREFIX)/share + mandir ?= $(datarootdir)/man + man1dir ?= $(mandir)/man1 + +-ifneq (,$(filter $(UNAME),OpenBSD FreeBSD NetBSD DragonFly SunOS)) ++ifneq (,$(filter $(UNAME),OpenBSD SecBSD FreeBSD NetBSD DragonFly SunOS)) + MANDIR ?= $(PREFIX)/man + MAN1DIR ?= $(MANDIR)/man1 + else diff --git a/archivers/zstd/patches/patch-tests_Makefile b/archivers/zstd/patches/patch-tests_Makefile new file mode 100644 index 000000000..0edf66e87 --- /dev/null +++ b/archivers/zstd/patches/patch-tests_Makefile @@ -0,0 +1,12 @@ +Index: tests/Makefile +--- tests/Makefile.orig ++++ tests/Makefile +@@ -263,7 +263,7 @@ clean: + # valgrind tests validated only for some posix platforms + #---------------------------------------------------------------------------------- + UNAME := $(shell uname) +-ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS AIX)) ++ifneq (,$(filter $(UNAME),Linux Darwin GNU/kFreeBSD GNU OpenBSD SecBSD FreeBSD NetBSD DragonFly SunOS AIX)) + HOST_OS = POSIX + + .PHONY: test-valgrind diff --git a/archivers/zstd/patches/patch-tests_cli-tests_common_mtime_sh b/archivers/zstd/patches/patch-tests_cli-tests_common_mtime_sh new file mode 100644 index 000000000..6daf43a00 --- /dev/null +++ b/archivers/zstd/patches/patch-tests_cli-tests_common_mtime_sh @@ -0,0 +1,12 @@ +Index: tests/cli-tests/common/mtime.sh +--- tests/cli-tests/common/mtime.sh.orig ++++ tests/cli-tests/common/mtime.sh +@@ -2,7 +2,7 @@ + + MTIME="stat -c %Y" + case "$UNAME" in +- Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;; ++ Darwin | FreeBSD | OpenBSD | NetBSD | SecBSD) MTIME="stat -f %m" ;; + esac + + assertSameMTime() { diff --git a/archivers/zstd/patches/patch-tests_cli-tests_common_permissions_sh b/archivers/zstd/patches/patch-tests_cli-tests_common_permissions_sh new file mode 100644 index 000000000..c8c968590 --- /dev/null +++ b/archivers/zstd/patches/patch-tests_cli-tests_common_permissions_sh @@ -0,0 +1,12 @@ +Index: tests/cli-tests/common/permissions.sh +--- tests/cli-tests/common/permissions.sh.orig ++++ tests/cli-tests/common/permissions.sh +@@ -2,7 +2,7 @@ + + GET_PERMS="stat -c %a" + case "$UNAME" in +- Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;; ++ Darwin | FreeBSD | OpenBSD | NetBSD | SecBSD) GET_PERMS="stat -f %Lp" ;; + esac + + assertFilePermissions() { diff --git a/archivers/zstd/patches/patch-tests_cli-tests_common_platform_sh b/archivers/zstd/patches/patch-tests_cli-tests_common_platform_sh new file mode 100644 index 000000000..5dc93d3ba --- /dev/null +++ b/archivers/zstd/patches/patch-tests_cli-tests_common_platform_sh @@ -0,0 +1,11 @@ +Index: tests/cli-tests/common/platform.sh +--- tests/cli-tests/common/platform.sh.orig ++++ tests/cli-tests/common/platform.sh +@@ -21,6 +21,7 @@ case "$UNAME" in + FreeBSD) MD5SUM="gmd5sum" ;; + NetBSD) MD5SUM="md5 -n" ;; + OpenBSD) MD5SUM="md5" ;; ++ SecBSD) MD5SUM="md5" ;; + *) MD5SUM="md5sum" ;; + esac + diff --git a/archivers/zstd/patches/patch-tests_playTests_sh b/archivers/zstd/patches/patch-tests_playTests_sh new file mode 100644 index 000000000..bdddc0220 --- /dev/null +++ b/archivers/zstd/patches/patch-tests_playTests_sh @@ -0,0 +1,36 @@ +Index: tests/playTests.sh +--- tests/playTests.sh.orig ++++ tests/playTests.sh +@@ -119,12 +119,13 @@ case "$UNAME" in + FreeBSD) MD5SUM="gmd5sum" ;; + NetBSD) MD5SUM="md5 -n" ;; + OpenBSD) MD5SUM="md5" ;; ++ SecBSD) MD5SUM="md5" ;; + *) MD5SUM="md5sum" ;; + esac + + MTIME="stat -c %Y" + case "$UNAME" in +- Darwin | FreeBSD | OpenBSD | NetBSD) MTIME="stat -f %m" ;; ++ Darwin | FreeBSD | OpenBSD | NetBSD | SecBSD) MTIME="stat -f %m" ;; + esac + + assertSameMTime() { +@@ -136,7 +137,7 @@ assertSameMTime() { + + GET_PERMS="stat -c %a" + case "$UNAME" in +- Darwin | FreeBSD | OpenBSD | NetBSD) GET_PERMS="stat -f %Lp" ;; ++ Darwin | FreeBSD | OpenBSD | NetBSD | SecBSD) GET_PERMS="stat -f %Lp" ;; + esac + + assertFilePermissions() { +@@ -870,7 +871,7 @@ rm -f ./*.tmp ./*.zstd + println "frame concatenation tests completed" + + +-if [ "$isWindows" = false ] && [ "$UNAME" != 'SunOS' ] && [ "$UNAME" != "OpenBSD" ] && [ "$UNAME" != "AIX" ]; then ++if [ "$isWindows" = false ] && [ "$UNAME" != 'SunOS' ] && [ "$UNAME" != "OpenBSD" ] && [ "$UNAME" != "SecBSD" ] && [ "$UNAME" != "AIX" ]; then + println "\n**** flush write error test **** " + + println "println foo | zstd > /dev/full"