[103241] trunk/dports/shells/luash/Portfile

Ryan Schmidt ryandesign at macports.org
Tue Feb 19 01:36:44 PST 2013


On Feb 19, 2013, at 03:23, and.damore at macports.org wrote:

> Revision: 103241
>          https://trac.macports.org/changeset/103241
> Author:   and.damore at macports.org
> Date:     2013-02-19 01:23:47 -0800 (Tue, 19 Feb 2013)
> Log Message:
> -----------
> port luash: adding compiler flags, adding universal variant
> 
> Modified Paths:
> --------------
>    trunk/dports/shells/luash/Portfile
> 
> Modified: trunk/dports/shells/luash/Portfile
> ===================================================================
> --- trunk/dports/shells/luash/Portfile	2013-02-19 09:19:15 UTC (rev 103240)
> +++ trunk/dports/shells/luash/Portfile	2013-02-19 09:23:47 UTC (rev 103241)
> @@ -24,11 +24,14 @@
> use_configure           no
> depends_lib             port:lua \
>                         port:lua-luafilesystem
> -build.args-append       CC=${configure.cc} \
> -                        CXX=${configure.cxx} \
> -                        CPP=${configure.cpp}
> +build.args-append       CXX=${configure.cxx} \
> +                        CXX_FLAGS=${configure.cxxflags}
> destroot.args           PREFIX=${prefix}
> post-destroot {
>     xinstall -d -m 755 ${destroot}$prefix/share/doc/${name}
>     xinstall    -m 644 -W ${worksrcpath} COPYING README ${destroot}$prefix/share/doc/${name}
> }
> +variant universal {
> +    build.args-delete   CXX_FLAGS=${configure.cxxflags}
> +    build.args-append   CXX_FLAGS=\"${configure.cxxflags} ${configure.universal_cxxflags}\"
> +}

This is fine for the universal variant, which now uses -arch flags, but when not using the universal variant, -arch flags still aren't used. -arch flags should always be used (the user could have changed build_arch in macports.conf). Also there's no need to backslash those quotes.

It's simplest to use the [get_canonical_archflags] proc. If you want to have a universal variant, be sure to define it before that proc is invoked for the first time.

The attached patch makes these changes. I also removed setting worksrcdir, since the default for worksrcdir is ${distname}.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: luash.diff
Type: application/octet-stream
Size: 1385 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20130219/a00396a6/attachment.obj>
-------------- next part --------------



More information about the macports-dev mailing list