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 | 81 |
1 files changed, 31 insertions, 50 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 index e146f7d..4bbcbe9 100644 --- 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 | |||
@@ -1,6 +1,6 @@ | |||
1 | From ff524f14ba93eb422963c8009a108516639d9b3a Mon Sep 17 00:00:00 2001 | 1 | From f2a1c67e2b3b60ba54f506cf806437924b5242ca Mon Sep 17 00:00:00 2001 |
2 | From: Yi Zhao <yi.zhao@windriver.com> | 2 | From: "Hongzhi.Song" <hongzhi.song@windriver.com> |
3 | Date: Wed, 19 Jul 2017 09:40:57 +0800 | 3 | Date: Tue, 12 Mar 2019 20:21:48 -0700 |
4 | Subject: [PATCH] configure.ac: allow PYTHON values to be passed via env | 4 | Subject: [PATCH] configure.ac: allow PYTHON values to be passed via env |
5 | 5 | ||
6 | Allow the recipe can specify specific values for PYTHON. | 6 | Allow the recipe can specify specific values for PYTHON. |
@@ -8,58 +8,39 @@ Allow the recipe can specify specific values for PYTHON. | |||
8 | Upstream-Status: Inappropriate [embedded specific] | 8 | Upstream-Status: Inappropriate [embedded specific] |
9 | 9 | ||
10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> | 10 | Signed-off-by: Yi Zhao <yi.zhao@windriver.com> |
11 | 11 | [Hongzhi: minor adjust the patch on v5.4] | |
12 | Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> | ||
12 | --- | 13 | --- |
13 | configure.ac | 26 ++++++++++---------------- | 14 | configure.ac | 12 ++++++++++-- |
14 | 1 file changed, 10 insertions(+), 16 deletions(-) | 15 | 1 file changed, 10 insertions(+), 2 deletions(-) |
15 | 16 | ||
16 | diff --git a/configure.ac b/configure.ac | 17 | diff --git a/configure.ac b/configure.ac |
17 | index 8e0652a..f49b9b3 100644 | 18 | index d55a7b2..36b0980 100644 |
18 | --- a/configure.ac | 19 | --- a/configure.ac |
19 | +++ b/configure.ac | 20 | +++ b/configure.ac |
20 | @@ -546,9 +546,6 @@ fi | 21 | @@ -650,12 +650,20 @@ if test "x${PYTHON_VERSION}" = "x2.6"; then |
21 | dnl Check if version matches that we require | 22 | PYTHON_CFLAGS=$(python-config --includes) |
22 | PYTHONDEV_CPPFLAGS= | 23 | PYTHON_LIBS=$(python-config --libs) |
23 | PYTHONDEV_LDFLAGS= | 24 | else |
24 | -BUILD_PYTHON_SITE_PACKAGES= | 25 | - PKG_CHECK_MODULES([PYTHON], "python-${PYTHON_VERSION}",,true) |
25 | -BUILD_PYTHON_INC= | 26 | + PKG_CHECK_MODULES([PYTHONDEV], "python-$PYTHON_VERSION", [AC_SUBST(PYTHONDEV_CPPFLAGS) AC_SUBST(PYTHONDEV_LDFLAGS)], AC_MSG_ERROR([Can not find python])) |
26 | -BUILD_PYTHON_LIB= | ||
27 | have_python2=no | ||
28 | have_Python_h=no | ||
29 | |||
30 | @@ -557,25 +554,22 @@ if echo $PYTHON_VERSION | grep -q ^2; then | ||
31 | |||
32 | dnl Use pkg-config to get runtime search patch missing from ${PYTHON}-config | ||
33 | dnl Just do "true" on failure so that configure does not bail out | ||
34 | - PKG_CHECK_MODULES([PYTHON], "python-$PYTHON_VERSION",,true) | ||
35 | + PKG_CHECK_MODULES([PYTHONDEV], "python-$PYTHON_VERSION", [AC_SUBST(PYTHONDEV_CPPFLAGS) AC_SUBST(PYTHONDEV_LDFLAGS)], AC_MSG_ERROR([Can not find python])) | ||
36 | |||
37 | - PYTHONDEV_CPPFLAGS="`${PYTHON}-config --cflags`" | ||
38 | - dnl Edit out the flags that are not required or are conflicting | ||
39 | - PYTHONDEV_CPPFLAGS=`echo ${PYTHONDEV_CPPFLAGS} | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[[0-9]]//g'` | ||
40 | - | ||
41 | - dnl Find python libs at user configured libdir and also "lib" under prefix | ||
42 | - PYTHONDEV_LDFLAGS="${PYTHON_LIBS} -L`${PYTHON}-config --prefix`/lib -L`${PYTHON}-config --prefix`/$libdir `${PYTHON}-config --ldflags`" | ||
43 | - | ||
44 | - BUILD_PYTHON_SITE_PACKAGES=${pythondir} | ||
45 | - BUILD_PYTHON_INC=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())" 2>/dev/null` | ||
46 | - BUILD_PYTHON_LIB=python$PYTHON_VERSION | ||
47 | + if test -z "${BUILD_PYTHON_SITE_PACKAGES}"; then | ||
48 | + BUILD_PYTHON_SITE_PACKAGES=${pythondir} | ||
49 | + fi | ||
50 | + if test -z "${BUILD_PYTHON_INC}"; then | ||
51 | + BUILD_PYTHON_INC=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())" 2>/dev/null` | ||
52 | + fi | ||
53 | + if test -z "${BUILD_PYTHON_LIB}"; then | ||
54 | + BUILD_PYTHON_LIB=python$PYTHON_VERSION | ||
55 | + fi | ||
56 | |||
57 | dnl Now check for python header using the include path obtained above | ||
58 | AC_CHECK_HEADERS([${BUILD_PYTHON_INC}/Python.h],[have_Python_h=yes],[]) | ||
59 | fi | 27 | fi |
60 | 28 | ||
61 | -AC_SUBST(PYTHONDEV_CPPFLAGS) | 29 | PYTHON_CFLAGS=$(echo ${PYTHON_CFLAGS} | sed -e 's|-I|-isystem |') |
62 | -AC_SUBST(PYTHONDEV_LDFLAGS) | 30 | |
31 | -BUILD_PYTHON_SITE_PACKAGES=${pythondir} | ||
32 | +if test -z "${BUILD_PYTHON_SITE_PACKAGES}"; then | ||
33 | + BUILD_PYTHON_SITE_PACKAGES=${pythondir} | ||
34 | +fi | ||
35 | +if test -z "${BUILD_PYTHON_INC}"; then | ||
36 | + BUILD_PYTHON_INC=`$PYTHON -c "import sys; from distutils import sysconfig; sys.stdout.write(sysconfig.get_python_inc())" 2>/dev/null` | ||
37 | +fi | ||
38 | +if test -z "${BUILD_PYTHON_LIB}"; then | ||
39 | + BUILD_PYTHON_LIB=python$PYTHON_VERSION | ||
40 | +fi | ||
63 | AC_SUBST(BUILD_PYTHON_SITE_PACKAGES) | 41 | AC_SUBST(BUILD_PYTHON_SITE_PACKAGES) |
64 | AC_SUBST(BUILD_PYTHON_INC) | 42 | |
65 | AC_SUBST(BUILD_PYTHON_LIB) | 43 | # Eval two times to expand fully. First eval replaces $exec_prefix into $prefix |
44 | -- | ||
45 | 2.17.1 | ||
46 | |||