From owner-svn-ports-all@FreeBSD.ORG Thu Apr 17 03:47:55 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 803D185C; Thu, 17 Apr 2014 03:47:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6D0331C0A; Thu, 17 Apr 2014 03:47:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s3H3lt37005761; Thu, 17 Apr 2014 03:47:55 GMT (envelope-from bdrewery@svn.freebsd.org) Received: (from bdrewery@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s3H3lt3s005760; Thu, 17 Apr 2014 03:47:55 GMT (envelope-from bdrewery@svn.freebsd.org) Message-Id: <201404170347.s3H3lt3s005760@svn.freebsd.org> From: Bryan Drewery Date: Thu, 17 Apr 2014 03:47:55 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r351441 - head/Mk X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2014 03:47:55 -0000 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!