summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/pango/pango.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/pango/pango.inc')
-rw-r--r--meta/recipes-graphics/pango/pango.inc97
1 files changed, 97 insertions, 0 deletions
diff --git a/meta/recipes-graphics/pango/pango.inc b/meta/recipes-graphics/pango/pango.inc
new file mode 100644
index 0000000000..b59d33d14f
--- /dev/null
+++ b/meta/recipes-graphics/pango/pango.inc
@@ -0,0 +1,97 @@
1SUMMARY = "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
49postinst_prologue() {
50if ! [ -e $D${sysconfdir}/pango ] ; then
51 mkdir -p $D${sysconfdir}/pango
52fi
53
54if [ "x$D" != "x" ]; 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
64fi
65}
66
67# This binary needs to be compiled for the host architecture. This isn't pretty!
68do_compile_prepend () {
69 if ${@base_contains('DISTRO_FEATURES', 'ptest', 'true', 'false', d)}; then
70 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
71 fi
72}
73
74do_install_append () {
75 if [ "${MLPREFIX}" != "" ]; then
76 mv ${D}/${bindir}/pango-querymodules ${D}/${bindir}/${MLPREFIX}pango-querymodules
77 fi
78}
79
80
81python populate_packages_prepend () {
82 prologue = d.getVar("postinst_prologue", True)
83
84 modules_root = d.expand('${libdir}/pango/${LIBV}/modules')
85
86 do_split_packages(d, modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', prologue + '${bindir}/${MLPREFIX}pango-querymodules > /etc/pango/${MLPREFIX}pango.modules')
87}
88
89FILES_${PN} = "${sysconfdir}/pango/* ${bindir}/* ${libdir}/libpango*${SOLIBS}"
90FILES_${PN}-dbg += "${libdir}/pango/${LIBV}/modules/.debug"
91FILES_${PN}-dev += "${libdir}/pango/${LIBV}/modules/*.la"
92
93FILES_${PN}-ptest += "${libexecdir}/installed-tests/* \
94 ${datadir}/installed-tests/pango"
95FILES_${PN}-dbg += "${libexecdir}/installed-tests/.debug"
96
97RDEPENDS_${PN}-ptest += "gnome-desktop-testing liberation-fonts"