summaryrefslogtreecommitdiffstats
path: root/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch')
-rw-r--r--recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch129
1 files changed, 129 insertions, 0 deletions
diff --git a/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch b/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch
new file mode 100644
index 00000000..f9c53406
--- /dev/null
+++ b/recipes-extended/ceph/ceph/0001-ceph-add-pybind-support-in-OE.patch
@@ -0,0 +1,129 @@
1From 00d44940c2e83bf73101a05d2aa8f88c2e2fca58 Mon Sep 17 00:00:00 2001
2From: Dengke Du <dengke.du@windriver.com>
3Date: Tue, 23 Oct 2018 15:34:53 +0800
4Subject: [PATCH] ceph: add pybind support in OE
5
61. add sysroot to CFLAGS when cross compiling pybind
72. change the pybind's INSTALL path to OE's INSTALL path
83. delete the check for header files, because the check method using
9 host compiler.
10
11Signed-off-by: Dengke Du <dengke.du@windriver.com>
12Upstream-Status: Inappropriate [oe specific]
13---
14 cmake/modules/Distutils.cmake | 12 +++---------
15 src/pybind/cephfs/setup.py | 8 --------
16 src/pybind/rados/setup.py | 8 --------
17 src/pybind/rbd/setup.py | 8 --------
18 src/pybind/rgw/setup.py | 8 --------
19 5 files changed, 3 insertions(+), 41 deletions(-)
20
21diff --git a/cmake/modules/Distutils.cmake b/cmake/modules/Distutils.cmake
22index d6e9f38..3091d97 100644
23--- a/cmake/modules/Distutils.cmake
24+++ b/cmake/modules/Distutils.cmake
25@@ -47,7 +47,7 @@ function(distutils_add_cython_module name src)
26 LDFLAGS=-L${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
27 CYTHON_BUILD_DIR=${CMAKE_CURRENT_BINARY_DIR}
28 CEPH_LIBDIR=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
29- CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include -w\"
30+ CFLAGS=\"-iquote${CMAKE_SOURCE_DIR}/src/include -w --sysroot=${CMAKE_SYSROOT}\"
31 ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
32 build --verbose --build-base ${CYTHON_MODULE_DIR}
33 --build-platlib ${CYTHON_MODULE_DIR}/lib.${PYTHON${PYTHON_VERSION}_VERSION_MAJOR}
34@@ -69,14 +69,8 @@ function(distutils_install_cython_module name)
35 set(ENV{CEPH_LIBDIR} \"${CMAKE_LIBRARY_OUTPUT_DIRECTORY}\")
36
37 set(options --prefix=${CMAKE_INSTALL_PREFIX})
38- if(DEFINED ENV{DESTDIR})
39- if(EXISTS /etc/debian_version)
40- list(APPEND options --install-layout=deb)
41- endif()
42- list(APPEND options --root=\$ENV{DESTDIR})
43- else()
44- list(APPEND options --root=/)
45- endif()
46+ list(APPEND options --root=${CMAKE_DESTDIR})
47+ list(APPEND options --install-lib=${PYTHON_SITEPACKAGES_DIR})
48 execute_process(
49 COMMAND
50 ${PYTHON${PYTHON_VERSION}_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/setup.py
51diff --git a/src/pybind/cephfs/setup.py b/src/pybind/cephfs/setup.py
52index 6533f41..1ee4a59 100755
53--- a/src/pybind/cephfs/setup.py
54+++ b/src/pybind/cephfs/setup.py
55@@ -121,14 +121,6 @@ def check_sanity():
56 finally:
57 shutil.rmtree(tmp_dir)
58
59-
60-if 'BUILD_DOC' in os.environ.keys():
61- pass
62-elif check_sanity():
63- pass
64-else:
65- sys.exit(1)
66-
67 cmdclass = {}
68 try:
69 from Cython.Build import cythonize
70diff --git a/src/pybind/rados/setup.py b/src/pybind/rados/setup.py
71index ef7c307..5204017 100755
72--- a/src/pybind/rados/setup.py
73+++ b/src/pybind/rados/setup.py
74@@ -117,14 +117,6 @@ def check_sanity():
75 finally:
76 shutil.rmtree(tmp_dir)
77
78-
79-if 'BUILD_DOC' in os.environ.keys():
80- pass
81-elif check_sanity():
82- pass
83-else:
84- sys.exit(1)
85-
86 cmdclass = {}
87 try:
88 from Cython.Build import cythonize
89diff --git a/src/pybind/rbd/setup.py b/src/pybind/rbd/setup.py
90index bcf96f2..d4cbbeb 100755
91--- a/src/pybind/rbd/setup.py
92+++ b/src/pybind/rbd/setup.py
93@@ -120,14 +120,6 @@ def check_sanity():
94 finally:
95 shutil.rmtree(tmp_dir)
96
97-
98-if 'BUILD_DOC' in os.environ.keys():
99- pass
100-elif check_sanity():
101- pass
102-else:
103- sys.exit(1)
104-
105 cmdclass = {}
106 try:
107 from Cython.Build import cythonize
108diff --git a/src/pybind/rgw/setup.py b/src/pybind/rgw/setup.py
109index f14f30c..ee7570b 100755
110--- a/src/pybind/rgw/setup.py
111+++ b/src/pybind/rgw/setup.py
112@@ -120,14 +120,6 @@ def check_sanity():
113 finally:
114 shutil.rmtree(tmp_dir)
115
116-
117-if 'BUILD_DOC' in os.environ.keys():
118- pass
119-elif check_sanity():
120- pass
121-else:
122- sys.exit(1)
123-
124 cmdclass = {}
125 try:
126 from Cython.Build import cythonize
127--
1282.7.4
129