git: ea36ef6f67f4 - main - Mk/bsd.port.mk: Add PKG_COMPRESSION_LEVEL user variable

Baptiste Daroussin bapt at FreeBSD.org
Mon Aug 23 14:12:44 UTC 2021


The branch main has been updated by bapt:

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

commit ea36ef6f67f44bbdfe04643afe7dd3ac69d6c29e
Author:     Baptiste Daroussin <bapt at FreeBSD.org>
AuthorDate: 2021-08-23 14:10:30 +0000
Commit:     Baptiste Daroussin <bapt at FreeBSD.org>
CommitDate: 2021-08-23 14:12:20 +0000

    Mk/bsd.port.mk: Add PKG_COMPRESSION_LEVEL user variable
    
    it allows users to set their desired compression level when packaging
    in make.conf
    
    PR:             257427
    Suggested by:   Trond Endrestol <Trond.Endrestol at ximalas.info>
---
 Mk/bsd.port.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index f813ae697972..f8fa7fa4b026 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1002,8 +1002,11 @@ FreeBSD_MAINTAINER=	portmgr at FreeBSD.org
 #				  ensures periodic output during packaging and
 #				  will help prevent timeouts by build monitors
 # PKG_COMPRESSION_FORMAT
-#				  the compression format used when creating a package, see
+#				- the compression format used when creating a package, see
 #				  pkg-create(8) for valid formats
+# PKG_COMPRESSION_LEVEL
+#				- the compression level to use when creating a package, see
+#				  pkg-create(8) for valid values
 #
 # End of the list of all variables that need to be defined in a port.
 # Most port authors should not need to understand anything after this point.
@@ -3486,6 +3489,9 @@ _EXTRA_PACKAGE_TARGET_DEP+=	${WRKDIR_PKGFILE}
 
 .if !target(do-package)
 PKG_CREATE_ARGS+= -f ${PKG_COMPRESSION_FORMAT}
+.if defined(PKG_COMPRESSION_LEVEL)
+PKG_CREATE_ARGS+= -l ${PKG_COMPRESSION_LEVEL}
+.endif
 PKG_CREATE_ARGS+=	-r ${STAGEDIR}
 .  if defined(PKG_CREATE_VERBOSE)
 PKG_CREATE_ARGS+=	-v


More information about the dev-commits-ports-main mailing list