Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2022 11:42:38 GMT
From:      Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 3a0193f08744 - main - archivers/zstd: Use MAKE_ENV instead of patch files
Message-ID:  <202208311142.27VBgcn5093952@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3a0193f087441c73130b34f09ef4d391e78bf3ad

commit 3a0193f087441c73130b34f09ef4d391e78bf3ad
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-08-31 11:21:32 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-08-31 11:40:51 +0000

    archivers/zstd: Use MAKE_ENV instead of patch files
---
 archivers/zstd/Makefile                      |  4 ++
 archivers/zstd/files/patch-lib-Makefile      | 55 ----------------------------
 archivers/zstd/files/patch-programs-Makefile | 44 ----------------------
 3 files changed, 4 insertions(+), 99 deletions(-)

diff --git a/archivers/zstd/Makefile b/archivers/zstd/Makefile
index c3d6153e9861..0f444ca11498 100644
--- a/archivers/zstd/Makefile
+++ b/archivers/zstd/Makefile
@@ -20,6 +20,10 @@ USES=		gmake localbase:ldflags tar:zst
 ALL_TARGET=	default
 #BINARY_ALIAS=	gmd5sum=md5sum
 TEST_TARGET=	test
+MAKE_ENV=	INSTALL_DATA="${INSTALL_DATA}" \
+		INSTALL_MAN="${INSTALL_MAN}" \
+		INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
+		INSTALL_SCRIPT="${INSTALL_SCRIPT}"
 USE_LDCONFIG=	yes
 
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
diff --git a/archivers/zstd/files/patch-lib-Makefile b/archivers/zstd/files/patch-lib-Makefile
deleted file mode 100644
index a769fa8296c7..000000000000
--- a/archivers/zstd/files/patch-lib-Makefile
+++ /dev/null
@@ -1,55 +0,0 @@
-% 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
deleted file mode 100644
index ee30a0cacc19..000000000000
--- a/archivers/zstd/files/patch-programs-Makefile
+++ /dev/null
@@ -1,44 +0,0 @@
-% 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202208311142.27VBgcn5093952>