summaryrefslogtreecommitdiffstats
path: root/external/meta-iot-cloud/recipes-azure/azure-uamqp-c
diff options
context:
space:
mode:
Diffstat (limited to 'external/meta-iot-cloud/recipes-azure/azure-uamqp-c')
-rw-r--r--external/meta-iot-cloud/recipes-azure/azure-uamqp-c/azure-uamqp-c.inc30
-rw-r--r--external/meta-iot-cloud/recipes-azure/azure-uamqp-c/azure-uamqp-c_1.2.12.bb14
-rw-r--r--external/meta-iot-cloud/recipes-azure/azure-uamqp-c/files/Fix-packaging-issues.patch42
3 files changed, 86 insertions, 0 deletions
diff --git a/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/azure-uamqp-c.inc b/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/azure-uamqp-c.inc
new file mode 100644
index 00000000..8636ba20
--- /dev/null
+++ b/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/azure-uamqp-c.inc
@@ -0,0 +1,30 @@
+inherit cmake
+
+DEPENDS = "\
+ azure-c-shared-utility \
+ azure-macro-utils-c \
+ umock-c \
+"
+
+SRC_URI += "\
+ file://Fix-packaging-issues.patch \
+"
+
+S = "${WORKDIR}/git"
+B = "${WORKDIR}/build"
+
+EXTRA_OECMAKE = "\
+ -DBUILD_SHARED_LIBS:BOOL=ON \
+ -Dskip_samples:BOOL=ON \
+ -Duse_installed_dependencies:BOOL=ON \
+"
+
+sysroot_stage_all_append () {
+ sysroot_stage_dir ${D}${exec_prefix}/cmake ${SYSROOT_DESTDIR}${exec_prefix}/cmake
+}
+
+FILES_${PN}-dev += "\
+ ${exec_prefix}/cmake \
+"
+
+BBCLASSEXTEND = "native nativesdk"
diff --git a/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/azure-uamqp-c_1.2.12.bb b/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/azure-uamqp-c_1.2.12.bb
new file mode 100644
index 00000000..48333dbc
--- /dev/null
+++ b/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/azure-uamqp-c_1.2.12.bb
@@ -0,0 +1,14 @@
+DESCRIPTION = "uAMQP is a general purpose C library for AMQP"
+AUTHOR = "Microsoft Corporation"
+HOMEPAGE = "https://github.com/Azure/azure-uamqp-c"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=4283671594edec4c13aeb073c219237a"
+
+SRC_URI = "\
+ git://github.com/Azure/azure-uamqp-c.git \
+"
+SRCREV = "142cfab9d66c6f81ea0cceb635f31e00cfa51c77"
+
+PR = "r0"
+
+include ${BPN}.inc
diff --git a/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/files/Fix-packaging-issues.patch b/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/files/Fix-packaging-issues.patch
new file mode 100644
index 00000000..415987d0
--- /dev/null
+++ b/external/meta-iot-cloud/recipes-azure/azure-uamqp-c/files/Fix-packaging-issues.patch
@@ -0,0 +1,42 @@
+From 2124dbef79f97e785a3cc75acf636e20e0845661 Mon Sep 17 00:00:00 2001
+From: Scott Ware <scott.r.ware@intel.com>
+Date: Thu, 8 Nov 2018 12:34:23 +0000
+Subject: [PATCH] Fix packaging issues
+
+Signed-off-by: Scott Ware <scott.r.ware@intel.com>
+---
+ CMakeLists.txt | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 96a2692..46ba016 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -6,6 +6,9 @@ project(uamqp)
+
+ FILE(READ ${CMAKE_CURRENT_LIST_DIR}/version.txt UAMQP_VERSION)
+
++set(GENERIC_LIB_VERSION ${UAMQP_VERSION})
++string(SUBSTRING ${UAMQP_VERSION} 0 1 GENERIC_LIB_SOVERSION)
++
+ option(run_e2e_tests "set run_e2e_tests to ON to run e2e tests (default is OFF) [if possible, they are always built]" OFF)
+ option(run_unittests "set run_unittests to ON to run unittests (default is OFF)" OFF)
+ option(skip_samples "set skip_samples to ON to skip building samples (default is OFF)[if possible, they are always built]" OFF)
+@@ -247,6 +250,14 @@ setTargetBuildProperties(uamqp)
+
+ target_link_libraries(uamqp aziotsharedutil)
+
++if (NOT WIN32)
++ set_target_properties(uamqp
++ PROPERTIES
++ VERSION ${GENERIC_LIB_VERSION}
++ SOVERSION ${GENERIC_LIB_SOVERSION}
++ )
++endif()
++
+ if (NOT ${skip_samples})
+ add_subdirectory(samples)
+ endif()
+--
+2.7.4
+