Ticket #19391: Portfile.diff

File Portfile.diff, 2.7 KB (added by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), 16 years ago)
  • Portfile

    old new  
    11# $Id: Portfile 47297 2009-02-25 11:59:08Z ryandesign@macports.org $
    22
    33PortSystem              1.0
     4PortGroup               muniversal 1.0
    45
    56name                    gd2
    67version                 2.0.35
    7 revision                4
     8revision                5
    89categories              graphics
    910maintainers             ryandesign
    1011homepage                http://www.libgd.org/
     
    5455    port:xpm
    5556
    5657patchfiles \
    57     patch-gdft.c.diff \
    58     patch-Makefile.in.diff \
    59     patch-config-gdlib-config.in.diff
     58    patch-gdft.c.diff
    6059
    6160post-patch {
    6261    if {[file exists ${prefix}/share/libtool/config/ltmain.sh]} {
     
    6867
    6968use_autoreconf          yes
    7069
    71 post-destroot {
     70post-build {
    7271    if {[variant_isset universal]} {
    73        reinplace "s|${configure.universal_ldflags}||" \
    74            ${destroot}${prefix}/bin/gdlib-config
     72       foreach arch ${universal_archs_to_use} {
     73           reinplace "s| ${configure.universal_ldflags}||" \
     74               ${worksrcpath}-${arch}/config/gdlib-config
     75           reinplace "s| [muniversal_get_arch_flag ${arch}]||" \
     76               ${worksrcpath}-${arch}/config/gdlib-config
     77       }
    7578    }
    7679}
    7780
     
    7982    depends_lib lib:libdl:dlcompat
    8083}
    8184
    82 platform darwin {
    83     post-configure {
    84         reinplace "s/^\\(hardcode_direct=\\)yes/\\1no/" ${worksrcpath}/libtool
     85# AC_X_PATH blindly asks xmkmf where X11 is, and it always uses /usr/X11R6.
     86# This block helps us link correctly when we are +system_x11 and x11prefix
     87# is somewhere non-standard and should cause AC_X_PATH to let us setup our
     88# CPPFLAGS and LDFLAGS without interference
     89pre-configure {
     90    if { ! [variant_isset no_x11] } {
     91        configure.args-append  --x-includes=${prefix}/include --x-libraries=${prefix}/lib
     92        if { ![file exists ${prefix}/lib/pkgconfig/x11.pc] } {
     93            configure.cppflags-append -I${x11prefix}/include
     94            configure.ldflags-append  -L${x11prefix}/lib
     95        }
    8596    }
    8697}
    8798
     
    89100    depends_lib-delete \
    90101        port:xpm
    91102    configure.args-append \
    92         --without-x
     103        --without-x \
     104        --without-xpm
    93105}
    94106
     107#platform darwin {
     108#    post-configure {
     109#        if { ! [variant_isset universal] } {
     110#            reinplace "s/^\\(hardcode_direct=\\)yes/\\1no/" ${worksrcpath}/libtool
     111#        } else {
     112#            foreach arch ${universal_archs_to_use} {
     113#                reinplace "s/^\\(hardcode_direct=\\)yes/\\1no/" ${worksrcpath}-${arch}/libtool
     114#            }
     115#        }
     116#    }
     117#}
     118
    95119livecheck.check         regex
    96120livecheck.url           ${homepage}Downloads
    97121livecheck.regex         gd-(\[0-9.\]+)\\.tar