diff options
Diffstat (limited to 'recipes-extended/glusterfs/files/configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch')
-rw-r--r-- | recipes-extended/glusterfs/files/configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/recipes-extended/glusterfs/files/configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch b/recipes-extended/glusterfs/files/configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch new file mode 100644 index 0000000..a33ffce --- /dev/null +++ b/recipes-extended/glusterfs/files/configure.ac-allow-PYTHON-values-to-be-passed-via-en.patch | |||
@@ -0,0 +1,67 @@ | |||
1 | From d535a5448191d433e328b0a25a0710da203c44e7 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yi Zhao <yi.zhao@windriver.com> | ||
3 | Date: Wed, 19 Jul 2017 09:40:57 +0800 | ||
4 | Subject: [PATCH] configure.ac: allow PYTHON values to be passed via env | ||
5 | |||
6 | Allow the recipe can specify specific values for PYTHON. | ||
7 | |||
8 | Upstream-Status: Inappropriate [embedded specific] | ||
9 | |||
10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | ||
11 | --- | ||
12 | configure.ac | 26 ++++++++++---------------- | ||
13 | 1 file changed, 10 insertions(+), 16 deletions(-) | ||
14 | |||
15 | diff --git a/configure.ac b/configure.ac | ||
16 | index 43efd6d..7a31038 100644 | ||
17 | --- a/configure.ac | ||
18 | +++ b/configure.ac | ||
19 | @@ -544,9 +544,6 @@ fi | ||
20 | dnl Check if version matches that we require | ||
21 | PYTHONDEV_CPPFLAGS= | ||
22 | PYTHONDEV_LDFLAGS= | ||
23 | -BUILD_PYTHON_SITE_PACKAGES= | ||
24 | -BUILD_PYTHON_INC= | ||
25 | -BUILD_PYTHON_LIB= | ||
26 | have_python2=no | ||
27 | have_Python_h=no | ||
28 | |||
29 | @@ -555,25 +552,22 @@ if echo $PYTHON_VERSION | grep -q ^2; then | ||
30 | |||
31 | dnl Use pkg-config to get runtime search patch missing from ${PYTHON}-config | ||
32 | dnl Just do "true" on failure so that configure does not bail out | ||
33 | - PKG_CHECK_MODULES([PYTHON], "python-$PYTHON_VERSION",,true) | ||
34 | + PKG_CHECK_MODULES([PYTHONDEV], "python-$PYTHON_VERSION", [AC_SUBST(PYTHONDEV_CPPFLAGS) AC_SUBST(PYTHONDEV_LDFLAGS)], AC_MSG_ERROR([Can not find python])) | ||
35 | |||
36 | - PYTHONDEV_CPPFLAGS="`${PYTHON}-config --cflags`" | ||
37 | - dnl Edit out the flags that are not required or are conflicting | ||
38 | - PYTHONDEV_CPPFLAGS=`echo ${PYTHONDEV_CPPFLAGS} | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[[0-9]]//g'` | ||
39 | - | ||
40 | - dnl Find python libs at user configured libdir and also "lib" under prefix | ||
41 | - PYTHONDEV_LDFLAGS="${PYTHON_LIBS} -L`${PYTHON}-config --prefix`/lib -L`${PYTHON}-config --prefix`/$libdir `${PYTHON}-config --ldflags`" | ||
42 | - | ||
43 | - BUILD_PYTHON_SITE_PACKAGES=${pythondir} | ||
44 | - BUILD_PYTHON_INC=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())" 2>/dev/null` | ||
45 | - BUILD_PYTHON_LIB=python$PYTHON_VERSION | ||
46 | + if test -z "${BUILD_PYTHON_SITE_PACKAGES}"; then | ||
47 | + BUILD_PYTHON_SITE_PACKAGES=${pythondir} | ||
48 | + fi | ||
49 | + if test -z "${BUILD_PYTHON_INC}"; then | ||
50 | + BUILD_PYTHON_INC=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())" 2>/dev/null` | ||
51 | + fi | ||
52 | + if test -z "${BUILD_PYTHON_LIB}"; then | ||
53 | + BUILD_PYTHON_LIB=python$PYTHON_VERSION | ||
54 | + fi | ||
55 | |||
56 | dnl Now check for python header using the include path obtained above | ||
57 | AC_CHECK_HEADERS([${BUILD_PYTHON_INC}/Python.h],[have_Python_h=yes],[]) | ||
58 | fi | ||
59 | |||
60 | -AC_SUBST(PYTHONDEV_CPPFLAGS) | ||
61 | -AC_SUBST(PYTHONDEV_LDFLAGS) | ||
62 | AC_SUBST(BUILD_PYTHON_SITE_PACKAGES) | ||
63 | AC_SUBST(BUILD_PYTHON_INC) | ||
64 | AC_SUBST(BUILD_PYTHON_LIB) | ||
65 | -- | ||
66 | 1.9.1 | ||
67 | |||