[oe] [meta-networking][PATCH] mosquitto: minor recipe cleanups

Andre McCurdy armccurdy at gmail.com
Wed Jun 27 22:25:52 UTC 2018


 - Passing prefix, mandir and localedir via the Make command line
   allows patching of config.mk to be dropped.

 - The variable PREFIX isn't used anywhere in the mosquitto 1.4.15
   Makefiles, so doesn't need to be passed on the Make command line.
   That means the default do_compile() from base.bbclass can be used
   and the recipe specific do_compile() can be dropped.

Signed-off-by: Andre McCurdy <armccurdy at gmail.com>
---
 ...llow-prefix-mandir-localedir-from-environ.patch | 35 ----------------------
 .../mosquitto/mosquitto_1.4.15.bb                  | 24 ++++++++-------
 2 files changed, 13 insertions(+), 46 deletions(-)
 delete mode 100644 meta-networking/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch

diff --git a/meta-networking/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch b/meta-networking/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch
deleted file mode 100644
index a5aa277..0000000
--- a/meta-networking/recipes-connectivity/mosquitto/files/0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 0be38301249d797ec1f59071cc868ceda6d4720a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik at jci.com>
-Date: Tue, 12 Apr 2016 12:50:32 +0100
-Subject: [PATCH 1/2] config.mk: allow prefix / mandir / localedir from
- environment
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-We want to control them using OE environment variables.
-
-Upstream-Status: Inappropriate [embedded-specific]
-Signed-off-by: André Draszik <andre.draszik at jci.com>
----
- config.mk | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/config.mk b/config.mk
-index 71f17e5..81d9702 100644
---- a/config.mk
-+++ b/config.mk
-@@ -249,7 +249,7 @@ ifeq ($(WITH_DOCS),yes)
- endif
- 
- INSTALL?=install
--prefix=/usr/local
--mandir=${prefix}/share/man
--localedir=${prefix}/share/locale
-+prefix?=/usr/local
-+mandir?=${prefix}/share/man
-+localedir?=${prefix}/share/locale
- STRIP?=strip
--- 
-2.15.1
-
diff --git a/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.4.15.bb b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.4.15.bb
index 8dd2124..f451687 100644
--- a/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.4.15.bb
+++ b/meta-networking/recipes-connectivity/mosquitto/mosquitto_1.4.15.bb
@@ -11,7 +11,6 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=62ddc846179e908dc0c8efec4a42ef20 \
 DEPENDS = "uthash"
 
 SRC_URI = "http://mosquitto.org/files/source/mosquitto-${PV}.tar.gz \
-           file://0001-config.mk-allow-prefix-mandir-localedir-from-environ.patch \
            file://0002-uthash-remove-in-tree-version.patch \
            file://mosquitto.service \
            file://mosquitto.init \
@@ -27,20 +26,23 @@ PACKAGECONFIG ??= "ssl uuid"
 PACKAGECONFIG[dns-srv] = ",,c-ares"
 PACKAGECONFIG[ssl] = ",,openssl"
 PACKAGECONFIG[uuid] = ",,util-linux"
-EXTRA_OEMAKE = "${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \
-                STRIP=/bin/true \
-                WITH_DOCS=no \
-                ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \
-                ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)}"
 
-export LIB_SUFFIX="${@d.getVar('baselib', True).replace('lib', '')}"
+EXTRA_OEMAKE = " \
+    prefix=${prefix} \
+    mandir=${mandir} \
+    localedir=${localedir} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'dns-srv', 'WITH_SRV=yes', 'WITH_SRV=no', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'ssl', 'WITH_TLS=yes WITH_TLS_PSK=yes', 'WITH_TLS=no WITH_TLS_PSK=no', d)} \
+    ${@bb.utils.contains('PACKAGECONFIG', 'uuid', 'WITH_UUID=yes', 'WITH_UUID=no', d)} \
+    STRIP=/bin/true \
+    WITH_DOCS=no \
+"
 
-do_compile() {
-    oe_runmake PREFIX=${prefix}
-}
+export LIB_SUFFIX = "${@d.getVar('baselib', True).replace('lib', '')}"
 
 do_install() {
-    oe_runmake install DESTDIR=${D}
+    oe_runmake 'DESTDIR=${D}' install
+
     install -d ${D}${libdir}
     install -m 0644 lib/libmosquitto.a ${D}${libdir}/
 
-- 
1.9.1




More information about the Openembedded-devel mailing list