Revision: 100902 https://trac.macports.org/changeset/100902 Author: ryandesign@macports.org Date: 2012-12-31 03:06:46 -0800 (Mon, 31 Dec 2012) Log Message: ----------- fdupes: ensure we're UsingTheRightCompiler (#37455) and -arch flags and add universal variant, in part by back-porting some changes to the Makefile from fdupes 1.50-PR2; license MIT Modified Paths: -------------- trunk/dports/sysutils/fdupes/Portfile Added Paths: ----------- trunk/dports/sysutils/fdupes/files/ trunk/dports/sysutils/fdupes/files/patch-Makefile.diff Modified: trunk/dports/sysutils/fdupes/Portfile =================================================================== --- trunk/dports/sysutils/fdupes/Portfile 2012-12-31 10:26:20 UTC (rev 100901) +++ trunk/dports/sysutils/fdupes/Portfile 2012-12-31 11:06:46 UTC (rev 100902) @@ -6,6 +6,8 @@ version 1.40 categories sysutils maintainers nomaintainer +license MIT + description identify and/or delete duplicate files long_description ${name} identifies and/or deletes duplicate files in specified directories. homepage http://premium.caribe.net/~adrian2/fdupes.html @@ -16,10 +18,15 @@ sha1 e1bce9bdf50d7bf700dda3eb8a3d218b181b3931 \ rmd160 0abd2f0dfee38cb333c1069363a65f8ab37e18dd +patchfiles patch-Makefile.diff + use_configure no + +variant universal {} + build.target ${name} +build.args PREFIX=${prefix} \ + CC=${configure.cc} \ + COMPILER_OPTIONS="${configure.cflags} [get_canonical_archflags cc]" -post-patch { - reinplace "s|/usr/local/bin|${destroot}${prefix}/bin|g" ${worksrcpath}/Makefile - reinplace "s|/usr/local/man|${destroot}${prefix}/share/man|g" ${worksrcpath}/Makefile -} +destroot.args PREFIX=${prefix} Added: trunk/dports/sysutils/fdupes/files/patch-Makefile.diff =================================================================== --- trunk/dports/sysutils/fdupes/files/patch-Makefile.diff (rev 0) +++ trunk/dports/sysutils/fdupes/files/patch-Makefile.diff 2012-12-31 11:06:46 UTC (rev 100902) @@ -0,0 +1,55 @@ +--- Makefile.orig 2001-03-14 20:49:11.000000000 -0600 ++++ Makefile 2012-12-31 04:57:27.000000000 -0600 +@@ -1,14 +1,22 @@ + # ++# PREFIX indicates the base directory used as the basis for the ++# determination of the actual installation directories. ++# Suggested values are "/usr/local", "/usr", "/pkgs/fdupes-$(VERSION)" ++# ++PREFIX = /usr/local ++DESTDIR = ++ ++# + # INSTALLDIR indicates directory where program is to be installed. + # Suggested values are "/usr/local/bin" or "/usr/bin". + # +-INSTALLDIR = /usr/local/bin ++INSTALLDIR = $(PREFIX)/bin + + # + # MANPAGEDIR indicates directory where the fdupes man page is to be + # installed. Suggested values are "/usr/local/man" or "/usr/man". + # +-MANPAGEDIR = /usr/local/man ++MANPAGEDIR = $(PREFIX)/share/man + + # + # VERSION determines the program's version number. +@@ -30,16 +38,24 @@ + # + #EXPERIMENTAL_RBTREE = -DEXPERIMENTAL_RBTREE + ++# ++# Make Configuration ++# ++CC = gcc ++COMPILER_OPTIONS = -Wall -O -g ++ ++CFLAGS= $(COMPILER_OPTIONS) -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) ++ + ##################################################################### + # no need to modify anything beyond this point # + ##################################################################### + + fdupes: fdupes.c md5/md5.c +- gcc fdupes.c md5/md5.c -Wall -o fdupes -DVERSION=\"$(VERSION)\" $(EXTERNAL_MD5) $(EXPERIMENTAL_RBTREE) ++ $(CC) $(CFLAGS) fdupes.c md5/md5.c -o fdupes + + install: fdupes +- cp fdupes $(INSTALLDIR) +- cp fdupes.1 $(MANPAGEDIR)/man1 ++ cp fdupes $(DESTDIR)$(INSTALLDIR) ++ cp fdupes.1 $(DESTDIR)$(MANPAGEDIR)/man1 + + tarball: clean + tar --directory=.. -c -z -v -f ../fdupes-$(VERSION).tar.gz fdupes-$(VERSION)
participants (1)
-
ryandesign@macports.org