[93705] trunk/dports/devel/ace

Ryan Schmidt ryandesign at macports.org
Mon May 28 15:01:23 PDT 2012


On May 28, 2012, at 16:30, pixilla at macports.org wrote:

> Revision: 93705
>          https://trac.macports.org/changeset/93705
> Author:   pixilla at macports.org
> Date:     2012-05-28 14:30:35 -0700 (Mon, 28 May 2012)
> Log Message:
> -----------
> devel/ace:
> - Maintainer update. Closes #34658
> - Fix +universal variant.
> - Add +ssl variant.
> 
> Modified Paths:
> --------------
>    trunk/dports/devel/ace/Portfile
>    trunk/dports/devel/ace/files/patch-include-makeinclude-platform_macros.GNU.diff
> 
> Modified: trunk/dports/devel/ace/Portfile
> ===================================================================
> --- trunk/dports/devel/ace/Portfile	2012-05-28 21:01:38 UTC (rev 93704)
> +++ trunk/dports/devel/ace/Portfile	2012-05-28 21:30:35 UTC (rev 93705)
> @@ -2,11 +2,16 @@
> # $Id$
> 
> PortSystem          1.0
> -PortGroup           muniversal 1.0
> 
> +# Disable the full universal support since ACE already does most of this
> +# and the extra stuff in muniversal (including making two build trees
> +# and using libtool to merge libraries) does not work for this case.
> +# PortGroup           muniversal 1.0

Use of the muniversal portgroup is unusual, and is only added to the small minority of ports that cannot build universal using the standard universal variant. Thus removing the muniversal portgroup doesn't require leaving a paragraph of justification in the portfile. If use of the muniversal portgroup was not appropriate for this port then I don't know why it got added in the first place but feel free to just remove it.



> +variant ssl description {Enable SSL} {
> +        depends_lib port:openssl
> +}

This overwrites the port's global library dependency on perl, which you don't want to do. To avoid this, you need to append to the dependencies, not overwrite them. This is a good idea even if a port currently doesn't have any globally declared dependencies, to future-proof the variants against a time when global dependencies might be added to the port.


> +universal_variant   yes

> post-patch {

> +    if {[variant_exists universal] && [variant_isset universal]} {

Does the universal variant exist or doesn't it? As the port author, you should know. Since you set "universal_variant yes", it does exist, so you don't need to check for its existence.


> +        # do not set universal=1 which tries i386 and PPC but fails
> +        reinplace "s|universal=0|universal=0|g" \
> +            ${worksrcpath}/include/makeinclude/platform_macros.GNU
> +    }

This line replaces a string with itself, and is thus completely pointless.


> +    if {[variant_exists ssl] && [variant_isset ssl]} {

You defined the ssl variant earlier, so you know that it exists; you don't need to test whether it exists.


It makes it easier to understand a portfile if all the code relating to a variant is inside the variant definition. For example:


variant ssl description {Enable SSL} {
    depends_lib-append port:openssl
    post-patch {
        reinplace "s|ssl=0|ssl=1|g" \
            ${worksrcpath}/include/makeinclude/platform_macros.GNU
    }
}


variant universal {
    post-patch {
        reinplace "s|buildbits=64|buildbits=universal|g" \
            ${worksrcpath}/include/makeinclude/platform_macros.GNU
    }
}


Incidentally this patch in the universal variant makes clear that, without the universal variant, the port would build for 64-bit. This is not necessarily what we want. When not building universal, inspect the build_arch variable to see what arch the user requested and set buildbits accordingly.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ace.diff
Type: application/octet-stream
Size: 2272 bytes
Desc: not available
URL: <http://lists.macosforge.org/pipermail/macports-dev/attachments/20120528/9c781f8a/attachment.obj>


More information about the macports-dev mailing list