From owner-svn-ports-head@FreeBSD.ORG Tue Jan 28 14:16:31 2014 Return-Path: Delivered-To: svn-ports-head@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 0A3E8D80; Tue, 28 Jan 2014 14:16:31 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D03AA118D; Tue, 28 Jan 2014 14:16:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0SEGUE1007502; Tue, 28 Jan 2014 14:16:30 GMT (envelope-from mat@svn.freebsd.org) Received: (from mat@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0SEGUXa007500; Tue, 28 Jan 2014 14:16:30 GMT (envelope-from mat@svn.freebsd.org) Message-Id: <201401281416.s0SEGUXa007500@svn.freebsd.org> From: Mathieu Arnold Date: Tue, 28 Jan 2014 14:16:30 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r341573 - in head/Mk: . Scripts X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 Jan 2014 14:16:31 -0000 Author: mat Date: Tue Jan 28 14:16:30 2014 New Revision: 341573 URL: http://svnweb.freebsd.org/changeset/ports/341573 QAT: https://qat.redports.org/buildarchive/r341573/ Log: Greatly enhance makeplist to replace all it can find in PLIST_SUB. With hat: portmgr Sponsored by: Absolight Modified: head/Mk/Scripts/check-stagedir.sh head/Mk/bsd.stage.mk Modified: head/Mk/Scripts/check-stagedir.sh ============================================================================== --- head/Mk/Scripts/check-stagedir.sh Tue Jan 28 14:15:54 2014 (r341572) +++ head/Mk/Scripts/check-stagedir.sh Tue Jan 28 14:16:30 2014 (r341573) @@ -24,7 +24,7 @@ esac # validate environment envfault= for i in STAGEDIR PREFIX LOCALBASE WRKDIR WRKSRC MTREE_FILE \ - TMPPLIST DATADIR DOCSDIR EXAMPLESDIR + TMPPLIST DOCSDIR EXAMPLESDIR PLIST_SUB do if ! ( eval ": \${${i}?}" ) 2>/dev/null ; then envfault="${envfault}${envfault:+" "}${i}" @@ -98,14 +98,27 @@ fi done } > ${WRKDIR}/.mtree +for i in $PLIST_SUB +do + echo $i +done | awk -F= '{print length($2), $1, $2 | "sort -nr" }' | while read l k v +do + if [ $l -ne 0 ] + then + echo "s,${v},%%${k}%%,g;" + fi +done > ${WRKDIR}/.plist_sub + +sed_plist_sub=`cat ${WRKDIR}/.plist_sub` + ### HANDLE FILES find ${STAGEDIR} -type f -o -type l | sort | sed -e "s,${STAGEDIR},," >${WRKDIR}/.staged-files comm -13 ${WRKDIR}/.plist-files ${WRKDIR}/.staged-files \ | sed \ -e "s,${DOCSDIR},%%PORTDOCS%%%%DOCSDIR%%,g" \ -e "s,${EXAMPLESDIR},%%PORTEXAMPLES%%%%EXAMPLESDIR%%,g" \ - -e "s,${DATADIR},%%DATADIR%%,g" \ - -e "s,${PREFIX}/,,g" | grep -v "^share/licenses" || [ $? = 1 ] + -e "s,${PREFIX}/,,g" \ + -e "${sed_plist_sub}" | grep -v "^share/licenses" || [ $? = 1 ] ### HANDLE DIRS cat ${WRKDIR}/.plist-dirs-unsorted ${WRKDIR}/.mtree | sort -u >${WRKDIR}/.traced-dirs @@ -115,6 +128,6 @@ comm -13 ${WRKDIR}/.traced-dirs ${WRKDIR -e 's,^,@dirrmtry ,' \ -e "s,\(.*\)${DOCSDIR},%%PORTDOCS%%\1%%DOCSDIR%%,g" \ -e "s,\(.*\)${EXAMPLESDIR},%%PORTEXAMPLES%%\1%%EXAMPLESDIR%%,g" \ - -e "s,${DATADIR},%%DATADIR%%,g" \ -e "s,${PREFIX}/,,g" \ + -e "${sed_plist_sub}" \ -e 's,@dirrmtry \(/.*\),@unexec rmdir >/dev/null 2>\&1 \1 || :,' | grep -v "^@dirrmtry share/licenses" || [ $? = 1 ] Modified: head/Mk/bsd.stage.mk ============================================================================== --- head/Mk/bsd.stage.mk Tue Jan 28 14:15:54 2014 (r341572) +++ head/Mk/bsd.stage.mk Tue Jan 28 14:16:30 2014 (r341573) @@ -24,9 +24,9 @@ CO_ENV+= STAGEDIR=${STAGEDIR} \ WRKSRC=${WRKSRC} \ MTREE_FILE=${MTREE_FILE} \ TMPPLIST=${TMPPLIST} \ - DATADIR=${DATADIR} \ DOCSDIR=${DOCSDIR} \ - EXAMPLESDIR=${EXAMPLESDIR} + EXAMPLESDIR=${EXAMPLESDIR} \ + PLIST_SUB="${PLIST_SUB:NPREFIX=*:NLOCALBASE=*:NOSREL=*:NLIB32DIR=*:NDOCSDIR=*:NEXAMPLESDIR=*}" .if !target(stage-dir) stage-dir: