diff --git a/sysutils/duff/Makefile b/sysutils/duff/Makefile index cb7829f138c2..f742c56a81e3 100644 --- a/sysutils/duff/Makefile +++ b/sysutils/duff/Makefile @@ -2,7 +2,7 @@ PORTNAME= duff PORTVERSION= 0.5.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= SF @@ -12,17 +12,20 @@ COMMENT= Duplicate file finder LICENSE= ZLIB LICENSE_FILE= ${WRKSRC}/COPYING -USES= tar:bzip2 +USES= localbase tar:bzip2 shebangfix GNU_CONFIGURE= yes - -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +bash_OLD_CMD= /bin/sh +SHEBANG_FILES= join-duplicates.sh PORTDOCS= README.SHA -OPTIONS_DEFINE= NLS +OPTIONS_DEFINE= JOIN NLS OPTIONS_SUB= yes +JOIN_DESC= Add run-dependencies for join-duplicates.sh +JOIN_RUN_DEPENDS= bash:shells/bash \ + gtouch:sysutils/coreutils + NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls diff --git a/sysutils/duff/files/patch-join-duplicates.sh b/sysutils/duff/files/patch-join-duplicates.sh new file mode 100644 index 000000000000..a90ca85ff204 --- /dev/null +++ b/sysutils/duff/files/patch-join-duplicates.sh @@ -0,0 +1,26 @@ +--- join-duplicates.sh.orig 2011-04-10 13:17:26 UTC ++++ join-duplicates.sh +@@ -25,16 +25,19 @@ duff -r '-f#' -z -p -P "$1" | + if [ "$first" == '' ]; then + first="$file" + else +- temp=`mktemp -p \`dirname $file\`` ++ dir=`dirname "$file"` ++ temp=`gmktemp -p "$dir"` + + mv "$file" "$temp" && \ + ln "$first" "$file" && \ +- touch --reference="$temp" "$file" && \ ++ gtouch --reference="$temp" "$file" && \ + rm "$temp" + ++ echo "$first <- $file" ++ + if [ $? != 0 ]; then +- echo "`basename $0`: $file: failed to join with $first" +- echo "`basename $0`: $file: may exist as $temp" ++ echo "`basename "$0"`: $file: failed to join with $first" ++ echo "`basename "$0"`: $file: may exist as $temp" + exit 1 + fi + fi