[meta-oe] lmdb: use libprefix in Makefile to install libraries

Submitted by Sakib Sajal on Aug. 13, 2021, 4:17 p.m. | Patch ID: 180070

Details

Message ID 20210813161749.24182-1-sakib.sajal@windriver.com
State Superseded
Commit ae4d9e814f3aa3d2a4ab452227c321de1b51ee01
Headers show

Commit Message

Sakib Sajal Aug. 13, 2021, 4:17 p.m.
Makefile used libdir which had hardcoded "$(exec_prefix)/lib"
directory to install libraries. This is a problem for MULTILIB
builds as libraries are installed in "lib64" directory.
Hence use libprefix which contains the correct path for installing
libraries.

Upstream-Status: oe-specific

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
---
 ...file-use-libprefix-instead-of-libdir.patch | 33 +++++++++++++++++++
 meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb       |  5 +--
 2 files changed, 36 insertions(+), 2 deletions(-)
 create mode 100644 meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch

Patch hide | download patch | download mbox

diff --git a/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch
new file mode 100644
index 000000000..2e32d9c37
--- /dev/null
+++ b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch
@@ -0,0 +1,33 @@ 
+From 8d1d18f8ae4c3cd7ecdc79545f89459d1c9e4bfd Mon Sep 17 00:00:00 2001
+From: Sakib Sajal <sakib.sajal@windriver.com>
+Date: Fri, 13 Aug 2021 15:59:15 +0000
+Subject: [PATCH] Makefile: use libprefix instead of libdir
+
+libdir expands to "$(exec_prefix)/lib" where "lib" is hardcoded.
+This is a problem for builds that enable MULTILIB since libraries
+are to be installed in "lib64" directory. Hence allow the directory
+to be configurable.
+
+Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
+---
+ libraries/liblmdb/Makefile | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libraries/liblmdb/Makefile b/libraries/liblmdb/Makefile
+index f254511..1ec74e6 100644
+--- a/libraries/liblmdb/Makefile
++++ b/libraries/liblmdb/Makefile
+@@ -46,11 +46,11 @@ all:	$(ILIBS) $(PROGS)
+ 
+ install: $(ILIBS) $(IPROGS) $(IHDRS)
+ 	mkdir -p $(DESTDIR)$(bindir)
+-	mkdir -p $(DESTDIR)$(libdir)
++	mkdir -p $(DESTDIR)$(libprefix)
+ 	mkdir -p $(DESTDIR)$(includedir)
+ 	mkdir -p $(DESTDIR)$(mandir)/man1
+ 	for f in $(IPROGS); do cp $$f $(DESTDIR)$(bindir); done
+-	for f in $(ILIBS); do cp $$f $(DESTDIR)$(libdir); done
++	for f in $(ILIBS); do cp $$f $(DESTDIR)$(libprefix); done
+ 	for f in $(IHDRS); do cp $$f $(DESTDIR)$(includedir); done
+ 	for f in $(IDOCS); do cp $$f $(DESTDIR)$(mandir)/man1; done
+ 
diff --git a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
index 0746da141..3c6ffe04e 100644
--- a/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
+++ b/meta-oe/recipes-dbs/lmdb/lmdb_0.9.29.bb
@@ -10,7 +10,8 @@  LIC_FILES_CHKSUM = "file://LICENSE;md5=153d07ef052c4a37a8fac23bc6031972"
 
 SRC_URI = "git://github.com/LMDB/lmdb.git;nobranch=1 \
            file://run-ptest \
-"
+           file://0001-Makefile-use-libprefix-instead-of-libdir.patch \
+           "
 
 SRCREV = "LMDB_${PV}"
 
@@ -26,7 +27,7 @@  do_compile() {
 
 do_install() {
     oe_runmake CC="${CC}" DESTDIR="${D}" prefix="${prefix}" libprefix="${libdir}" manprefix="${mandir}" SOEXT=".so.${PV}" LDFLAGS="${LDFLAGS}" install
-    cd ${D}/${libdir}
+    cd ${D}${libdir}
     ln -s liblmdb.so.${PV} liblmdb.so
     rm liblmdb.a
 }

Comments

Sakib Sajal Aug. 19, 2021, 1:28 a.m.
This is a system generated Comment: Patch 180070 was automatically marked as superseded by patch 180089.