Ticket #17090: Portfile-apr.diff

File Portfile-apr.diff, 1.5 KB (added by ulrich.kohlhase@…, 16 years ago)
  • Portfile

    old new  
    11# $Id: Portfile 45504 2009-01-16 19:23:25Z dluke@macports.org $
    22
    33PortSystem      1.0
     4PortGroup   muniversal 1.0
    45
    56name            apr
    67version         1.3.3
     
    3435        use_parallel_build      no
    3536}
    3637
     38# muniversal non-merging required for apr-util (see below) but it breaks libtool
     39if {[variant_isset universal] && ${os.arch}=="i386"} {
     40        set merger_dont_diff "${prefix}/share/apr-1/build/apr_rules.mk \
     41                ${prefix}/share/apr-1/build/libtool"
     42}
     43
     44# We need arch specific rules.mk and libtool for apr-util. Also fix pesky libtool
     45# "unable to infer tagged configuration" when using -m32/64 switches
     46if {[variant_isset universal] && ${os.arch}=="i386"} {
     47        post-install {
     48                system "chmod 755 ${prefix}/bin/apr-1-config"
     49                reinplace  "s|/libtool|/i386-libtool --tag=CC|g" \
     50                        "${prefix}/share/apr-1/build/i386-apr_rules.mk"
     51                reinplace  "s|/libtool|/x86_64-libtool --tag=CC|g" \
     52                        "${prefix}/share/apr-1/build/x86_64-apr_rules.mk"
     53
     54                # Copy i386 libtool for ports depending on apr-util and fix tag error
     55                system "cp ${prefix}/share/apr-1/build/i386-libtool \
     56                                        ${prefix}/share/apr-1/build/libtool"
     57                reinplace "s| -m32||g" "${prefix}/share/apr-1/build/libtool"
     58                system "chmod 755 ${prefix}/share/apr-1/build/libtool"
     59        }
     60}
     61
    3762livecheck.check regex
    3863livecheck.url   http://apache.org/dist/apr/
    3964livecheck.regex {<a href="#apr">APR (\d+(?:\.\d+)*) is the latest available version</a>}