Ticket #17357: Portfile-universalhackaround.diff

File Portfile-universalhackaround.diff, 1.1 KB (added by erik.abair@…, 15 years ago)

Here's an alternative patch that limits the change to i386 arch, though in an awful hacky way

  • Portfile

    old new  
    11# $Id: Portfile 59458 2009-10-15 11:37:40Z jmr@macports.org $
    22
    33PortSystem      1.0
     4PortGroup muniversal 1.0
     5PortGroup archcheck 1.0
    46
    57name                    cyrus-sasl2
    68version                 2.1.23
     
    4850
    4951use_parallel_build  yes
    5052
    51 universal_variant no
     53#universal_variant no
    5254
    5355# This is a start towards universal... lib/Makefile.am and sasldb/Makefile.am need to be updated to not do blind ar-fu
    5456#post-extract {
    5557#       system "rm ${worksrcpath}/config/libtool.m4"
    5658#}
    57 #
     59
    5860#use_autoreconf yes
    5961#autoreconf.args -fvi
    6062#autoreconf.env ACLOCAL="aclocal -I${worksrcpath}/cmulocal -I${worksrcpath}/config"
    6163
     64# This is a horrible hackaround as replacing the ar-fu as mentioned above is non-trivial
     65pre-build {   
     66    if {[variant_isset universal] && [file exists ${worksrcpath}-i386/libtool]} {
     67        reinplace -E -- "s|^CC=\\\"(\[^\\\"\]+)\\\"|CC=\"\\1 -arch i386\"|g" ${worksrcpath}-i386/libtool
     68    }
     69}
     70
    6271destroot.keepdirs \
    6372    ${destroot}${prefix}/var/state/saslauthd \
    6473    ${destroot}${prefix}/var/pwcheck