blob: df0fdf679a74f268bf2be3e6774c48a20b630ee0 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001SUMMARY = "Framework for layout and rendering of internationalized text"
2DESCRIPTION = "Pango is a library for laying out and rendering of text, \
3with an emphasis on internationalization. Pango can be used anywhere \
4that text layout is needed, though most of the work on Pango so far has \
5been done in the context of the GTK+ widget toolkit. Pango forms the \
6core of text and font handling for GTK+-2.x."
7HOMEPAGE = "http://www.pango.org/"
8BUGTRACKER = "http://bugzilla.gnome.org"
9SECTION = "libs"
10LICENSE = "LGPLv2.0+"
11
12X11DEPENDS = "virtual/libx11 libxft"
13DEPENDS = "glib-2.0 fontconfig freetype zlib virtual/libiconv cairo harfbuzz qemu-native"
14
15PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
16 ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'ptest', '', d)}"
17
18PACKAGECONFIG[x11] = "--with-xft,--without-xft,${X11DEPENDS}"
19PACKAGECONFIG[ptest] = "--enable-installed-tests,--disable-installed-tests,glib-2.0-native"
20
21BBCLASSEXTEND = "native"
22DEPENDS_class-native = "glib-2.0-native cairo-native harfbuzz-native"
23
24PACKAGES_DYNAMIC += "^pango-module-.*"
25
26RRECOMMENDS_${PN} = "pango-module-basic-fc"
27
28inherit gnomebase gtk-doc qemu ptest
29
30# Create a pango-modules package
31ALLOW_EMPTY_${BPN}-modules = "1"
32PACKAGES += "${BPN}-modules"
33RRECOMMENDS_${BPN}-modules = "${@" ".join([p for p in d.getVar('PACKAGES', True).split() if p.find("pango-module") != -1])}"
34
35
36EXTRA_AUTORECONF = ""
37
38# seems to go wrong with default cflags
39FULL_OPTIMIZATION_arm = "-O2"
40
41EXTRA_OECONF = "--disable-introspection \
42 --enable-explicit-deps=no \
43 --disable-debug \
44 --with-mlprefix=${MLPREFIX}"
45
46LEAD_SONAME = "libpango-1.0*"
47LIBV = "1.8.0"
48
49pango_postinst() {
50if ! [ -e $D${sysconfdir}/pango ] ; then
51 mkdir -p $D${sysconfdir}/pango
52fi
53
54if [ -n "$D" ]; then
55 ${@qemu_run_binary(d, '$D','${bindir}/${MLPREFIX}pango-querymodules')} \
56 $D${libdir}/pango/${LIBV}/modules/*.so \
57 > $D${sysconfdir}/pango/${MLPREFIX}pango.modules 2>/dev/null
58
59 [ $? -ne 0 ] && exit 1
60
61 sed -i -e "s:$D::" $D${sysconfdir}/pango/${MLPREFIX}pango.modules
62
63 exit 0
64else
65 ${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules
66fi
67}
68
69# This binary needs to be compiled for the host architecture. This isn't pretty!
70do_compile_prepend () {
71 if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
72 make CC="${BUILD_CC}" CFLAGS="" AM_CPPFLAGS="$(pkg-config-native --cflags glib-2.0)" gen_all_unicode_LDADD="$(pkg-config-native --libs glib-2.0)" -C ${B}/tests gen-all-unicode
73 fi
74}
75
76do_install_append () {
77 if [ "${MLPREFIX}" != "" ]; then
78 mv ${D}/${bindir}/pango-querymodules ${D}/${bindir}/${MLPREFIX}pango-querymodules
79 fi
80}
81
82
83python populate_packages_prepend () {
84 pango_postinst = d.getVar("pango_postinst", True)
85
86 modules_root = d.expand('${libdir}/pango/${LIBV}/modules')
87
88 do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', pango_postinst)
89}
90
91FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"
92FILES_${PN}-dbg += "${libdir}/pango/${LIBV}/modules/.debug"
93FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
94
95FILES_${PN}-ptest += "${libexecdir}/installed-tests/* \
96 ${datadir}/installed-tests/pango"
97FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
98
99RDEPENDS_${PN}-ptest += "gnome-desktop-testing liberation-fonts"