All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lei Maohui <leimaohui@cn.fujitsu.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: [meta-oe][PATCH 3/8] cmpi-bindings: add new recipe for openlmi
Date: Fri, 26 Jun 2015 16:23:25 +0800	[thread overview]
Message-ID: <1435307010-34957-4-git-send-email-leimaohui@cn.fujitsu.com> (raw)
In-Reply-To: <1435307010-34957-1-git-send-email-leimaohui@cn.fujitsu.com>

Cmpi-bindings is the dependence of openlmi.

Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
 .../cmpi-bindings/0001-Fix-error.patch             | 26 +++++++++++++
 .../cmpi-bindings/0001-Modify-cmakelist.patch      | 41 ++++++++++++++++++++
 .../cmpi-bindings-0.4.17-no-ruby-perl.patch        | 44 ++++++++++++++++++++++
 .../cmpi-bindings-0.4.17-sblim-sigsegv.patch       | 22 +++++++++++
 .../cmpi-bindings-0.9.5-python-lib-dir.patch       | 17 +++++++++
 .../cmpi-bindings/cmpi-bindings_git.bb             | 31 +++++++++++++++
 6 files changed, 181 insertions(+)
 create mode 100644 meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Fix-error.patch
 create mode 100644 meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Modify-cmakelist.patch
 create mode 100644 meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-no-ruby-perl.patch
 create mode 100644 meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-sblim-sigsegv.patch
 create mode 100644 meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.9.5-python-lib-dir.patch
 create mode 100644 meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb

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 0000000..d1a303c
--- /dev/null
+++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Fix-error.patch
@@ -0,0 +1,26 @@
+From b8e791ce93a467081fb1594b91841e2f57c634a0 Mon Sep 17 00:00:00 2001
+From: Qian Lei <qianl.fnst@cn.fujitsu.com>
+Date: Fri, 16 Jan 2015 18:37:26 +0800
+Subject: [PATCH] Fix error
+
+Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
+---
+ swig/python/CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt
+index 3976296..8073fc8 100644
+--- a/swig/python/CMakeLists.txt
++++ b/swig/python/CMakeLists.txt
+@@ -27,7 +27,7 @@ SET( SWIG_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/../cmpi.i" )
+ ADD_CUSTOM_COMMAND (
+    OUTPUT  ${SWIG_OUTPUT}
+    COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for Python ..."
+-   COMMAND ${SWIG_EXECUTABLE} -python -Wall -threads -features autodoc -o ${SWIG_OUTPUT} -outdir ${CMAKE_CURRENT_BINARY_DIR} -I/usr/include ${SWIG_INPUT}
++   COMMAND ${SWIG_EXECUTABLE} -python -Wall -threads -features autodoc -o ${SWIG_OUTPUT} -outdir ${CMAKE_CURRENT_BINARY_DIR} -I$ENV{STAGING_INCDIR} ${SWIG_INPUT}
+    COMMAND ${CMAKE_COMMAND} -E echo "Done."
+    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i
+-- 
+1.8.3.1
+
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 0000000..92e5e56
--- /dev/null
+++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/0001-Modify-cmakelist.patch
@@ -0,0 +1,41 @@
+From 070822507befe7c1b8bb1be2d36cb12141d03b8f Mon Sep 17 00:00:00 2001
+From: Qian Lei <qianl.fnst@cn.fujitsu.com>
+Date: Tue, 6 Jan 2015 18:38:32 +0800
+Subject: [PATCH] Change the install path in cmakelist
+
+Upstream-Status: Pending
+Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
+---
+ swig/python/CMakeLists.txt | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/swig/python/CMakeLists.txt b/swig/python/CMakeLists.txt
+index 3976296..93c87c1 100644
+--- a/swig/python/CMakeLists.txt
++++ b/swig/python/CMakeLists.txt
+@@ -56,18 +56,18 @@ TARGET_LINK_LIBRARIES( ${NAME} util )
+ 
+ INSTALL(TARGETS ${NAME} LIBRARY DESTINATION ${CMPI_LIBRARY_DIR})
+ # .py: swig generated
+-INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmpi.py DESTINATION ${PYTHON_SITE_DIR} )
++INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/cmpi.py DESTINATION $ENV{ENV_INSTALL_PATH} )
+ 
+ 
+ #
+ # cmpi_pywbem_bindings.py: provider implementation
+ #
+-INSTALL(FILES cmpi_pywbem_bindings.py DESTINATION ${PYTHON_SITE_DIR} )
++INSTALL(FILES cmpi_pywbem_bindings.py DESTINATION $ENV{ENV_INSTALL_PATH} )
+ #INSTALL(FILES Py_UnixProcessProvider.py DESTINATION /usr/lib/pycim )
+ 
+-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')\")")
++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')\")")
+ 
+-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')\")")
++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')\")")
+ 
+ 
+ 
+-- 
+1.8.3.1
+
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 0000000..a586dbd
--- /dev/null
+++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-no-ruby-perl.patch
@@ -0,0 +1,44 @@
+Port from Fedora20
+
+Upstream-Status: Pending
+Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
+
+diff -up cmpi-bindings-0.5.2/swig/CMakeLists.txt.orig cmpi-bindings-0.5.2/swig/CMakeLists.txt
+--- cmpi-bindings-0.5.2/swig/CMakeLists.txt.orig	2012-05-04 15:47:18.000000000 +0200
++++ cmpi-bindings-0.5.2/swig/CMakeLists.txt	2012-05-07 09:59:33.639648918 +0200
+@@ -4,12 +4,12 @@
+ 
+ enable_testing()
+ 
+-FIND_PACKAGE(Ruby)
+-IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+-  MESSAGE(STATUS "Building Ruby...")
+-  ADD_SUBDIRECTORY(ruby)
+-  OPTION( BUILD_RUBY_GEM "Build Ruby GEM" YES )
+-ENDIF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
++#FIND_PACKAGE(Ruby)
++#IF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
++#  MESSAGE(STATUS "Building Ruby...")
++#  ADD_SUBDIRECTORY(ruby)
++#  OPTION( BUILD_RUBY_GEM "Build Ruby GEM" YES )
++#ENDIF (RUBY_LIBRARY AND RUBY_INCLUDE_PATH)
+ 
+ FIND_PACKAGE(PythonLibs)
+ IF (PYTHON_LIBRARY)
+@@ -22,9 +22,9 @@ IF (PYTHON_LIBRARY)
+   ENDIF (PYTHON_LINK_LIBS)
+ ENDIF (PYTHON_LIBRARY)
+ 
+-FIND_PACKAGE(Perl)
+-IF (PERL_EXECUTABLE)
+-  MESSAGE(STATUS "Building Perl...")
+-  ADD_SUBDIRECTORY(perl)
+-ENDIF (PERL_EXECUTABLE)
+-    
+\ No newline at end of file
++#FIND_PACKAGE(Perl)
++#IF (PERL_EXECUTABLE)
++#  MESSAGE(STATUS "Building Perl...")
++#  ADD_SUBDIRECTORY(perl)
++#ENDIF (PERL_EXECUTABLE)
++    
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 0000000..b993372
--- /dev/null
+++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.4.17-sblim-sigsegv.patch
@@ -0,0 +1,22 @@
+Port from Fedora20
+
+Upstream-Status: Pending
+Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
+
+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
+--- cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py.orig	2012-03-01 17:05:31.878367281 +0100
++++ cmpi-bindings-0.4.17/swig/python/cmpi_pywbem_bindings.py	2012-03-01 17:06:34.718110137 +0100
+@@ -350,10 +350,10 @@ class BrokerCIMOMHandle(object):
+             allow_null_ns = False
+         else:
+             allow_null_ns = True
+-            if self.broker.name() == 'RequestHandler':
++#            if self.broker.name() == 'RequestHandler':
+                 # Check sblim bug #2185410.
+-                if instance.path is not None:
+-                    instance.path.namespace = None
++#                if instance.path is not None:
++#                    instance.path.namespace = None
+         inst = self.proxy.pywbem2cmpi_inst(instance, allow_null_ns)
+         rv = self.broker.deliverIndication(self.ctx, ns, inst)
+         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 0000000..b6a51ec
--- /dev/null
+++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings/cmpi-bindings-0.9.5-python-lib-dir.patch
@@ -0,0 +1,17 @@
+Port from Fedora20
+
+Upstream-Status: Pending
+Signed-off-by: Qian Lei <qianl.fnst@cn.fujitsu.com>
+
+diff -up cmpi-bindings-0.9.5/swig/python/CMakeLists.txt.old cmpi-bindings-0.9.5/swig/python/CMakeLists.txt
+--- cmpi-bindings-0.9.5/swig/python/CMakeLists.txt.old	2013-08-06 15:57:03.576285764 +0200
++++ cmpi-bindings-0.9.5/swig/python/CMakeLists.txt	2013-08-06 15:57:14.891345941 +0200
+@@ -9,7 +9,7 @@ SET (BUILD_SHARED_LIBS ON)
+ 
+ FIND_PACKAGE(PythonInterp REQUIRED)
+ 
+-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)
++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)
+ 
+ IF (NOT PYTHON_SITE_DIR)
+   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 0000000..7e3859b
--- /dev/null
+++ b/meta-oe/recipes-extended/cmpi-bindings/cmpi-bindings_git.bb
@@ -0,0 +1,31 @@
+SUMMARY = "Adapter to write and run CMPI-type CIM providers"
+DESCRIPTION = "CMPI-compliant provider interface for various languages via SWIG"
+HOMEPAGE = "http://github.com/kkaempf/cmpi-bindings"
+LICENSE = "BSD"
+LIC_FILES_CHKSUM = "file://COPYING;md5=b19ee058d2d5f69af45da98051d91064"
+SECTION = "Development/Libraries"
+DEPENDS = "swig-native python sblim-cmpi-devel"
+
+SRC_URI = "git://github.com/kkaempf/cmpi-bindings.git;protocol=http \
+           file://cmpi-bindings-0.4.17-no-ruby-perl.patch \
+           file://cmpi-bindings-0.4.17-sblim-sigsegv.patch \
+           file://cmpi-bindings-0.9.5-python-lib-dir.patch \
+           file://0001-Modify-cmakelist.patch \
+           file://0001-Fix-error.patch"
+SRCREV = "93b6044f53bcfa79253d7af51a9c23ddd73f8486"
+S = "${WORKDIR}/git"
+
+inherit cmake pythonnative
+
+EXTRA_OECMAKE = "-DLIB='${baselib}'"
+
+do_configure_prepend() {
+    export HOST_SYS=${HOST_SYS}
+    export BUILD_SYS=${BUILD_SYS}
+    export STAGING_LIBDIR=${STAGING_LIBDIR}
+    export STAGING_INCDIR=${STAGING_INCDIR}
+    export ENV_INSTALL_PATH=${PYTHON_SITEPACKAGES_DIR}
+}
+
+FILES_${PN} =+"${libdir}/cmpi/libpyCmpiProvider.so ${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dbg =+ "${libdir}/cmpi/.debug/libpyCmpiProvider.so"
-- 
1.8.4.2



  parent reply	other threads:[~2015-06-26  8:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-26  8:23 [meta-oe][PATCH 0/8] add openlmi and it's depends Lei Maohui
2015-06-26  8:23 ` [meta-oe][PATCH 1/8] openlmi: add new recipe openlmi Lei Maohui
2015-06-26  8:23 ` [meta-oe][PATCH 2/8] cim-schema-exper: add new recipe for openlmi Lei Maohui
2015-06-26  8:23 ` Lei Maohui [this message]
2015-06-26  8:23 ` [meta-oe][PATCH 4/8] konkretcmpi:add " Lei Maohui
2015-06-26  8:23 ` [meta-oe][PATCH 5/8] sblim-sfcb: add " Lei Maohui
2015-06-26  8:23 ` [meta-oe][PATCH 6/8] sblim-sfcCommon: add new recipe Lei Maohui
2015-06-26  8:23 ` [meta-oe][PATCH 7/8] sblim-cmpi-devel: " Lei Maohui
2015-06-26  8:23 ` [meta-oe][PATCH 8/8] cim-schema_2.40.0.bb: delete Lei Maohui

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435307010-34957-4-git-send-email-leimaohui@cn.fujitsu.com \
    --to=leimaohui@cn.fujitsu.com \
    --cc=openembedded-devel@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.