On Feb 20, 2011, at 04:47, [email protected] wrote:
> Revision: 76337
> http://trac.macports.org/changeset/76337
> Author: [email protected]
> Date: 2011-02-20 02:47:52 -0800 (Sun, 20 Feb 2011)
> Log Message:
> -----------
> created smodels: stable model semantics for logic programs
> +patch {
> + reinplace s|/usr/bin|/opt/local/bin|g ${worksrcpath}/Makefile
> + reinplace s|/usr/local/lib|/opt/local/lib|g ${worksrcpath}/Makefile
> + reinplace "s|-O3 -Wall -W|${configure.cxxflags}|g"
> ${worksrcpath}/Makefile
> +}
You already fixed the /opt/local hardcoding...
But mightn't these reinplaces be better handled as a combo
patchfile-with-placeholders / reinplace-placeholders-with-values? In particular
the CXXFLAGS -- what if upstream later changes the CXXFLAGS in the Makefile
slightly? Unless your MacPorts base is patched to include the patch from
#15514, your reinplace will then silently fail, whereas if you use a patchfile,
you'll get notification and immediate port failure, which is good because it
gives you the chance to fix it; it also gives you context around the line in
question, so that you can more easily find the corresponding section in the
revised source file.
> +use_configure no
This means you'll need to manually deal with build_arch and
UsingTheRightCompiler.
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev