[OE-core] [PATCH 3/6] gpgme: add native build and ship a valid gpgme-config

Andreas Müller schnitzeltony at googlemail.com
Fri Feb 13 05:59:52 UTC 2015


Some packages (here kde/kf5 kwallet) ask for gpgme details during
configuration. This patch makes them build properly. In case
gpgme-config is asked for host, it returns 'unknown' because native
build cannot know the target to build for.

Signed-off-by: Andreas Müller <schnitzeltony at googlemail.com>
---
 .../gpgme-1.4.3/0001-return-unknown-as-host.patch  | 33 ++++++++++++++++++++++
 meta/recipes-support/gpgme/gpgme_1.4.3.bb          | 11 ++++++--
 2 files changed, 42 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-support/gpgme/gpgme-1.4.3/0001-return-unknown-as-host.patch

diff --git a/meta/recipes-support/gpgme/gpgme-1.4.3/0001-return-unknown-as-host.patch b/meta/recipes-support/gpgme/gpgme-1.4.3/0001-return-unknown-as-host.patch
new file mode 100644
index 0000000..7dabd98
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme-1.4.3/0001-return-unknown-as-host.patch
@@ -0,0 +1,33 @@
+From 84427b2fd68f6c56f3919fdddad63cf5b5541730 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony at googlemail.com>
+Date: Thu, 4 Dec 2014 13:31:15 +0100
+Subject: [PATCH] return unknown as host
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+this is intended for native build which cannot know target host
+
+Upstream-Status: Inappropriate [cross build specific]
+
+Signed-off-by: Andreas Müller <schnitzeltony at googlemail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 92375e6..4564c05 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -989,7 +989,7 @@ AH_BOTTOM([
+ # Substitution used for gpgme-config
+ GPGME_CONFIG_LIBS="-lgpgme"
+ GPGME_CONFIG_CFLAGS=""
+-GPGME_CONFIG_HOST="$host"
++GPGME_CONFIG_HOST="unknown"
+ AC_SUBST(GPGME_CONFIG_API_VERSION)
+ AC_SUBST(GPGME_CONFIG_LIBS)
+ AC_SUBST(GPGME_CONFIG_CFLAGS)
+-- 
+1.8.3.1
+
diff --git a/meta/recipes-support/gpgme/gpgme_1.4.3.bb b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
index 98fd68b..0b93ce4 100644
--- a/meta/recipes-support/gpgme/gpgme_1.4.3.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.4.3.bb
@@ -12,15 +12,16 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 SRC_URI = "ftp://ftp.gnupg.org/gcrypt/gpgme/gpgme-${PV}.tar.bz2 \
            file://gpgme.pc"
 
+SRC_URI_append_class-native = " file://0001-return-unknown-as-host.patch"
+
 SRC_URI[md5sum] = "334e524cffa8af4e2f43ae8afe585672"
 SRC_URI[sha256sum] = "2d1cc12411753752d9c5b9037e6fd3fd363517af720154768cc7b46b60120496"
 
 DEPENDS = "libgpg-error libassuan"
 
-BINCONFIG = "${bindir}/gpgme-config"
 EXTRA_OECONF = "--with-gpg=${bindir}/gpg --without-gpgsm --with-gpgconf=no --with-g13=no"
 
-inherit autotools texinfo binconfig-disabled pkgconfig
+inherit autotools texinfo pkgconfig
 
 PACKAGES =+ "${PN}-pthread"
 FILES_${PN}-pthread = "${libdir}/libgpgme-pthread.so.*"
@@ -36,3 +37,9 @@ do_install_append () {
         install -d ${D}${libdir}/pkgconfig
         install -m 0644 ${WORKDIR}/gpgme.pc ${D}${libdir}/pkgconfig/
 }
+
+do_install_append_class-native () {
+	sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}${bindir}/gpgme-config
+}
+
+BBCLASSEXTEND = "native"
-- 
1.9.3




More information about the Openembedded-core mailing list