summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-support')
-rw-r--r--meta/recipes-support/gpgme/gpgme/python-lang-config.patch52
-rw-r--r--meta/recipes-support/gpgme/gpgme_1.8.0.bb28
2 files changed, 79 insertions, 1 deletions
diff --git a/meta/recipes-support/gpgme/gpgme/python-lang-config.patch b/meta/recipes-support/gpgme/gpgme/python-lang-config.patch
new file mode 100644
index 0000000000..132e42677f
--- /dev/null
+++ b/meta/recipes-support/gpgme/gpgme/python-lang-config.patch
@@ -0,0 +1,52 @@
1gpgme/lang/python: gpg-error-config should not be used.
2
3gpg-error-config was modified by OE to always return an error. So we want
4to find an alternative way to retrieve whatever it is we need. It turns
5out that the system is just trying to find the path to the gpg-error.h, which
6we can pull in from the STAGING_INC environment.
7
8Upstream-Status: Inappropriate [changes are specific to OE]
9
10Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
11
12Index: gpgme-1.8.0/lang/python/setup.py.in
13===================================================================
14--- gpgme-1.8.0.orig/lang/python/setup.py.in
15+++ gpgme-1.8.0/lang/python/setup.py.in
16@@ -24,7 +24,6 @@ import glob
17 import subprocess
18
19 # Out-of-tree build of the gpg bindings.
20-gpg_error_config = ["gpg-error-config"]
21 gpgme_config_flags = ["--thread=pthread"]
22 gpgme_config = ["gpgme-config"] + gpgme_config_flags
23 gpgme_h = ""
24@@ -52,13 +51,6 @@ else:
25 devnull = open(os.devnull, "w")
26
27 try:
28- subprocess.check_call(gpg_error_config + ['--version'],
29- stdout=devnull)
30-except:
31- sys.exit("Could not find gpg-error-config. " +
32- "Please install the libgpg-error development package.")
33-
34-try:
35 subprocess.check_call(gpgme_config + ['--version'],
36 stdout=devnull)
37 except:
38@@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and min
39 if not gpgme_h:
40 gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h")
41
42-gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0]
43-gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h")
44+gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h")
45 if not os.path.exists(gpg_error_h):
46- gpg_error_h = \
47- glob.glob(os.path.join(gpg_error_prefix, "include",
48- "*", "gpg-error.h"))[0]
49+ sys.exit("gpg_error_h not found: %s" % gpg_error_h)
50
51 print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h))
52
diff --git a/meta/recipes-support/gpgme/gpgme_1.8.0.bb b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
index 3e74b6fe97..728e247a18 100644
--- a/meta/recipes-support/gpgme/gpgme_1.8.0.bb
+++ b/meta/recipes-support/gpgme/gpgme_1.8.0.bb
@@ -12,6 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
12UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" 12UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
13SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ 13SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
14 file://pkgconfig.patch \ 14 file://pkgconfig.patch \
15 file://python-lang-config.patch \
15 " 16 "
16 17
17SRC_URI[md5sum] = "722a4153904b9b5dc15485a22d29263b" 18SRC_URI[md5sum] = "722a4153904b9b5dc15485a22d29263b"
@@ -22,12 +23,37 @@ RDEPENDS_${PN}-cpp += "libstdc++"
22 23
23BINCONFIG = "${bindir}/gpgme-config" 24BINCONFIG = "${bindir}/gpgme-config"
24 25
25inherit autotools texinfo binconfig-disabled pkgconfig 26# Note select python2 or python3, but you can't select both at the same time
27PACKAGECONFIG ??= "python3"
28PACKAGECONFIG[python2] = ",,python swig-native,"
29PACKAGECONFIG[python3] = ",,python3 swig-native,"
30
31# Default in configure.ac: "cl cpp python qt"
32# Supported: "cl cpp python python2 python3 qt"
33# python says 'search and find python2 or python3'
34
35LANGUAGES ?= "cpp"
36LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}"
37LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}"
38
39PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
40PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}"
41
42EXTRA_OECONF += '--enable-languages="${LANGUAGES}"'
43
44inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT}
45
46export PKG_CONFIG='pkg-config'
26 47
27BBCLASSEXTEND = "native" 48BBCLASSEXTEND = "native"
28 49
29PACKAGES =+ "${PN}-cpp" 50PACKAGES =+ "${PN}-cpp"
51PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
52PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
53
30FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*" 54FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*"
55FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
56FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
31FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \ 57FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \
32 ${libdir}/cmake/* \ 58 ${libdir}/cmake/* \
33" 59"