Ticket #58926: pango-1.44.6-WIP-Portfile

File pango-1.44.6-WIP-Portfile, 5.2 KB (added by kencu (Ken), 5 years ago)
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2
3PortSystem              1.0
4PortGroup               active_variants 1.1
5PortGroup               meson 1.0
6
7# Please keep the pango and pango-devel ports as similar as possible.
8
9name                    pango-devel
10conflicts               pango
11set my_name             pango
12version                 1.44.6
13checksums               rmd160  ec6e791baaba57e81465a339e8ccee28bc0f45d2 \
14                        sha256  3e1e41ba838737e200611ff001e3b304c2ca4cdbba63d200a20db0b0ddc0f86c \
15                        size    521672
16
17set branch              [join [lrange [split ${version} .] 0 1] .]
18categories              x11
19maintainers             {ryandesign @ryandesign} openmaintainer
20license                 LGPL-2+
21license_noconflict      gobject-introspection
22
23homepage                https://www.pango.org/
24master_sites            gnome:sources/${my_name}/${branch}
25platforms               darwin
26distname                ${my_name}-${version}
27dist_subdir             ${my_name}
28use_xz                  yes
29use_parallel_build      yes
30
31description \
32    Framework for the layout and rendering of i18n text
33
34long_description \
35    The goal of the Pango project is to provide an \
36    open-source framework for the layout and rendering \
37    of internationalized text.
38
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
52
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 \
66    path:lib/pkgconfig/glib-2.0.pc:glib2 \
67    path:lib/pkgconfig/cairo.pc:cairo \
68    port:fribidi \
69    port:harfbuzz \
70    port:fontconfig
71
72configure.args-append   -Ddefault_library=both \
73                        -Dintrospection=true \
74                        -Duse_fontconfig=true
75
76platform macosx {
77    variant quartz {
78        # Although this variant does nothing, pango will automatically build
79        # itself differently depending on whether or not cairo is installed with
80        # the quartz variant. Therefore this variant is necessary to be able to
81        # distinguish whether an installed pango has Quartz support or not.
82    }
83
84    default_variants    +quartz
85    # Don't allow Quartz support to be disabled. Keep the variant for awhile in
86    # case any dependents are using the active_variants portgroup to check for it.
87    variant_set         quartz
88
89    if {[variant_isset quartz]} {
90        require_active_variants path:lib/pkgconfig/cairo.pc:cairo quartz
91    }
92}
93
94variant x11 {
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 \
99                            --x-lib=${prefix}/lib
100}
101
102default_variants        +x11
103if {${os.platform} ne "darwin" || ${os.subplatform} ne "macosx"} {
104    # When not on OS X, don't allow X11 support to be disabled, since it is the
105    # only available option.
106    variant_set         x11
107}
108
109if {[variant_isset x11]} {
110    require_active_variants path:lib/pkgconfig/cairo.pc:cairo x11
111}
112
113post-destroot {
114    set docdir ${prefix}/share/doc/${my_name}
115    xinstall -d ${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}
119}
120
121test.run                yes
122test.target             check
123
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
148livecheck.type          gnome-with-unstable
149livecheck.name          ${my_name}