[90209] trunk/dports/tex/sketch/Portfile

Ryan Schmidt ryandesign at macports.org
Tue Mar 13 22:31:53 PDT 2012


On Feb 26, 2012, at 10:43, snc at macports.org wrote:

> Revision: 90209
>          http://trac.macports.org/changeset/90209
> Author:   snc at macports.org
> Date:     2012-02-26 08:43:13 -0800 (Sun, 26 Feb 2012)
> Log Message:
> -----------
> sketch: blind update to 0.3.7

Does this mean you did not test whether this update compiles and installs? If so, we should avoid that.

> http://lists.macosforge.org/pipermail/macports-dev/2012-February/017934.html

If you're saying this is the reason why you did not test the update, then you should simply go back to your macports.conf and undo the change you made to binpath that was described in the wiki page UsingTheRightCompiler so that you can continue to work despite ports that might not be using the right compiler.

> +patch {
> +    reinplace "s|CC\ \=\ gcc\ -O1\ -g\ -Wall|CC \= ${configure.cc} ${configure.cflags}|g" ${worksrcpath}/makefile
> +}
> +
> use_configure       no

Looks like this was done to ensure the port is UsingTheRightCompiler, but whenever you're doing that, you probably also need to do something to deal with using the right -arch flags ([get_canonical_archflags]).

Since this is not a change that alters very many lines in the makefile (it changes only one line), I recommend the use of a patchfile to insert a placeholder, then a reinplace to change the placeholder. This will ensure that, if in a future version the upstream file changes in a way that makes the reinplace fail to apply (for example if they change what CFLAGS they put on that line), the patch failure will alert you to that problem instead of silently failing (see #15514), and the context provided in the patchfile will give you clues about how the patch can be reconstructed.

For the record, spaces and equals signs are not special characters for either Tcl or regular expressions so they do not need to be escaped with a backslash.

I have made the changes I mentioned in r90750.



More information about the macports-dev mailing list