From c1696d67206c36d6aeaf8f0e618c3e9246668c42 Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Wed, 11 Mar 2020 11:58:42 +0100 Subject: main/gcr: upgrade to 3.36.0 --- main/gcr/APKBUILD | 52 +++++++++---------------------- main/gcr/allow-building-without-gpg.patch | 39 +++++++++++++++++++++++ main/gcr/dont-run-gpg-tests.patch | 12 +++++++ main/gcr/remove-failing-test.patch | 13 -------- 4 files changed, 66 insertions(+), 50 deletions(-) create mode 100644 main/gcr/allow-building-without-gpg.patch create mode 100644 main/gcr/dont-run-gpg-tests.patch delete mode 100644 main/gcr/remove-failing-test.patch diff --git a/main/gcr/APKBUILD b/main/gcr/APKBUILD index 1c6de14883..4c30449a2a 100644 --- a/main/gcr/APKBUILD +++ b/main/gcr/APKBUILD @@ -2,61 +2,38 @@ # Contributor: Natanael Copa # Maintainer: Rasmus Thomsen pkgname=gcr -pkgver=3.34.0 +pkgver=3.36.0 pkgrel=0 pkgdesc="A library for bits of crypto UI and parsing" url="https://wiki.gnome.org/Projects/CryptoGlue" arch="all" license="LGPL-2.0-or-later" makedepends="glib-dev gtk+3.0-dev libgcrypt-dev p11-kit-dev - gobject-introspection-dev libxslt vala" -checkdepends="python3" + gobject-introspection-dev libxslt vala meson gtk-doc" +checkdepends="xvfb-run dbus-x11" subpackages="$pkgname-dev $pkgname-doc $pkgname-lang $pkgname-base" source="https://download.gnome.org/sources/gcr/${pkgver%.*}/gcr-$pkgver.tar.xz - remove-failing-test.patch" + allow-building-without-gpg.patch + dont-run-gpg-tests.patch" build() { - ./configure \ - --build=$CBUILD \ - --host=$CHOST \ + meson \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ - --infodir=/usr/share/info \ --localstatedir=/var \ - --enable-introspection \ - --enable-vala - make + --buildtype=plain \ + -Dgpg_path=/usr/bin/gpg2 \ + output + ninja -C output } check() { - # only run tests that does not require gnupg to avoid circular dependency: - # gcr -> gnupg -> pinentry -> gcr - make check TESTS=" - test-asn1 test-asn1x test-dn - test-decimal test-hex test-hkdf - test-oid test-secmem test-padding - test-symkey test-armor test-openssl - test-dh - test-gck-attributes test-gck-module - test-gck-slot test-gck-session - test-gck-object test-gck-crypto - test-gck-uri test-gck-enumerator - test-gck-modules - test-secret-exchange test-simple-certificate - test-certificate test-certificate-chain - test-subject-public-key test-fingerprint - test-pkcs11-certificate test-openpgp - test-openssh test-secure-memory - test-trust test-parser - test-memory-icon test-gnupg-key - test-gnupg-process - test-ssh-askpass - " + xvfb-run ninja -C output test } package() { - make DESTDIR="$pkgdir" install + DESTDIR="$pkgdir" ninja -C output install } base() { @@ -68,5 +45,6 @@ base() { "$subpkgdir"/usr/lib } -sha512sums="9314b531ed46a42b2c8c1531c7d95003db04f2c8065e46f4e6a84ec26400ce6302ea71c4db42a8c7b98884a0b84d75a0ca65d988aa0fe6de6d897d772b070093 gcr-3.34.0.tar.xz -1e2d8641a3ccc9989704c901ea636c2a6e3c8cd0bc86193bf9c178f7edbddda7158846cb07099ef4098c774a0bcb7a45ddbbd093ce7b5355cca2f7ac3a2d6130 remove-failing-test.patch" +sha512sums="0431e7971b73accc62869c9497fcff7c111c453aa6a8ff25b42f19ceae1be0aec52e0e4eb504676f967c6e4f179198c15c521278690822e3457dbc5fe512fd5e gcr-3.36.0.tar.xz +7cca3fd0512621129f0a0c532a3592b4ea0e49f887cf5935b1a104363d08fca05dbba470672561efa4b8b02efdbe22c948f989af26fdb32833a82383393207f0 allow-building-without-gpg.patch +e4fc2248497e7103980e9baf9444505649ee93c657c7a82c042ae62d7c54b2764ad7bc9780467ceda5e53a23fa11dc4957898929c7d7f995d9d0d205d18d5eb7 dont-run-gpg-tests.patch" diff --git a/main/gcr/allow-building-without-gpg.patch b/main/gcr/allow-building-without-gpg.patch new file mode 100644 index 0000000000..7560419e8d --- /dev/null +++ b/main/gcr/allow-building-without-gpg.patch @@ -0,0 +1,39 @@ +Upstream: See https://gitlab.gnome.org/GNOME/gcr/-/merge_requests/50 +diff --git a/meson.build b/meson.build +index f19af0f..57b625b 100644 +--- a/meson.build ++++ b/meson.build +@@ -41,7 +41,10 @@ gobject_dep = dependency('gobject-2.0', version: '>=' + min_glib_version) + gio_dep = dependency('gio-2.0', version: '>=' + min_glib_version) + gio_unix_dep = dependency('gio-unix-2.0',version: '>=' + min_glib_version) + glib_deps = [ glib_dep, gmodule_dep, gthread_dep, gobject_dep, gio_dep, gio_unix_dep, ] +-gpg_bin = find_program('gpg2', 'gpg') ++gpg_path = get_option('gpg_path') ++if gpg_path == '' ++ gpg_path = find_program('gpg2', 'gpg').path() ++endif + libgcrypt_dep = dependency('libgcrypt', version: '>= 1') + p11kit_dep = dependency('p11-kit-1', version: '>= 0.19.0') + p11_system_config_modules = p11kit_dep.get_pkgconfig_variable('p11_system_config_modules') +@@ -65,7 +68,7 @@ conf.set('HAVE_GETTEXT', true) + conf.set('HAVE_LOCALE_H', cc.has_header('locale.h')) + conf.set('HAVE_TIMEGM', cc.has_function('timegm')) + conf.set('HAVE_MLOCK', cc.has_function('mlock')) +-conf.set_quoted('GPG_EXECUTABLE', gpg_bin.path()) ++conf.set_quoted('GPG_EXECUTABLE', gpg_path) + conf.set_quoted('LIBGCRYPT_VERSION', libgcrypt_dep.version()) + config_file = configure_file( + output: 'config.h', +diff --git a/meson_options.txt b/meson_options.txt +index bbdc8e3..ae0f524 100644 +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -13,3 +13,8 @@ option('gtk_doc', + value: true, + description: 'Build the reference documentation (requires gtk-doc)', + ) ++option('gpg_path', ++ type: 'string', ++ value: '', ++ description: 'Path to gpg, autodetected if not set', ++) diff --git a/main/gcr/dont-run-gpg-tests.patch b/main/gcr/dont-run-gpg-tests.patch new file mode 100644 index 0000000000..acab92442a --- /dev/null +++ b/main/gcr/dont-run-gpg-tests.patch @@ -0,0 +1,12 @@ +diff --git a/gcr/meson.build b/gcr/meson.build +index 254a933..8c17e7c 100644 +--- a/gcr/meson.build ++++ b/gcr/meson.build +@@ -271,7 +271,6 @@ gcr_test_names = [ + 'record', + 'memory-icon', + 'gnupg-key', +- 'gnupg-collection', + 'gnupg-process', + 'system-prompt', + 'ssh-askpass', diff --git a/main/gcr/remove-failing-test.patch b/main/gcr/remove-failing-test.patch deleted file mode 100644 index 85df1c0275..0000000000 --- a/main/gcr/remove-failing-test.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/gcr/test-gnupg-collection.c b/gcr/test-gnupg-collection.c -index 893669c..bca1917 100644 ---- a/gcr/test-gnupg-collection.c -+++ b/gcr/test-gnupg-collection.c -@@ -199,8 +199,6 @@ test_load (Test *test, gconstpointer unused) - /* Phillip R. Zimmerman's key should have a photo */ - key = g_hash_table_lookup (test->keys, "C7463639B2D7795E"); - g_assert (GCR_IS_GNUPG_KEY (key)); -- record = _gcr_records_find (_gcr_gnupg_key_get_public_records (key), GCR_RECORD_SCHEMA_XA1); -- g_assert (record); - } - - int -- cgit v1.2.3