summaryrefslogtreecommitdiff
path: root/pango/pango_1.2.5.oe
blob: f023f157a28d91b99f3980f70203a297a4b53a3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
DEPENDS = "virtual/libc glib-2.0 fontconfig freetype zlib x11-cvs xft-cvs xproto-cvs"
RDEPENDS = "libc6 glib-2.0 fontconfig freetype zlib x11-cvs xft-cvs xproto-cvs"
DESCRIPTION = "The goal of the Pango project is to provide an \
Open Source framework for the layout and rendering of \
internationalized text."

SRC_URI = "http://ftp.gnome.org/pub/gnome/sources/pango/1.2/pango-${PV}.tar.bz2 \
	   file://${FILESDIR}/ft2.patch;patch=1 \
	   file://${FILESDIR}/m4.patch;patch=1 \
	   file://${FILESDIR}/no-tests.patch;patch=1"

inherit autotools libtool pkgconfig

EXTRA_OECONF = "--disable-glibtest \
		--enable-explicit-deps=no"

FILES_${PN} = "/etc ${bindir} ${libdir}/libpango*.so.*"

SOV = "0.200.5"
LIBV = "1.2.0"

do_stage () {
	for lib in pango pangox pangoft2 pangoxft; do
		oe_soinstall pango/.libs/lib$lib-1.0.so.${SOV} ${STAGING_LIBDIR}/
		install -m 0644 pango/.libs/lib$lib-1.0.lai ${STAGING_LIBDIR}/lib$lib-1.0.la
		install -m 0644 pango/.libs/lib$lib-1.0.a ${STAGING_LIBDIR}/
	done
	install -d ${STAGING_INCDIR}/pango
	install -m 0644 ${S}/pango/pango*.h ${STAGING_INCDIR}/pango/
}

python populate_packages_prepend () {
	import string, os
	def do_split(root, pattern, format, description, postinst):
		dvar = oe.data.getVar('D', d, 1)
		if not dvar:
			oe.error("D not defined")
			return

		packages = string.split(oe.data.getVar('PACKAGES', d, 1))
		if not packages:
			oe.error("PACKAGES not defined")
			return

		postinst = '#!/bin/sh\n' + postinst
		objs = os.listdir(dvar + root)
		mainpkg = packages[0]
		for o in objs:
			import re
			m = re.match(pattern, o)
			if not m:
				continue
			on = m.group(1)
			pkg = format % on
			packages.append(pkg)
			oe.data.setVar('FILES_' + pkg, os.path.join(root, o), d)
			oe.data.setVar('RDEPENDS_' + pkg, mainpkg, d)
			oe.data.setVar('DESCRIPTION_' + pkg, description % on, d)
			oe.data.setVar('pkg_postinst_' + pkg, postinst, d)

		oe.data.setVar('PACKAGES', string.join(packages, ' '), d)

	libdir = oe.data.getVar('libdir', d, 1)
	if not libdir:
		oe.error("libdir not defined")
		return

	pango_libdir = os.path.join(libdir, "pango", oe.data.getVar('LIBV', d))
	modules_root = os.path.join(pango_libdir, 'modules')

	do_split(modules_root, '^pango-(.*)\.so$', 'pango-module-%s', 'Pango module %s', 'pango-querymodules > /etc/pango/pango.modules')
}