Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1 | SUMMARY = "High-level GnuPG encryption/signing API" |
| 2 | DESCRIPTION = "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" |
| 3 | HOMEPAGE = "http://www.gnupg.org/gpgme.html" |
| 4 | BUGTRACKER = "https://bugs.g10code.com/gnupg/index" |
| 5 | |
| 6 | LICENSE = "GPLv2+ & LGPLv2.1+" |
| 7 | LIC_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 | |
| 12 | UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" |
| 13 | SRC_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 | |
| 23 | SRC_URI[md5sum] = "78b1533c593478982ee2fc548260c563" |
| 24 | SRC_URI[sha256sum] = "1a8fed1197c3b99c35f403066bb344a26224d292afc048cfdfc4ccd5690a0693" |
| 25 | |
| 26 | DEPENDS = "libgpg-error libassuan" |
| 27 | RDEPENDS_${PN}-cpp += "libstdc++" |
| 28 | |
| 29 | RDEPENDS_python2-gpg += "python-unixadmin" |
| 30 | RDEPENDS_python3-gpg += "python3-unixadmin" |
| 31 | |
| 32 | BINCONFIG = "${bindir}/gpgme-config" |
| 33 | |
| 34 | # Note select python2 or python3, but you can't select both at the same time |
| 35 | PACKAGECONFIG ??= "python3" |
| 36 | PACKAGECONFIG[python2] = ",,python swig-native," |
| 37 | PACKAGECONFIG[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. |
| 45 | DEFAULT_LANGUAGES = "" |
| 46 | DEFAULT_LANGUAGES_class-target = "cpp" |
| 47 | LANGUAGES ?= "${DEFAULT_LANGUAGES}" |
| 48 | LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" |
| 49 | LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" |
| 50 | |
| 51 | PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" |
| 52 | PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" |
| 53 | |
| 54 | EXTRA_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 | |
| 63 | inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT} |
| 64 | |
| 65 | export PKG_CONFIG='pkg-config' |
| 66 | |
| 67 | BBCLASSEXTEND = "native nativesdk" |
| 68 | |
| 69 | PACKAGES =+ "${PN}-cpp" |
| 70 | PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}" |
| 71 | PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}" |
| 72 | |
| 73 | FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*" |
| 74 | FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" |
| 75 | FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" |
| 76 | FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \ |
| 77 | ${libdir}/cmake/* \ |
| 78 | " |
| 79 | |
| 80 | CFLAGS_append_libc-musl = " -D__error_t_defined " |
| 81 | do_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 | } |