From 8b893f0c36a722c2ab4ab3234e46197faac695f7 Mon Sep 17 00:00:00 2001 From: kamil Date: Sat, 12 Dec 2015 04:00:30 +0000 Subject: Update sysutils/fdupes to 1.51 Patch via pkgsrc-wip/fdupes by Mateusz Poszwa Changes from 1.50 to 1.51 - Added support for 64-bit file offsets on 32-bit systems. - Using tty for interactive input instead of regular stdin. This is to allow feeding filenames via stdin in future versions of fdupes without breaking interactive deletion feature. - Fixed some typos in --help. - Turned C++ style comments into C style comments. Changes from 1.40 to 1.50-PR2 - Fixed memory leak. [JB] - Added "--summarize" option. [AL] - Added "--recurse:" selective recursion option. [AL] - Added "--noprompt" option for totally automated deletion of duplicate files. - Now sorts duplicates (old to new) for consistent order when listing or deleteing duplicate files. - Now tests for early matching of files, which should help speed up the matching process when large files are involved. - Added warning whenever a file cannot be deleted. [CHL, AL] - Fixed bug where some files would not be closed after failure. [AL] - Fixed bug where confirmmatch() function wouldn't always deal properly with zero-length files. [AL] - Fixed bug where progress indicator would not be cleared when no files were found. [AL] - Removed experimental red-black tree code (it was slower on my system than the default code). [AL] - Modified md5/md5.c to avoid compiler warning. [CHL] - Changes to fdupes.c for compilation under platforms where getopt_long is unavailable. [LR, AL] - Changes to help text for clarity. [AL] - Various changes and improvements to Makefile. [PB, AL] --- sysutils/fdupes/Makefile | 9 ++++---- sysutils/fdupes/distinfo | 15 ++++++------ sysutils/fdupes/patches/patch-aa | 31 ++++++++++++++++++------- sysutils/fdupes/patches/patch-ab | 21 ----------------- sysutils/fdupes/patches/patch-ac | 50 +++++++++++++++++++++++++++++++--------- 5 files changed, 73 insertions(+), 53 deletions(-) delete mode 100644 sysutils/fdupes/patches/patch-ab diff --git a/sysutils/fdupes/Makefile b/sysutils/fdupes/Makefile index 8f1cc49b49b..adfe0515032 100644 --- a/sysutils/fdupes/Makefile +++ b/sysutils/fdupes/Makefile @@ -1,20 +1,19 @@ -# $NetBSD: Makefile,v 1.2 2012/10/23 19:51:01 asau Exp $ +# $NetBSD: Makefile,v 1.3 2015/12/12 04:00:30 kamil Exp $ -DISTNAME= fdupes-1.40 +DISTNAME= fdupes-1.51 CATEGORIES= sysutils -MASTER_SITES= http://netdial.caribe.net/~adrian2/programs/ +MASTER_SITES= http://fdupes.googlecode.com/files/ MAINTAINER= ef@math.uni-bonn.de HOMEPAGE= http://netdial.caribe.net/~adrian2/fdupes.html COMMENT= Program for identifying or deleting duplicate files +LICENSE= mit USE_LANGUAGES= c NO_CONFIGURE= yes MAKE_FLAGS= INSTALLDIR=${PREFIX}/bin MANPAGEDIR=${PREFIX}/${PKGMANDIR} -BUILD_TARGET= fdupes - INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 .include "../../mk/bsd.pkg.mk" diff --git a/sysutils/fdupes/distinfo b/sysutils/fdupes/distinfo index c2c526edf9c..dee8ce8dd0a 100644 --- a/sysutils/fdupes/distinfo +++ b/sysutils/fdupes/distinfo @@ -1,9 +1,8 @@ -$NetBSD: distinfo,v 1.2 2015/11/04 01:32:13 agc Exp $ +$NetBSD: distinfo,v 1.3 2015/12/12 04:00:30 kamil Exp $ -SHA1 (fdupes-1.40.tar.gz) = e1bce9bdf50d7bf700dda3eb8a3d218b181b3931 -RMD160 (fdupes-1.40.tar.gz) = 0abd2f0dfee38cb333c1069363a65f8ab37e18dd -SHA512 (fdupes-1.40.tar.gz) = 800f281bd17cfbf3e007959e99ce2c74e8d7e23cbb272aab8373e7e6cb462275a5c52cf7455ed461b8cc442d73ba456b83c017df9d01d3d8fba60b8344f0ef99 -Size (fdupes-1.40.tar.gz) = 16026 bytes -SHA1 (patch-aa) = c84138d46bef74db226e3ea1226de874e5a7e01a -SHA1 (patch-ab) = 8e988a6f42682b0393454b8564b6068e1fc70df9 -SHA1 (patch-ac) = 833aaa5903efb59acaa1f3f505090f7b018903f8 +SHA1 (fdupes-1.51.tar.gz) = 8276b39026f57a2f9503d7af18efca0a7d42b8ec +RMD160 (fdupes-1.51.tar.gz) = cf2c3524a2f827c50ce2ef257d3d7f9b75951c48 +SHA512 (fdupes-1.51.tar.gz) = 7cbc414f25427793317667b8d5494f7247a08ba402855929de77d1db01eb3dce41ea608f8dcca047c4a7856e02b10261982cf2acd7f6a79ab726b3009c710a8d +Size (fdupes-1.51.tar.gz) = 48942 bytes +SHA1 (patch-aa) = 925d3c4923fe1d784273b292ef3be0a36371a9f2 +SHA1 (patch-ac) = be0d27bfbf58fae478f54133d16e01012a24c5cf diff --git a/sysutils/fdupes/patches/patch-aa b/sysutils/fdupes/patches/patch-aa index 61943dd0866..6fff7ba616b 100644 --- a/sysutils/fdupes/patches/patch-aa +++ b/sysutils/fdupes/patches/patch-aa @@ -1,22 +1,37 @@ -$NetBSD: patch-aa,v 1.1.1.1 2008/12/17 11:56:26 obache Exp $ +$NetBSD: patch-aa,v 1.2 2015/12/12 04:00:30 kamil Exp $ ---- fdupes.c.orig 2001-03-15 02:16:09.000000000 +0000 +Add casts to silence printf errors. +Do not overwrite stdin. + +--- fdupes.c.orig 2013-04-20 18:02:18.000000000 +0000 +++ fdupes.c -@@ -588,7 +588,7 @@ void printmatches(file_t *files) +@@ -643,7 +643,7 @@ void printmatches(file_t *files) while (files != NULL) { if (files->hasdupes) { if (!ISFLAG(flags, F_OMITFIRST)) { -- if (ISFLAG(flags, F_SHOWSIZE)) printf("%ld byte%seach:\n", files->size, -+ if (ISFLAG(flags, F_SHOWSIZE)) printf("%ld byte%seach:\n", (long)files->size, +- if (ISFLAG(flags, F_SHOWSIZE)) printf("%lld byte%seach:\n", files->size, ++ if (ISFLAG(flags, F_SHOWSIZE)) printf("%lld byte%seach:\n", (long long)files->size, (files->size != 1) ? "s " : " "); if (ISFLAG(flags, F_DSAMELINE)) escapefilename("\\ ", &files->d_name); printf("%s%c", files->d_name, ISFLAG(flags, F_DSAMELINE)?' ':'\n'); -@@ -676,7 +676,7 @@ void autodelete(file_t *files) +@@ -796,7 +796,7 @@ void deletefiles(file_t *files, int prom do { printf("Set %d of %d, preserve files [1 - %d, all]", curgroup, groups, counter); -- if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%ld byte%seach)", files->size, -+ if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%ld byte%seach)", (long)files->size, +- if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%lld byte%seach)", files->size, ++ if (ISFLAG(flags, F_SHOWSIZE)) printf(" (%lld byte%seach)", (long long)files->size, (files->size != 1) ? "s " : " "); printf(": "); fflush(stdout); +@@ -1164,8 +1164,9 @@ int main(int argc, char **argv) { + } + else + { +- stdin = freopen("/dev/tty", "r", stdin); +- deletefiles(files, 1, stdin); ++ FILE* fd; ++ fd = freopen("/dev/tty", "r", stdin); ++ deletefiles(files, 1, fd); + } + } + diff --git a/sysutils/fdupes/patches/patch-ab b/sysutils/fdupes/patches/patch-ab deleted file mode 100644 index 767fbe8fdf7..00000000000 --- a/sysutils/fdupes/patches/patch-ab +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-ab,v 1.1.1.1 2008/12/17 11:56:26 obache Exp $ - ---- md5/md5.c.orig 1999-11-05 01:04:36.000000000 +0000 -+++ md5/md5.c -@@ -38,6 +38,8 @@ - 1999-05-03 lpd Original version. - */ - -+#include -+ - #include "md5.h" - - #ifdef TEST -@@ -46,7 +48,6 @@ - * The test program should print out the same values as given in section - * A.5 of RFC 1321, reproduced below. - */ --#include - main() - { - static const char *const test[7] = { diff --git a/sysutils/fdupes/patches/patch-ac b/sysutils/fdupes/patches/patch-ac index 4b9cf1b465a..50af27c9554 100644 --- a/sysutils/fdupes/patches/patch-ac +++ b/sysutils/fdupes/patches/patch-ac @@ -1,15 +1,43 @@ -$NetBSD: patch-ac,v 1.1.1.1 2008/12/17 11:56:26 obache Exp $ +$NetBSD: patch-ac,v 1.2 2015/12/12 04:00:30 kamil Exp $ ---- Makefile.orig 2001-03-15 02:49:11.000000000 +0000 +Fix various target paths. +Add a rule in order not to depend on gmake. + +--- Makefile.orig 2013-04-20 17:51:58.000000000 +0000 +++ Makefile -@@ -38,8 +38,8 @@ fdupes: fdupes.c md5/md5.c - gcc fdupes.c md5/md5.c -Wall -o fdupes -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) +@@ -11,7 +11,7 @@ + # determination of the actual installation directories. + # Suggested values are "/usr/local", "/usr", "/pkgs/fdupes-$(VERSION)" + # +-PREFIX = /usr/local ++PREFIX ?= /usr/local + + # + # When compiling for 32-bit systems, FILEOFFSET_64BIT must be enabled +@@ -50,13 +50,13 @@ PROGRAM_NAME=fdupes + # BIN_DIR indicates directory where program is to be installed. + # Suggested value is "$(PREFIX)/bin" + # +-BIN_DIR = $(PREFIX)/bin ++BIN_DIR = $(DESTDIR)$(PREFIX)/bin + + # + # MAN_DIR indicates directory where the fdupes man page is to be + # installed. Suggested value is "$(PREFIX)/man/man1" + # +-MAN_BASE_DIR = $(PREFIX)/man ++MAN_BASE_DIR = $(DESTDIR)$(PREFIX)/man + MAN_DIR = $(MAN_BASE_DIR)/man1 + MAN_EXT = 1 + +@@ -91,7 +91,9 @@ INSTALL_DATA = $(INSTALL) -c -m 0644 + # + #ADDITIONAL_OBJECTS = getopt.o - install: fdupes -- cp fdupes $(INSTALLDIR) -- cp fdupes.1 $(MANPAGEDIR)/man1 -+ ${BSD_INSTALL_PROGRAM} fdupes ${DESTDIR}$(INSTALLDIR) -+ ${BSD_INSTALL_MAN} fdupes.1 ${DESTDIR}$(MANPAGEDIR)/man1 +-OBJECT_FILES = fdupes.o md5/md5.o $(ADDITIONAL_OBJECTS) ++OBJECT_FILES = fdupes.o md5.o $(ADDITIONAL_OBJECTS) ++ ++md5.o: md5/md5.c - tarball: clean - tar --directory=.. -c -z -v -f ../fdupes-$(VERSION).tar.gz fdupes-$(VERSION) + ##################################################################### + # no need to modify anything beyond this point # -- cgit v1.2.3