diff options
author | jhale <jhale@FreeBSD.org> | 2017-12-29 23:47:00 +0800 |
---|---|---|
committer | jhale <jhale@FreeBSD.org> | 2017-12-29 23:47:00 +0800 |
commit | 218ec1a72ac1c8b360e787a4cfcee38019ba2f75 (patch) | |
tree | 6992d22a1da85acb704da0b7a99e2d330acf0dc7 /sysutils | |
parent | da00696cdc0edb86304082657fa2618b4a5c997d (diff) | |
download | freebsd-ports-gnome-218ec1a72ac1c8b360e787a4cfcee38019ba2f75.tar.gz freebsd-ports-gnome-218ec1a72ac1c8b360e787a4cfcee38019ba2f75.tar.zst freebsd-ports-gnome-218ec1a72ac1c8b360e787a4cfcee38019ba2f75.zip |
Fix up the join-dupicates.sh script and add an option to pull in the required
dependecies for it.
While here, convert to USES=localbase.
PR: 224620
Submitted by: mat
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/duff/Makefile | 15 | ||||
-rw-r--r-- | sysutils/duff/files/patch-join-duplicates.sh | 26 |
2 files changed, 35 insertions, 6 deletions
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 |