svn commit: r351441 - head/Mk
Bryan Drewery
bdrewery at FreeBSD.org
Thu Apr 17 03:47:55 UTC 2014
Author: bdrewery
Date: Thu Apr 17 03:47:54 2014
New Revision: 351441
URL: http://svnweb.freebsd.org/changeset/ports/351441
QAT: https://qat.redports.org/buildarchive/r351441/
Log:
- Add PLIST_SUB_SED which is used to replace absolute paths with PLIST_SUB'd
paths. This will be used for check-stagedir.sh and poudriere/tinderbox
leftover handling.
This version handles several flaws of other implementations:
- Remove VARS that are too generic
- Remove empty values
- Remove @comment values
- Remove quotes
- Replace . with \. for later sed(1) usage
- Handle values with spaces
- By default only use values 2+ characters long. Let this be overridable
with PLIST_SUB_SED_MIN.
Reviewed by: antoine, mat
With hat: portmgr
Modified:
head/Mk/bsd.port.mk
Modified: head/Mk/bsd.port.mk
==============================================================================
--- head/Mk/bsd.port.mk Thu Apr 17 03:22:45 2014 (r351440)
+++ head/Mk/bsd.port.mk Thu Apr 17 03:47:54 2014 (r351441)
@@ -1614,6 +1614,15 @@ PLIST_SUB+= OSREL=${OSREL} PREFIX=%D LOC
SUB_LIST+= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} \
DATADIR=${DATADIR} DOCSDIR=${DOCSDIR} EXAMPLESDIR=${EXAMPLESDIR} \
WWWDIR=${WWWDIR} ETCDIR=${ETCDIR}
+# This is used for check-stagedir.sh and check_leftover.sh to replace
+# directories/files with PLIST_SUB %%KEYS%%.
+# Remove VARS that are too generic
+# Remove empty values
+# Remove @comment values
+# Remove quotes
+# Replace . with \. for later sed(1) usage
+PLIST_SUB_SED_MIN?= 2
+PLIST_SUB_SED?= ${PLIST_SUB:C/.*=.{1,${PLIST_SUB_SED_MIN}}$//g:NEXTRACT_SUFX=*:NOSREL=*:NLIB32DIR=*:NPREFIX=*:NLOCALBASE=*:N*="":N*="@comment*:C/(.*)="?([^"]*)"?/s!\2!%%\1%%!g;/g:C/\./\\./g}
PLIST_REINPLACE+= dirrmtry stopdaemon rmtry
PLIST_REINPLACE_DIRRMTRY=s!^@dirrmtry \(.*\)!@unexec rmdir "%D/\1" 2>/dev/null || true!
More information about the svn-ports-head
mailing list