[OE-core] [denzil 01/18 v2] Patch ocf-linux.inc to work with the 2010 and 2012 versions

Mark Hatle mark.hatle at windriver.com
Fri Feb 8 17:34:03 UTC 2013


From: dhall <dennis.hall at windriver.com>

The 2010 version of the ocf-linux package contains an embedded
tar file that has to be expanded.  The 2012 version of the package
comes with the contents of the tar file extracted in the source
tree.  This patch to ocf-linux.inc allows it to handle both versions.

Signed-off-by: dhall <dennis.hall at windriver.com>
Signed-off-by: Jeff Polk <jeff.polk at windriver.com>
Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
---
 meta/recipes-connectivity/openssl/ocf-linux.inc | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-connectivity/openssl/ocf-linux.inc b/meta/recipes-connectivity/openssl/ocf-linux.inc
index f4ec7c9..15a553a 100644
--- a/meta/recipes-connectivity/openssl/ocf-linux.inc
+++ b/meta/recipes-connectivity/openssl/ocf-linux.inc
@@ -9,6 +9,12 @@ SRC_URI = "http://sourceforge.net/projects/ocf-linux/files/ocf-linux/${PV}/ocf-l
 
 S = "${WORKDIR}/ocf-linux-${PV}"
 
+get_headers() {
+    if [ -f ocf-linux.tar.gz ]; then
+        tar xzf ocf-linux.tar.gz
+    fi
+}
+
 # Need to unpack the the ocf-linux.tar.gz file contained inside the
 # downloaded tarball
 # Install the OCF Linux headers so that other packages such as openssl
@@ -16,7 +22,10 @@ S = "${WORKDIR}/ocf-linux-${PV}"
 # the README file.
 do_install() {
     cd ${S}
-    tar xzf ocf-linux.tar.gz
+    # if ocf-linux.tar.gz exists extract the contents or else go to 
+    #    the next do_install step
+    # Added to maintain compatibility between the 2010 and 2012+ versions
+    get_headers
     install -d ${D}${includedir}/crypto
     install -m 0644 ${S}/ocf/*.h ${D}${includedir}/crypto/
 }
-- 
1.8.1.2.545.g2f19ada





More information about the Openembedded-core mailing list