Ticket #17042: glib2-2.19.6-muniversal.diff

File glib2-2.19.6-muniversal.diff, 3.7 KB (added by ryandesign (Ryan Carsten Schmidt), 16 years ago)
  • files/config.cache

     
     1glib_cv_stack_grows=no
     2glib_cv_uscore=no
     3ac_cv_func_posix_getpwuid_r=yes
     4ac_cv_func_posix_getgrgid_r=yes
  • Portfile

     
    11# $Id$
    22
    33PortSystem              1.0
     4PortGroup               muniversal 1.0
    45
    56name                    glib2-devel
    67set my_name             glib
    7 version                 2.19.3
     8version                 2.19.6
     9#version                 2.19.8
    810set branch              [join [lrange [split ${version} .] 0 1] .]
    911categories              devel
    1012maintainers             ryandesign
     
    2830#    ftp://ftp.gtk.org/pub/${my_name}/${branch}/
    2931
    3032checksums \
    31     md5     8c209e5ed7864cf38bd9f48db6631d1b \
    32     sha1    c67056bb797cd36ea23805ba93f301785cfc7807 \
    33     rmd160  f114c6a1901bed76d96392e6c2b609f181400895
     33    md5     d78ebdcb6a9bbd7cce1f396501037f9b \
     34    sha1    6b39ba2b1d702ada6da900410d2ef99191c5efe1 \
     35    rmd160  47b58160f6ada1cfe75a723778400a8aee7f3c0b
     36#    md5     b2898de261b212dcc1244b624ed756a5 \
     37#    sha1    79016e45baed8ccb0f57174274e3dc00483d27bd \
     38#    rmd160  a6c6c00885ae808767dbc51b71d55cad3c24a9f9
    3439
    3540patchfiles \
    3641    patch-glib-2.0.pc.in.diff \
     
    5156    -bind_at_load
    5257
    5358configure.cflags-append \
    54     -funroll-loops \
    5559    -fstrict-aliasing
    5660
    5761configure.args \
     
    6165configure.perl    ${prefix}/bin/perl
    6266configure.env-append  PERL_PATH=${configure.perl}
    6367
     68if {[variant_isset universal]} {
     69    # Answers to questions configure can't determine without running a program.
     70    configure.args-append       --config-cache
     71    # So it will find glib-genmarshal when cross-compiling.
     72    if {"powerpc" == ${os.arch}} {
     73        set build_arch ppc
     74    } else {
     75        set build_arch ${os.arch}
     76    }
     77    configure.env-append        PATH=${workpath}/${build_arch}/gobject:$env(PATH)
     78    build.env-append            PATH=${workpath}/${build_arch}/gobject:$env(PATH)
     79    pre-extract {
     80        # ${workpath}/${build_arch}/gobject/glib-genmarshal must exist before a
     81        # cross-compiled configure phase runs, so ${build_arch} must be configured
     82        # first.
     83        if {${build_arch} != [lindex ${universal_archs} 0]} {
     84            ui_msg "When building a universal binary of ${name} on ${build_arch}, ${build_arch} must appear first in the list of universal_archs in ${prefix}/etc/macports/macports.conf"
     85            return -code error "incompatible universal_archs order"
     86        }
     87    }
     88    post-extract {
     89        # Answers to questions configure can't determine without running a program.
     90        copy ${filespath}/config.cache ${worksrcpath}
     91        # So it will find glib-genmarshal during configure before it has been built.
     92        touch ${worksrcpath}/gobject/glib-genmarshal
     93        file attributes ${worksrcpath}/gobject/glib-genmarshal -permissions +x
     94    }
     95}
     96
    6497post-patch {
    6598    reinplace "s|data_dirs = \"/usr|data_dirs = \"${prefix}/share:/usr|g" ${worksrcpath}/glib/gutils.c
    6699    reinplace "s|path = \"/bin|path = \"${prefix}/bin:/bin|g" ${worksrcpath}/glib/gutils.c ${worksrcpath}/glib/gspawn.c
     
    68101
    69102platform darwin {
    70103    patchfiles-append \
    71         patch-child-test.c.diff \
    72         patch-configure.diff
    73 }
    74 
    75 platform powerpc {
    76     if {[variant_isset universal]} {
    77         post-configure {
    78             reinplace {s|^#define G_ATOMIC_POWERPC 1$|#undef G_ATOMIC_POWERPC|} ${worksrcpath}/config.h
    79         }
    80     }
     104        patch-child-test.c.diff
    81105}
    82106
    83107test.run                yes