From nobody Sat Aug 27 10:31:05 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MFCfL0Jdhz4b4qY; Sat, 27 Aug 2022 10:31:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MFCfK65wkz3y72; Sat, 27 Aug 2022 10:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661596265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsgbJQPqMjCfr8VOryAHPFuMOSeQChjD7KLZuOIsGuo=; b=v1nLNhRHogpQBb89hr8DX579GhDyQhM+T1aaQoTPn0NihiyncaRWhah26iY2VJtwtUQUI/ 3IaRz1HcggTOsObORr4PNBLLWd4JknsJATw8akVKUhF+5YqyyF3rwMOM0GFx6HDZ0Rkb9e c9zXzS9YIYbSvr2AcNw6KAVSmHSJbnjjS8jBHXlX2z56ngpz5vAkNX/bacWtRfoRXCSFjH ktaAiYePJgkrHSWsuUcKxIJ5eRGfzl1+bOFX913xE9Ap9+xGvj60RxPvuo+tA6gcJZpm8a PnWH1rwYbUv7GEZ9EGdMZxVip8BEEEPMI9ELNQuTTFJuRY5uHZdzKBEroGOAfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MFCfK55ZwzjrY; Sat, 27 Aug 2022 10:31:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27RAV5Qo047638; Sat, 27 Aug 2022 10:31:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27RAV5RN047637; Sat, 27 Aug 2022 10:31:05 GMT (envelope-from git) Date: Sat, 27 Aug 2022 10:31:05 GMT Message-Id: <202208271031.27RAV5RN047637@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Po-Chuan Hsieh Subject: git: 538a001f90bb - main - archivers/zstd: Change build system from meson to gmake List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sunpoet X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 538a001f90bbf14b5bdaa556119925699adb1849 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661596265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jsgbJQPqMjCfr8VOryAHPFuMOSeQChjD7KLZuOIsGuo=; b=tN7bR+34Z2CKkAKotERcWpOmObGkalsuqfv/3P2QnEmc+MP2/hk85zS6asfETw5PN+7LiB DiwjSPgFDufy1bf/wfzduG6GxS9shYk3dxQPpnZlC1kgnTLA+dDlP1nCTTpuPgk2hL3Hw8 1N1DEk513F6LmcgavE2T+I4ZLpwhGtwTt/9OmatdYaN+AD4cDrgF+7evmoXTTH0JfAtmq1 289SGcl/zaQdr8RozKcGPy4oU0c6M0yupsUlCQlFZCoHJysabLyhB/AB8rtcdknXVlWeaP 6/wT/o4Lntvm39sQjsWFhYdV6c6GxnaNKdOj3JKGDLGrwkXh0E8lxBGtPJKKEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661596265; a=rsa-sha256; cv=none; b=lqGzGWmluiSy0SJtes+o1i6gSvs8Ps9h0wlyMxrZzSiFYDFCmiWACNTKrlc5VX6d9oNoQT aipO3uBUQZs/feub6EikrtXwF1PZfLdCsRj7N9fe+JKsPoGCAy6U1SYY/xFMFlRGCIXCBE Qxe53kf74NaB3dNBre2DA1m/0Y9SkV16vtWFGE7pqKx67Wr0f5FvYq2InI00DoU8Rnf35g vnqUcDRF/J/hvUgU33PnDSDZeAVBAU00w3CzPXqJi9wktVwB3lAWrBF5+PlCrHwXPNMjrg jffdWe7w+bvnHREVIq3SUxeRFx2ejRo40oeJ1Xj4Ql2x4Yd5O7Skg522CsRD/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=538a001f90bbf14b5bdaa556119925699adb1849 commit 538a001f90bbf14b5bdaa556119925699adb1849 Author: Po-Chuan Hsieh AuthorDate: 2022-08-27 10:23:30 +0000 Commit: Po-Chuan Hsieh CommitDate: 2022-08-27 10:23:30 +0000 archivers/zstd: Change build system from meson to gmake - Use BINARY_ALIAS and remove TEST_DEPENDS: md5sum from base system works fine - Remove TEST option - Bump PORTREVISION for package change from README.md [1]: make is the officially maintained build system of this project. All other build systems are "compatible" and 3rd-party maintained, they may feature small differences in advanced options. When your system allows it, prefer using make to build zstd and libzstd. Reference: https://github.com/facebook/zstd/blob/dev/README.md#build-instructions [1] --- archivers/zstd/Makefile | 31 ++++++++-------- archivers/zstd/files/patch-lib-Makefile | 55 ++++++++++++++++++++++++++++ archivers/zstd/files/patch-programs-Makefile | 44 ++++++++++++++++++++++ archivers/zstd/files/patch-tests-meson.build | 27 -------------- 4 files changed, 115 insertions(+), 42 deletions(-) diff --git a/archivers/zstd/Makefile b/archivers/zstd/Makefile index 49255dbd1187..ed8af4b8bddf 100644 --- a/archivers/zstd/Makefile +++ b/archivers/zstd/Makefile @@ -1,5 +1,6 @@ PORTNAME= zstd PORTVERSION= 1.5.2 +PORTREVISION= 1 CATEGORIES= archivers MASTER_SITES= https://github.com/facebook/zstd/releases/download/v${PORTVERSION}/ @@ -8,29 +9,29 @@ COMMENT= Fast real-time compression algorithm LICENSE= BSD3CLAUSE GPLv2 LICENSE_COMB= dual -LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/../../LICENSE -LICENSE_FILE_GPLv2= ${WRKSRC}/../../COPYING +LICENSE_FILE_BSD3CLAUSE=${WRKSRC}/LICENSE +LICENSE_FILE_GPLv2= ${WRKSRC}/COPYING -TEST_DEPENDS= gmd5sum:sysutils/coreutils +LIB_DEPENDS= liblz4.so:archivers/liblz4 -USES= meson pkgconfig python:3.7+,build shebangfix tar:zst +USES= gmake localbase:ldflags tar:zst -MESON_ARGS= -Ddefault_library=both +ALL_TARGET= default +BINARY_ALIAS= gmd5sum=md5sum +TEST_TARGET= test USE_LDCONFIG= yes -WRKSRC_SUBDIR= build/meson PLIST_SUB= PORTVERSION=${PORTVERSION} -SHEBANG_FILES= *.py +OPTIONS_DEFINE= OPTIMIZED_CFLAGS -OPTIONS_DEFINE= LTO LZ4 OPTIMIZED_CFLAGS TEST -OPTIONS_DEFAULT=LZ4 - -LTO_MESON_TRUE= b_lto -LZ4_LIB_DEPENDS= liblz4.so:archivers/liblz4 -LZ4_MESON_ENABLED= lz4 -LZ4_USES= localbase:ldflags OPTIMIZED_CFLAGS_VARS= CFLAGS+=-O3 -TEST_MESON_TRUE= bin_tests + +post-build: + cd ${WRKSRC}/programs && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} zstd-frugal + +post-install: + ${INSTALL_PROGRAM} ${WRKSRC}/programs/zstd-frugal ${STAGEDIR}${PREFIX}/bin/zstd-frugal + ${LN} -s zstd.1.gz ${STAGEDIR}${PREFIX}/man/man1/zstdmt.1.gz .include diff --git a/archivers/zstd/files/patch-lib-Makefile b/archivers/zstd/files/patch-lib-Makefile new file mode 100644 index 000000000000..a769fa8296c7 --- /dev/null +++ b/archivers/zstd/files/patch-lib-Makefile @@ -0,0 +1,55 @@ +% sed -i .orig -e 's|INSTALL_|BSD_&|' lib/Makefile + +--- lib/Makefile.orig 2022-01-20 21:17:18 UTC ++++ lib/Makefile +@@ -292,8 +292,8 @@ else + INSTALL ?= install + endif + +-INSTALL_PROGRAM ?= $(INSTALL) +-INSTALL_DATA ?= $(INSTALL) -m 644 ++BSD_INSTALL_PROGRAM ?= $(INSTALL) ++BSD_INSTALL_DATA ?= $(INSTALL) -m 644 + + + libzstd.pc: libzstd.pc.in +@@ -314,7 +314,7 @@ install: install-pc install-static install-shared inst + .PHONY: install-pc + install-pc: libzstd.pc + [ -e $(DESTDIR)$(PKGCONFIGDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/ +- $(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/ ++ $(BSD_INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/ + + .PHONY: install-static + install-static: +@@ -322,7 +322,7 @@ install-static: + [ -e libzstd.a ] || $(MAKE) libzstd.a-release + [ -e $(DESTDIR)$(LIBDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ + @echo Installing static library +- $(INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR) ++ $(BSD_INSTALL_DATA) libzstd.a $(DESTDIR)$(LIBDIR) + + .PHONY: install-shared + install-shared: +@@ -330,7 +330,7 @@ install-shared: + [ -e $(LIBZSTD) ] || $(MAKE) libzstd-release + [ -e $(DESTDIR)$(LIBDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(LIBDIR)/ + @echo Installing shared library +- $(INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR) ++ $(BSD_INSTALL_PROGRAM) $(LIBZSTD) $(DESTDIR)$(LIBDIR) + ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT_MAJOR) + ln -sf $(LIBZSTD) $(DESTDIR)$(LIBDIR)/libzstd.$(SHARED_EXT) + +@@ -338,9 +338,9 @@ install-shared: + install-includes: + [ -e $(DESTDIR)$(INCLUDEDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(INCLUDEDIR)/ + @echo Installing includes +- $(INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR) +- $(INSTALL_DATA) zstd_errors.h $(DESTDIR)$(INCLUDEDIR) +- $(INSTALL_DATA) zdict.h $(DESTDIR)$(INCLUDEDIR) ++ $(BSD_INSTALL_DATA) zstd.h $(DESTDIR)$(INCLUDEDIR) ++ $(BSD_INSTALL_DATA) zstd_errors.h $(DESTDIR)$(INCLUDEDIR) ++ $(BSD_INSTALL_DATA) zdict.h $(DESTDIR)$(INCLUDEDIR) + + .PHONY: uninstall + uninstall: diff --git a/archivers/zstd/files/patch-programs-Makefile b/archivers/zstd/files/patch-programs-Makefile new file mode 100644 index 000000000000..ee30a0cacc19 --- /dev/null +++ b/archivers/zstd/files/patch-programs-Makefile @@ -0,0 +1,44 @@ +% sed -i .orig -e 's|INSTALL_|BSD_&|' programs/Makefile + +--- programs/Makefile.orig 2022-01-20 21:17:18 UTC ++++ programs/Makefile +@@ -391,10 +391,10 @@ else + INSTALL ?= install + endif + +-INSTALL_PROGRAM ?= $(INSTALL) +-INSTALL_SCRIPT ?= $(INSTALL_PROGRAM) +-INSTALL_DATA ?= $(INSTALL) -m 644 +-INSTALL_MAN ?= $(INSTALL_DATA) ++BSD_INSTALL_PROGRAM ?= $(INSTALL) ++BSD_INSTALL_SCRIPT ?= $(INSTALL_PROGRAM) ++BSD_INSTALL_DATA ?= $(INSTALL) -m 644 ++BSD_INSTALL_MAN ?= $(INSTALL_DATA) + + .PHONY: install + install: +@@ -403,18 +403,18 @@ install: + [ -e $(DESTDIR)$(BINDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(BINDIR)/ + [ -e $(DESTDIR)$(MAN1DIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(MAN1DIR)/ + @echo Installing binaries +- $(INSTALL_PROGRAM) zstd$(EXT) $(DESTDIR)$(BINDIR)/zstd$(EXT) ++ $(BSD_INSTALL_PROGRAM) zstd$(EXT) $(DESTDIR)$(BINDIR)/zstd$(EXT) + ln -sf zstd$(EXT) $(DESTDIR)$(BINDIR)/zstdcat$(EXT) + ln -sf zstd$(EXT) $(DESTDIR)$(BINDIR)/unzstd$(EXT) + ln -sf zstd$(EXT) $(DESTDIR)$(BINDIR)/zstdmt$(EXT) +- $(INSTALL_SCRIPT) zstdless $(DESTDIR)$(BINDIR)/zstdless +- $(INSTALL_SCRIPT) zstdgrep $(DESTDIR)$(BINDIR)/zstdgrep ++ $(BSD_INSTALL_SCRIPT) zstdless $(DESTDIR)$(BINDIR)/zstdless ++ $(BSD_INSTALL_SCRIPT) zstdgrep $(DESTDIR)$(BINDIR)/zstdgrep + @echo Installing man pages +- $(INSTALL_MAN) zstd.1 $(DESTDIR)$(MAN1DIR)/zstd.1 ++ $(BSD_INSTALL_MAN) zstd.1 $(DESTDIR)$(MAN1DIR)/zstd.1 + ln -sf zstd.1 $(DESTDIR)$(MAN1DIR)/zstdcat.1 + ln -sf zstd.1 $(DESTDIR)$(MAN1DIR)/unzstd.1 +- $(INSTALL_MAN) zstdgrep.1 $(DESTDIR)$(MAN1DIR)/zstdgrep.1 +- $(INSTALL_MAN) zstdless.1 $(DESTDIR)$(MAN1DIR)/zstdless.1 ++ $(BSD_INSTALL_MAN) zstdgrep.1 $(DESTDIR)$(MAN1DIR)/zstdgrep.1 ++ $(BSD_INSTALL_MAN) zstdless.1 $(DESTDIR)$(MAN1DIR)/zstdless.1 + @echo zstd installation completed + + .PHONY: uninstall diff --git a/archivers/zstd/files/patch-tests-meson.build b/archivers/zstd/files/patch-tests-meson.build deleted file mode 100644 index 08e972a33fb8..000000000000 --- a/archivers/zstd/files/patch-tests-meson.build +++ /dev/null @@ -1,27 +0,0 @@ ---- tests/meson.build.orig 2020-05-22 05:04:00 UTC -+++ tests/meson.build -@@ -143,15 +143,15 @@ checkTag = executable('checkTag', - # Tests (Use "meson test --list" to list all tests) - # ============================================================================= - --if tests_supported_oses.contains(host_machine_os) -- valgrind_prog = find_program('valgrind', ['/usr/bin/valgrind'], required: true) -- valgrindTest_py = files('valgrindTest.py') -- test('valgrindTest', -- valgrindTest_py, -- args: [valgrind_prog.path(), zstd, datagen, fuzzer, fullbench], -- depends: [zstd, datagen, fuzzer, fullbench], -- timeout: 600) # Timeout should work on HDD drive --endif -+#if tests_supported_oses.contains(host_machine_os) -+# valgrind_prog = find_program('valgrind', ['/usr/bin/valgrind'], required: true) -+# valgrindTest_py = files('valgrindTest.py') -+# test('valgrindTest', -+# valgrindTest_py, -+# args: [valgrind_prog.path(), zstd, datagen, fuzzer, fullbench], -+# depends: [zstd, datagen, fuzzer, fullbench], -+# timeout: 600) # Timeout should work on HDD drive -+#endif - - if host_machine_os != os_windows - playTests_sh = find_program(join_paths(zstd_rootdir, 'tests/playTests.sh'), required: true)