Date: Thu, 17 Apr 2014 03:47:55 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r351441 - head/Mk Message-ID: <201404170347.s3H3lt3s005760@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404170347.s3H3lt3s005760>