| 1 | # $Id: Portfile 58104 2009-09-22 06:58:34Z ryandesign@macports.org $ |
|---|
| 2 | |
|---|
| 3 | PortSystem 1.0 |
|---|
| 4 | PortGroup muniversal 1.0 |
|---|
| 5 | |
|---|
| 6 | name pango |
|---|
| 7 | conflicts pango-devel |
|---|
| 8 | version 1.26.0 |
|---|
| 9 | set branch [join [lrange [split ${version} .] 0 1] .] |
|---|
| 10 | categories x11 |
|---|
| 11 | maintainers ryandesign |
|---|
| 12 | license LGPLv2 |
|---|
| 13 | homepage http://www.pango.org/ |
|---|
| 14 | master_sites gnome:sources/pango/${branch} |
|---|
| 15 | platforms darwin |
|---|
| 16 | use_bzip2 yes |
|---|
| 17 | use_parallel_build yes |
|---|
| 18 | |
|---|
| 19 | description \ |
|---|
| 20 | Framework for the layout and rendering of i18n text |
|---|
| 21 | |
|---|
| 22 | long_description \ |
|---|
| 23 | The goal of the Pango project is to provide an \ |
|---|
| 24 | open-source framework for the layout and rendering \ |
|---|
| 25 | of internationalized text. |
|---|
| 26 | |
|---|
| 27 | checksums md5 74ce18cfcc3ad0008a6ad56cfc535061 \ |
|---|
| 28 | sha1 567f9ace5a8384b3a59dbf95304dc8b1a271d5b6 \ |
|---|
| 29 | rmd160 b3b64d6af1eb9cc27d23a7e58d118df8fed25502 |
|---|
| 30 | |
|---|
| 31 | depends_extract \ |
|---|
| 32 | port:pkgconfig |
|---|
| 33 | |
|---|
| 34 | depends_lib \ |
|---|
| 35 | path:lib/pkgconfig/glib-2.0.pc:glib2 \ |
|---|
| 36 | port:Xft2 \ |
|---|
| 37 | path:lib/pkgconfig/cairo.pc:cairo |
|---|
| 38 | |
|---|
| 39 | configure.ccache no |
|---|
| 40 | |
|---|
| 41 | # Do not call gzip on man files as it interferes with the universal merger process. |
|---|
| 42 | post-patch { |
|---|
| 43 | reinplace "s|\$(MAKE) \$(AM_MAKEFLAGS) install-data-hook||" ${worksrcpath}/pango-view/Makefile.in |
|---|
| 44 | } |
|---|
| 45 | |
|---|
| 46 | platform macosx {} |
|---|
| 47 | variant quartz requires macosx description {Add Quartz graphics interface} { |
|---|
| 48 | # Although this variant does nothing, pango will automatically build |
|---|
| 49 | # itself differently depending on whether or not cairo is installed with |
|---|
| 50 | # the quartz variant. Therefore this variant is necessary to be able to |
|---|
| 51 | # distinguish whether an installed pango has quartz support or not. |
|---|
| 52 | } |
|---|
| 53 | |
|---|
| 54 | pre-extract { |
|---|
| 55 | set glib_minimum_version 2.17.3 |
|---|
| 56 | set glib_installed_version [exec pkg-config glib-2.0 --modversion] |
|---|
| 57 | if {[rpm-vercomp ${glib_installed_version} ${glib_minimum_version}] < 0} { |
|---|
| 58 | ui_error "${name} ${version} requires glib2 ${glib_minimum_version} or later but you have glib2 ${glib_installed_version}." |
|---|
| 59 | return -code error "incompatible glib2 version" |
|---|
| 60 | } |
|---|
| 61 | |
|---|
| 62 | set cairo_minimum_version 1.7.4 |
|---|
| 63 | set cairo_installed_version [exec pkg-config cairo --modversion] |
|---|
| 64 | if {[rpm-vercomp ${cairo_installed_version} ${cairo_minimum_version}] < 0} { |
|---|
| 65 | ui_error "${name} ${version} requires cairo ${cairo_minimum_version} or later but you have cairo ${cairo_installed_version}." |
|---|
| 66 | return -code error "incompatible cairo version" |
|---|
| 67 | } |
|---|
| 68 | |
|---|
| 69 | set cairo_quartz_pc ${prefix}/lib/pkgconfig/cairo-quartz.pc |
|---|
| 70 | if {[variant_isset quartz]} { |
|---|
| 71 | if {![file exists ${cairo_quartz_pc}]} { |
|---|
| 72 | ui_error "To install pango with the quartz variant, cairo must be installed with the quartz variant." |
|---|
| 73 | return -code error "incompatible cairo installation" |
|---|
| 74 | } |
|---|
| 75 | } else { |
|---|
| 76 | if {[file exists ${cairo_quartz_pc}]} { |
|---|
| 77 | ui_error "To install pango without the quartz variant, cairo must be installed without the quartz variant." |
|---|
| 78 | return -code error "incompatible cairo installation" |
|---|
| 79 | } |
|---|
| 80 | } |
|---|
| 81 | |
|---|
| 82 | set cairo_xlib_pc ${prefix}/lib/pkgconfig/cairo-xlib.pc |
|---|
| 83 | if {[variant_isset no_x11]} { |
|---|
| 84 | if {[file exists ${cairo_xlib_pc}]} { |
|---|
| 85 | ui_error "To install pango with the no_x11 variant, cairo must be installed with the no_x11 variant." |
|---|
| 86 | return -code error "incompatible cairo installation" |
|---|
| 87 | } |
|---|
| 88 | } else { |
|---|
| 89 | if {![file exists ${cairo_xlib_pc}]} { |
|---|
| 90 | ui_error "To install pango without the no_x11 variant, cairo must be installed without the no_x11 variant." |
|---|
| 91 | return -code error "incompatible cairo installation" |
|---|
| 92 | } |
|---|
| 93 | } |
|---|
| 94 | } |
|---|
| 95 | |
|---|
| 96 | if { ${os.arch}=="i386" } { |
|---|
| 97 | set merger_configure_env(ppc) "NM='/usr/bin/nm -p'" |
|---|
| 98 | set merger_configure_env(ppc64) "NM='/usr/bin/nm -p'" |
|---|
| 99 | } else { |
|---|
| 100 | set merger_configure_env(i386) "NM='/usr/bin/nm -p'" |
|---|
| 101 | set merger_configure_env(x86_64) "NM='/usr/bin/nm -p'" |
|---|
| 102 | } |
|---|
| 103 | lappend merger_configure_env(ppc64) ac_cv_header_Carbon_Carbon_h=no |
|---|
| 104 | lappend merger_configure_env(x86_64) ac_cv_header_Carbon_Carbon_h=no |
|---|
| 105 | |
|---|
| 106 | configure.cppflags-append \ |
|---|
| 107 | -no-cpp-precomp |
|---|
| 108 | |
|---|
| 109 | configure.ldflags-append \ |
|---|
| 110 | -no-undefined \ |
|---|
| 111 | -bind_at_load |
|---|
| 112 | |
|---|
| 113 | configure.args \ |
|---|
| 114 | --enable-static \ |
|---|
| 115 | --x-include=${prefix}/include --x-lib=${prefix}/lib |
|---|
| 116 | |
|---|
| 117 | variant no_x11 { |
|---|
| 118 | depends_lib-delete \ |
|---|
| 119 | port:Xft2 |
|---|
| 120 | configure.args-append \ |
|---|
| 121 | --without-x |
|---|
| 122 | } |
|---|
| 123 | |
|---|
| 124 | post-destroot { |
|---|
| 125 | if {[variant_isset no_x11]} { |
|---|
| 126 | xinstall -d ${destroot}${prefix}/etc/pango |
|---|
| 127 | } |
|---|
| 128 | xinstall -m 0644 ${worksrcpath}/modules/pangorc \ |
|---|
| 129 | ${destroot}${prefix}/etc/pango |
|---|
| 130 | reinplace "s|\\.\\./modules/|${prefix}/etc/pango/|g" \ |
|---|
| 131 | ${destroot}${prefix}/etc/pango/pangorc |
|---|
| 132 | |
|---|
| 133 | system "env LANG=C DYLD_LIBRARY_PATH=${destroot}${prefix}/lib \ |
|---|
| 134 | ${destroot}${prefix}/bin/pango-querymodules ${destroot}${prefix}/lib/pango/1.6.0/modules/*.so \ |
|---|
| 135 | >${destroot}${prefix}/etc/pango/pango.modules" |
|---|
| 136 | reinplace s|${destroot}||g ${destroot}${prefix}/etc/pango/pango.modules |
|---|
| 137 | |
|---|
| 138 | set docdir ${prefix}/share/doc/${name}-${version} |
|---|
| 139 | xinstall -d ${destroot}${docdir} |
|---|
| 140 | xinstall -m 0644 -W ${worksrcpath} AUTHORS ChangeLog COPYING MAINTAINERS NEWS README THANKS \ |
|---|
| 141 | ${destroot}${docdir} |
|---|
| 142 | } |
|---|
| 143 | |
|---|
| 144 | test.run yes |
|---|
| 145 | test.target check |
|---|
| 146 | |
|---|
| 147 | livecheck.type regex |
|---|
| 148 | livecheck.url http://ftp.gnome.org/pub/GNOME/sources/${name}/${branch}/?C=M&O=D |
|---|
| 149 | livecheck.regex ${name}-(\[0-9.\]+)\\.tar |
|---|