Revision: 70885 http://trac.macports.org/changeset/70885 Author: mk@macports.org Date: 2010-08-24 14:06:26 -0700 (Tue, 24 Aug 2010) Log Message: ----------- - improve portfile and patch makefile according to discussion in http://trac.macports.org/ticket/26205#comment:17 Modified Paths: -------------- trunk/dports/graphics/makeicns/Portfile Added Paths: ----------- trunk/dports/graphics/makeicns/files/ trunk/dports/graphics/makeicns/files/patch-Makefile.diff Modified: trunk/dports/graphics/makeicns/Portfile =================================================================== --- trunk/dports/graphics/makeicns/Portfile 2010-08-24 20:58:24 UTC (rev 70884) +++ trunk/dports/graphics/makeicns/Portfile 2010-08-24 21:06:26 UTC (rev 70885) @@ -5,11 +5,12 @@ name makeicns version 1.4 - +revision 1 categories graphics maintainers techno.ms:mk-macports pixilla.com:brad platforms darwin - +supported_archs ppc i386 +configure.universal_archs ppc i386 license MIT description This program lets you convert all kinds of images to Apple's icns format on the command line. @@ -27,11 +28,25 @@ sha1 592c2c17fb3ad6f7b480878a2c5764953b69c125 \ rmd160 ccdfb493b63f19d508d3ef18aaad67b12c9eda70 +patchfiles patch-Makefile.diff + use_configure no -build.target +variant universal {} +if {[variant_isset universal]} { + set archflags ${configure.universal_cflags} +} else { + set archflags ${configure.cc_archflags} +} +if {${configure.sdkroot} != ""} { + configure.ldflags-append "-isysroot ${configure.sdkroot}" +} + build.env CC=${configure.cc} \ - CXX=${configure.cxx} + CXX=${configure.cxx} \ + CFLAGS="${configure.cflags} ${archflags}" \ + CXXFLAGS="${configure.cxxflags} ${archflags}" \ + LDFLAGS="[join ${configure.ldflags}] ${archflags}" destroot { xinstall ${worksrcpath}/${name} ${destroot}${prefix}/bin/${name} Added: trunk/dports/graphics/makeicns/files/patch-Makefile.diff =================================================================== --- trunk/dports/graphics/makeicns/files/patch-Makefile.diff (rev 0) +++ trunk/dports/graphics/makeicns/files/patch-Makefile.diff 2010-08-24 21:06:26 UTC (rev 70885) @@ -0,0 +1,16 @@ +--- Makefile.orig 2010-08-24 07:48:45.000000000 -0700 ++++ Makefile 2010-08-24 07:50:43.000000000 -0700 +@@ -1,9 +1,11 @@ +-CFLAGS = -fpascal-strings -O2 -arch ppc -arch i386 ++CFLAGS += -fpascal-strings + + .PHONY: clean dist + ++all: makeicns ++ + makeicns: makeicns.o IconFamily.o NSString+CarbonFSRefCreation.o +- $(CXX) -o $@ $^ -O2 -arch ppc -arch i386 \ ++ $(CXX) -o $@ $^ $(CXXFLAGS) $(LDFLAGS) \ + -framework Foundation -framework AppKit -framework Carbon + + clean: