Ticket #58926: pango-1.44.6-WIP-Portfile.diff

File pango-1.44.6-WIP-Portfile.diff, 5.0 KB (added by kencu (Ken), 5 years ago)
  • Portfile

    old new  
    22
    33PortSystem              1.0
    44PortGroup               active_variants 1.1
    5 PortGroup               gobject_introspection 1.0
     5PortGroup               meson 1.0
    66
    77# Please keep the pango and pango-devel ports as similar as possible.
    88
    99name                    pango-devel
    1010conflicts               pango
    1111set my_name             pango
    12 version                 1.42.4
    13 checksums               rmd160  e91880e0e9a459bbc2c280ac747ab31f80352000 \
    14                         sha256  1d2b74cd63e8bd41961f2f8d952355aa0f9be6002b52c8aa7699d9f5da597c9d \
    15                         size    833876
     12version                 1.44.6
     13checksums               rmd160  ec6e791baaba57e81465a339e8ccee28bc0f45d2 \
     14                        sha256  3e1e41ba838737e200611ff001e3b304c2ca4cdbba63d200a20db0b0ddc0f86c \
     15                        size    521672
    1616
    1717set branch              [join [lrange [split ${version} .] 0 1] .]
    1818categories              x11
    1919maintainers             {ryandesign @ryandesign} openmaintainer
    2020license                 LGPL-2+
     21license_noconflict      gobject-introspection
     22
    2123homepage                https://www.pango.org/
    2224master_sites            gnome:sources/${my_name}/${branch}
    2325platforms               darwin
     
    3436    open-source framework for the layout and rendering \
    3537    of internationalized text.
    3638
    37 depends_build \
    38     port:pkgconfig
     39depends_build-append \
     40    port:pkgconfig \
     41    port:gobject-introspection
     42
     43
     44# FIXME
     45# at present uses a fallback subproject for glib as our macports version is too old
     46# this makes it additionally install glib2 version 2.61.3
     47# this will obviously have to be changed to a new glib2 version in macports instead, but builds throug
     48
     49#Dependency glib-2.0 found: NO found '2.58.3' but need: '>= 2.59.2'
     50#Run-time dependency glib-2.0 found: NO (tried pkgconfig, cmake and framework)
     51#Looking for a fallback subproject for the dependency glib-2.0
    3952
    40 depends_lib \
     53# this is needed for the glib2 subport to build, at least
     54# I don't know the tricks of python; we need
     55# /usr/bin/env python -> python37
     56# /usr/bin/env python3 -> python37
     57# so I did the following, and it worked.
     58# sudo port select python python37
     59# sudo port select python3 python37
     60set python.version 37
     61depends_build-append    port:py${python.version}-setuptools
     62
     63
     64
     65depends_lib-append \
    4166    path:lib/pkgconfig/glib-2.0.pc:glib2 \
    4267    path:lib/pkgconfig/cairo.pc:cairo \
    4368    port:fribidi \
    44     port:harfbuzz
    45 
    46 configure.args          --enable-static \
    47                         --disable-silent-rules \
    48                         --without-x
     69    port:harfbuzz \
     70    port:fontconfig
    4971
    50 gobject_introspection   yes
    51 
    52 license_noconflict      gobject-introspection
     72configure.args-append   -Ddefault_library=both \
     73                        -Dintrospection=true \
     74                        -Duse_fontconfig=true
    5375
    5476platform macosx {
    5577    variant quartz {
     
    7092}
    7193
    7294variant x11 {
    73     depends_lib-append      port:Xft2
    74     configure.args-delete   --without-x
    75     configure.args-append   --x-include=${prefix}/include \
     95# not sure whether to use this or fontconfig - build seems to want fontconfig but I didn't try this
     96#    depends_lib-append      port:Xft2
     97#    configure.args-delete   --without-x
     98#    configure.args-append   --x-include=${prefix}/include \
    7699                            --x-lib=${prefix}/lib
    77100}
    78101
     
    90113post-destroot {
    91114    set docdir ${prefix}/share/doc/${my_name}
    92115    xinstall -d ${destroot}${docdir}
    93     xinstall -m 0644 -W ${worksrcpath} AUTHORS ChangeLog COPYING MAINTAINERS NEWS README THANKS \
    94         ${destroot}${docdir}
     116# at least some of these extra files are no longer there
     117#    xinstall -m 0644 -W ${worksrcpath} AUTHORS ChangeLog COPYING MAINTAINERS NEWS README THANKS \
     118#        ${destroot}${docdir}
    95119}
    96120
    97121test.run                yes
    98122test.target             check
    99123
     124# gobject-introspection uses g-ir-scanner, which uses $CC from env
     125if {[vercmp [macports_version] 2.5.99] >= 0} {
     126if {[variant_isset universal]} {
     127    foreach arch ${configure.universal_archs} {
     128        lappend merger_build_env(${arch})  "CC=${configure.cc} -arch ${arch}"
     129        lappend merger_destroot_env(${arch})  "CC=${configure.cc} -arch ${arch}"
     130    }
     131} else {
     132    build.env-append       "CC=${configure.cc} ${configure.cc_archflags}"
     133    destroot.env-append    "CC=${configure.cc} ${configure.cc_archflags}"
     134}
     135} else {
     136if {[variant_isset universal]} {
     137    foreach arch ${configure.universal_archs} {
     138        lappend merger_build_env(${arch})  CC='${configure.cc} -arch ${arch}'
     139        lappend merger_destroot_env(${arch})  CC='${configure.cc} -arch ${arch}'
     140    }
     141} else {
     142    build.env-append       CC="${configure.cc} ${configure.cc_archflags}"
     143    destroot.env-append    CC="${configure.cc} ${configure.cc_archflags}"
     144}
     145}
     146
     147
    100148livecheck.type          gnome-with-unstable
    101149livecheck.name          ${my_name}