All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Sakib Sajal" <sakib.sajal@windriver.com>
To: <openembedded-devel@lists.openembedded.org>
Subject: [meta-oe][hardknott][PATCH 2/2] lmdb: use libprefix in Makefile to install libraries
Date: Mon, 13 Sep 2021 17:21:41 -0400	[thread overview]
Message-ID: <20210913212141.353383-2-sakib.sajal@windriver.com> (raw)
In-Reply-To: <20210913212141.353383-1-sakib.sajal@windriver.com>

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.

Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 15ee78730ae2793c5211562fdac7619279794870)
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

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..2cc98e6d6
--- /dev/null
+++ b/meta-oe/recipes-dbs/lmdb/files/0001-Makefile-use-libprefix-instead-of-libdir.patch
@@ -0,0 +1,33 @@
+From 4a11d4d03ef66729d302cc122fa0c693299a7776 Mon Sep 17 00:00:00 2001
+From: Sakib Sajal <sakib.sajal@windriver.com>
+Date: Wed, 18 Aug 2021 10:49:38 -0400
+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/Makefile b/Makefile
+index f254511..1ec74e6 100644
+--- a/Makefile
++++ b/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
 }
-- 
2.25.1


  reply	other threads:[~2021-09-13 21:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 21:21 [meta-oe][hardknott][PATCH 1/2] lmdb: add recipe Sakib Sajal
2021-09-13 21:21 ` Sakib Sajal [this message]
2021-09-13 21:50 ` [oe] " Armin Kuster
2021-09-14 17:00   ` Sakib Sajal

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=20210913212141.353383-2-sakib.sajal@windriver.com \
    --to=sakib.sajal@windriver.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.