Revision: 103247 https://trac.macports.org/changeset/103247 Author: ryandesign@macports.org Date: 2013-02-19 03:02:21 -0800 (Tue, 19 Feb 2013) Log Message: ----------- getopt: simplify getting -arch flags Modified Paths: -------------- trunk/dports/sysutils/getopt/Portfile Modified: trunk/dports/sysutils/getopt/Portfile =================================================================== --- trunk/dports/sysutils/getopt/Portfile 2013-02-19 10:21:20 UTC (rev 103246) +++ trunk/dports/sysutils/getopt/Portfile 2013-02-19 11:02:21 UTC (rev 103247) @@ -36,6 +36,13 @@ use_configure no +variant universal {} + +post-patch { + reinplace -E "/^CFLAGS/s|\$| [get_canonical_archflags cc]|" ${worksrcpath}/Makefile + reinplace -E "/^LDFLAGS/s|\$| [get_canonical_archflags ld]|" ${worksrcpath}/Makefile +} + build.args LIBCGETOPT=0 prefix=${prefix} mandir=${prefix}/share/man CC=${configure.cc} destroot.args ${build.args} @@ -52,19 +59,6 @@ configure.universal_ldflags-append -liconv } -variant universal { - post-patch { - reinplace -E "/^CFLAGS/s|\$| ${configure.universal_cflags}|" ${worksrcpath}/Makefile - reinplace -E "/^LDFLAGS/s|\$| ${configure.universal_ldflags}|" ${worksrcpath}/Makefile - } -} -if {![variant_isset universal]} { - post-patch { - reinplace -E "/^CFLAGS/s|\$| ${configure.cc_archflags}|" ${worksrcpath}/Makefile - reinplace -E "/^LDFLAGS/s|\$| ${configure.cc_archflags}|" ${worksrcpath}/Makefile - } -} - livecheck.type regex livecheck.url ${homepage}download.php livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)