python-pygtk2: make it build on 64bit host for 32bit machine (from Poky)
authorMarcin Juszkiewicz <hrw@openembedded.org>
Fri, 23 Mar 2007 10:53:46 +0000 (10:53 +0000)
committerMarcin Juszkiewicz <hrw@openembedded.org>
Fri, 23 Mar 2007 10:53:46 +0000 (10:53 +0000)
Informations why it is needed sent to mailing list.

packages/python/python-pygtk2/acinclude.m4
packages/python/python-pygtk2_2.10.3.bb
packages/python/python-pygtk2_2.6.3.bb
packages/python/python-pygtk2_2.8.6.bb

index eec3758..53518fb 100644 (file)
@@ -43,12 +43,18 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
 [AC_REQUIRE([AM_PATH_PYTHON])
 AC_MSG_CHECKING(for headers required to compile python extensions)
 dnl deduce PYTHON_INCLUDES
+AC_ARG_WITH(python-includes,
+       [  --with-python-includes=DIR  path to Python includes], py_exec_prefix=$withval)
+if test x$py_exec_prefix != x; then
+PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}"
+else
 py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
 py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
 PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
 if test "$py_prefix" != "$py_exec_prefix"; then
   PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}"
 fi
+fi
 AC_SUBST(PYTHON_INCLUDES)
 dnl check if the headers exist:
 save_CPPFLAGS="$CPPFLAGS"
index d040299..f7366af 100644 (file)
@@ -13,6 +13,7 @@ SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.10/${SRCNAME}-${PV}.tar
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 EXTRA_OECONF = "--disable-docs"
+EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
 
 inherit autotools pkgconfig distutils-base
 
index 6125063..ffd837f 100644 (file)
@@ -13,6 +13,8 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 inherit autotools pkgconfig distutils-base
 
+EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
+
 PACKAGES = "${PN}-dbg ${PN}-dev ${PN}-doc ${PN}"
 FILES_${PN}-dbg += "${libdir}/python2.4/site-packages/gtk-2.0/gtk/.debug \
                    ${libdir}/python2.4/site-packages/gtk-2.0/.debug"
index ab571bd..b3d8c93 100644 (file)
@@ -1,11 +1,11 @@
 DESCRIPTION = "Python GTK+ Bindings"
 SECTION = "devel/python"
-# needs gtk+-2.8.x
+PRIORITY = "optional"
 DEPENDS = "gtk+ libglade"
 RDEPENDS = "python-shell"
 SRCNAME = "pygtk"
 LICENSE = "LGPL"
-PR = "ml0"
+PR = "r1"
 
 SRC_URI = "ftp://ftp.gnome.org/pub/gnome/sources/pygtk/2.8/${SRCNAME}-${PV}.tar.bz2 \
            file://acinclude.m4"
@@ -13,6 +13,8 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
 
 inherit autotools pkgconfig distutils-base
 
+EXTRA_OECONF += "--with-python-includes=${STAGING_INCDIR}/../"
+
 do_configure_prepend() {
        install -m 0644 ${WORKDIR}/acinclude.m4 ${S}/
 }