summaryrefslogtreecommitdiffstats
path: root/recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch')
-rw-r--r--recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch60
1 files changed, 60 insertions, 0 deletions
diff --git a/recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch b/recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch
new file mode 100644
index 0000000..174be5f
--- /dev/null
+++ b/recipes-append/libxml/libxml2/configure-Add-with-python-install-dir.patch
@@ -0,0 +1,60 @@
1From df85edda5f6632f12f5802173a5012a35b19ccdd Mon Sep 17 00:00:00 2001
2From: Jonas Eriksson <jonas.eriksson@enea.com>
3Date: Thu, 6 Mar 2014 08:22:23 +0100
4Subject: [PATCH] configure: Add --with-python-install-dir
5
6Cross-compiling the python bindings is a bit difficult today, as the
7configure script will figure out the site packages dir
8(PYTHON_SITE_PACKAGES) by either:
9
10- Generating the path to the site-package target directories using
11 libdir, and see if it exists. As it is not possible to point to the
12 full path of the sysroot, since that will yield the wrong install
13 path, and that the directory does not neccessarily exist on the host,
14 this approach will not work.
15
16- Fetch the site packages dir from the python interpreter as pointed to
17 by --with-python. Since this python interpreter will point to the
18 sysroot, the install dir generated will be inside the sysroot and thus
19 not work.
20
21This patch approaches the problem by adding the possibility of
22explicitly stating the install dir of the python packages, leaving it up
23to the cross-compilation environment to specify it. The patch does not
24affect the default case (non-cross compilation).
25
26Signed-off-by: Jonas Eriksson <jonas.eriksson@enea.com>
27
28Upstream-Status: Submitted [xml@gnome.org]
29---
30 configure.in | 7 +++++++
31 1 file changed, 7 insertions(+)
32
33diff --git a/configure.in b/configure.in
34index ecaa403..21ad1e7 100644
35--- a/configure.in
36+++ b/configure.in
37@@ -148,6 +148,9 @@ AC_ARG_WITH(push,
38 [ --with-push add the PUSH parser interfaces (on)])
39 AC_ARG_WITH(python,
40 [ --with-python[[=DIR]] build Python bindings if found])
41+AC_ARG_WITH(python_install_dir,
42+[ --with-python-install-dir=DIR
43+ install Python bindings in DIR])
44 AC_ARG_WITH(reader,
45 [ --with-reader add the xmlReader parsing interface (on)])
46 AC_ARG_WITH(readline,
47@@ -866,6 +869,10 @@ if test "$with_python" != "no" ; then
48 fi
49 fi
50 fi
51+ if test "$with_python_install_dir" != ""
52+ then
53+ PYTHON_SITE_PACKAGES="$with_python_install_dir"
54+ fi
55 if test "$PYTHON_VERSION" != "" -a "$PYTHON_SITE_PACKAGES" = ""
56 then
57 if test -d $libdir/python$PYTHON_VERSION/site-packages
58--
591.9.0
60