source: trunk/dports/x11/pango-devel/Portfile @ 47716

Last change on this file since 47716 was 47716, checked in by ryandesign@…, 11 years ago

cairo, cairo-devel, pango, pango-devel: Quartz and ATSUI features are now optional via a new +quartz variant; fixes #16778 and should help #15626

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1# $Id: Portfile 47716 2009-03-04 13:25:16Z ryandesign@macports.org $
2
3PortSystem              1.0
4
5name                    pango-devel
6set my_name             pango
7version                 1.21.6
8revision                3
9set branch              [join [lrange [split ${version} .] 0 1] .]
10categories              x11
11maintainers             ryandesign
12homepage                http://www.pango.org/
13master_sites            gnome:sources/${my_name}/${branch}
14platforms               darwin
15distname                ${my_name}-${version}
16dist_subdir             ${my_name}
17use_bzip2               yes
18use_parallel_build      yes
19
20description \
21    Framework for the layout and rendering of i18n text
22
23long_description \
24    The goal of the Pango project is to provide an \
25    open-source framework for the layout and rendering \
26    of internationalized text.
27
28checksums \
29    md5     db7b24c685d488dd9d06b66b42faed50 \
30    sha1    7efd4bf06a5a1111e4cfc42b8fcb5a668cab2bab \
31    rmd160  ae62dcd44d0c5374be27f6b5b806dfa8b9abc2c6
32
33depends_build \
34    port:pkgconfig
35
36depends_lib \
37    path:lib/pkgconfig/glib-2.0.pc:glib2 \
38    port:Xft2 \
39    path:lib/pkgconfig/cairo.pc:cairo \
40
41patchfiles \
42    patch-ltmain.sh.diff
43
44configure.ccache        no
45
46platform macosx {}
47variant quartz requires macosx description {Add Quartz graphics interface} {}
48
49pre-configure {
50    set glib_minimum_version 2.17.3
51    set glib_installed_version [exec pkg-config glib-2.0 --modversion]
52    if {[rpm-vercomp ${glib_installed_version} ${glib_minimum_version}] < 0} {
53        return -code error "pango ${version} requires glib ${glib_minimum_version} or later but you have glib ${glib_installed_version}."
54    }
55   
56    set cairo_minimum_version 1.7.4
57    set cairo_installed_version [exec pkg-config cairo --modversion]
58    if {[rpm-vercomp ${cairo_installed_version} ${cairo_minimum_version}] < 0} {
59        return -code error "pango ${version} requires cairo ${cairo_minimum_version} or later but you have cairo ${cairo_installed_version}."
60    }
61   
62    set cairo_quartz_pc ${prefix}/lib/pkgconfig/cairo-quartz.pc
63    if {[variant_isset quartz]} {
64        if {![file exists ${cairo_quartz_pc}]} {
65            ui_msg "To install pango with the quartz variant, cairo must be installed with the quartz variant."
66            return -code error "incompatible cairo installation"
67        }
68    } else {
69        if {[file exists ${cairo_quartz_pc}]} {
70            ui_msg "To install pango without the quartz variant, cairo must be installed without the quartz variant."
71            return -code error "incompatible cairo installation"
72        }
73    }
74}
75
76configure.cppflags-append \
77    -no-cpp-precomp
78
79configure.ldflags-append \
80    -no-undefined \
81    -bind_at_load
82
83configure.args \
84    --enable-static \
85    --enable-cairo
86
87variant no_x11 {
88    depends_lib-delete \
89        port:Xft2
90    configure.args-append \
91        --without-x
92}
93
94post-destroot {
95    if {[variant_isset no_x11]} {
96        xinstall -d ${destroot}${prefix}/etc/pango
97    }
98    xinstall -m 0644 ${worksrcpath}/modules/pangorc \
99        ${destroot}${prefix}/etc/pango
100    reinplace "s|\\.\\./modules/|${prefix}/etc/pango/|g" \
101        ${destroot}${prefix}/etc/pango/pangorc
102   
103    system "env LANG=C DYLD_LIBRARY_PATH=${destroot}${prefix}/lib \
104        ${destroot}${prefix}/bin/pango-querymodules ${destroot}${prefix}/lib/pango/1.6.0/modules/*.so \
105        >${destroot}${prefix}/etc/pango/pango.modules"
106    reinplace s|${destroot}||g ${destroot}${prefix}/etc/pango/pango.modules
107   
108    set docdir ${prefix}/share/doc/${name}-${version}
109    xinstall -d ${destroot}${docdir}
110    xinstall -m 0644 -W ${worksrcpath} AUTHORS ChangeLog COPYING MAINTAINERS NEWS README THANKS \
111        ${destroot}${docdir}
112}
113
114test.run                yes
115test.target             check
116
117livecheck.check         regex
118livecheck.url           http://ftp.gnome.org/pub/GNOME/sources/${my_name}/${branch}/?C=M&O=D
119livecheck.regex         ${my_name}-(\[0-9.\]+)\\.tar
Note: See TracBrowser for help on using the repository browser.