diff options
author | Mark Hatle <mark.hatle@windriver.com> | 2017-03-07 12:54:33 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-07 21:46:52 +0000 |
commit | 839d6f124c2761194c868cf5597e1aa96571e1ca (patch) | |
tree | fa8707bf3e247c63bfe2a507c00d99873080a937 /meta/recipes-support/gpgme/gpgme_1.8.0.bb | |
parent | 1098bcbc4520874967e7bd23fe798ab1a123fac4 (diff) | |
download | openembedded-core-contrib-839d6f124c2761194c868cf5597e1aa96571e1ca.tar.gz |
gpgme: Fix issue building for the target
gpgme failed when configuring since you can only configure for one python
system at a time (via the inherits). So we need to have a PACKAGECONFIG
that defines which one [or neither] you want to use.
The prior pkgconfig patch introduced the usage of the variable PKG_CONFIG,
which is not defined anywhere. Define this.
When building the python module, we can not call gpg-error-config, so we
need to find an alternative way of finding the information the setup.py.in
requires. (In this case, it's easy to just use the environment
STAGING_INCDIR.)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/gpgme/gpgme_1.8.0.bb')
-rw-r--r-- | meta/recipes-support/gpgme/gpgme_1.8.0.bb | 28 |
1 files changed, 27 insertions, 1 deletions
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 \ UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ file://pkgconfig.patch \ + file://python-lang-config.patch \ " SRC_URI[md5sum] = "722a4153904b9b5dc15485a22d29263b" @@ -22,12 +23,37 @@ RDEPENDS_${PN}-cpp += "libstdc++" BINCONFIG = "${bindir}/gpgme-config" -inherit autotools texinfo binconfig-disabled pkgconfig +# Note select python2 or python3, but you can't select both at the same time +PACKAGECONFIG ??= "python3" +PACKAGECONFIG[python2] = ",,python swig-native," +PACKAGECONFIG[python3] = ",,python3 swig-native," + +# Default in configure.ac: "cl cpp python qt" +# Supported: "cl cpp python python2 python3 qt" +# python says 'search and find python2 or python3' + +LANGUAGES ?= "cpp" +LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" +LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" + +PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" +PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" + +EXTRA_OECONF += '--enable-languages="${LANGUAGES}"' + +inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT} + +export PKG_CONFIG='pkg-config' BBCLASSEXTEND = "native" PACKAGES =+ "${PN}-cpp" +PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}" +PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}" + FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*" +FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" +FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \ ${libdir}/cmake/* \ " |