Date: Fri, 29 Dec 2017 15:47:00 +0000 (UTC) From: "Jason E. Hale" <jhale@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457510 - in head/sysutils/duff: . files Message-ID: <201712291547.vBTFl0Z2085861@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhale Date: Fri Dec 29 15:47:00 2017 New Revision: 457510 URL: https://svnweb.freebsd.org/changeset/ports/457510 Log: 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 Added: head/sysutils/duff/files/ head/sysutils/duff/files/patch-join-duplicates.sh (contents, props changed) Modified: head/sysutils/duff/Makefile Modified: head/sysutils/duff/Makefile ============================================================================== --- head/sysutils/duff/Makefile Fri Dec 29 15:39:12 2017 (r457509) +++ head/sysutils/duff/Makefile Fri Dec 29 15:47:00 2017 (r457510) @@ -2,7 +2,7 @@ PORTNAME= duff PORTVERSION= 0.5.2 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= SF @@ -12,16 +12,19 @@ COMMENT= Duplicate file finder LICENSE= ZLIB LICENSE_FILE= ${WRKSRC}/COPYING -USES= tar:bzip2 +USES= localbase tar:bzip2 shebangfix GNU_CONFIGURE= yes +bash_OLD_CMD= /bin/sh +SHEBANG_FILES= join-duplicates.sh -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib - 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 Added: head/sysutils/duff/files/patch-join-duplicates.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/duff/files/patch-join-duplicates.sh Fri Dec 29 15:47:00 2017 (r457510) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712291547.vBTFl0Z2085861>