app-misc/fdupes: Drop obsolete patch; add live version
authorJustin Lecher <jlec@gentoo.org>
Tue, 11 Aug 2015 06:28:21 +0000 (08:28 +0200)
committerJustin Lecher <jlec@gentoo.org>
Tue, 11 Aug 2015 06:30:09 +0000 (08:30 +0200)
Package-Manager: portage-2.2.20
Signed-off-by: Justin Lecher <jlec@gentoo.org>
app-misc/fdupes/fdupes-9999.ebuild [new file with mode: 0644]
app-misc/fdupes/files/fdupes-1.50_pre2-lfs.patch [deleted file]
app-misc/fdupes/files/fdupes-1.50_pre2-makefile.patch [deleted file]
app-misc/fdupes/files/fdupes-9999-makefile.patch [new file with mode: 0644]

diff --git a/app-misc/fdupes/fdupes-9999.ebuild b/app-misc/fdupes/fdupes-9999.ebuild
new file mode 100644 (file)
index 0000000..9d51929
--- /dev/null
@@ -0,0 +1,35 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils flag-o-matic git-r3 toolchain-funcs
+
+MY_P="${PN}-${PV/_pre/-PR}"
+
+DESCRIPTION="Identify/delete duplicate files residing within specified directories"
+HOMEPAGE="https://github.com/adrianlopezroche/fdupes https://code.google.com/p/fdupes/"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/adrianlopezroche/fdupes.git"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+       epatch \
+               "${FILESDIR}"/${P}-makefile.patch
+
+       append-lfs-flags
+       tc-export CC
+}
+
+src_install() {
+       dobin fdupes
+       doman fdupes.1
+       dodoc CHANGES CONTRIBUTORS README TODO
+}
diff --git a/app-misc/fdupes/files/fdupes-1.50_pre2-lfs.patch b/app-misc/fdupes/files/fdupes-1.50_pre2-lfs.patch
deleted file mode 100644 (file)
index bd63f83..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-diff -urNp fdupes-1.50-PR2.orig/fdupes.c fdupes-1.50-PR2/fdupes.c
---- fdupes-1.50-PR2.orig/fdupes.c      2009-01-31 20:11:49.577968848 +0530
-+++ fdupes-1.50-PR2/fdupes.c   2009-01-31 20:29:17.103220311 +0530
-@@ -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("%lld byte%seach:\n", 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');
-@@ -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(" (%lld byte%seach)", files->size,
-         (files->size != 1) ? "s " : " ");
-       printf(": ");
-       fflush(stdout);
diff --git a/app-misc/fdupes/files/fdupes-1.50_pre2-makefile.patch b/app-misc/fdupes/files/fdupes-1.50_pre2-makefile.patch
deleted file mode 100644 (file)
index ed2e987..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
---- fdupes-1.50-PR2/Makefile.orig      2010-11-19 19:05:18.152330536 -0800
-+++ fdupes-1.50-PR2/Makefile   2010-11-19 19:06:00.998659992 -0800
-@@ -72,9 +72,9 @@
- # Make Configuration
- #
- CC = gcc
--COMPILER_OPTIONS = -Wall -O -g
-+COMPILER_OPTIONS = -Wall
--CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG)
-+CFLAGS += $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) $(OMIT_GETOPT_LONG)
- INSTALL_PROGRAM = $(INSTALL) -c -m 0755
- INSTALL_DATA    = $(INSTALL) -c -m 0644
-@@ -94,7 +94,7 @@
- all: fdupes
- fdupes: $(OBJECT_FILES)
--      $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES)
-+      $(CC) $(CFLAGS) $(LDFLAGS) -o fdupes $(OBJECT_FILES)
- installdirs:
-       test -d $(BIN_DIR) || -$(MKDIR) $(BIN_DIR)
diff --git a/app-misc/fdupes/files/fdupes-9999-makefile.patch b/app-misc/fdupes/files/fdupes-9999-makefile.patch
new file mode 100644 (file)
index 0000000..b534c64
--- /dev/null
@@ -0,0 +1,28 @@
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 921d910..67576f9 100644
+--- a/Makefile
++++ b/Makefile
+@@ -78,9 +78,9 @@ MKDIR   = mkdir -p
+ # Make Configuration
+ #
+ CC ?= gcc
+-COMPILER_OPTIONS = -Wall -O -g
++CFLAGS ?= -Wall -O -g
+-CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT)
++CFLAGS += -I. -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT)
+ INSTALL_PROGRAM = $(INSTALL) -c -m 0755
+ INSTALL_DATA    = $(INSTALL) -c -m 0644
+@@ -100,7 +100,7 @@ OBJECT_FILES = fdupes.o md5/md5.o $(ADDITIONAL_OBJECTS)
+ all: fdupes
+ fdupes: $(OBJECT_FILES)
+-      $(CC) $(CFLAGS) -o fdupes $(OBJECT_FILES)
++      $(CC) $(CFLAGS) $(LDFLAGS) -o fdupes $(OBJECT_FILES)
+ installdirs:
+       test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR)