Mailing List Archive

[PATCH] gnome3: prefer gcr-4
Newer distributions are now using gcr-4, while older ones will still have
gcr-3. The APIs used by pinentry have not changed in between versions,
only the top-level header has changed. Also, for gcr-3, only gcr-base-3
is required.

(I have attempted to sign up for a dev.gnupg.org account, but am still
awaiting verification.)

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
configure.ac | 19 ++++++++++++++-----
gnome3/pinentry-gnome3.c | 4 ++++
2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index f9d090f..7dde8fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -458,15 +458,24 @@ AM_CONDITIONAL(BUILD_PINENTRY_GTK_2, test "$pinentry_gtk_2" = "yes")
if test "$pinentry_gnome_3" != "no"; then
PKG_CHECK_MODULES(
GNOME3,
- [gcr-3,gcr-base-3],
+ [gcr-4],
[
pinentry_gnome_3=yes
AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod])
+ AC_DEFINE(GCR_API_4, 1, [GCR API version])
],
- [
- AC_MSG_WARN([pkg-config could not find the module gcr-3,gcr-base-3])
- pinentry_gnome_3=no
- ]
+ [PKG_CHECK_MODULES(
+ GNOME3,
+ [gcr-base-3],
+ [
+ pinentry_gnome_3=yes
+ AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod])
+ ],
+ [.
+ AC_MSG_WARN([pkg-config could not find the module gcr-4 or gcr-base-3])
+ pinentry_gnome_3=no
+ ]
+ )]
)
fi

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index 8a8fbed..7f21d6f 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -23,7 +23,11 @@
# include "config.h"
#endif

+#ifdef GCR_API_4
+#include <gcr/gcr.h>
+#else
#include <gcr/gcr-base.h>
+#endif

#include <string.h>
#include <stdlib.h>
--
2.44.0


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
[PATCH] gnome3: prefer gcr-4 [ In reply to ]
Newer distributions are now using gcr-4, while older ones will still have
gcr-3. The APIs used by pinentry have not changed in between versions,
only the top-level header has changed. Also, for gcr-3, only gcr-base-3
is required.

(I have attempted to sign up for a dev.gnupg.org account, but am still
awaiting verification.)

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
---
configure.ac | 19 ++++++++++++++-----
gnome3/pinentry-gnome3.c | 4 ++++
2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index f9d090f..7dde8fb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -458,15 +458,24 @@ AM_CONDITIONAL(BUILD_PINENTRY_GTK_2, test "$pinentry_gtk_2" = "yes")
if test "$pinentry_gnome_3" != "no"; then
PKG_CHECK_MODULES(
GNOME3,
- [gcr-3,gcr-base-3],
+ [gcr-4],
[
pinentry_gnome_3=yes
AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod])
+ AC_DEFINE(GCR_API_4, 1, [GCR API version])
],
- [
- AC_MSG_WARN([pkg-config could not find the module gcr-3,gcr-base-3])
- pinentry_gnome_3=no
- ]
+ [PKG_CHECK_MODULES(
+ GNOME3,
+ [gcr-base-3],
+ [
+ pinentry_gnome_3=yes
+ AC_DEFINE(GCR_API_SUBJECT_TO_CHANGE, 1, [Nod nod])
+ ],
+ [.
+ AC_MSG_WARN([pkg-config could not find the module gcr-4 or gcr-base-3])
+ pinentry_gnome_3=no
+ ]
+ )]
)
fi

diff --git a/gnome3/pinentry-gnome3.c b/gnome3/pinentry-gnome3.c
index 8a8fbed..7f21d6f 100644
--- a/gnome3/pinentry-gnome3.c
+++ b/gnome3/pinentry-gnome3.c
@@ -23,7 +23,11 @@
# include "config.h"
#endif

+#ifdef GCR_API_4
+#include <gcr/gcr.h>
+#else
#include <gcr/gcr-base.h>
+#endif

#include <string.h>
#include <stdlib.h>
--
2.44.0


_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: [PATCH] gnome3: prefer gcr-4 [ In reply to ]
Hi!

On Sun, 10 Mar 2024 23:19, Yaakov Selkowitz said:
> Newer distributions are now using gcr-4, while older ones will still have
> gcr-3. The APIs used by pinentry have not changed in between versions,
> only the top-level header has changed. Also, for gcr-3, only gcr-base-3
> is required.

I just pushed your change. Thanks.

> (I have attempted to sign up for a dev.gnupg.org account, but am still
> awaiting verification.)

Approved. Sorry, there are so many bot generated attempts that we can't
timely approve well sounding accounts.


Shalom-Salam,

Werner

--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein