1*4882a593SmuzhiyunSUMMARY = "High-level GnuPG encryption/signing API" 2*4882a593SmuzhiyunDESCRIPTION = "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*4882a593SmuzhiyunHOMEPAGE = "http://www.gnupg.org/gpgme.html" 4*4882a593SmuzhiyunBUGTRACKER = "https://bugs.g10code.com/gnupg/index" 5*4882a593Smuzhiyun 6*4882a593SmuzhiyunLICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later" 7*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ 8*4882a593Smuzhiyun file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \ 9*4882a593Smuzhiyun file://src/gpgme.h.in;endline=23;md5=2f0bf06d1c7dcb28532a9d0f94a7ca1d \ 10*4882a593Smuzhiyun file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" 11*4882a593Smuzhiyun 12*4882a593SmuzhiyunUPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" 13*4882a593SmuzhiyunSRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ 14*4882a593Smuzhiyun file://0001-Revert-build-Make-gpgme.m4-use-gpgrt-config-with-.pc.patch \ 15*4882a593Smuzhiyun file://0001-pkgconfig.patch \ 16*4882a593Smuzhiyun file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \ 17*4882a593Smuzhiyun file://0003-Correctly-install-python-modules.patch \ 18*4882a593Smuzhiyun file://0004-python-import.patch \ 19*4882a593Smuzhiyun file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \ 20*4882a593Smuzhiyun file://0006-fix-build-path-issue.patch \ 21*4882a593Smuzhiyun file://0007-python-Add-variables-to-tests.patch \ 22*4882a593Smuzhiyun file://0008-do-not-auto-check-var-PYTHON.patch \ 23*4882a593Smuzhiyun file://0001-use-closefrom-on-linux-and-glibc-2.34.patch \ 24*4882a593Smuzhiyun " 25*4882a593Smuzhiyun 26*4882a593SmuzhiyunSRC_URI[sha256sum] = "711eabf5dd661b9b04be9edc9ace2a7bc031f6bd9d37a768d02d0efdef108f5f" 27*4882a593Smuzhiyun 28*4882a593SmuzhiyunDEPENDS = "libgpg-error libassuan" 29*4882a593SmuzhiyunRDEPENDS:${PN}-cpp += "libstdc++" 30*4882a593Smuzhiyun 31*4882a593SmuzhiyunRDEPENDS:python2-gpg += "python-unixadmin" 32*4882a593SmuzhiyunRDEPENDS:python3-gpg += "python3-unixadmin" 33*4882a593Smuzhiyun 34*4882a593SmuzhiyunBINCONFIG = "${bindir}/gpgme-config" 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun# Note select python2 or python3, but you can't select both at the same time 37*4882a593SmuzhiyunPACKAGECONFIG ??= "python3" 38*4882a593SmuzhiyunPACKAGECONFIG[python2] = ",,python swig-native," 39*4882a593SmuzhiyunPACKAGECONFIG[python3] = ",,python3 swig-native," 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun# Default in configure.ac: "cl cpp python qt" 42*4882a593Smuzhiyun# Supported: "cl cpp python python2 python3 qt" 43*4882a593Smuzhiyun# python says 'search and find python2 or python3' 44*4882a593Smuzhiyun 45*4882a593Smuzhiyun# Building the C++ bindings for native requires a C++ compiler with C++11 46*4882a593Smuzhiyun# support. Since these bindings are currently not needed, we can disable them. 47*4882a593SmuzhiyunDEFAULT_LANGUAGES = "" 48*4882a593SmuzhiyunDEFAULT_LANGUAGES:class-target = "cpp" 49*4882a593SmuzhiyunLANGUAGES ?= "${DEFAULT_LANGUAGES} python" 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunPYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" 52*4882a593SmuzhiyunPYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native python3targetconfig', '', d)}" 53*4882a593Smuzhiyun 54*4882a593SmuzhiyunEXTRA_OECONF += '--enable-languages="${LANGUAGES}" \ 55*4882a593Smuzhiyun --disable-gpgconf-test \ 56*4882a593Smuzhiyun --disable-gpg-test \ 57*4882a593Smuzhiyun --disable-gpgsm-test \ 58*4882a593Smuzhiyun --disable-g13-test \ 59*4882a593Smuzhiyun --disable-lang-python-test \ 60*4882a593Smuzhiyun' 61*4882a593Smuzhiyun 62*4882a593Smuzhiyuninherit autotools texinfo binconfig-disabled pkgconfig setuptools3-base ${PYTHON_INHERIT} multilib_header 63*4882a593Smuzhiyun 64*4882a593Smuzhiyunexport PKG_CONFIG='pkg-config' 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunBBCLASSEXTEND = "native nativesdk" 67*4882a593Smuzhiyun 68*4882a593SmuzhiyunPACKAGES =+ "${PN}-cpp" 69*4882a593SmuzhiyunPACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}" 70*4882a593SmuzhiyunPACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}" 71*4882a593Smuzhiyun 72*4882a593SmuzhiyunFILES:${PN}-cpp = "${libdir}/libgpgmepp.so.*" 73*4882a593SmuzhiyunFILES:python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" 74*4882a593SmuzhiyunFILES:python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" 75*4882a593SmuzhiyunFILES:${PN}-dev += "${datadir}/common-lisp/source/gpgme/*" 76*4882a593Smuzhiyun 77*4882a593SmuzhiyunCFLAGS:append:libc-musl = " -D__error_t_defined " 78*4882a593Smuzhiyundo_configure:prepend () { 79*4882a593Smuzhiyun # Else these could be used in preference to those in aclocal-copy 80*4882a593Smuzhiyun rm -f ${S}/m4/gpg-error.m4 81*4882a593Smuzhiyun rm -f ${S}/m4/libassuan.m4 82*4882a593Smuzhiyun rm -f ${S}/m4/python.m4 83*4882a593Smuzhiyun} 84*4882a593Smuzhiyun 85*4882a593Smuzhiyundo_install:append() { 86*4882a593Smuzhiyun oe_multilib_header gpgme.h 87*4882a593Smuzhiyun} 88