commit: 9db4bdcc36e46f87c0b3bded2e23ce8b0148bdae Author: Azamat H. Hackimov <azamat.hackimov <AT> gmail <DOT> com> AuthorDate: Sat Feb 17 10:37:10 2024 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Sat Mar 16 12:53:54 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9db4bdcc
x11-plugins/pidgin-gpg: fix compilation on musl Closes: https://bugs.gentoo.org/831185 Signed-off-by: Azamat H. Hackimov <azamat.hackimov <AT> gmail.com> Closes: https://github.com/gentoo/gentoo/pull/35386 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> .../files/pidgin-gpg-0.9.3_musl-support.patch | 32 ++++++++++++++++++++++ x11-plugins/pidgin-gpg/pidgin-gpg-0.9.3-r1.ebuild | 6 +++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/x11-plugins/pidgin-gpg/files/pidgin-gpg-0.9.3_musl-support.patch b/x11-plugins/pidgin-gpg/files/pidgin-gpg-0.9.3_musl-support.patch new file mode 100644 index 000000000000..47de6808fd5c --- /dev/null +++ b/x11-plugins/pidgin-gpg/files/pidgin-gpg-0.9.3_musl-support.patch @@ -0,0 +1,32 @@ +From https://github.com/Draghtnod/Pidgin-GPG/pull/9 +From: "Azamat H. Hackimov" <azamat.hacki...@gmail.com> +Date: Sat, 17 Feb 2024 13:28:40 +0300 +Subject: [PATCH] Fix compilation on MUSL systems + +In MUSL encrypt() is part of unistd.h, which conflicts with internal +static function encrypt(). Renamed last one to fix that. + +See: https://bugs.gentoo.org/831185 +--- a/src/pidgin-gpg.c ++++ b/src/pidgin-gpg.c +@@ -604,7 +604,7 @@ static char* verify( const char* sig_str ) { + * encrypt a plain string with the key found with fingerprint fpr + * FREE MEMORY AFTER USAGE OF RETURN VALUE! + * ------------------ */ +-static char* encrypt( gpgme_ctx_t* ctx, gpgme_key_t* key_arr, const char* plain_str, const char* fpr ) { ++static char* pidgin_gpg_encrypt( gpgme_ctx_t* ctx, gpgme_key_t* key_arr, const char* plain_str, const char* fpr ) { + if( ctx == NULL ) { + purple_debug_error( PLUGIN_ID, "encrypt: missing ctx\n" ); + return NULL; +@@ -1054,7 +1054,7 @@ void jabber_send_signal_cb( PurpleConnection* pc, xmlnode** packet, gpointer unu + g_free( bare_jid ); + + // encrypt message +- enc_str = encrypt( &item->ctx, item->key_arr, message, item->fpr ); ++ enc_str = pidgin_gpg_encrypt( &item->ctx, item->key_arr, message, item->fpr ); + g_free( message ); + if( enc_str != NULL ) { + // remove message from body +-- +2.43.0 + diff --git a/x11-plugins/pidgin-gpg/pidgin-gpg-0.9.3-r1.ebuild b/x11-plugins/pidgin-gpg/pidgin-gpg-0.9.3-r1.ebuild index ac3eeac2c984..03ca90a1df37 100644 --- a/x11-plugins/pidgin-gpg/pidgin-gpg-0.9.3-r1.ebuild +++ b/x11-plugins/pidgin-gpg/pidgin-gpg-0.9.3-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -20,6 +20,10 @@ BDEPEND="virtual/pkgconfig" S="${WORKDIR}/Pidgin-GPG-${PV}" +PATCHES=( + "${FILESDIR}/pidgin-gpg-0.9.3_musl-support.patch" +) + src_prepare() { default eautoreconf