Ticket #34616: Portfile-6.1.2-universal.diff

File Portfile-6.1.2-universal.diff, 3.2 KB (added by lockhart (Thomas Lockhart), 12 years ago)

Implement +universal and +ssl variants.

  • Portfile

    old new  
    22# $Id: Portfile 93489 2012-05-24 05:19:35Z ryandesign@macports.org $
    33
    44# MacPorts specification for the TAO CORBA package.
    5 # Includes ACE even though the libACE package is available
     5# Includes ACE even though the ace port is available
    66# since TAO can not be built against an installed version of ACE.
    77# Thanks to the boost port maintainers for a great example to follow.
    88# Thomas Lockhart
    99# 2012-02-06
    1010
    1111PortSystem          1.0
    12 PortGroup           muniversal 1.0
     12# Disable the full universal support since TAO already does most of this
     13# and the extra stuff in muniversal (including making two build trees
     14# and using libtool to merge libraries) does not work for this case.
     15# PortGroup           muniversal 1.0
    1316
    1417name                tao
    1518set name_package    ACE+TAO
    1619version             6.1.2
     20revision            1
    1721distname            ${name_package}-${version}
    1822categories          devel
    1923platforms           darwin
     
    3438master_sites        http://download.dre.vanderbilt.edu/previous_versions \
    3539                    ftp://download.dre.vanderbilt.edu/previous_versions
    3640
     41universal_variant   yes
     42
     43variant ssl description {Enable SSL} {
     44        depends_lib port:openssl
     45}
     46
    3747use_bzip2           yes
    3848
    3949worksrcdir          ACE_wrappers
     
    8191    reinplace "s|@MACOSX@|${os.name}|g" \
    8292        ${worksrcpath}/ace/config.h \
    8393        ${worksrcpath}/include/makeinclude/platform_macros.GNU
     94    # disable the assignment for compilers in lion and use our environment instead
     95    reinplace "s|^\\(CXX:=.*\\)|# \\1|g" \
     96        ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
     97    reinplace "s|^\\(CC:=.*\\)|# \\1|g" \
     98        ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
     99
     100    if {[variant_exists universal] && [variant_isset universal]} {
     101        ui_debug "Enabling a universal build"
     102        reinplace "s|buildbits=64|buildbits=universal|g" \
     103            ${worksrcpath}/include/makeinclude/platform_macros.GNU
     104        # do not set universal=1 which tries i386 and PPC but fails
     105        reinplace "s|universal=0|universal=0|g" \
     106            ${worksrcpath}/include/makeinclude/platform_macros.GNU
     107    }
     108
     109    if {[variant_exists ssl] && [variant_isset ssl]} {
     110        ui_debug "Enabling SSL"
     111        reinplace "s|ssl=0|ssl=1|g" \
     112            ${worksrcpath}/include/makeinclude/platform_macros.GNU
     113    }
     114
    84115    reinplace "s|@PREFIX@|${prefix}|g" \
    85116        ${worksrcpath}/org.macports.${taodaemon}.plist
    86117    reinplace "s|@USER@|${taouser}|g" \
     
    104135build.pre_args      ${makearg} all
    105136build {
    106137    foreach {subdir} $subdirs {
    107         build.dir           ${worksrcpath}/${subdir}
     138        build.dir ${worksrcpath}/${subdir}
    108139        command_exec build
    109140    }
    110141}
     
    115146destroot {
    116147    xinstall -d -o ${taouser} -m 0755 ${logdir}
    117148    foreach {subdir} $subdirs {
    118         destroot.dir        ${worksrcpath}/${subdir}
     149        destroot.dir ${worksrcpath}/${subdir}
    119150        command_exec destroot
    120151    }
    121152    # Files required to build CosEvent classes but not installed