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

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

x11 dependent ports: Force port: based X11 dependencies

As mentioned over the past month and a half on macports-dev:
http://lists.macosforge.org/pipermail/macports-dev/2008-December/006818.html
http://lists.macosforge.org/pipermail/macports-dev/2009-January/006870.html
http://lists.macosforge.org/pipermail/macports-dev/2009-January/007003.html

This should address the underlying problem in tickets:
http://trac.macports.org/ticket/17356
http://trac.macports.org/ticket/17558
http://trac.macports.org/ticket/17631

This commit updates all ports explicitly depending on X11. These ports now
explicitly rely on X11 libraries in MacPorts rather than using lib: based
dependencies satisfied by X11 libraries in $x11prefix. The former policy was
devised due to the difficulty of providing such libs easily to the MacPorts
community under the old monolythic X distribution. Due to the X.org project's
transition to the autoconf build system and modularization of the project as
well as the XQuartz projects efforts to make these new releases work on OSX,
MacPorts can now have more control over its offerings and provide users with
better consistency and stability.

Other ports that "inherited" the X11 dependency may still require a revision
bump to link against the new libs. If you find a binary or library linking
against $x11prefix/lib/lib*.dylib after 'sudo port upgrade outdated' (and
you're not using the +system_x11 variant), please report that, so we can get
it fixed.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.2 KB
Line 
1# $Id: Portfile 45603 2009-01-18 20:52:41Z jeremyhu@macports.org $
2
3PortSystem              1.0
4
5name                    pango-devel
6set my_name             pango
7version                 1.21.6
8revision                2
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
46pre-configure {
47    set glib_minimum_version 2.17.3
48    set glib_installed_version [exec pkg-config glib-2.0 --modversion]
49    if {[rpm-vercomp ${glib_installed_version} ${glib_minimum_version}] < 0} {
50        return -code error "pango ${version} requires glib ${glib_minimum_version} or later but you have glib ${glib_installed_version}."
51    }
52   
53    set cairo_minimum_version 1.7.4
54    set cairo_installed_version [exec pkg-config cairo --modversion]
55    if {[rpm-vercomp ${cairo_installed_version} ${cairo_minimum_version}] < 0} {
56        return -code error "pango ${version} requires cairo ${cairo_minimum_version} or later but you have cairo ${cairo_installed_version}."
57    }
58}
59
60configure.cppflags-append \
61    -no-cpp-precomp
62
63configure.ldflags-append \
64    -no-undefined \
65    -bind_at_load
66
67configure.args \
68    --enable-static \
69    --enable-cairo
70
71variant no_x11 {
72    depends_lib-delete \
73        port:Xft2
74    configure.args-append \
75        --without-x
76}
77
78post-destroot {
79    if {[variant_isset no_x11]} {
80        xinstall -d ${destroot}${prefix}/etc/pango
81    }
82    xinstall -m 0644 ${worksrcpath}/modules/pangorc \
83        ${destroot}${prefix}/etc/pango
84    reinplace "s|\\.\\./modules/|${prefix}/etc/pango/|g" \
85        ${destroot}${prefix}/etc/pango/pangorc
86   
87    system "env LANG=C DYLD_LIBRARY_PATH=${destroot}${prefix}/lib \
88        ${destroot}${prefix}/bin/pango-querymodules ${destroot}${prefix}/lib/pango/1.6.0/modules/*.so \
89        >${destroot}${prefix}/etc/pango/pango.modules"
90    reinplace s|${destroot}||g ${destroot}${prefix}/etc/pango/pango.modules
91   
92    set docdir ${prefix}/share/doc/${name}-${version}
93    xinstall -d ${destroot}${docdir}
94    xinstall -m 0644 -W ${worksrcpath} AUTHORS ChangeLog COPYING MAINTAINERS NEWS README THANKS \
95        ${destroot}${docdir}
96}
97
98test.run                yes
99test.target             check
100
101livecheck.check         regex
102livecheck.url           http://ftp.gnome.org/pub/GNOME/sources/${my_name}/${branch}/?C=M&O=D
103livecheck.regex         ${my_name}-(\[0-9.\]+)\\.tar
Note: See TracBrowser for help on using the repository browser.