diff mbox series

[oe,meta-oe,20/23] liblightmodbus: Fix packaging errors when using multilib

Message ID 20191221000635.1573390-20-raj.khem@gmail.com
State Accepted
Commit 52394379815d84febff28f0de0fb6ab291351122
Headers show
Series [oe,meta-networking,01/23] cannelloni: Update to latest and fix multilib builds | expand

Commit Message

Khem Raj Dec. 21, 2019, 12:06 a.m. UTC
Fixes
ERROR: liblightmodbus-2.0.2-r0 do_package: QA Issue: liblightmodbus: Files/directories were installed but not shipped in any package:
  /usr/lib
  /usr/lib/liblightmodbus.a

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 ...tallDirs-instead-of-hardcoding-lib-p.patch | 37 +++++++++++++++++++
 .../liblightmodbus/liblightmodbus_2.0.2.bb    |  4 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-extended/liblightmodbus/liblightmodbus/0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch

-- 
2.24.1

-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel
diff mbox series

Patch

diff --git a/meta-oe/recipes-extended/liblightmodbus/liblightmodbus/0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch b/meta-oe/recipes-extended/liblightmodbus/liblightmodbus/0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch
new file mode 100644
index 0000000000..321b41289d
--- /dev/null
+++ b/meta-oe/recipes-extended/liblightmodbus/liblightmodbus/0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch
@@ -0,0 +1,37 @@ 
+From 066c49158a71ea77598c9e1ae16bba63d6ac6bb5 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 19 Dec 2019 23:41:35 -0800
+Subject: [PATCH] cmake: Use GNUInstallDirs instead of hardcoding lib path
+
+Upstream-Status: Submitted [https://github.com/Jacajack/liblightmodbus/pull/12]
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ CMakeLists.txt | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index ce6cc88..bee83aa 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -242,14 +242,14 @@ if ( DEFINED AVR )
+ 	)
+ endif( )
+ 
+-
++include(GNUInstallDirs)
+ #Installation
+ install( 
+ 	TARGETS lightmodbus
+-	ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/"
++	ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/"
+ )
+ 
+ #Install headers
+ install(
+ 	DIRECTORY "${CMAKE_SOURCE_DIR}/include/" DESTINATION "${CMAKE_INSTALL_PREFIX}/include/" FILES_MATCHING PATTERN "*.h"
+-)
+\ No newline at end of file
++)
+-- 
+2.24.1
+
diff --git a/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb b/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb
index 1e35f08c0f..7fc5997983 100644
--- a/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb
+++ b/meta-oe/recipes-extended/liblightmodbus/liblightmodbus_2.0.2.bb
@@ -7,7 +7,9 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=84dcc94da3adb52b53ae4fa38fe49e5d"
 
 inherit cmake pkgconfig
 
-SRC_URI = "git://github.com/Jacajack/liblightmodbus.git;protocol=https"
+SRC_URI = "git://github.com/Jacajack/liblightmodbus.git;protocol=https \
+           file://0001-cmake-Use-GNUInstallDirs-instead-of-hardcoding-lib-p.patch \
+          "
 SRCREV = "59d2b405f95701e5b04326589786dbb43ce49e81"
 
 S = "${WORKDIR}/git"