am-benchmarks: Add support for am387x-evm machine
[openembedded.git] / recipes / python / python-pygtk_2.16.0.bb
blob699bd5d65918fb712967d6acf237447e6e91b091
1 DESCRIPTION = "Python GTK+ 2.10.x Bindings"
2 SECTION = "devel/python"
3 # needs gtk+ 2.10.x
4 DEPENDS = "gtk+ libglade python-pycairo python-pygobject"
5 RDEPENDS_${PN} = "python-shell python-pycairo python-pygobject"
6 PROVIDES = "python-pygtk2"
7 SRCNAME = "pygtk"
8 LICENSE = "LGPL"
9 PR = "r3"
11 MAJ_VER = "${@bb.data.getVar('PV',d,1).split('.')[0]}.${@bb.data.getVar('PV',d,1).split('.')[1]}"
12 SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/${MAJ_VER}/${SRCNAME}-${PV}.tar.bz2;name=pygtk \
13 file://fix-gtkunixprint.patch \
14 file://acinclude.m4"
15 S = "${WORKDIR}/${SRCNAME}-${PV}"
17 EXTRA_OECONF = "\
18 --disable-docs \
19 --with-python-includes=${STAGING_INCDIR}/../ \
22 inherit autotools pkgconfig distutils-base
24 do_configure_prepend() {
25 install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
26 sed -i \
27 -e s:'`$PKG_CONFIG --variable defsdir pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/2.0/defs\":g \
28 -e s:'`$PKG_CONFIG --variable=pygtkincludedir pygobject-2.0`':\"${STAGING_INCDIR}/pygtk-2.0\":g \
29 -e s:'`$PKG_CONFIG --variable=datadir pygobject-2.0`':\"${STAGING_DATADIR}\":g \
30 -e s:'`$PKG_CONFIG --variable codegendir pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/2.0/codegen\":g \
31 -e s:'`$PKG_CONFIG --variable=fixxref pygobject-2.0`':\"${STAGING_DATADIR}/pygobject/xsl/fixxref.py\":g \
32 ${S}/configure.ac
33 sed -i 's:tests docs:tests:' Makefile.am
36 # dirty fix #1: remove dependency on python-pygobject-dev
37 do_install_append() {
38 find ${D} -name "*.la"|xargs rm -f
39 rm -f ${D}/${bindir}/pygtk-codegen-2.0
40 rm -rf ${D}/${libdir}/pkgconfig
41 install -d ${D}${libdir}/pkgconfig
42 install -m 0644 ${S}/*.pc ${D}${libdir}/pkgconfig
45 # dirty fix #2: fix build system paths leaking in
46 require fix-path.inc
48 PACKAGES =+ "${PN}-demo"
49 FILES_${PN}-demo = "\
50 ${bindir}/pygtk-demo \
51 ${libdir}/pygtk \
53 RDEPENDS_${PN}-demo = "python-pygtk python-stringold python-lang"
55 # todo: revamp packaging, package demo seperatly
56 FILES_${PN}-dev += "\
57 ${libdir}/pygtk/2.0 \
58 ${bindir}/pygtk-* \
59 ${datadir}/pygtk/2.0"
62 SRC_URI[pygtk.md5sum] = "bd0d437fefd6d5390f5d770a495cd50c"
63 SRC_URI[pygtk.sha256sum] = "7fae5e01af217a01738eae41c38ad7f86d1f538f444300d0fa2847aafb7444a8"