Permalink
Browse files

FL-654: add gobject patch to gcr

  • Loading branch information...
1 parent 90a1d2a commit 4f534edd2e7603ca144a239dbfc3fe00dad63cf0 @angryvincent angryvincent committed Aug 3, 2013
View
@@ -0,0 +1,2 @@
+DIST gcr-3.4.1.tar.xz 1335160 SHA256 a0812b6e9623465b0053f4b1b09f3b9316317b2c6ed69a73bc2c5b3b6b849609 SHA512 bfd298b2fe52a97bcae6988b865dbe4f43ade209531cb5ddeebbd4a5f9ac3310f2bf9aebfc6101da63b2db427b8d4b822d3711693ab91a6227f632a7d9189874 WHIRLPOOL 01386f8b140f99861c9dc24b25dc675b862d851ef31cae94ac071d30701e5fc357fb7d763c23ba0d64578fb0f2ece36ec087302e356aafb3f9abe1b53a1f936a
+DIST gcr-3.6.2.tar.xz 1365124 SHA256 f709db2435e3635b68d8aa212863e0a8e81b1cc33442852a5183762876c7be9b SHA512 77ef1da381436db128cc2c784b989776f0975360c9c374989cfcb7c4aecd45eaaea9f0b6b82881e093165b3b67d18914582d2f233e856d4bb39f9d04e7f6fa15 WHIRLPOOL 1de2178d1367ba5c2837fe4e6a71a2f55253b4813b70984c39d93e4a38545fb17c315d6d9f545f83b842ae618dac1618245dae73f3298aa9210e9cbde5579cdb
@@ -0,0 +1,46 @@
+From b7e899d45a49085e2cedbff1cf76e6d8450b0bea Mon Sep 17 00:00:00 2001
+From: Stef Walter <stefw@gnome.org>
+Date: Sat, 30 Jun 2012 13:10:31 +0200
+Subject: [PATCH] gcr: Fix invalid warning when sending a secret exchange
+
+ * We checked the prefix of the sent data, but didn't correctly
+ remove whitespace. In addition the check was inverted
+ * Exposed by recent changes to glib, which changed the whitespace
+ in the format a GKeyFile slightly
+---
+ gcr/gcr-secret-exchange.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/gcr/gcr-secret-exchange.c b/gcr/gcr-secret-exchange.c
+index cb3941f..f6eb32e 100644
+--- a/gcr/gcr-secret-exchange.c
++++ b/gcr/gcr-secret-exchange.c
+@@ -292,9 +292,9 @@ gcr_secret_exchange_begin (GcrSecretExchange *self)
+ result = g_key_file_to_data (output, NULL, NULL);
+ g_return_val_if_fail (result != NULL, NULL);
+
+- g_strchomp (result);
++ g_strchug (result);
+
+- if (g_str_has_prefix (result, SECRET_EXCHANGE_PROTOCOL_1_PREFIX))
++ if (!g_str_has_prefix (result, SECRET_EXCHANGE_PROTOCOL_1_PREFIX))
+ g_warning ("the prepared data does not have the correct protocol prefix");
+
+ g_key_file_free (output);
+@@ -540,10 +540,10 @@ gcr_secret_exchange_send (GcrSecretExchange *self,
+ result = g_key_file_to_data (output, NULL, NULL);
+ g_return_val_if_fail (result != NULL, NULL);
+
+- g_strchomp (result);
++ g_strchug (result);
+
+- if (g_str_has_prefix (result, SECRET_EXCHANGE_PROTOCOL_1_PREFIX))
+- g_warning ("the prepared data does not have the correct protocol prefix");
++ if (!g_str_has_prefix (result, SECRET_EXCHANGE_PROTOCOL_1_PREFIX))
++ g_warning ("the prepared data does not have the correct protocol prefix: %s", result);
+
+ g_key_file_free (output);
+ return result;
+--
+1.7.12
+
@@ -0,0 +1,136 @@
+From 0b889388a7f45258fa2291dd577b2ea7ca8d42c0 Mon Sep 17 00:00:00 2001
+From: Stef Walter <stefw@gnome.org>
+Date: Mon, 11 Feb 2013 16:43:54 +0000
+Subject: Use GObject.Object instead of GLib.Object in introspection annotations
+
+A gobject-introspection change broke the former.
+
+Bug: https://bugzilla.gnome.org/show_bug.cgi?id=693440
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1163786
+
+Index: gcr-3.6.2/gck/gck-misc.c
+===================================================================
+--- gcr-3.6.2.orig/gck/gck-misc.c 2012-10-27 15:03:06.000000000 +0200
++++ gcr-3.6.2/gck/gck-misc.c 2013-04-03 11:15:51.006103179 +0200
+@@ -261,7 +261,7 @@
+
+ /**
+ * gck_list_unref_free: (skip)
+- * @reflist: (element-type GLib.Object): list of Gobject reference counted pointers
++ * @reflist: (element-type GObject.Object): list of Gobject reference counted pointers
+ *
+ * Free a list of GObject based pointers. All objects in the list
+ * will be unreffed and then the list itself will be freed.
+@@ -279,13 +279,13 @@
+
+ /**
+ * gck_list_ref_copy: (skip)
+- * @reflist: (element-type GLib.Object): list of GObject reference counted
++ * @reflist: (element-type GObject.Object): list of GObject reference counted
+ * objects
+ *
+ * Copy a list of GObject based pointers. All objects
+ * in the list will be reffed and the list will be copied.
+ *
+- * Return value: (transfer full) (element-type GLib.Object): the copied and
++ * Return value: (transfer full) (element-type GObject.Object): the copied and
+ * reffed list, when done, free it with gck_list_unref_free ()
+ **/
+ GList *
+Index: gcr-3.6.2/gcr/gcr-collection-model.c
+===================================================================
+--- gcr-3.6.2.orig/gcr/gcr-collection-model.c 2012-09-19 11:01:28.000000000 +0200
++++ gcr-3.6.2/gcr/gcr-collection-model.c 2013-04-03 11:15:50.838103171 +0200
+@@ -1587,7 +1587,7 @@
+ *
+ * Get a list of checked/selected objects.
+ *
+- * Returns: (transfer container) (element-type GLib.Object): a list of selected
++ * Returns: (transfer container) (element-type GObject.Object): a list of selected
+ * objects, which should be freed with g_list_free()
+ */
+ GList *
+@@ -1611,7 +1611,7 @@
+ /**
+ * gcr_collection_model_set_selected_objects:
+ * @self: the collection model
+- * @selected: (element-type GLib.Object): a list of objects to select
++ * @selected: (element-type GObject.Object): a list of objects to select
+ *
+ * Set the checked/selected objects.
+ */
+Index: gcr-3.6.2/gcr/gcr-collection.c
+===================================================================
+--- gcr-3.6.2.orig/gcr/gcr-collection.c 2012-10-27 15:03:44.000000000 +0200
++++ gcr-3.6.2/gcr/gcr-collection.c 2013-04-03 11:15:50.814103170 +0200
+@@ -65,7 +65,7 @@
+ /**
+ * GcrCollection::added:
+ * @self: the collection
+- * @object: (type GLib.Object): object that was added
++ * @object: (type GObject.Object): object that was added
+ *
+ * This signal is emitted when an object is added to the collection.
+ */
+@@ -77,7 +77,7 @@
+ /**
+ * GcrCollection::removed:
+ * @self: the collection
+- * @object: (type GLib.Object): object that was removed
++ * @object: (type GObject.Object): object that was removed
+ *
+ * This signal is emitted when an object is removed from the collection.
+ */
+@@ -117,7 +117,7 @@
+ *
+ * Get a list of the objects in this collection.
+ *
+- * Returns: (transfer container) (element-type GLib.Object): a list of the objects
++ * Returns: (transfer container) (element-type GObject.Object): a list of the objects
+ * in this collection, which should be freed with g_list_free()
+ */
+ GList*
+Index: gcr-3.6.2/gcr/gcr-list-selector.c
+===================================================================
+--- gcr-3.6.2.orig/gcr/gcr-list-selector.c 2012-09-19 11:01:28.000000000 +0200
++++ gcr-3.6.2/gcr/gcr-list-selector.c 2013-04-03 11:15:50.878103173 +0200
+@@ -396,7 +396,7 @@
+ *
+ * Get a list of selected objects.
+ *
+- * Returns: (transfer container) (element-type GLib.Object): the list of
++ * Returns: (transfer container) (element-type GObject.Object): the list of
+ * selected objects, to be released with g_list_free()
+ */
+ GList*
+@@ -409,7 +409,7 @@
+ /**
+ * gcr_list_selector_set_selected:
+ * @self: The selector
+- * @selected: (element-type GLib.Object): the list of objects to select
++ * @selected: (element-type GObject.Object): the list of objects to select
+ *
+ * Select certain objects in the selector.
+ */
+Index: gcr-3.6.2/gcr/gcr-tree-selector.c
+===================================================================
+--- gcr-3.6.2.orig/gcr/gcr-tree-selector.c 2012-09-19 11:01:28.000000000 +0200
++++ gcr-3.6.2/gcr/gcr-tree-selector.c 2013-04-03 11:15:50.922103175 +0200
+@@ -337,7 +337,7 @@
+ *
+ * Get a list of selected objects.
+ *
+- * Returns: (transfer container) (element-type GLib.Object): the list of selected
++ * Returns: (transfer container) (element-type GObject.Object): the list of selected
+ * objects, to be released with g_list_free()
+ */
+ GList*
+@@ -350,7 +350,7 @@
+ /**
+ * gcr_tree_selector_set_selected:
+ * @self: The selector
+- * @selected: (element-type GLib.Object): The list of objects to select.
++ * @selected: (element-type GObject.Object): The list of objects to select.
+ *
+ * Select certain objects in the selector.
+ */
@@ -0,0 +1,64 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="4"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit autotools gnome2 virtualx
+
+DESCRIPTION="Libraries for cryptographic UIs and accessing PKCS#11 modules"
+HOMEPAGE="http://www.gnome.org/"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0"
+IUSE="debug +introspection"
+KEYWORDS="*"
+
+COMMON_DEPEND=">=app-crypt/gnupg-2
+ >=app-crypt/p11-kit-0.6
+ >=dev-libs/glib-2.30:2
+ >=dev-libs/libgcrypt-1.2.2
+ >=dev-libs/libtasn1-1
+ >=sys-apps/dbus-1.0
+ >=x11-libs/gtk+-3.0:3
+ introspection? ( >=dev-libs/gobject-introspection-1.29 )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gnome-keyring-3.3"
+# gcr was part of gnome-keyring until 3.3
+DEPEND="${COMMON_DEPEND}
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.9
+ >=dev-util/intltool-0.35
+ sys-devel/gettext
+ virtual/pkgconfig
+
+ dev-libs/gobject-introspection-common"
+# eautoreconf needs:
+# dev-libs/gobject-introspection-common
+
+src_prepare() {
+ DOCS="AUTHORS ChangeLog HACKING NEWS README"
+ G2CONF="${G2CONF}
+ $(use_enable debug)
+ $(use_enable introspection)
+ --disable-update-icon-cache
+ --disable-update-mime"
+
+ epatch "${FILESDIR}/${P}-invalid-whitespace.patch" #434422
+
+ # FIXME: failing tests
+ if use test; then
+ sed -e 's:test-subject-public-key::' \
+ -e 's:test-system-prompt:$(NULL):' \
+ -i gcr/tests/Makefile.am || die "sed failed"
+ eautoreconf
+ fi
+
+ gnome2_src_prepare
+}
+
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+ Xemake check
+}
@@ -0,0 +1,63 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+GCONF_DEBUG="no"
+GNOME2_LA_PUNT="yes"
+
+inherit eutils gnome2 virtualx
+
+DESCRIPTION="Libraries for cryptographic UIs and accessing PKCS#11 modules"
+HOMEPAGE="http://www.gnome.org/"
+
+LICENSE="GPL-2+ LGPL-2+"
+SLOT="0/1" # subslot = suffix of libgcr-3
+IUSE="debug +introspection"
+KEYWORDS="~*"
+
+COMMON_DEPEND="
+ >=app-crypt/gnupg-2
+ >=app-crypt/p11-kit-0.6
+ >=dev-libs/glib-2.32:2
+ >=dev-libs/libgcrypt-1.2.2:=
+ >=dev-libs/libtasn1-1:=
+ >=sys-apps/dbus-1.0
+ >=x11-libs/gtk+-3.0:3
+ introspection? ( >=dev-libs/gobject-introspection-1.29 )
+"
+RDEPEND="${COMMON_DEPEND}
+ !<gnome-base/gnome-keyring-3.3
+"
+# gcr was part of gnome-keyring until 3.3
+DEPEND="${COMMON_DEPEND}
+ dev-libs/gobject-introspection-common
+ dev-util/gdbus-codegen
+ >=dev-util/gtk-doc-am-1.9
+ >=dev-util/intltool-0.35
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+# eautoreconf needs:
+# dev-libs/gobject-introspection-common
+
+src_prepare() {
+ DOCS="AUTHORS ChangeLog HACKING NEWS README"
+ G2CONF="${G2CONF}
+ $(use_enable introspection)
+ $(usex debug --enable-debug=yes --enable-debug=default)
+ --disable-update-icon-cache
+ --disable-update-mime"
+
+ epatch "${FILESDIR}/${P}-gobject.patch"
+
+ # Disable stupid flag changes
+ sed -e 's/CFLAGS="$CFLAGS -g"//' \
+ -e 's/CFLAGS="$CFLAGS -O0"//' \
+ -i configure.ac configure || die
+
+ gnome2_src_prepare
+}
+
+src_test() {
+ unset DBUS_SESSION_BUS_ADDRESS
+ Xemake check
+}
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>gnome</herd>
+</pkgmetadata>

0 comments on commit 4f534ed

Please sign in to comment.