pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/chat/profanity
Module Name: pkgsrc
Committed By: wiz
Date: Sat Jan 31 23:07:00 UTC 2026
Modified Files:
pkgsrc/chat/profanity: Makefile distinfo
Added Files:
pkgsrc/chat/profanity/patches: patch-src_pgp_gpg.c
Log Message:
profanity: fix build with gpgme 2 using upstream patch
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 pkgsrc/chat/profanity/Makefile
cvs rdiff -u -r1.11 -r1.12 pkgsrc/chat/profanity/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/chat/profanity/patches/patch-src_pgp_gpg.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/chat/profanity/Makefile
diff -u pkgsrc/chat/profanity/Makefile:1.47 pkgsrc/chat/profanity/Makefile:1.48
--- pkgsrc/chat/profanity/Makefile:1.47 Tue Jan 27 08:39:05 2026
+++ pkgsrc/chat/profanity/Makefile Sat Jan 31 23:07:00 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.47 2026/01/27 08:39:05 wiz Exp $
+# $NetBSD: Makefile,v 1.48 2026/01/31 23:07:00 wiz Exp $
DISTNAME= profanity-0.14.0
-PKGREVISION= 21
+PKGREVISION= 22
CATEGORIES= chat
MASTER_SITES= ${MASTER_SITE_GITHUB:=profanity-im/}
GITHUB_RELEASE= ${PKGVERSION_NOREV}
Index: pkgsrc/chat/profanity/distinfo
diff -u pkgsrc/chat/profanity/distinfo:1.11 pkgsrc/chat/profanity/distinfo:1.12
--- pkgsrc/chat/profanity/distinfo:1.11 Wed Nov 8 16:37:46 2023
+++ pkgsrc/chat/profanity/distinfo Sat Jan 31 23:07:00 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.11 2023/11/08 16:37:46 nros Exp $
+$NetBSD: distinfo,v 1.12 2026/01/31 23:07:00 wiz Exp $
BLAKE2s (profanity-0.14.0.tar.gz) = a22eb5183294fef1008611e50a9f1b54520d49ecc258374e4a83bb22bd2651ad
SHA512 (profanity-0.14.0.tar.gz) = 25afd2f3146e6ed9f573f0e073cad0f06f7f8a21441c3c2c61641442d1aa5b9a7a817cdccc17354b32045ab9a965a95495a30c49088577a5060e8969725ea86e
@@ -6,4 +6,5 @@ Size (profanity-0.14.0.tar.gz) = 936272
SHA1 (patch-configure) = 90e14f5fa3945afd2b4edd9925ef13b1258780fd
SHA1 (patch-src_config.h.in) = 455700982a35a7eb277908971f3978f27a77a308
SHA1 (patch-src_config_preferences.c) = 17bf3adea60a4934a655e59a48551724506e158b
+SHA1 (patch-src_pgp_gpg.c) = c3f76e648431678cd37efb603be8e4b22e53b739
SHA1 (patch-src_ui_core.c) = 31a530cb3d485162fd647374c2cfe57815f3019f
Added files:
Index: pkgsrc/chat/profanity/patches/patch-src_pgp_gpg.c
diff -u /dev/null pkgsrc/chat/profanity/patches/patch-src_pgp_gpg.c:1.1
--- /dev/null Sat Jan 31 23:07:00 2026
+++ pkgsrc/chat/profanity/patches/patch-src_pgp_gpg.c Sat Jan 31 23:07:00 2026
@@ -0,0 +1,65 @@
+$NetBSD: patch-src_pgp_gpg.c,v 1.1 2026/01/31 23:07:00 wiz Exp $
+
+Fix GPGME >= 2.0.0 compatibility
+https://github.com/profanity-im/profanity/commit/606eaac31dfb97df16b0d2ba9466a3a67bec122a
+
+--- src/pgp/gpg.c.orig 2023-07-14 05:39:30.000000000 +0000
++++ src/pgp/gpg.c
+@@ -76,6 +76,7 @@ static ProfPGPKey* _gpgme_key_to_ProfPGPKey(gpgme_key_
+ static char* _gpgme_data_to_char(gpgme_data_t data);
+ static void _save_pubkeys(void);
+ static ProfPGPKey* _gpgme_key_to_ProfPGPKey(gpgme_key_t key);
++static const char* _gpgme_key_get_email(gpgme_key_t key);
+
+ void
+ _p_gpg_free_pubkeyid(ProfPGPPubKeyId* pubkeyid)
+@@ -683,7 +684,7 @@ p_gpg_decrypt(const char* const cipher)
+ error = gpgme_get_key(ctx, recipient->keyid, &key, 1);
+
+ if (!error && key) {
+- const char* addr = gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0);
++ const char* addr = _gpgme_key_get_email(key);
+ if (addr) {
+ g_string_append(recipients_str, addr);
+ }
+@@ -912,6 +913,40 @@ _gpgme_key_to_ProfPGPKey(gpgme_key_t key)
+ sub = sub->next;
+ }
+ return p_pgpkey;
++}
++
++/**
++ * Extract the first email address from a gpgme_key_t object.
++ * This function provides backwards compatibility for both old and new GPGME versions.
++ * - GPGME < 2.0.0: Uses gpgme_key_get_string_attr (if available)
++ * - GPGME >= 2.0.0: Uses modern key->uids->email API
++ *
++ * @param key The gpgme_key_t object to extract email from.
++ * @return The first email address found in the key's user IDs, or NULL if none found.
++ * The returned string should not be freed as it points to internal gpgme memory.
++ */
++static const char*
++_gpgme_key_get_email(gpgme_key_t key)
++{
++ if (!key) {
++ return NULL;
++ }
++
++#ifdef GPGME_ATTR_EMAIL
++ /* Use deprecated function if available (GPGME < 2.0.0) */
++ return gpgme_key_get_string_attr(key, GPGME_ATTR_EMAIL, NULL, 0);
++#else
++ /* Use modern API for GPGME >= 2.0.0 */
++ gpgme_user_id_t uid = key->uids;
++ while (uid) {
++ if (uid->email && strlen(uid->email) > 0) {
++ return uid->email;
++ }
++ uid = uid->next;
++ }
++
++ return NULL;
++#endif
+ }
+
+ /**
Home |
Main Index |
Thread Index |
Old Index