#29050: groff universal variant fails -------------------------------------+-------------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.9.2 Keywords: universal | Port: groff -------------------------------------+-------------------------------------- Comment(by rmstonecipher@…): dtakahashi,[[br]] Some of the commands in your patch are not yet documented in the [http://guide.macports.org/ MacPorts Guide].[[br]] Could you explain what your patch does?[[br]][[br]] This could also be resolved by adding configure.cflags or configure.universal_cflags to Makefile.in using a patchfile and a post- patch reinplace.[[br]] {{{ Index: files/patch-Makefile.in.diff =================================================================== --- files/patch-Makefile.in.diff (revision 0) +++ files/patch-Makefile.in.diff (revision 0) @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2011-04-09 23:21:32.000000000 -0500 ++++ Makefile.in 2011-04-09 23:22:27.000000000 -0500 +@@ -767,7 +767,7 @@ + case $(do) in \ + all) \ + cd $@; \ +- test -f Makefile || $(SHELL) $$srcdir/configure ; \ ++ test -f Makefile || $(SHELL) $$srcdir/configure %%CONFIGURE_ARGS%%; \ + $(MAKE) ACLOCAL=: AUTOCONF=: AUTOHEADER=: AUTOMAKE=: $(do) ;; \ + esac + Index: Portfile =================================================================== --- Portfile (revision 77708) +++ Portfile (working copy) @@ -15,10 +15,20 @@ master_sites gnu checksums sha1 a513aca4a7530a6e63325addd6ba2d282c8f1608 \ rmd160 d050f886291a53ea46875887e5641e510e1aecf6 +depends_build port:psutils configure.args --infodir=${prefix}/share/info \ --mandir=${prefix}/share/man \ --without-x +patchfiles patch-Makefile.in.diff +post-patch { + if {[variant_isset universal]} { + reinplace "s|%%CONFIGURE_ARGS%%|${configure.universal_args}|g" ${worksrcpath}/Makefile.in + } else { + reinplace "s|%%CONFIGURE_ARGS%%|${configure.args}|g" ${worksrcpath}/Makefile.in + } +} + post-destroot { delete ${destroot}${prefix}/lib/charset.alias } }}} dtakahashi's way is more terse.[[br]] Does it matter which solution is used?[[br]][[br]] Ryan Stonecipher[[br]] P.S. The other change in my Portfile diff, adding 'depends_build port:psutils', allows the documentation to build html per a configure-time warning. -- Ticket URL: <https://trac.macports.org/ticket/29050#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS