From b18a7adf8ce194b2dd3ce787228fb87c5ef3efde Mon Sep 17 00:00:00 2001 From: Hongxu Jia Date: Wed, 16 Aug 2017 04:31:21 -0400 Subject: gpgme: 1.8.0 -> 1.9.0 Rebase patches: - pkgconfig.patch -> 0001 - python-lang-config.patch -> 0002 - 0001-Correctly-install-python-modules.patch -> 0003 - python-import.patch -> 0004 - 0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch -> 0005 Signed-off-by: Hongxu Jia Signed-off-by: Richard Purdie --- .../0001-Correctly-install-python-modules.patch | 26 -- ...g-skip-all-lib-or-usr-lib-directories-in-.patch | 31 --- .../gpgme/gpgme/0001-pkgconfig.patch | 303 +++++++++++++++++++++ ...python-gpg-error-config-should-not-be-use.patch | 65 +++++ .../0003-Correctly-install-python-modules.patch | 30 ++ .../gpgme/gpgme/0004-python-import.patch | 34 +++ ...g-skip-all-lib-or-usr-lib-directories-in-.patch | 31 +++ meta/recipes-support/gpgme/gpgme/pkgconfig.patch | 295 -------------------- .../gpgme/gpgme/python-import.patch | 19 -- .../gpgme/gpgme/python-lang-config.patch | 52 ---- meta/recipes-support/gpgme/gpgme_1.8.0.bb | 76 ------ meta/recipes-support/gpgme/gpgme_1.9.0.bb | 76 ++++++ 12 files changed, 539 insertions(+), 499 deletions(-) delete mode 100644 meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch delete mode 100644 meta/recipes-support/gpgme/gpgme/0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch create mode 100644 meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch create mode 100644 meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch create mode 100644 meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch create mode 100644 meta/recipes-support/gpgme/gpgme/0004-python-import.patch create mode 100644 meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch delete mode 100644 meta/recipes-support/gpgme/gpgme/pkgconfig.patch delete mode 100644 meta/recipes-support/gpgme/gpgme/python-import.patch delete mode 100644 meta/recipes-support/gpgme/gpgme/python-lang-config.patch delete mode 100644 meta/recipes-support/gpgme/gpgme_1.8.0.bb create mode 100644 meta/recipes-support/gpgme/gpgme_1.9.0.bb (limited to 'meta/recipes-support/gpgme') diff --git a/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch b/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch deleted file mode 100644 index 42655fbbe6..0000000000 --- a/meta/recipes-support/gpgme/gpgme/0001-Correctly-install-python-modules.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 4d714c097e497b63d2e8b22a834c671045e215e9 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 9 Mar 2017 21:34:55 +0200 -Subject: [PATCH] Correctly install python modules - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - lang/python/Makefile.am | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am -index e32fd12..5ecf6fb 100644 ---- a/lang/python/Makefile.am -+++ b/lang/python/Makefile.am -@@ -102,6 +102,7 @@ install-exec-local: - for PYTHON in $(PYTHONS); do \ - $$PYTHON setup.py install \ - --prefix $(DESTDIR)$(prefix) \ -+ --install-lib=$(DESTDIR)${pythondir} \ - --record files.txt \ - --verbose ; \ - cat files.txt >> install_files.txt ; \ --- -2.11.0 - diff --git a/meta/recipes-support/gpgme/gpgme/0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch b/meta/recipes-support/gpgme/gpgme/0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch deleted file mode 100644 index 84d55b9685..0000000000 --- a/meta/recipes-support/gpgme/gpgme/0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 8c317f6186bd3a9a1c80b4d1e872b3db95934bb6 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin -Date: Thu, 13 Apr 2017 16:40:27 +0300 -Subject: [PATCH] gpgme-config: skip all /lib* or /usr/lib* directories in - output - -The logic was not working in multilib setups which use other -directory names than plain /lib or /usr/lib. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin ---- - src/gpgme-config.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/gpgme-config.in b/src/gpgme-config.in -index a4d152e..8342865 100644 ---- a/src/gpgme-config.in -+++ b/src/gpgme-config.in -@@ -154,7 +154,7 @@ while test $# -gt 0; do - for i in $libs $tmp_l $assuan_libs $gpg_error_libs $tmp_x; do - skip=no - case $i in -- -L/usr/lib|-L/lib) -+ -L/usr/lib*|-L/lib*) - skip=yes - ;; - -L*|-l*) --- -2.11.0 - diff --git a/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch b/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch new file mode 100644 index 0000000000..14a43eeeeb --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme/0001-pkgconfig.patch @@ -0,0 +1,303 @@ +From 8ae149035c97d27cd2c624704d1651806c53577e Mon Sep 17 00:00:00 2001 +From: Richard Purdie +Date: Wed, 16 Aug 2017 02:00:08 -0400 +Subject: [PATCH 1/5] pkgconfig + +Update gpgme to use pkgconfig instead of -config files since its +simpler and less error prone when cross compiling. + +Upstream-Status: Denied [Upstream not interested in pkg-config support] +RP 2015/4/17 + +Signed-off-by: Richard Purdie + +Rebase to 1.9.0 + +Signed-off-by: Hongxu Jia +--- + configure.ac | 1 + + src/Makefile.am | 4 +- + src/gpgme-pthread.pc.in | 15 +++++++ + src/gpgme.m4 | 114 ++++-------------------------------------------- + src/gpgme.pc.in | 15 +++++++ + 5 files changed, 42 insertions(+), 107 deletions(-) + create mode 100644 src/gpgme-pthread.pc.in + create mode 100644 src/gpgme.pc.in + +diff --git a/configure.ac b/configure.ac +index 0dac6ce..6a9e507 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -866,6 +866,7 @@ AC_CONFIG_FILES(Makefile src/Makefile + src/versioninfo.rc + src/gpgme.h) + AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) ++AC_CONFIG_FILES(src/gpgme.pc src/gpgme-pthread.pc) + AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile) + AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in) + AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in) +diff --git a/src/Makefile.am b/src/Makefile.am +index ce6f1d4..5f38fee 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -19,12 +19,14 @@ + ## Process this file with automake to produce Makefile.in + + EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \ +- gpgme.h.in versioninfo.rc.in gpgme.def ++ gpgme.h.in versioninfo.rc.in gpgme.def gpgme.pc.in gpgme-pthread.pc.in + + bin_SCRIPTS = gpgme-config + m4datadir = $(datadir)/aclocal + m4data_DATA = gpgme.m4 + nodist_include_HEADERS = gpgme.h ++pkgconfigdir = $(libdir)/pkgconfig ++pkgconfig_DATA = gpgme.pc gpgme-pthread.pc + + bin_PROGRAMS = gpgme-tool + +diff --git a/src/gpgme-pthread.pc.in b/src/gpgme-pthread.pc.in +new file mode 100644 +index 0000000..074bbf6 +--- /dev/null ++++ b/src/gpgme-pthread.pc.in +@@ -0,0 +1,15 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++# API info ++api_version=@GPGME_CONFIG_API_VERSION@ ++host=@GPGME_CONFIG_HOST@ ++ ++Name: gpgme ++Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program (deprecated) ++Version: @VERSION@ ++Libs: -L${libdir} -lgpgme -lpthread ++Cflags: -I${includedir} ++Requires: libassuan gpg-error +diff --git a/src/gpgme.m4 b/src/gpgme.m4 +index 6c2be44..d8a75cb 100644 +--- a/src/gpgme.m4 ++++ b/src/gpgme.m4 +@@ -79,7 +79,7 @@ dnl config script does not match the host specification the script + dnl is added to the gpg_config_script_warn variable. + dnl + AC_DEFUN([AM_PATH_GPGME], +-[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl ++[ + tmp=ifelse([$1], ,1:0.4.2,$1) + if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then + req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` +@@ -89,36 +89,12 @@ AC_DEFUN([AM_PATH_GPGME], + min_gpgme_version="$tmp" + fi + +- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) +- ok=no +- if test "$GPGME_CONFIG" != "no" ; then +- req_major=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` +- req_minor=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` +- req_micro=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` +- if test "$gpgme_version_major" -gt "$req_major"; then +- ok=yes +- else +- if test "$gpgme_version_major" -eq "$req_major"; then +- if test "$gpgme_version_minor" -gt "$req_minor"; then +- ok=yes +- else +- if test "$gpgme_version_minor" -eq "$req_minor"; then +- if test "$gpgme_version_micro" -ge "$req_micro"; then +- ok=yes +- fi +- fi +- fi +- fi +- fi +- fi ++ PKG_CHECK_MODULES(GPGME, [gpgme >= $min_gpgme_version], [ok=yes], [ok=no]) + if test $ok = yes; then + # If we have a recent GPGME, we should also check that the + # API is compatible. + if test "$req_gpgme_api" -gt 0 ; then +- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` ++ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0` + if test "$tmp" -gt 0 ; then + if test "$req_gpgme_api" -ne "$tmp" ; then + ok=no +@@ -127,19 +103,11 @@ AC_DEFUN([AM_PATH_GPGME], + fi + fi + if test $ok = yes; then +- GPGME_CFLAGS=`$GPGME_CONFIG --cflags` +- GPGME_LIBS=`$GPGME_CONFIG --libs` +- AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + _AM_PATH_GPGME_CONFIG_HOST_CHECK + else +- GPGME_CFLAGS="" +- GPGME_LIBS="" +- AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi +- AC_SUBST(GPGME_CFLAGS) +- AC_SUBST(GPGME_LIBS) + ]) + + dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION, +@@ -148,7 +116,7 @@ dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS + dnl and GPGME_PTHREAD_LIBS. + dnl + AC_DEFUN([AM_PATH_GPGME_PTHREAD], +-[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl ++[ + tmp=ifelse([$1], ,1:0.4.2,$1) + if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then + req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` +@@ -158,38 +126,12 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD], + min_gpgme_version="$tmp" + fi + +- AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version) +- ok=no +- if test "$GPGME_CONFIG" != "no" ; then +- if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then +- req_major=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` +- req_minor=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` +- req_micro=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` +- if test "$gpgme_version_major" -gt "$req_major"; then +- ok=yes +- else +- if test "$gpgme_version_major" -eq "$req_major"; then +- if test "$gpgme_version_minor" -gt "$req_minor"; then +- ok=yes +- else +- if test "$gpgme_version_minor" -eq "$req_minor"; then +- if test "$gpgme_version_micro" -ge "$req_micro"; then +- ok=yes +- fi +- fi +- fi +- fi +- fi +- fi +- fi ++ PKG_CHECK_MODULES(GPGME_PTHREAD, [gpgme-pthread >= $min_gpgme_version], [ok=yes], [ok=no]) + if test $ok = yes; then + # If we have a recent GPGME, we should also check that the + # API is compatible. + if test "$req_gpgme_api" -gt 0 ; then +- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` ++ tmp=`$PKG_CONFIG --variable=api_version gpgme-pthread 2>/dev/null || echo 0` + if test "$tmp" -gt 0 ; then + if test "$req_gpgme_api" -ne "$tmp" ; then + ok=no +@@ -198,19 +140,11 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD], + fi + fi + if test $ok = yes; then +- GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags` +- GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs` +- AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + _AM_PATH_GPGME_CONFIG_HOST_CHECK + else +- GPGME_PTHREAD_CFLAGS="" +- GPGME_PTHREAD_LIBS="" +- AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi +- AC_SUBST(GPGME_PTHREAD_CFLAGS) +- AC_SUBST(GPGME_PTHREAD_LIBS) + ]) + + +@@ -229,36 +163,12 @@ AC_DEFUN([AM_PATH_GPGME_GLIB], + min_gpgme_version="$tmp" + fi + +- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) +- ok=no +- if test "$GPGME_CONFIG" != "no" ; then +- req_major=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` +- req_minor=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` +- req_micro=`echo $min_gpgme_version | \ +- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` +- if test "$gpgme_version_major" -gt "$req_major"; then +- ok=yes +- else +- if test "$gpgme_version_major" -eq "$req_major"; then +- if test "$gpgme_version_minor" -gt "$req_minor"; then +- ok=yes +- else +- if test "$gpgme_version_minor" -eq "$req_minor"; then +- if test "$gpgme_version_micro" -ge "$req_micro"; then +- ok=yes +- fi +- fi +- fi +- fi +- fi +- fi ++ PKG_CHECK_MODULES(GPGME_GLIB, [gpgme >= $min_gpgme_version glib-2.0], [ok=yes], [ok=no]) + if test $ok = yes; then + # If we have a recent GPGME, we should also check that the + # API is compatible. + if test "$req_gpgme_api" -gt 0 ; then +- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` ++ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0` + if test "$tmp" -gt 0 ; then + if test "$req_gpgme_api" -ne "$tmp" ; then + ok=no +@@ -267,17 +177,9 @@ AC_DEFUN([AM_PATH_GPGME_GLIB], + fi + fi + if test $ok = yes; then +- GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags` +- GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs` +- AC_MSG_RESULT(yes) + ifelse([$2], , :, [$2]) + _AM_PATH_GPGME_CONFIG_HOST_CHECK + else +- GPGME_GLIB_CFLAGS="" +- GPGME_GLIB_LIBS="" +- AC_MSG_RESULT(no) + ifelse([$3], , :, [$3]) + fi +- AC_SUBST(GPGME_GLIB_CFLAGS) +- AC_SUBST(GPGME_GLIB_LIBS) + ]) +diff --git a/src/gpgme.pc.in b/src/gpgme.pc.in +new file mode 100644 +index 0000000..b69539f +--- /dev/null ++++ b/src/gpgme.pc.in +@@ -0,0 +1,15 @@ ++prefix=@prefix@ ++exec_prefix=@exec_prefix@ ++libdir=@libdir@ ++includedir=@includedir@ ++ ++# API info ++api_version=@GPGME_CONFIG_API_VERSION@ ++host=@GPGME_CONFIG_HOST@ ++ ++Name: gpgme ++Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program. ++Version: @VERSION@ ++Libs: -L${libdir} -lgpgme ++Cflags: -I${includedir} ++Requires: libassuan gpg-error +\ No newline at end of file +-- +2.8.1 + diff --git a/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch b/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch new file mode 100644 index 0000000000..f1f8c911fc --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme/0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch @@ -0,0 +1,65 @@ +From fb165c9bd96aca8c9ee3e4509c9b6e35d238ad2e Mon Sep 17 00:00:00 2001 +From: Mark Hatle +Date: Wed, 16 Aug 2017 02:02:47 -0400 +Subject: [PATCH 2/5] gpgme/lang/python: gpg-error-config should not be used. + +gpg-error-config was modified by OE to always return an error. So we want +to find an alternative way to retrieve whatever it is we need. It turns +out that the system is just trying to find the path to the gpg-error.h, which +we can pull in from the STAGING_INC environment. + +Upstream-Status: Inappropriate [changes are specific to OE] + +Signed-off-by: Mark Hatle + +Rebase to 1.9.0 + +Signed-off-by: Hongxu Jia +--- + lang/python/setup.py.in | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in +index bf4efa3..7c34487 100755 +--- a/lang/python/setup.py.in ++++ b/lang/python/setup.py.in +@@ -24,7 +24,6 @@ import glob + import subprocess + + # Out-of-tree build of the gpg bindings. +-gpg_error_config = ["gpg-error-config"] + gpgme_config_flags = ["--thread=pthread"] + gpgme_config = ["gpgme-config"] + gpgme_config_flags + gpgme_h = "" +@@ -52,13 +51,6 @@ else: + devnull = open(os.devnull, "w") + + try: +- subprocess.check_call(gpg_error_config + ['--version'], +- stdout=devnull) +-except: +- sys.exit("Could not find gpg-error-config. " + +- "Please install the libgpg-error development package.") +- +-try: + subprocess.check_call(gpgme_config + ['--version'], + stdout=devnull) + except: +@@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and minor >= 7)): + if not gpgme_h: + gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h") + +-gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0] +-gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h") ++gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h") + if not os.path.exists(gpg_error_h): +- gpg_error_h = \ +- glob.glob(os.path.join(gpg_error_prefix, "include", +- "*", "gpg-error.h"))[0] ++ sys.exit("gpg_error_h not found: %s" % gpg_error_h) + + print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h)) + +-- +2.8.1 + diff --git a/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch b/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch new file mode 100644 index 0000000000..d38331171e --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme/0003-Correctly-install-python-modules.patch @@ -0,0 +1,30 @@ +From 62332eec752dd790f4dd071dfb0dbe86be377203 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Wed, 16 Aug 2017 02:05:34 -0400 +Subject: [PATCH 3/5] Correctly install python modules + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin + +Rebase to 1.9.0 + +Signed-off-by: Hongxu Jia +--- + lang/python/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lang/python/Makefile.am b/lang/python/Makefile.am +index d91ead9..67f7cdc 100644 +--- a/lang/python/Makefile.am ++++ b/lang/python/Makefile.am +@@ -106,6 +106,7 @@ install-exec-local: + cd python$${VERSION}-gpg ; \ + $$PYTHON setup.py install \ + --prefix $(DESTDIR)$(prefix) \ ++ --install-lib=$(DESTDIR)${pythondir} \ + --record files.txt \ + --verbose ; \ + cat files.txt >> ../install_files.txt ; \ +-- +2.8.1 + diff --git a/meta/recipes-support/gpgme/gpgme/0004-python-import.patch b/meta/recipes-support/gpgme/gpgme/0004-python-import.patch new file mode 100644 index 0000000000..93071030f9 --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme/0004-python-import.patch @@ -0,0 +1,34 @@ +From ccbf028eea8815d3b16d6c34b527253a6b108ec3 Mon Sep 17 00:00:00 2001 +From: Ross Burton +Date: Wed, 16 Aug 2017 02:06:45 -0400 +Subject: [PATCH 4/5] python import + +Don't check for output on stderr to know if an import worked, host inputrc and +sysroot readline can cause warnings on stderr. + +Upstream-Status: Backport (from autoconf-archive 883a2abd) +Signed-off-by: Ross Burton + +Rebase to 1.9.0 + +Signed-off-by: Hongxu Jia +--- + m4/ax_python_devel.m4 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 +index b990d5b..318b089 100644 +--- a/m4/ax_python_devel.m4 ++++ b/m4/ax_python_devel.m4 +@@ -137,7 +137,7 @@ variable to configure. See ``configure --help'' for reference. + # + AC_MSG_CHECKING([for the distutils Python package]) + ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` +- if test -z "$ac_distutils_result"; then ++ if test $? -eq 0; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +-- +2.8.1 + diff --git a/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch b/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch new file mode 100644 index 0000000000..7a6cc7b84d --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme/0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch @@ -0,0 +1,31 @@ +From 064ae4441e2c11329748a18157988f9e953f9752 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +Date: Thu, 13 Apr 2017 16:40:27 +0300 +Subject: [PATCH 5/5] gpgme-config: skip all /lib* or /usr/lib* directories in + output + +The logic was not working in multilib setups which use other +directory names than plain /lib or /usr/lib. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin +--- + src/gpgme-config.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/gpgme-config.in b/src/gpgme-config.in +index a4d152e..8342865 100644 +--- a/src/gpgme-config.in ++++ b/src/gpgme-config.in +@@ -154,7 +154,7 @@ while test $# -gt 0; do + for i in $libs $tmp_l $assuan_libs $gpg_error_libs $tmp_x; do + skip=no + case $i in +- -L/usr/lib|-L/lib) ++ -L/usr/lib*|-L/lib*) + skip=yes + ;; + -L*|-l*) +-- +2.8.1 + diff --git a/meta/recipes-support/gpgme/gpgme/pkgconfig.patch b/meta/recipes-support/gpgme/gpgme/pkgconfig.patch deleted file mode 100644 index 341cabfc50..0000000000 --- a/meta/recipes-support/gpgme/gpgme/pkgconfig.patch +++ /dev/null @@ -1,295 +0,0 @@ -Update gpgme to use pkgconfig instead of -config files since its -simpler and less error prone when cross compiling. - -Upstream-Status: Denied [Upstream not interested in pkg-config support] -RP 2015/4/17 - -Rebase to 1.8.0 -Signed-off-by: Hongxu Jia ---- - configure.ac | 1 + - src/Makefile.am | 4 +- - src/gpgme-pthread.pc.in | 15 +++++++ - src/gpgme.m4 | 114 ++++-------------------------------------------- - src/gpgme.pc.in | 15 +++++++ - 5 files changed, 42 insertions(+), 107 deletions(-) - create mode 100644 src/gpgme-pthread.pc.in - create mode 100644 src/gpgme.pc.in - -diff --git a/configure.ac b/configure.ac -index 0a67b48..e402dd3 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -875,6 +875,7 @@ AC_CONFIG_FILES(Makefile src/Makefile - src/versioninfo.rc - src/gpgme.h) - AC_CONFIG_FILES(src/gpgme-config, chmod +x src/gpgme-config) -+AC_CONFIG_FILES(src/gpgme.pc src/gpgme-pthread.pc) - AC_CONFIG_FILES(lang/cpp/Makefile lang/cpp/src/Makefile) - AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig-w32.cmake.in) - AC_CONFIG_FILES(lang/cpp/src/GpgmeppConfig.cmake.in) -diff --git a/src/Makefile.am b/src/Makefile.am -index ce6f1d4..5f38fee 100644 ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -19,12 +19,14 @@ - ## Process this file with automake to produce Makefile.in - - EXTRA_DIST = gpgme-config.in gpgme.m4 libgpgme.vers ChangeLog-2011 \ -- gpgme.h.in versioninfo.rc.in gpgme.def -+ gpgme.h.in versioninfo.rc.in gpgme.def gpgme.pc.in gpgme-pthread.pc.in - - bin_SCRIPTS = gpgme-config - m4datadir = $(datadir)/aclocal - m4data_DATA = gpgme.m4 - nodist_include_HEADERS = gpgme.h -+pkgconfigdir = $(libdir)/pkgconfig -+pkgconfig_DATA = gpgme.pc gpgme-pthread.pc - - bin_PROGRAMS = gpgme-tool - -diff --git a/src/gpgme-pthread.pc.in b/src/gpgme-pthread.pc.in -new file mode 100644 -index 0000000..980a48e ---- /dev/null -+++ b/src/gpgme-pthread.pc.in -@@ -0,0 +1,15 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+# API info -+api_version=@GPGME_CONFIG_API_VERSION@ -+host=@GPGME_CONFIG_HOST@ -+ -+Name: gpgme -+Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program (deprecated) -+Version: @VERSION@ -+Libs: -L${libdir} -lgpgme -lpthread -+Cflags: -I${includedir} -+Requires: libassuan gpg-error -diff --git a/src/gpgme.m4 b/src/gpgme.m4 -index 6c2be44..d8a75cb 100644 ---- a/src/gpgme.m4 -+++ b/src/gpgme.m4 -@@ -79,7 +79,7 @@ dnl config script does not match the host specification the script - dnl is added to the gpg_config_script_warn variable. - dnl - AC_DEFUN([AM_PATH_GPGME], --[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl -+[ - tmp=ifelse([$1], ,1:0.4.2,$1) - if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then - req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` -@@ -89,36 +89,12 @@ AC_DEFUN([AM_PATH_GPGME], - min_gpgme_version="$tmp" - fi - -- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) -- ok=no -- if test "$GPGME_CONFIG" != "no" ; then -- req_major=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` -- req_minor=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` -- req_micro=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` -- if test "$gpgme_version_major" -gt "$req_major"; then -- ok=yes -- else -- if test "$gpgme_version_major" -eq "$req_major"; then -- if test "$gpgme_version_minor" -gt "$req_minor"; then -- ok=yes -- else -- if test "$gpgme_version_minor" -eq "$req_minor"; then -- if test "$gpgme_version_micro" -ge "$req_micro"; then -- ok=yes -- fi -- fi -- fi -- fi -- fi -- fi -+ PKG_CHECK_MODULES(GPGME, [gpgme >= $min_gpgme_version], [ok=yes], [ok=no]) - if test $ok = yes; then - # If we have a recent GPGME, we should also check that the - # API is compatible. - if test "$req_gpgme_api" -gt 0 ; then -- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` -+ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0` - if test "$tmp" -gt 0 ; then - if test "$req_gpgme_api" -ne "$tmp" ; then - ok=no -@@ -127,19 +103,11 @@ AC_DEFUN([AM_PATH_GPGME], - fi - fi - if test $ok = yes; then -- GPGME_CFLAGS=`$GPGME_CONFIG --cflags` -- GPGME_LIBS=`$GPGME_CONFIG --libs` -- AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - _AM_PATH_GPGME_CONFIG_HOST_CHECK - else -- GPGME_CFLAGS="" -- GPGME_LIBS="" -- AC_MSG_RESULT(no) - ifelse([$3], , :, [$3]) - fi -- AC_SUBST(GPGME_CFLAGS) -- AC_SUBST(GPGME_LIBS) - ]) - - dnl AM_PATH_GPGME_PTHREAD([MINIMUM-VERSION, -@@ -148,7 +116,7 @@ dnl Test for libgpgme and define GPGME_PTHREAD_CFLAGS - dnl and GPGME_PTHREAD_LIBS. - dnl - AC_DEFUN([AM_PATH_GPGME_PTHREAD], --[ AC_REQUIRE([_AM_PATH_GPGME_CONFIG])dnl -+[ - tmp=ifelse([$1], ,1:0.4.2,$1) - if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then - req_gpgme_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` -@@ -158,38 +126,12 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD], - min_gpgme_version="$tmp" - fi - -- AC_MSG_CHECKING(for GPGME pthread - version >= $min_gpgme_version) -- ok=no -- if test "$GPGME_CONFIG" != "no" ; then -- if `$GPGME_CONFIG --thread=pthread 2> /dev/null` ; then -- req_major=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` -- req_minor=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` -- req_micro=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` -- if test "$gpgme_version_major" -gt "$req_major"; then -- ok=yes -- else -- if test "$gpgme_version_major" -eq "$req_major"; then -- if test "$gpgme_version_minor" -gt "$req_minor"; then -- ok=yes -- else -- if test "$gpgme_version_minor" -eq "$req_minor"; then -- if test "$gpgme_version_micro" -ge "$req_micro"; then -- ok=yes -- fi -- fi -- fi -- fi -- fi -- fi -- fi -+ PKG_CHECK_MODULES(GPGME_PTHREAD, [gpgme-pthread >= $min_gpgme_version], [ok=yes], [ok=no]) - if test $ok = yes; then - # If we have a recent GPGME, we should also check that the - # API is compatible. - if test "$req_gpgme_api" -gt 0 ; then -- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` -+ tmp=`$PKG_CONFIG --variable=api_version gpgme-pthread 2>/dev/null || echo 0` - if test "$tmp" -gt 0 ; then - if test "$req_gpgme_api" -ne "$tmp" ; then - ok=no -@@ -198,19 +140,11 @@ AC_DEFUN([AM_PATH_GPGME_PTHREAD], - fi - fi - if test $ok = yes; then -- GPGME_PTHREAD_CFLAGS=`$GPGME_CONFIG --thread=pthread --cflags` -- GPGME_PTHREAD_LIBS=`$GPGME_CONFIG --thread=pthread --libs` -- AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - _AM_PATH_GPGME_CONFIG_HOST_CHECK - else -- GPGME_PTHREAD_CFLAGS="" -- GPGME_PTHREAD_LIBS="" -- AC_MSG_RESULT(no) - ifelse([$3], , :, [$3]) - fi -- AC_SUBST(GPGME_PTHREAD_CFLAGS) -- AC_SUBST(GPGME_PTHREAD_LIBS) - ]) - - -@@ -229,36 +163,12 @@ AC_DEFUN([AM_PATH_GPGME_GLIB], - min_gpgme_version="$tmp" - fi - -- AC_MSG_CHECKING(for GPGME - version >= $min_gpgme_version) -- ok=no -- if test "$GPGME_CONFIG" != "no" ; then -- req_major=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` -- req_minor=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` -- req_micro=`echo $min_gpgme_version | \ -- sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` -- if test "$gpgme_version_major" -gt "$req_major"; then -- ok=yes -- else -- if test "$gpgme_version_major" -eq "$req_major"; then -- if test "$gpgme_version_minor" -gt "$req_minor"; then -- ok=yes -- else -- if test "$gpgme_version_minor" -eq "$req_minor"; then -- if test "$gpgme_version_micro" -ge "$req_micro"; then -- ok=yes -- fi -- fi -- fi -- fi -- fi -- fi -+ PKG_CHECK_MODULES(GPGME_GLIB, [gpgme >= $min_gpgme_version glib-2.0], [ok=yes], [ok=no]) - if test $ok = yes; then - # If we have a recent GPGME, we should also check that the - # API is compatible. - if test "$req_gpgme_api" -gt 0 ; then -- tmp=`$GPGME_CONFIG --api-version 2>/dev/null || echo 0` -+ tmp=`$PKG_CONFIG --variable=api_version gpgme 2>/dev/null || echo 0` - if test "$tmp" -gt 0 ; then - if test "$req_gpgme_api" -ne "$tmp" ; then - ok=no -@@ -267,17 +177,9 @@ AC_DEFUN([AM_PATH_GPGME_GLIB], - fi - fi - if test $ok = yes; then -- GPGME_GLIB_CFLAGS=`$GPGME_CONFIG --glib --cflags` -- GPGME_GLIB_LIBS=`$GPGME_CONFIG --glib --libs` -- AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) - _AM_PATH_GPGME_CONFIG_HOST_CHECK - else -- GPGME_GLIB_CFLAGS="" -- GPGME_GLIB_LIBS="" -- AC_MSG_RESULT(no) - ifelse([$3], , :, [$3]) - fi -- AC_SUBST(GPGME_GLIB_CFLAGS) -- AC_SUBST(GPGME_GLIB_LIBS) - ]) -diff --git a/src/gpgme.pc.in b/src/gpgme.pc.in -new file mode 100644 -index 0000000..b69539f ---- /dev/null -+++ b/src/gpgme.pc.in -@@ -0,0 +1,15 @@ -+prefix=@prefix@ -+exec_prefix=@exec_prefix@ -+libdir=@libdir@ -+includedir=@includedir@ -+ -+# API info -+api_version=@GPGME_CONFIG_API_VERSION@ -+host=@GPGME_CONFIG_HOST@ -+ -+Name: gpgme -+Description: GnuPG Made Easy (GPGME) is a C language library that allows to addsupport for cryptography to a program. -+Version: @VERSION@ -+Libs: -L${libdir} -lgpgme -+Cflags: -I${includedir} -+Requires: libassuan gpg-error -\ No newline at end of file --- -2.8.1 - diff --git a/meta/recipes-support/gpgme/gpgme/python-import.patch b/meta/recipes-support/gpgme/gpgme/python-import.patch deleted file mode 100644 index 61b77a1f75..0000000000 --- a/meta/recipes-support/gpgme/gpgme/python-import.patch +++ /dev/null @@ -1,19 +0,0 @@ -Don't check for output on stderr to know if an import worked, host inputrc and -sysroot readline can cause warnings on stderr. - -Upstream-Status: Backport (from autoconf-archive 883a2abd) -Signed-off-by: Ross Burton - -diff --git a/m4/ax_python_devel.m4 b/m4/ax_python_devel.m4 -index b990d5b..318b089 100644 ---- a/m4/ax_python_devel.m4 -+++ b/m4/ax_python_devel.m4 -@@ -137,7 +137,7 @@ variable to configure. See ``configure --help'' for reference. - # - AC_MSG_CHECKING([for the distutils Python package]) - ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` -- if test -z "$ac_distutils_result"; then -+ if test $? -eq 0; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) diff --git a/meta/recipes-support/gpgme/gpgme/python-lang-config.patch b/meta/recipes-support/gpgme/gpgme/python-lang-config.patch deleted file mode 100644 index 132e42677f..0000000000 --- a/meta/recipes-support/gpgme/gpgme/python-lang-config.patch +++ /dev/null @@ -1,52 +0,0 @@ -gpgme/lang/python: gpg-error-config should not be used. - -gpg-error-config was modified by OE to always return an error. So we want -to find an alternative way to retrieve whatever it is we need. It turns -out that the system is just trying to find the path to the gpg-error.h, which -we can pull in from the STAGING_INC environment. - -Upstream-Status: Inappropriate [changes are specific to OE] - -Signed-off-by: Mark Hatle - -Index: gpgme-1.8.0/lang/python/setup.py.in -=================================================================== ---- gpgme-1.8.0.orig/lang/python/setup.py.in -+++ gpgme-1.8.0/lang/python/setup.py.in -@@ -24,7 +24,6 @@ import glob - import subprocess - - # Out-of-tree build of the gpg bindings. --gpg_error_config = ["gpg-error-config"] - gpgme_config_flags = ["--thread=pthread"] - gpgme_config = ["gpgme-config"] + gpgme_config_flags - gpgme_h = "" -@@ -52,13 +51,6 @@ else: - devnull = open(os.devnull, "w") - - try: -- subprocess.check_call(gpg_error_config + ['--version'], -- stdout=devnull) --except: -- sys.exit("Could not find gpg-error-config. " + -- "Please install the libgpg-error development package.") -- --try: - subprocess.check_call(gpgme_config + ['--version'], - stdout=devnull) - except: -@@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and min - if not gpgme_h: - gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h") - --gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0] --gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h") -+gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h") - if not os.path.exists(gpg_error_h): -- gpg_error_h = \ -- glob.glob(os.path.join(gpg_error_prefix, "include", -- "*", "gpg-error.h"))[0] -+ sys.exit("gpg_error_h not found: %s" % gpg_error_h) - - print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h)) - diff --git a/meta/recipes-support/gpgme/gpgme_1.8.0.bb b/meta/recipes-support/gpgme/gpgme_1.8.0.bb deleted file mode 100644 index 4ddf6ed999..0000000000 --- a/meta/recipes-support/gpgme/gpgme_1.8.0.bb +++ /dev/null @@ -1,76 +0,0 @@ -SUMMARY = "High-level GnuPG encryption/signing API" -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" -HOMEPAGE = "http://www.gnupg.org/gpgme.html" -BUGTRACKER = "https://bugs.g10code.com/gnupg/index" - -LICENSE = "GPLv2+ & LGPLv2.1+" -LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ - file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \ - file://src/gpgme.h.in;endline=23;md5=0f7059665c4b7897f4f4d0cb93aa9f98 \ - file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" - -UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" -SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ - file://pkgconfig.patch \ - file://python-lang-config.patch \ - file://0001-Correctly-install-python-modules.patch \ - file://python-import.patch \ - file://0001-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \ - " - -SRC_URI[md5sum] = "722a4153904b9b5dc15485a22d29263b" -SRC_URI[sha256sum] = "596097257c2ce22e747741f8ff3d7e24f6e26231fa198a41b2a072e62d1e5d33" - -DEPENDS = "libgpg-error libassuan" -RDEPENDS_${PN}-cpp += "libstdc++" - -RDEPENDS_python2-gpg += "python-unixadmin" -RDEPENDS_python3-gpg += "python3-unixadmin" - -BINCONFIG = "${bindir}/gpgme-config" - -# Note select python2 or python3, but you can't select both at the same time -PACKAGECONFIG ??= "python3" -PACKAGECONFIG[python2] = ",,python swig-native," -PACKAGECONFIG[python3] = ",,python3 swig-native," - -# Default in configure.ac: "cl cpp python qt" -# Supported: "cl cpp python python2 python3 qt" -# python says 'search and find python2 or python3' - -# Building the C++ bindings for native requires a C++ compiler with C++11 -# support. Since these bindings are currently not needed, we can disable them. -DEFAULT_LANGUAGES = "" -DEFAULT_LANGUAGES_class-target = "cpp" -LANGUAGES ?= "${DEFAULT_LANGUAGES}" -LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" -LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" - -PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" -PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" - -EXTRA_OECONF += '--enable-languages="${LANGUAGES}"' - -inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT} - -export PKG_CONFIG='pkg-config' - -BBCLASSEXTEND = "native nativesdk" - -PACKAGES =+ "${PN}-cpp" -PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}" -PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}" - -FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*" -FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" -FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" -FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \ - ${libdir}/cmake/* \ -" - -CFLAGS_append_libc-musl = " -D__error_t_defined " -do_configure_prepend () { - # Else these could be used in preference to those in aclocal-copy - rm -f ${S}/m4/gpg-error.m4 - rm -f ${S}/m4/libassuan.m4 -} diff --git a/meta/recipes-support/gpgme/gpgme_1.9.0.bb b/meta/recipes-support/gpgme/gpgme_1.9.0.bb new file mode 100644 index 0000000000..251814743d --- /dev/null +++ b/meta/recipes-support/gpgme/gpgme_1.9.0.bb @@ -0,0 +1,76 @@ +SUMMARY = "High-level GnuPG encryption/signing API" +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" +HOMEPAGE = "http://www.gnupg.org/gpgme.html" +BUGTRACKER = "https://bugs.g10code.com/gnupg/index" + +LICENSE = "GPLv2+ & LGPLv2.1+" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \ + file://COPYING.LESSER;md5=bbb461211a33b134d42ed5ee802b37ff \ + file://src/gpgme.h.in;endline=23;md5=9d157d08a69059344e6f82abd2d25781 \ + file://src/engine.h;endline=22;md5=4b6d8ba313d9b564cc4d4cfb1640af9d" + +UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" +SRC_URI = "${GNUPG_MIRROR}/gpgme/${BP}.tar.bz2 \ + file://0001-pkgconfig.patch \ + file://0002-gpgme-lang-python-gpg-error-config-should-not-be-use.patch \ + file://0003-Correctly-install-python-modules.patch \ + file://0004-python-import.patch \ + file://0005-gpgme-config-skip-all-lib-or-usr-lib-directories-in-.patch \ + " + +SRC_URI[md5sum] = "1e00bb8ef04d1d05d5a0f19e143854c3" +SRC_URI[sha256sum] = "1b29fedb8bfad775e70eafac5b0590621683b2d9869db994568e6401f4034ceb" + +DEPENDS = "libgpg-error libassuan" +RDEPENDS_${PN}-cpp += "libstdc++" + +RDEPENDS_python2-gpg += "python-unixadmin" +RDEPENDS_python3-gpg += "python3-unixadmin" + +BINCONFIG = "${bindir}/gpgme-config" + +# Note select python2 or python3, but you can't select both at the same time +PACKAGECONFIG ??= "python3" +PACKAGECONFIG[python2] = ",,python swig-native," +PACKAGECONFIG[python3] = ",,python3 swig-native," + +# Default in configure.ac: "cl cpp python qt" +# Supported: "cl cpp python python2 python3 qt" +# python says 'search and find python2 or python3' + +# Building the C++ bindings for native requires a C++ compiler with C++11 +# support. Since these bindings are currently not needed, we can disable them. +DEFAULT_LANGUAGES = "" +DEFAULT_LANGUAGES_class-target = "cpp" +LANGUAGES ?= "${DEFAULT_LANGUAGES}" +LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python2', ' python2', '', d)}" +LANGUAGES .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', ' python3', '', d)}" + +PYTHON_INHERIT = "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'pythonnative', '', d)}" +PYTHON_INHERIT .= "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3native', '', d)}" + +EXTRA_OECONF += '--enable-languages="${LANGUAGES}"' + +inherit autotools texinfo binconfig-disabled pkgconfig ${PYTHON_INHERIT} + +export PKG_CONFIG='pkg-config' + +BBCLASSEXTEND = "native nativesdk" + +PACKAGES =+ "${PN}-cpp" +PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python2', 'python2-gpg ', '', d)}" +PACKAGES =. "${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-gpg ', '', d)}" + +FILES_${PN}-cpp = "${libdir}/libgpgmepp.so.*" +FILES_python2-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" +FILES_python3-gpg = "${PYTHON_SITEPACKAGES_DIR}/*" +FILES_${PN}-dev += "${datadir}/common-lisp/source/gpgme/* \ + ${libdir}/cmake/* \ +" + +CFLAGS_append_libc-musl = " -D__error_t_defined " +do_configure_prepend () { + # Else these could be used in preference to those in aclocal-copy + rm -f ${S}/m4/gpg-error.m4 + rm -f ${S}/m4/libassuan.m4 +} -- cgit 1.2.3-korg