From f86a87c735218d54f0d29464ebfaabdc3c284ab5 Mon Sep 17 00:00:00 2001 From: Dennis Herrmann Date: Sat, 28 Apr 2012 07:58:13 +0000 Subject: [PATCH] - Avoid literal appearances of "$FreeBSD:...$" in patch-util_diff.in. - While we are here: - Make the affected sed pattern more flexible with regard to the repository path from which the port was checked out. - When handling -d , if the port's directory does not exist, fix the path used in the first check for an alternative path. - Bump PORTREVISION. PR: ports/166593 Submitted by: Johannes Joemann (maintainer) --- ports-mgmt/porttools/Makefile | 2 +- ports-mgmt/porttools/files/patch-util_diff.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ports-mgmt/porttools/Makefile b/ports-mgmt/porttools/Makefile index 62e68b8fbfd5..5cae00d24a5c 100644 --- a/ports-mgmt/porttools/Makefile +++ b/ports-mgmt/porttools/Makefile @@ -7,7 +7,7 @@ PORTNAME= porttools PORTVERSION= 0.99 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= ports-mgmt MASTER_SITES= SF diff --git a/ports-mgmt/porttools/files/patch-util_diff.in b/ports-mgmt/porttools/files/patch-util_diff.in index e5428cddfc28..c7d07a8f22e3 100644 --- a/ports-mgmt/porttools/files/patch-util_diff.in +++ b/ports-mgmt/porttools/files/patch-util_diff.in @@ -90,7 +90,7 @@ else # Non-CVS modes + DIRBASENAME=`basename \`pwd\`` -+ PORTBASENAME_HEADER=`sed -n -E -e '1,/^($|[^#].*$)|\\$FreeBSD: /tmp/pcvs/ports/ports-mgmt/porttools/files/patch-util_diff.in,v 1.5 2012-03-03 13:31:02 crees Exp $FreeBSD:[[:space:]]*ports/([^/]+)/([^/]+)/Makefile.*$%\2%p' Makefile` ++ PORTBASENAME_HEADER=`sed -n -E -e '1,/^($|[^#].*$)|\\$FreeBSD\:/s%^#.*\\$FreeBSD\:[[:space:]]*([^/]+/)*([^/]+)/Makefile.*\\$%\2%p' Makefile` + if [ "${DIRBASENAME}" != "${PORTBASENAME_HEADER}" ] + then + echo "Warning: current directory name differs from Makefile header:" @@ -116,7 +116,7 @@ + if [ ! -d ${ORIG_DIR} ] + then + echo "Original version does not exist at ${ORIG_DIR}" -+ if [ -d "${DIFF_MODE}/${CATEGORY}/${PORTBASENAME}" ] ++ if [ -d "${DIFF_MODE}/${CATEGORY}/${DIRBASENAME}" ] + then + PORTBASENAME=${DIRBASENAME} + ORIG_DIR="${DIFF_MODE}/${CATEGORY}/${PORTBASENAME}"