Ticket #34603: Portfile-6.1.2-universal.diff

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

Patch to enable +universal and +ssl support relative to current svn repo. Similar to previous version posted here but slight cleanup in approach to modifying files to set compilers.

  • Portfile

    old new  
    22# $Id: Portfile 93487 2012-05-24 00:41:47Z ryandesign@macports.org $
    33
    44PortSystem          1.0
    5 PortGroup           muniversal 1.0
     5# Disable the full universal support since ACE already does most of this
     6# and the extra stuff in muniversal (including making two build trees
     7# and using libtool to merge libraries) does not work for this case.
     8# PortGroup           muniversal 1.0
    69
    710name                ace
    811set name_package    ACE
    912version             6.1.2
     13revision            1
    1014distname            ${name_package}-${version}
    1115categories          devel
    1216maintainers         fourpalms.org:lockhart openmaintainer
     
    3034homepage            http://www.cs.wustl.edu/~schmidt/ACE.html
    3135master_sites        http://download.dre.vanderbilt.edu/previous_versions
    3236
     37universal_variant   yes
     38
     39variant ssl description {Enable SSL} {
     40        depends_lib port:openssl
     41}
     42
    3343use_bzip2           yes
    3444
    3545worksrcdir          ACE_wrappers
     
    5767        }
    5868    }
    5969}
     70set libenv          DYLD_LIBRARY_PATH=${worksrcpath}/lib
     71set aceenv          ACE_ROOT=${worksrcpath}
     72set makearg         INSTALL_PREFIX=${prefix}
     73set subdirs         { . }
    6074
    6175post-patch {
    6276    reinplace "s|@MACOSX@|${os.name}|g" \
    6377        ${worksrcpath}/ace/config.h \
    6478        ${worksrcpath}/include/makeinclude/platform_macros.GNU
     79    # disable the assignment for compilers in lion and use our environment instead
     80    reinplace "s|^\\(CXX:=.*\\)|# \\1|g" \
     81        ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
     82    reinplace "s|^\\(CC:=.*\\)|# \\1|g" \
     83        ${worksrcpath}/include/makeinclude/platform_macosx_lion.GNU
     84
     85    if {[variant_exists universal] && [variant_isset universal]} {
     86        ui_debug "Enabling a universal build"
     87        reinplace "s|buildbits=64|buildbits=universal|g" \
     88            ${worksrcpath}/include/makeinclude/platform_macros.GNU
     89        # do not set universal=1 which tries i386 and PPC but fails
     90        reinplace "s|universal=0|universal=0|g" \
     91            ${worksrcpath}/include/makeinclude/platform_macros.GNU
     92    }
     93
     94    if {[variant_exists ssl] && [variant_isset ssl]} {
     95        ui_debug "Enabling SSL"
     96        reinplace "s|ssl=0|ssl=1|g" \
     97            ${worksrcpath}/include/makeinclude/platform_macros.GNU
     98    }
    6599}
    66100
     101depends_lib         path:bin/perl:perl5
     102
    67103use_configure       no
    68104
    69105use_parallel_build  no
    70106
    71 build.env-append    "DYLD_LIBRARY_PATH=${worksrcpath}/lib"
    72 build.env-append    "ACE_ROOT=${worksrcpath}"
    73 build.env-append    "INSTALL_PREFIX=${prefix}"
    74 
    75 destroot.env-append "DYLD_LIBRARY_PATH=${worksrcpath}/lib"
    76 destroot.env-append "ACE_ROOT=${worksrcpath}"
    77 destroot.args-append "INSTALL_PREFIX=${prefix}"
     107build.env           "${libenv} ${aceenv}"
     108build.args-append   CC=${configure.cc} \
     109                    CXX=${configure.cxx} \
     110                    CPP=${configure.cpp}
     111build.pre_args      ${makearg} all
     112build {
     113    foreach {subdir} $subdirs {
     114        build.dir ${worksrcpath}/${subdir}
     115        command_exec build
     116    }
     117}
     118
     119destroot.env        "${libenv} ${aceenv}"
     120destroot.pre_args   ${makearg} install
     121destroot {
     122    foreach {subdir} $subdirs {
     123        destroot.dir ${worksrcpath}/${subdir}
     124        command_exec destroot
     125    }
     126}
    78127
    79128livecheck.url       ${master_sites}
    80129livecheck.regex     ${name_package}-(\\d+\[0-9a-z.\]*)${extract.suffix}