blob: 0ab30d93b9e7690b6741f00129e8cd806eb2bb81 [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -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=2f0bf06d1c7dcb28532a9d0f94a7ca1d \
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-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch \
15 file://0001-pkgconfig.patch \
16 file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
17 file://0003-Correctly-install-python-modules.patch \
18 file://0004-python-import.patch \
19 file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
20 file://0006-fix-build-path-issue.patch \
21 file://0007-python-Add-variables-to-tests.patch \
22 file://0008-do-not-auto-check-var-PYTHON.patch \
Andrew Geissler5f350902021-07-23 13:09:54 -040023 file://0001-use-closefrom-on-linux-and-glibc-2.34.patch \
24 "
Brad Bishopc342db32019-05-15 21:57:59 -040025
Andrew Geissler5f350902021-07-23 13:09:54 -040026SRC_URI[sha256sum] = "6c8cc4aedb10d5d4c905894ba1d850544619ee765606ac43df7405865de29ed0"
Brad Bishopc342db32019-05-15 21:57:59 -040027
28DEPENDS = "libgpg-error libassuan"
Patrick Williams213cb262021-08-07 19:21:33 -050029RDEPENDS:${PN}-cpp += "libstdc++"
Brad Bishopc342db32019-05-15 21:57:59 -040030
Patrick Williams213cb262021-08-07 19:21:33 -050031RDEPENDS:python2-gpg += "python-unixadmin"
32RDEPENDS:python3-gpg += "python3-unixadmin"
Brad Bishopc342db32019-05-15 21:57:59 -040033
34BINCONFIG = "${bindir}/gpgme-config"
35
36# Note select python2 or python3, but you can't select both at the same time
37PACKAGECONFIG ??= "python3"
38PACKAGECONFIG[python2] = ",,python swig-native,"
39PACKAGECONFIG[python3] = ",,python3 swig-native,"
40
41# Default in configure.ac: "cl cpp python qt"
42# Supported: "cl cpp python python2 python3 qt"
43# python says 'search and find python2 or python3'
44
45# Building the C++ bindings for native requires a C++ compiler with C++11
46# support. Since these bindings are currently not needed, we can disable them.
47DEFAULT_LANGUAGES = ""
Patrick Williams213cb262021-08-07 19:21:33 -050048DEFAULT_LANGUAGES:class-target = "cpp"
Brad Bishopc342db32019-05-15 21:57:59 -040049LANGUAGES ?= "${DEFAULT_LANGUAGES} python"
50
51PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}"
Andrew Geissler6ce62a22020-11-30 19:58:47 -060052PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native python3targetconfig', '', d)}"
Brad Bishopc342db32019-05-15 21:57:59 -040053
54EXTRA_OECONF += '--enable-languages="${LANGUAGES}" \
55 --disable-gpgconf-test \
56 --disable-gpg-test \
57 --disable-gpgsm-test \
58 --disable-g13-test \
59 --disable-lang-python-test \
60'
61
Andrew Geissler635e0e42020-08-21 15:58:33 -050062inherit autotools texinfo binconfig-disabled pkgconfig distutils-common-base ${PYTHON_INHERIT} multilib_header
Brad Bishopc342db32019-05-15 21:57:59 -040063
64export PKG_CONFIG='pkg-config'
65
66BBCLASSEXTEND = "native nativesdk"
67
68PACKAGES =+ "${PN}-cpp"
69PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}"
70PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}"
71
Patrick Williams213cb262021-08-07 19:21:33 -050072FILES:${PN}-cpp = "${libdir}/libgpgmepp.so.*"
73FILES:python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
74FILES:python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
75FILES:${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
Brad Bishopc342db32019-05-15 21:57:59 -040076
Patrick Williams213cb262021-08-07 19:21:33 -050077CFLAGS:append:libc-musl = " -D__error_t_defined "
78do_configure:prepend () {
Brad Bishopc342db32019-05-15 21:57:59 -040079 # Else these could be used in preference to those in aclocal-copy
80 rm -f ${S}/m4/gpg-error.m4
81 rm -f ${S}/m4/libassuan.m4
82 rm -f ${S}/m4/python.m4
83}
Andrew Geissler635e0e42020-08-21 15:58:33 -050084
Patrick Williams213cb262021-08-07 19:21:33 -050085do_install:append() {
Andrew Geissler635e0e42020-08-21 15:58:33 -050086 oe_multilib_header gpgme.h
87}