blob: f015f3ad755365340cc0e5f423ee9270ab5f3979 [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001SUMMARY = "High-level GnuPG encryption/signing API"
2DESCRIPTION = "GnuPG Made Easy (GPGME) is a library designed to make access to GnuPG easier for applications. It provides a High-Level Crypto API for encryption, decryption, signing, signature verification and key management"
3HOMEPAGE = "http://www.gnupg.org/gpgme.html"
4BUGTRACKER = "https://bugs.g10code.com/gnupg/index"
5
6LICENSE = "GPLv2+ & LGPLv2.1+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
8 file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
9 file://src/gpgme.h.in;endline=23;md5=9d157d08a69059344e6f82abd2d25781 \
10 file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
11
12UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
13SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
14 file://0001-pkgconfig.patch \
15 file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
16 file://0003-Correctly-install-python-modules.patch \
17 file://0004-python-import.patch \
18 file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
19 file://0006-fix-build-path-issue.patch \
20 file://0007-qt-python-Add-variables-to-tests.patch \
21 "
22
23SRC_URI[md5sum] = "78b1533c593478982ee2fc548260c563"
24SRC_URI[sha256sum] = "1a8fed1197c3b99c35f403066bb344a26224d292afc048cfdfc4ccd5690a0693"
25
26DEPENDS = "libgpg-error libassuan"
27RDEPENDS_${PN}-cpp += "libstdc++"
28
29RDEPENDS_python2-gpg += "python-unixadmin"
30RDEPENDS_python3-gpg += "python3-unixadmin"
31
32BINCONFIG = "${bindir}/gpgme-config"
33
34# Note select python2 or python3, but you can't select both at the same time
35PACKAGECONFIG ??= "python3"
36PACKAGECONFIG[python2] = ",,python swig-native,"
37PACKAGECONFIG[python3] = ",,python3 swig-native,"
38
39# Default in configure.ac: "cl cpp python qt"
40# Supported: "cl cpp python python2 python3 qt"
41# python says 'search and find python2 or python3'
42
43# Building the C++ bindings for native requires a C++ compiler with C++11
44# support. Since these bindings are currently not needed, we can disable them.
45DEFAULT_LANGUAGES = ""
46DEFAULT_LANGUAGES_class-target = "cpp"
47LANGUAGES ?= "${DEFAULT_LANGUAGES}"
48LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}"
49LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}"
50
51PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
52PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}"
53
54EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \
55 --disable-gpgconf-test \
56 --disable-gpg-test \
57 --disable-gpgsm-test \
58 --disable-g13-test \
59 --disable-lang-qt-test \
60 --disable-lang-python-test \
61'
62
63inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT}
64
65export PKG_CONFIG='pkg-config'
66
67BBCLASSEXTEND = "native nativesdk"
68
69PACKAGES =+ "${PN}-cpp"
70PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
71PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
72
73FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*"
74FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
75FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
76FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \
77 ${libdir}/cmake/* \
78"
79
80CFLAGS_append_libc-musl = " -D__error_t_defined "
81do_configure_prepend () {
82 # Else these could be used in preference to those in aclocal-copy
83 rm -f ${S}/m4/gpg-error.m4
84 rm -f ${S}/m4/libassuan.m4
85 rm -f ${S}/m4/python.m4
86}