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