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