diff options
| author | leimaohui <leimaohui@cn.fujitsu.com> | 2015-08-25 13:19:51 +0800 |
|---|---|---|
| committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-08-31 19:11:11 +0200 |
| commit | d21a985c480104ad798afe217c4fee0506c492dc (patch) | |
| tree | 9c5c7e010727a7dcdcdbb4523e2eb976eabc6c3e /meta-oe/recipes-extended/cmpi-bindings | |
| parent | 985fca448f2593f5e5aeba07656eb8f2dad60183 (diff) | |
| download | meta-openembedded-d21a985c480104ad798afe217c4fee0506c492dc.tar.gz | |
cmpi-bindings: add new recipe
Cmpi-bindings is the dependence of openlmi.
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-extended/cmpi-bindings')
7 files changed, 221 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Fix-error.patch b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Fix-error.patch new file mode 100644 index 0000000000..d1a303cf4f --- /dev/null +++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Fix-error.patch | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | From b8e791ce93a467081fb1594b91841e2f57c634a0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 3 | Date: Fri, 16 Jan 2015 18:37:26 +0800 | ||
| 4 | Subject: [PATCH] Fix error | ||
| 5 | |||
| 6 | Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 7 | --- | ||
| 8 | swig/python/CMakeLists.txt | 2 +- | ||
| 9 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt | ||
| 12 | index 3976296..8073fc8 100644 | ||
| 13 | --- a/swig/python/CMakeLists.txt | ||
| 14 | +++ b/swig/python/CMakeLists.txt | ||
| 15 | @@ -27,7 +27,7 @@ SET( SWIG_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/../cmpi.i" ) | ||
| 16 | ADD_CUSTOM_COMMAND ( | ||
| 17 | OUTPUT ${SWIG_OUTPUT} | ||
| 18 | COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for Python ..." | ||
| 19 | - COMMAND ${SWIG_EXECUTABLE} -python -Wall -threads -features autodoc -o ${SWIG_OUTPUT} -outdir ${CMAKE_CURRENT_BINARY_DIR} -I/usr/include ${SWIG_INPUT} | ||
| 20 | + COMMAND ${SWIG_EXECUTABLE} -python -Wall -threads -features autodoc -o ${SWIG_OUTPUT} -outdir ${CMAKE_CURRENT_BINARY_DIR} -I$ENV{STAGING_INCDIR} ${SWIG_INPUT} | ||
| 21 | COMMAND ${CMAKE_COMMAND} -E echo "Done." | ||
| 22 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} | ||
| 23 | DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i | ||
| 24 | -- | ||
| 25 | 1.8.3.1 | ||
| 26 | |||
diff --git a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Modify-cmakelist.patch b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Modify-cmakelist.patch new file mode 100644 index 0000000000..92e5e5662e --- /dev/null +++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Modify-cmakelist.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 1 | From 070822507befe7c1b8bb1be2d36cb12141d03b8f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 3 | Date: Tue, 6 Jan 2015 18:38:32 +0800 | ||
| 4 | Subject: [PATCH] Change the install path in cmakelist | ||
| 5 | |||
| 6 | Upstream-Status: Pending | ||
| 7 | Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 8 | --- | ||
| 9 | swig/python/CMakeLists.txt | 8 ++++---- | ||
| 10 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
| 11 | |||
| 12 | diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt | ||
| 13 | index 3976296..93c87c1 100644 | ||
| 14 | --- a/swig/python/CMakeLists.txt | ||
| 15 | +++ b/swig/python/CMakeLists.txt | ||
| 16 | @@ -56,18 +56,18 @@ TARGET_LINK_LIBRARIES( ${NAME} util ) | ||
| 17 | |||
| 18 | INSTALL(TARGETS ${NAME} LIBRARY DESTINATION ${CMPI_LIBRARY_DIR}) | ||
| 19 | # .py: swig generated | ||
| 20 | -INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmpi.py DESTINATION ${PYTHON_SITE_DIR} ) | ||
| 21 | +INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmpi.py DESTINATION $ENV{ENV_INSTALL_PATH} ) | ||
| 22 | |||
| 23 | |||
| 24 | # | ||
| 25 | # cmpi_pywbem_bindings.py: provider implementation | ||
| 26 | # | ||
| 27 | -INSTALL(FILES cmpi_pywbem_bindings.py DESTINATION ${PYTHON_SITE_DIR} ) | ||
| 28 | +INSTALL(FILES cmpi_pywbem_bindings.py DESTINATION $ENV{ENV_INSTALL_PATH} ) | ||
| 29 | #INSTALL(FILES Py_UnixProcessProvider.py DESTINATION /usr/lib/pycim ) | ||
| 30 | |||
| 31 | -INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"from py_compile import compile; compile('\$ENV{DESTDIR}${PYTHON_SITE_DIR}/cmpi.py', dfile='${PYTHON_SITE_DIR}/cmpi.py')\")") | ||
| 32 | +INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"from py_compile import compile; compile('\$ENV{DESTDIR}$ENV{ENV_INSTALL_PATH}/cmpi.py', dfile='\$ENV{ENV_INSTALL_PATH}/cmpi.py')\")") | ||
| 33 | |||
| 34 | -INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"from py_compile import compile; compile('\$ENV{DESTDIR}${PYTHON_SITE_DIR}/cmpi_pywbem_bindings.py', dfile='${PYTHON_SITE_DIR}/cmpi_pywbem_bindings.py')\")") | ||
| 35 | +INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"from py_compile import compile; compile('\$ENV{DESTDIR}$ENV{ENV_INSTALL_PATH}/cmpi_pywbem_bindings.py', dfile='$ENV{ENV_INSTALL_PATH}/cmpi_pywbem_bindings.py')\")") | ||
| 36 | |||
| 37 | |||
| 38 | |||
| 39 | -- | ||
| 40 | 1.8.3.1 | ||
| 41 | |||
diff --git a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-fix-the-build-error-when-python-3.0.patch b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-fix-the-build-error-when-python-3.0.patch new file mode 100644 index 0000000000..0d6f029e4c --- /dev/null +++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-fix-the-build-error-when-python-3.0.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From 323ced03a66e6cd963d8277b66cfcc7dce740be7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 3 | Date: Fri, 17 Jul 2015 01:33:43 -0700 | ||
| 4 | Subject: [PATCH] fix Xthe build error when python>3.0 | ||
| 5 | |||
| 6 | Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 7 | --- | ||
| 8 | src/target_python.c | 7 ++++++- | ||
| 9 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
| 10 | |||
| 11 | diff --git a/src/target_python.c b/src/target_python.c | ||
| 12 | index 90b43a1..2b76c9e 100644 | ||
| 13 | --- a/src/target_python.c | ||
| 14 | +++ b/src/target_python.c | ||
| 15 | @@ -167,7 +167,12 @@ PyGlobalInitialize(const CMPIBroker* broker, CMPIStatus* st) | ||
| 16 | |||
| 17 | Py_SetProgramName("cmpi_swig"); | ||
| 18 | Py_Initialize(); | ||
| 19 | - SWIGEXPORT void SWIG_init(void); | ||
| 20 | +#if PY_VERSION_HEX >= 0x03000000 | ||
| 21 | +SWIGEXPORT PyObject* | ||
| 22 | +#else | ||
| 23 | + SWIGEXPORT void | ||
| 24 | +#endif | ||
| 25 | + SWIG_init(void); | ||
| 26 | SWIG_init(); | ||
| 27 | cmpiMainPyThreadState = PyGILState_GetThisThreadState(); | ||
| 28 | PyEval_ReleaseThread(cmpiMainPyThreadState); | ||
| 29 | -- | ||
| 30 | 2.1.0 | ||
| 31 | |||
diff --git a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-no-ruby-perl.patch b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-no-ruby-perl.patch new file mode 100644 index 0000000000..2072da72b5 --- /dev/null +++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-no-ruby-perl.patch | |||
| @@ -0,0 +1,47 @@ | |||
| 1 | From 7dd01e33f9dac75f177113de9a8ff458d4263a11 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lei Maohui <leimaohui@cn.fujitsu.com> | ||
| 3 | Date: Mon, 24 Aug 2015 11:00:13 +0900 | ||
| 4 | Subject: [PATCH] cmpi-bindings-0.4.17 no ruby perl | ||
| 5 | |||
| 6 | Port from Fedora20 | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 10 | --- | ||
| 11 | swig/CMakeLists.txt | 22 +++++++++++----------- | ||
| 12 | 1 file changed, 11 insertions(+), 11 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt | ||
| 15 | index 8b5555c..c2655b9 100644 | ||
| 16 | --- a/swig/CMakeLists.txt | ||
| 17 | +++ b/swig/CMakeLists.txt | ||
| 18 | @@ -15,15 +15,15 @@ IF (PYTHON_LIBRARY) | ||
| 19 | ENDIF (PYTHON_LINK_LIBS) | ||
| 20 | ENDIF (PYTHON_LIBRARY) | ||
| 21 | |||
| 22 | -FIND_PACKAGE(Perl) | ||
| 23 | -IF (PERL_EXECUTABLE) | ||
| 24 | - MESSAGE(STATUS "Building Perl...") | ||
| 25 | - ADD_SUBDIRECTORY(perl) | ||
| 26 | -ENDIF (PERL_EXECUTABLE) | ||
| 27 | +#FIND_PACKAGE(Perl) | ||
| 28 | +#IF (PERL_EXECUTABLE) | ||
| 29 | +# MESSAGE(STATUS "Building Perl...") | ||
| 30 | +# ADD_SUBDIRECTORY(perl) | ||
| 31 | +#ENDIF (PERL_EXECUTABLE) | ||
| 32 | |||
| 33 | -FIND_PACKAGE(Ruby) | ||
| 34 | -IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) | ||
| 35 | - MESSAGE(STATUS "Building Ruby...") | ||
| 36 | - ADD_SUBDIRECTORY(ruby) | ||
| 37 | - OPTION( BUILD_RUBY_GEM "Build Ruby GEM" YES ) | ||
| 38 | -ENDIF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) | ||
| 39 | +#FIND_PACKAGE(Ruby) | ||
| 40 | +#IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) | ||
| 41 | +# MESSAGE(STATUS "Building Ruby...") | ||
| 42 | +# ADD_SUBDIRECTORY(ruby) | ||
| 43 | +# OPTION( BUILD_RUBY_GEM "Build Ruby GEM" YES ) | ||
| 44 | +#ENDIF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH) | ||
| 45 | -- | ||
| 46 | 1.8.4.2 | ||
| 47 | |||
diff --git a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-sblim-sigsegv.patch b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-sblim-sigsegv.patch new file mode 100644 index 0000000000..b99337204d --- /dev/null +++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-sblim-sigsegv.patch | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | Port from Fedora20 | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 5 | |||
| 6 | diff -up cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py.orig cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py | ||
| 7 | --- cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py.orig 2012-03-01 17:05:31.878367281 +0100 | ||
| 8 | +++ cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py 2012-03-01 17:06:34.718110137 +0100 | ||
| 9 | @@ -350,10 +350,10 @@ class BrokerCIMOMHandle(object): | ||
| 10 | allow_null_ns = False | ||
| 11 | else: | ||
| 12 | allow_null_ns = True | ||
| 13 | - if self.broker.name() == 'RequestHandler': | ||
| 14 | +# if self.broker.name() == 'RequestHandler': | ||
| 15 | # Check sblim bug #2185410. | ||
| 16 | - if instance.path is not None: | ||
| 17 | - instance.path.namespace = None | ||
| 18 | +# if instance.path is not None: | ||
| 19 | +# instance.path.namespace = None | ||
| 20 | inst = self.proxy.pywbem2cmpi_inst(instance, allow_null_ns) | ||
| 21 | rv = self.broker.deliverIndication(self.ctx, ns, inst) | ||
| 22 | return rv | ||
diff --git a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.9.5-python-lib-dir.patch b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.9.5-python-lib-dir.patch new file mode 100644 index 0000000000..b6a51ec0d2 --- /dev/null +++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.9.5-python-lib-dir.patch | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | Port from Fedora20 | ||
| 2 | |||
| 3 | Upstream-Status: Pending | ||
| 4 | Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com> | ||
| 5 | |||
| 6 | diff -up cmpi-bindings-0.9.5/swig/python/CMakeLists.txt.old cmpi-bindings-0.9.5/swig/python/CMakeLists.txt | ||
| 7 | --- cmpi-bindings-0.9.5/swig/python/CMakeLists.txt.old 2013-08-06 15:57:03.576285764 +0200 | ||
| 8 | +++ cmpi-bindings-0.9.5/swig/python/CMakeLists.txt 2013-08-06 15:57:14.891345941 +0200 | ||
| 9 | @@ -9,7 +9,7 @@ SET (BUILD_SHARED_LIBS ON) | ||
| 10 | |||
| 11 | FIND_PACKAGE(PythonInterp REQUIRED) | ||
| 12 | |||
| 13 | -EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib())" OUTPUT_VARIABLE PYTHON_LIB_DIR) | ||
| 14 | +EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "from sys import stdout; from distutils import sysconfig; stdout.write(sysconfig.get_python_lib(1))" OUTPUT_VARIABLE PYTHON_LIB_DIR) | ||
| 15 | |||
| 16 | IF (NOT PYTHON_SITE_DIR) | ||
| 17 | SET (PYTHON_SITE_DIR ${PYTHON_LIB_DIR}) | ||
diff --git a/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb new file mode 100644 index 0000000000..a2747c3508 --- /dev/null +++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | SUMMARY = "Adapter to write and run CMPI-type CIM providers" | ||
| 2 | DESCRIPTION = "CMPI-compliant provider interface for various languages via SWIG" | ||
| 3 | HOMEPAGE = "http://github.com/kkaempf/cmpi-bindings" | ||
| 4 | LICENSE = "BSD" | ||
| 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b19ee058d2d5f69af45da98051d91064" | ||
| 6 | SECTION = "Development/Libraries" | ||
| 7 | DEPENDS = "swig-native python sblim-cmpi-devel" | ||
| 8 | |||
| 9 | SRC_URI = "git://github.com/kkaempf/cmpi-bindings.git;protocol=http \ | ||
| 10 | file://cmpi-bindings-0.4.17-no-ruby-perl.patch \ | ||
| 11 | file://cmpi-bindings-0.4.17-sblim-sigsegv.patch \ | ||
| 12 | file://cmpi-bindings-0.9.5-python-lib-dir.patch \ | ||
| 13 | file://0001-Modify-cmakelist.patch \ | ||
| 14 | file://0001-Fix-error.patch \ | ||
| 15 | file://0001-fix-the-build-error-when-python-3.0.patch \ | ||
| 16 | " | ||
| 17 | |||
| 18 | SRCREV = "62f60e065aa1b901f826e4f530c0573ae32d065e" | ||
| 19 | S = "${WORKDIR}/git" | ||
| 20 | |||
| 21 | inherit cmake pythonnative | ||
| 22 | |||
| 23 | EXTRA_OECMAKE = "-DLIB='${baselib}' \ | ||
| 24 | -DPYTHON_INCLUDE_PATH=${STAGING_INCDIR}/python${PYTHON_BASEVERSION}" | ||
| 25 | |||
| 26 | do_configure_prepend() { | ||
| 27 | export HOST_SYS=${HOST_SYS} | ||
| 28 | export BUILD_SYS=${BUILD_SYS} | ||
| 29 | export STAGING_LIBDIR=${STAGING_LIBDIR} | ||
| 30 | export STAGING_INCDIR=${STAGING_INCDIR} | ||
| 31 | export ENV_INSTALL_PATH=${PYTHON_SITEPACKAGES_DIR} | ||
| 32 | } | ||
| 33 | |||
| 34 | FILES_${PN} =+"${libdir}/cmpi/libpyCmpiProvider.so ${PYTHON_SITEPACKAGES_DIR}/*" | ||
| 35 | FILES_${PN}-dbg =+ "${libdir}/cmpi/.debug/libpyCmpiProvider.so" | ||
| 36 | |||
| 37 | BBCLASSEXTEND = "native" | ||
