[90280] trunk/dports/graphics/wxWidgets/Portfile

Ryan Schmidt ryandesign at macports.org
Wed Feb 29 07:53:41 PST 2012


On Feb 29, 2012, at 07:11, jwa at macports.org wrote:

> Revision: 90280
>          http://trac.macports.org/changeset/90280
> Author:   jwa at macports.org
> Date:     2012-02-29 05:11:18 -0800 (Wed, 29 Feb 2012)
> Log Message:
> -----------
> change hardcoded /Developer to configurable developer_dir, add 4.3 check to locate the 10.6 SDK correctly, hopefully fixing #33312, add modeline
> 
> Modified Paths:
> --------------
>    trunk/dports/graphics/wxWidgets/Portfile
> 
> Modified: trunk/dports/graphics/wxWidgets/Portfile
> ===================================================================
> --- trunk/dports/graphics/wxWidgets/Portfile	2012-02-29 12:49:38 UTC (rev 90279)
> +++ trunk/dports/graphics/wxWidgets/Portfile	2012-02-29 13:11:18 UTC (rev 90280)
> @@ -1,3 +1,4 @@
> +# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
> # $Id$
> 
> PortSystem 1.0
> @@ -93,8 +94,14 @@
> 
> platform darwin 11 {
> 	 configure.args-append \
> -	 --with-macosx-sdk=/Developer/SDKs/MacOSX10.6.sdk \
> +         --with-macosx-sdk=${developer_dir}/SDKs/MacOSX10.6.sdk \
> 	 --with-macosx-version-min=10.6
> +    if {$xcodeversion == "4.3"} {
> +        configure.args-delete \
> +            --with-macosx-sdk=${developer_dir}/SDKs/MacOSX10.6.sdk
> +        configure.args-append \
> +            --with-macosx-sdk=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
> +    }

Why add a flag, then immediately remove the flag (for 4.3)? Why not only add the flag if it's needed?

More importantly, you should be using [vercmp] to test whether the Xcode version is 4.3 *or greater*; what you committed above will fail as soon as a newer version of Xcode is released.

Also, please don't hardcode /Applications/Xcode.app/Contents/Developer; isn't that what ${developer_dir} should be with Xcode 4.3?



More information about the macports-dev mailing list