1169d7bccSPatrick WilliamsSUMMARY = "High-level GnuPG encryption/signing API"
2169d7bccSPatrick WilliamsDESCRIPTION = "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"
3169d7bccSPatrick WilliamsHOMEPAGE = "http://www.gnupg.org/gpgme.html"
4169d7bccSPatrick WilliamsBUGTRACKER = "https://bugs.g10code.com/gnupg/index"
5169d7bccSPatrick Williams
6169d7bccSPatrick WilliamsLICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later"
7169d7bccSPatrick WilliamsLIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
8169d7bccSPatrick Williams                    file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \
9169d7bccSPatrick Williams                    file://src/gpgme.h.in;endline=23;md5=2f0bf06d1c7dcb28532a9d0f94a7ca1d \
10169d7bccSPatrick Williams                    file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d"
11169d7bccSPatrick Williams
12169d7bccSPatrick WilliamsUPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
13169d7bccSPatrick WilliamsSRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \
14169d7bccSPatrick Williams           file://0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch \
15169d7bccSPatrick Williams           file://0001-pkgconfig.patch \
16169d7bccSPatrick Williams           file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \
17169d7bccSPatrick Williams           file://0003-Correctly-install-python-modules.patch \
18169d7bccSPatrick Williams           file://0004-python-import.patch \
19169d7bccSPatrick Williams           file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \
20169d7bccSPatrick Williams           file://0006-fix-build-path-issue.patch \
21169d7bccSPatrick Williams           file://0008-do-not-auto-check-var-PYTHON.patch \
22169d7bccSPatrick Williams           file://0001-use-closefrom-on-linux-and-glibc-2.34.patch \
23169d7bccSPatrick Williams           file://0001-posix-io.c-Use-off_t-instead-of-off64_t.patch \
24169d7bccSPatrick Williams           file://0001-autogen.sh-remove-unknown-in-version.patch \
25169d7bccSPatrick Williams           "
26169d7bccSPatrick Williams
27169d7bccSPatrick WilliamsSRC_URI[sha256sum] = "9499e8b1f33cccb6815527a1bc16049d35a6198a6c5fae0185f2bd561bce5224"
28169d7bccSPatrick Williams
29169d7bccSPatrick WilliamsPYTHON_DEPS = "${@bb.utils.contains('LANGUAGES', 'python', 'swig-native', '', d)}"
30169d7bccSPatrick Williams
31169d7bccSPatrick WilliamsDEPENDS = "libgpg-error libassuan ${PYTHON_DEPS}"
32169d7bccSPatrick WilliamsRDEPENDS:${PN}-cpp += "libstdc++"
33169d7bccSPatrick Williams
34169d7bccSPatrick WilliamsRDEPENDS:python3-gpg += "python3-unixadmin"
35169d7bccSPatrick Williams
36169d7bccSPatrick WilliamsBINCONFIG = "${bindir}/gpgme-config"
37169d7bccSPatrick Williams
38169d7bccSPatrick Williams# Default in configure.ac: "cl cpp python qt"
39169d7bccSPatrick Williams# Supported: "cl cpp python python2 python3 qt"
40169d7bccSPatrick Williams# python says 'search and find python2 or python3'
41169d7bccSPatrick Williams
42169d7bccSPatrick Williams# Building the C++ bindings for native requires a C++ compiler with C++11
43169d7bccSPatrick Williams# support. Since these bindings are currently not needed, we can disable them.
44169d7bccSPatrick WilliamsDEFAULT_LANGUAGES = ""
45169d7bccSPatrick WilliamsDEFAULT_LANGUAGES:class-target = "cpp"
46169d7bccSPatrick WilliamsLANGUAGES ?= "${DEFAULT_LANGUAGES}"
47169d7bccSPatrick Williams
48169d7bccSPatrick WilliamsPYTHON_INHERIT = "${@bb.utils.contains('LANGUAGES', 'python', 'setuptools3-base', '', d)}"
49169d7bccSPatrick Williams
50169d7bccSPatrick WilliamsEXTRA_OECONF += '--enable-languages="${LANGUAGES}" \
51169d7bccSPatrick Williams                 --disable-gpgconf-test \
52169d7bccSPatrick Williams                 --disable-gpg-test \
53169d7bccSPatrick Williams                 --disable-gpgsm-test \
54169d7bccSPatrick Williams                 --disable-g13-test \
55169d7bccSPatrick Williams'
56169d7bccSPatrick Williams
57*56b44a98SPatrick Williamsinherit autotools texinfo binconfig-disabled pkgconfig multilib_header
58*56b44a98SPatrick Williamsinherit_defer ${PYTHON_INHERIT} python3native
59169d7bccSPatrick Williams
60169d7bccSPatrick Williamsexport PKG_CONFIG='pkg-config'
61169d7bccSPatrick Williams
62169d7bccSPatrick WilliamsBBCLASSEXTEND = "native nativesdk"
63169d7bccSPatrick Williams
64169d7bccSPatrick WilliamsPACKAGES =+ "${PN}-cpp python3-gpg"
65169d7bccSPatrick Williams
66169d7bccSPatrick WilliamsFILES:${PN}-cpp = "${libdir}/libgpgmepp.so.*"
67169d7bccSPatrick WilliamsFILES:python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*"
68169d7bccSPatrick WilliamsFILES:${PN}-dev += "${datadir}/common-lisp/source/gpgme/*"
69169d7bccSPatrick Williams
70169d7bccSPatrick WilliamsCFLAGS:append:libc-musl = " -D__error_t_defined "
71169d7bccSPatrick WilliamsCACHED_CONFIGUREVARS:libc-musl = "ac_cv_sys_file_offset_bits=no"
72169d7bccSPatrick Williams
73169d7bccSPatrick Williamsdo_configure:prepend () {
74169d7bccSPatrick Williams	# Else these could be used in preference to those in aclocal-copy
75169d7bccSPatrick Williams	rm -f ${S}/m4/gpg-error.m4
76169d7bccSPatrick Williams	rm -f ${S}/m4/libassuan.m4
77169d7bccSPatrick Williams	rm -f ${S}/m4/python.m4
78169d7bccSPatrick Williams}
79169d7bccSPatrick Williams
80169d7bccSPatrick Williamsdo_install:append() {
81169d7bccSPatrick Williams       oe_multilib_header gpgme.h
82169d7bccSPatrick Williams}
83