diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-02-02 17:45:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-02-02 17:45:32 +0000 |
commit | 5939313f229e6fcf374fb7e9ee4f8675b05ab293 (patch) | |
tree | 0a8181cbc5d052ab4d26a8e1d2dc52f126063fc6 /mail-client/claws-mail/files | |
parent | 7e3d6dcede5749fe6a1adef4e673a9dde7703b7b (diff) |
gentoo auto-resync : 02:02:2024 - 17:45:32
Diffstat (limited to 'mail-client/claws-mail/files')
3 files changed, 214 insertions, 909 deletions
diff --git a/mail-client/claws-mail/files/claws-mail-3.19.0-perl-5.36.patch b/mail-client/claws-mail/files/claws-mail-3.19.0-perl-5.36.patch deleted file mode 100644 index 3f4995fcb457..000000000000 --- a/mail-client/claws-mail/files/claws-mail-3.19.0-perl-5.36.patch +++ /dev/null @@ -1,455 +0,0 @@ -https://git.claws-mail.org/?p=claws.git;a=commitdiff;h=5fee50c54a370fdfb5241bd4c4c16281a741762e -https://bugs.gentoo.org/849569 - -From 5fee50c54a370fdfb5241bd4c4c16281a741762e Mon Sep 17 00:00:00 2001 -From: Ricardo Mones <ricardo@mones.org> -Date: Sat, 23 Apr 2022 19:26:16 +0200 -Subject: [PATCH] Fix building perl plugin since perl v5.35.2 - -Using XSRETURN_* macros in expressions is now deprecated: -https://github.com/Perl/perl5/commit/7169efc77525df70484a824bff4ceebd1fafc760 ---- a/src/plugins/perl/perl_plugin.c -+++ b/src/plugins/perl/perl_plugin.c -@@ -577,76 +577,182 @@ static XS(XS_ClawsMail_filter_init) - - /* msginfo */ - case 1: -- msginfo->size ? XSRETURN_UV(msginfo->size) : XSRETURN_UNDEF; -+ if (msginfo->size) { -+ XSRETURN_UV(msginfo->size); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 2: -- msginfo->date ? XSRETURN_PV(msginfo->date) : XSRETURN_UNDEF; -+ if (msginfo->date) { -+ XSRETURN_PV(msginfo->date); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 3: -- msginfo->from ? XSRETURN_PV(msginfo->from) : XSRETURN_UNDEF; -+ if (msginfo->from) { -+ XSRETURN_PV(msginfo->from); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 4: -- msginfo->to ? XSRETURN_PV(msginfo->to) : XSRETURN_UNDEF; -+ if (msginfo->to) { -+ XSRETURN_PV(msginfo->to); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 5: -- msginfo->cc ? XSRETURN_PV(msginfo->cc) : XSRETURN_UNDEF; -+ if (msginfo->cc) { -+ XSRETURN_PV(msginfo->cc); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 6: -- msginfo->newsgroups ? XSRETURN_PV(msginfo->newsgroups) : XSRETURN_UNDEF; -+ if (msginfo->newsgroups) { -+ XSRETURN_PV(msginfo->newsgroups); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 7: -- msginfo->subject ? XSRETURN_PV(msginfo->subject) : XSRETURN_UNDEF; -+ if (msginfo->subject) { -+ XSRETURN_PV(msginfo->subject); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 8: -- msginfo->msgid ? XSRETURN_PV(msginfo->msgid) : XSRETURN_UNDEF; -+ if (msginfo->msgid) { -+ XSRETURN_PV(msginfo->msgid); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 9: -- msginfo->inreplyto ? XSRETURN_PV(msginfo->inreplyto) : XSRETURN_UNDEF; -+ if (msginfo->inreplyto) { -+ XSRETURN_PV(msginfo->inreplyto); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 10: -- msginfo->xref ? XSRETURN_PV(msginfo->xref) : XSRETURN_UNDEF; -+ if (msginfo->xref) { -+ XSRETURN_PV(msginfo->xref); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 11: - xface = procmsg_msginfo_get_avatar(msginfo, AVATAR_XFACE); -- xface ? XSRETURN_PV(xface) : XSRETURN_UNDEF; -+ if (xface) { -+ XSRETURN_PV(xface); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 12: -- (msginfo->extradata && msginfo->extradata->dispositionnotificationto) ? -- XSRETURN_PV(msginfo->extradata->dispositionnotificationto) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->dispositionnotificationto) { -+ XSRETURN_PV(msginfo->extradata->dispositionnotificationto); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 13: -- (msginfo->extradata && msginfo->extradata->returnreceiptto) ? -- XSRETURN_PV(msginfo->extradata->returnreceiptto) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->returnreceiptto) { -+ XSRETURN_PV(msginfo->extradata->returnreceiptto); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 14: - EXTEND(SP, g_slist_length(msginfo->references)); - ii = 0; - for(walk = msginfo->references; walk != NULL; walk = g_slist_next(walk)) - XST_mPV(ii++,walk->data ? (gchar*) walk->data: ""); -- ii ? XSRETURN(ii) : XSRETURN_UNDEF; -+ if (ii) { -+ XSRETURN(ii); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 15: -- msginfo->score ? XSRETURN_IV(msginfo->score) : XSRETURN_UNDEF; -+ if (msginfo->score) { -+ XSRETURN_IV(msginfo->score); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 17: -- msginfo->plaintext_file ? -- XSRETURN_PV(msginfo->plaintext_file) : XSRETURN_UNDEF; -+ if (msginfo->plaintext_file) { -+ XSRETURN_PV(msginfo->plaintext_file); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 19: -- msginfo->hidden ? XSRETURN_IV(msginfo->hidden) : XSRETURN_UNDEF; -+ if (msginfo->hidden) { -+ XSRETURN_IV(msginfo->hidden); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 20: - if((charp = procmsg_get_message_file_path(msginfo)) != NULL) { - strncpy2(buf,charp,sizeof(buf)); - g_free(charp); - XSRETURN_PV(buf); - } -- else -+ else { - XSRETURN_UNDEF; -+ } - case 21: -- (msginfo->extradata && msginfo->extradata->partial_recv) ? -- XSRETURN_PV(msginfo->extradata->partial_recv) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->partial_recv) { -+ XSRETURN_PV(msginfo->extradata->partial_recv); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 22: -- msginfo->total_size ? XSRETURN_IV(msginfo->total_size) : XSRETURN_UNDEF; -+ if (msginfo->total_size) { -+ XSRETURN_IV(msginfo->total_size); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 23: -- (msginfo->extradata && msginfo->extradata->account_server) ? -- XSRETURN_PV(msginfo->extradata->account_server) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->account_server) { -+ XSRETURN_PV(msginfo->extradata->account_server); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 24: -- (msginfo->extradata && msginfo->extradata->account_login) ? -- XSRETURN_PV(msginfo->extradata->account_login) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->account_login) { -+ XSRETURN_PV(msginfo->extradata->account_login); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 25: -- msginfo->planned_download ? -- XSRETURN_IV(msginfo->planned_download) : XSRETURN_UNDEF; -+ if (msginfo->planned_download) { -+ XSRETURN_IV(msginfo->planned_download); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - - /* general */ - case 100: -- if(manual_filtering) -+ if(manual_filtering) { - XSRETURN_YES; -- else -+ } -+ else { - XSRETURN_NO; -+ } - default: - g_warning("Perl plugin: wrong argument to ClawsMail::C::init"); - XSRETURN_UNDEF; -@@ -664,8 +770,9 @@ static XS(XS_ClawsMail_open_mail_file) - XSRETURN_UNDEF; - } - file = procmsg_get_message_file_path(msginfo); -- if(!file) -+ if(!file) { - XSRETURN_UNDEF; -+ } - if((message_file = claws_fopen(file, "rb")) == NULL) { - FILE_OP_ERROR(file, "claws_fopen"); - g_warning("Perl plugin: file open error in ClawsMail::C::open_mail_file"); -@@ -718,8 +825,9 @@ static XS(XS_ClawsMail_get_next_header) - g_free(buf); - XSRETURN(2); - } -- else -+ else { - XSRETURN_EMPTY; -+ } - } - - /* ClawsMail::C::get_next_body_line */ -@@ -736,10 +844,12 @@ static XS(XS_ClawsMail_get_next_body_line) - g_warning("Perl plugin: message file not open. Use ClawsMail::C::open_message_file first"); - XSRETURN_UNDEF; - } -- if(claws_fgets(buf, sizeof(buf), message_file) != NULL) -+ if(claws_fgets(buf, sizeof(buf), message_file) != NULL) { - XSRETURN_PV(buf); -- else -+ } -+ else { - XSRETURN_UNDEF; -+ } - } - - -@@ -772,57 +882,65 @@ static XS(XS_ClawsMail_check_flag) - filter_log_write(LOG_MATCH,"marked"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 2: - if(MSG_IS_UNREAD(msginfo->flags)) { - filter_log_write(LOG_MATCH,"unread"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 3: - if(MSG_IS_DELETED(msginfo->flags)) { - filter_log_write(LOG_MATCH,"deleted"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 4: - if(MSG_IS_NEW(msginfo->flags)) { - filter_log_write(LOG_MATCH,"new"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 5: - if(MSG_IS_REPLIED(msginfo->flags)) { - filter_log_write(LOG_MATCH,"replied"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 6: - if(MSG_IS_FORWARDED(msginfo->flags)) { - filter_log_write(LOG_MATCH,"forwarded"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 7: - if(MSG_IS_LOCKED(msginfo->flags)) { - filter_log_write(LOG_MATCH,"locked"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 8: - if(MSG_IS_IGNORE_THREAD(msginfo->flags)) { - filter_log_write(LOG_MATCH,"ignore_thread"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - default: - g_warning("Perl plugin: unknown argument to ClawsMail::C::check_flag"); - XSRETURN_UNDEF; -@@ -845,8 +963,9 @@ static XS(XS_ClawsMail_colorlabel) - filter_log_write(LOG_MATCH,"colorlabel"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - } - - /* ClawsMail::C::age_greater(int) */ -@@ -866,8 +985,9 @@ static XS(XS_ClawsMail_age_greater) - filter_log_write(LOG_MATCH,"age_greater"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - } - - /* ClawsMail::C::age_lower(int) */ -@@ -887,8 +1007,9 @@ static XS(XS_ClawsMail_age_lower) - filter_log_write(LOG_MATCH,"age_lower"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - } - - /* ClawsMail::C::tagged() */ -@@ -900,7 +1021,12 @@ static XS(XS_ClawsMail_tagged) - XSRETURN_UNDEF; - } - -- return msginfo->tags ? XSRETURN_YES : XSRETURN_NO; -+ if (msginfo->tags) { -+ XSRETURN_YES; -+ } -+ else { -+ XSRETURN_NO; -+ } - } - - /* ClawsMail::C::get_tags() */ -@@ -1032,10 +1158,12 @@ static XS(XS_ClawsMail_make_sure_folder_exists) - - identifier = SvPV_nolen(ST(0)); - item = folder_get_item_from_identifier(identifier); -- if(item) -+ if(item) { - XSRETURN_YES; -- else -+ } -+ else { - XSRETURN_NO; -+ } - } - - -@@ -1066,8 +1194,9 @@ static XS(XS_ClawsMail_addr_in_addressbook) - filter_log_write(LOG_MATCH,"addr_in_addressbook"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - } - - -@@ -1348,8 +1477,9 @@ static XS(XS_ClawsMail_forward) - - XSRETURN_YES; - } -- else -+ else { - XSRETURN_UNDEF; -+ } - } - - /* ClawsMail::C::redirect(int,char*) */ -@@ -1373,8 +1503,9 @@ static XS(XS_ClawsMail_redirect) - account = account_find_from_id(account_id); - compose = compose_redirect(account, msginfo, TRUE); - -- if (compose->account->protocol == A_NNTP) -+ if (compose->account->protocol == A_NNTP) { - XSRETURN_UNDEF; -+ } - else - compose_entry_append(compose, dest, COMPOSE_TO, PREF_NONE); - -@@ -1389,8 +1520,9 @@ static XS(XS_ClawsMail_redirect) - - XSRETURN_YES; - } -- else -+ else { - XSRETURN_UNDEF; -+ } - } - - -@@ -1472,8 +1604,9 @@ static XS(XS_ClawsMail_get_attribute_value) - attribute_value = get_attribute_value(addr,attr,bookname); - } - -- if(attribute_value) -+ if(attribute_value) { - XSRETURN_PV(attribute_value); -+ } - XSRETURN_PV(""); - } - diff --git a/mail-client/claws-mail/files/claws-mail-4.1.0-perl-5.36.patch b/mail-client/claws-mail/files/claws-mail-4.1.0-perl-5.36.patch deleted file mode 100644 index 2bbe76d85cce..000000000000 --- a/mail-client/claws-mail/files/claws-mail-4.1.0-perl-5.36.patch +++ /dev/null @@ -1,454 +0,0 @@ -https://git.claws-mail.org/?p=claws.git;a=commitdiff;h=1465ce9c0eb6151a3eaeebb10fd4ffa6db3d69db -https://bugs.gentoo.org/849569 - -From: Ricardo Mones <ricardo@mones.org> -Date: Sat, 23 Apr 2022 19:26:16 +0200 -Subject: [PATCH] Fix building perl plugin since perl v5.35.2 - -Using XSRETURN_* macros in expressions is now deprecated: -https://github.com/Perl/perl5/commit/7169efc77525df70484a824bff4ceebd1fafc760 ---- a/src/plugins/perl/perl_plugin.c -+++ b/src/plugins/perl/perl_plugin.c -@@ -577,76 +577,182 @@ static XS(XS_ClawsMail_filter_init) - - /* msginfo */ - case 1: -- msginfo->size ? XSRETURN_UV(msginfo->size) : XSRETURN_UNDEF; -+ if (msginfo->size) { -+ XSRETURN_UV(msginfo->size); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 2: -- msginfo->date ? XSRETURN_PV(msginfo->date) : XSRETURN_UNDEF; -+ if (msginfo->date) { -+ XSRETURN_PV(msginfo->date); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 3: -- msginfo->from ? XSRETURN_PV(msginfo->from) : XSRETURN_UNDEF; -+ if (msginfo->from) { -+ XSRETURN_PV(msginfo->from); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 4: -- msginfo->to ? XSRETURN_PV(msginfo->to) : XSRETURN_UNDEF; -+ if (msginfo->to) { -+ XSRETURN_PV(msginfo->to); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 5: -- msginfo->cc ? XSRETURN_PV(msginfo->cc) : XSRETURN_UNDEF; -+ if (msginfo->cc) { -+ XSRETURN_PV(msginfo->cc); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 6: -- msginfo->newsgroups ? XSRETURN_PV(msginfo->newsgroups) : XSRETURN_UNDEF; -+ if (msginfo->newsgroups) { -+ XSRETURN_PV(msginfo->newsgroups); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 7: -- msginfo->subject ? XSRETURN_PV(msginfo->subject) : XSRETURN_UNDEF; -+ if (msginfo->subject) { -+ XSRETURN_PV(msginfo->subject); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 8: -- msginfo->msgid ? XSRETURN_PV(msginfo->msgid) : XSRETURN_UNDEF; -+ if (msginfo->msgid) { -+ XSRETURN_PV(msginfo->msgid); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 9: -- msginfo->inreplyto ? XSRETURN_PV(msginfo->inreplyto) : XSRETURN_UNDEF; -+ if (msginfo->inreplyto) { -+ XSRETURN_PV(msginfo->inreplyto); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 10: -- msginfo->xref ? XSRETURN_PV(msginfo->xref) : XSRETURN_UNDEF; -+ if (msginfo->xref) { -+ XSRETURN_PV(msginfo->xref); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 11: - xface = procmsg_msginfo_get_avatar(msginfo, AVATAR_XFACE); -- xface ? XSRETURN_PV(xface) : XSRETURN_UNDEF; -+ if (xface) { -+ XSRETURN_PV(xface); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 12: -- (msginfo->extradata && msginfo->extradata->dispositionnotificationto) ? -- XSRETURN_PV(msginfo->extradata->dispositionnotificationto) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->dispositionnotificationto) { -+ XSRETURN_PV(msginfo->extradata->dispositionnotificationto); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 13: -- (msginfo->extradata && msginfo->extradata->returnreceiptto) ? -- XSRETURN_PV(msginfo->extradata->returnreceiptto) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->returnreceiptto) { -+ XSRETURN_PV(msginfo->extradata->returnreceiptto); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 14: - EXTEND(SP, g_slist_length(msginfo->references)); - ii = 0; - for(walk = msginfo->references; walk != NULL; walk = g_slist_next(walk)) - XST_mPV(ii++,walk->data ? (gchar*) walk->data: ""); -- ii ? XSRETURN(ii) : XSRETURN_UNDEF; -+ if (ii) { -+ XSRETURN(ii); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 15: -- msginfo->score ? XSRETURN_IV(msginfo->score) : XSRETURN_UNDEF; -+ if (msginfo->score) { -+ XSRETURN_IV(msginfo->score); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 17: -- msginfo->plaintext_file ? -- XSRETURN_PV(msginfo->plaintext_file) : XSRETURN_UNDEF; -+ if (msginfo->plaintext_file) { -+ XSRETURN_PV(msginfo->plaintext_file); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 19: -- msginfo->hidden ? XSRETURN_IV(msginfo->hidden) : XSRETURN_UNDEF; -+ if (msginfo->hidden) { -+ XSRETURN_IV(msginfo->hidden); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 20: - if((charp = procmsg_get_message_file_path(msginfo)) != NULL) { - strncpy2(buf,charp,sizeof(buf)); - g_free(charp); - XSRETURN_PV(buf); - } -- else -+ else { - XSRETURN_UNDEF; -+ } - case 21: -- (msginfo->extradata && msginfo->extradata->partial_recv) ? -- XSRETURN_PV(msginfo->extradata->partial_recv) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->partial_recv) { -+ XSRETURN_PV(msginfo->extradata->partial_recv); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 22: -- msginfo->total_size ? XSRETURN_IV(msginfo->total_size) : XSRETURN_UNDEF; -+ if (msginfo->total_size) { -+ XSRETURN_IV(msginfo->total_size); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 23: -- (msginfo->extradata && msginfo->extradata->account_server) ? -- XSRETURN_PV(msginfo->extradata->account_server) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->account_server) { -+ XSRETURN_PV(msginfo->extradata->account_server); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 24: -- (msginfo->extradata && msginfo->extradata->account_login) ? -- XSRETURN_PV(msginfo->extradata->account_login) : XSRETURN_UNDEF; -+ if (msginfo->extradata && msginfo->extradata->account_login) { -+ XSRETURN_PV(msginfo->extradata->account_login); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - case 25: -- msginfo->planned_download ? -- XSRETURN_IV(msginfo->planned_download) : XSRETURN_UNDEF; -+ if (msginfo->planned_download) { -+ XSRETURN_IV(msginfo->planned_download); -+ } -+ else { -+ XSRETURN_UNDEF; -+ } - - /* general */ - case 100: -- if(manual_filtering) -+ if(manual_filtering) { - XSRETURN_YES; -- else -+ } -+ else { - XSRETURN_NO; -+ } - default: - g_warning("Perl plugin: wrong argument to ClawsMail::C::init"); - XSRETURN_UNDEF; -@@ -664,8 +770,9 @@ static XS(XS_ClawsMail_open_mail_file) - XSRETURN_UNDEF; - } - file = procmsg_get_message_file_path(msginfo); -- if(!file) -+ if(!file) { - XSRETURN_UNDEF; -+ } - if((message_file = claws_fopen(file, "rb")) == NULL) { - FILE_OP_ERROR(file, "claws_fopen"); - g_warning("Perl plugin: file open error in ClawsMail::C::open_mail_file"); -@@ -718,8 +825,9 @@ static XS(XS_ClawsMail_get_next_header) - g_free(buf); - XSRETURN(2); - } -- else -+ else { - XSRETURN_EMPTY; -+ } - } - - /* ClawsMail::C::get_next_body_line */ -@@ -736,10 +844,12 @@ static XS(XS_ClawsMail_get_next_body_line) - g_warning("Perl plugin: message file not open. Use ClawsMail::C::open_message_file first"); - XSRETURN_UNDEF; - } -- if(claws_fgets(buf, sizeof(buf), message_file) != NULL) -+ if(claws_fgets(buf, sizeof(buf), message_file) != NULL) { - XSRETURN_PV(buf); -- else -+ } -+ else { - XSRETURN_UNDEF; -+ } - } - - -@@ -772,57 +882,65 @@ static XS(XS_ClawsMail_check_flag) - filter_log_write(LOG_MATCH,"marked"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 2: - if(MSG_IS_UNREAD(msginfo->flags)) { - filter_log_write(LOG_MATCH,"unread"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 3: - if(MSG_IS_DELETED(msginfo->flags)) { - filter_log_write(LOG_MATCH,"deleted"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 4: - if(MSG_IS_NEW(msginfo->flags)) { - filter_log_write(LOG_MATCH,"new"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 5: - if(MSG_IS_REPLIED(msginfo->flags)) { - filter_log_write(LOG_MATCH,"replied"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 6: - if(MSG_IS_FORWARDED(msginfo->flags)) { - filter_log_write(LOG_MATCH,"forwarded"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 7: - if(MSG_IS_LOCKED(msginfo->flags)) { - filter_log_write(LOG_MATCH,"locked"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - case 8: - if(MSG_IS_IGNORE_THREAD(msginfo->flags)) { - filter_log_write(LOG_MATCH,"ignore_thread"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - default: - g_warning("Perl plugin: unknown argument to ClawsMail::C::check_flag"); - XSRETURN_UNDEF; -@@ -845,8 +963,9 @@ static XS(XS_ClawsMail_colorlabel) - filter_log_write(LOG_MATCH,"colorlabel"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - } - - /* ClawsMail::C::age_greater(int) */ -@@ -866,8 +985,9 @@ static XS(XS_ClawsMail_age_greater) - filter_log_write(LOG_MATCH,"age_greater"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - } - - /* ClawsMail::C::age_lower(int) */ -@@ -887,8 +1007,9 @@ static XS(XS_ClawsMail_age_lower) - filter_log_write(LOG_MATCH,"age_lower"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - } - - /* ClawsMail::C::tagged() */ -@@ -900,7 +1021,12 @@ static XS(XS_ClawsMail_tagged) - XSRETURN_UNDEF; - } - -- return msginfo->tags ? XSRETURN_YES : XSRETURN_NO; -+ if (msginfo->tags) { -+ XSRETURN_YES; -+ } -+ else { -+ XSRETURN_NO; -+ } - } - - /* ClawsMail::C::get_tags() */ -@@ -1032,10 +1158,12 @@ static XS(XS_ClawsMail_make_sure_folder_exists) - - identifier = SvPV_nolen(ST(0)); - item = folder_get_item_from_identifier(identifier); -- if(item) -+ if(item) { - XSRETURN_YES; -- else -+ } -+ else { - XSRETURN_NO; -+ } - } - - -@@ -1066,8 +1194,9 @@ static XS(XS_ClawsMail_addr_in_addressbook) - filter_log_write(LOG_MATCH,"addr_in_addressbook"); - XSRETURN_YES; - } -- else -+ else { - XSRETURN_NO; -+ } - } - - -@@ -1348,8 +1477,9 @@ static XS(XS_ClawsMail_forward) - - XSRETURN_YES; - } -- else -+ else { - XSRETURN_UNDEF; -+ } - } - - /* ClawsMail::C::redirect(int,char*) */ -@@ -1373,8 +1503,9 @@ static XS(XS_ClawsMail_redirect) - account = account_find_from_id(account_id); - compose = compose_redirect(account, msginfo, TRUE); - -- if (compose->account->protocol == A_NNTP) -+ if (compose->account->protocol == A_NNTP) { - XSRETURN_UNDEF; -+ } - else - compose_entry_append(compose, dest, COMPOSE_TO, PREF_NONE); - -@@ -1389,8 +1520,9 @@ static XS(XS_ClawsMail_redirect) - - XSRETURN_YES; - } -- else -+ else { - XSRETURN_UNDEF; -+ } - } - - -@@ -1472,8 +1604,9 @@ static XS(XS_ClawsMail_get_attribute_value) - attribute_value = get_attribute_value(addr,attr,bookname); - } - -- if(attribute_value) -+ if(attribute_value) { - XSRETURN_PV(attribute_value); -+ } - XSRETURN_PV(""); - } - diff --git a/mail-client/claws-mail/files/claws-mail-4.2.0-gtksocket.patch b/mail-client/claws-mail/files/claws-mail-4.2.0-gtksocket.patch new file mode 100644 index 000000000000..db28228cc3a9 --- /dev/null +++ b/mail-client/claws-mail/files/claws-mail-4.2.0-gtksocket.patch @@ -0,0 +1,214 @@ +From dd4c4e5152235f9f4f319cc9fdad9227ebf688c9 Mon Sep 17 00:00:00 2001 +From: Jonathan Boeing <jonathan@claws-mail.org> +Date: Sat, 18 Nov 2023 18:51:30 -0700 +Subject: [PATCH] Fix building on non-X11 systems + +Gtk Sockets and the GDK_IS_X11_DISPLAY() macro are only available when +GDK_WINDOWING_X11 is defined +--- + src/action.c | 3 ++ + src/compose.c | 78 ++++++++++++++++++-------------- + src/plugins/dillo/dillo_viewer.c | 5 ++ + 3 files changed, 53 insertions(+), 33 deletions(-) + +diff --git a/src/action.c b/src/action.c +index d86294fbc..0c459aab6 100644 +--- a/src/action.c ++++ b/src/action.c +@@ -30,6 +30,9 @@ + #ifdef GDK_WINDOWING_X11 + # include <gdk/gdkx.h> + #endif /* GDK_WINDOWING_X11 */ ++#ifdef GDK_WINDOWING_QUARTZ ++# include <gdk/gdkquartz.h> ++#endif /* GDK_WINDOWING_QUARTZ */ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +diff --git a/src/compose.c b/src/compose.c +index 574d89be1..b32fa6bc7 100644 +--- a/src/compose.c ++++ b/src/compose.c +@@ -375,11 +375,11 @@ static void compose_set_ext_editor_sensitive (Compose *compose, + gboolean sensitive); + static gboolean compose_get_ext_editor_cmd_valid(); + static gboolean compose_get_ext_editor_uses_socket(); +-#ifndef G_OS_WIN32 ++#ifdef GDK_WINDOWING_X11 + static gboolean compose_ext_editor_plug_removed_cb + (GtkSocket *socket, + Compose *compose); +-#endif /* G_OS_WIN32 */ ++#endif /* GDK_WINDOWING_X11 */ + + static void compose_undo_state_changed (UndoMain *undostruct, + gint undo_state, +@@ -9623,11 +9623,11 @@ static gboolean compose_can_autosave(Compose *compose) + static void compose_exec_ext_editor(Compose *compose) + { + gchar *tmp; +-#ifndef G_OS_WIN32 ++#ifdef GDK_WINDOWING_X11 + GtkWidget *socket; + Window socket_wid = 0; + gchar *p, *s; +-#endif /* G_OS_WIN32 */ ++#endif /* GDK_WINDOWING_X11 */ + GPid pid; + GError *error = NULL; + gchar *cmd = NULL; +@@ -9643,39 +9643,43 @@ static void compose_exec_ext_editor(Compose *compose) + return; + } + +- if (compose_get_ext_editor_uses_socket() && GDK_IS_X11_DISPLAY(gdk_display_get_default())) { +-#ifndef G_OS_WIN32 +- /* Only allow one socket */ +- if (compose->exteditor_socket != NULL) { +- if (gtk_widget_is_focus(compose->exteditor_socket)) { +- /* Move the focus off of the socket */ +- gtk_widget_child_focus(compose->window, GTK_DIR_TAB_BACKWARD); ++#ifdef GDK_WINDOWING_X11 ++ if (compose_get_ext_editor_uses_socket()) { ++ if (GDK_IS_X11_DISPLAY(gdk_display_get_default())) { ++ /* Only allow one socket */ ++ if (compose->exteditor_socket != NULL) { ++ if (gtk_widget_is_focus(compose->exteditor_socket)) { ++ /* Move the focus off of the socket */ ++ gtk_widget_child_focus(compose->window, GTK_DIR_TAB_BACKWARD); ++ } ++ g_free(tmp); ++ return; + } +- g_free(tmp); +- return; +- } +- /* Create the receiving GtkSocket */ +- socket = gtk_socket_new (); +- g_signal_connect (G_OBJECT(socket), "plug-removed", +- G_CALLBACK(compose_ext_editor_plug_removed_cb), +- compose); +- gtk_box_pack_start(GTK_BOX(compose->edit_vbox), socket, TRUE, TRUE, 0); +- gtk_widget_set_size_request(socket, prefs_common.compose_width, -1); +- /* Realize the socket so that we can use its ID */ +- gtk_widget_realize(socket); +- socket_wid = gtk_socket_get_id(GTK_SOCKET (socket)); +- compose->exteditor_socket = socket; ++ /* Create the receiving GtkSocket */ ++ socket = gtk_socket_new (); ++ g_signal_connect (G_OBJECT(socket), "plug-removed", ++ G_CALLBACK(compose_ext_editor_plug_removed_cb), ++ compose); ++ gtk_box_pack_start(GTK_BOX(compose->edit_vbox), socket, TRUE, TRUE, 0); ++ gtk_widget_set_size_request(socket, prefs_common.compose_width, -1); ++ /* Realize the socket so that we can use its ID */ ++ gtk_widget_realize(socket); ++ socket_wid = gtk_socket_get_id(GTK_SOCKET (socket)); ++ compose->exteditor_socket = socket; ++ } else ++ debug_print("Socket communication with an external editor is only available on X11.\n"); ++ } + #else +- alertpanel_error(_("Socket communication with an external editor is not available on Windows.")); ++ if (compose_get_ext_editor_uses_socket()) { ++ alertpanel_error(_("Socket communication with an external editor is only available on X11.")); + g_free(tmp); + return; +-#endif /* G_OS_WIN32 */ +- } else +- debug_print("Socket communication with an external editor is only available on X11.\n"); ++ } ++#endif /* GDK_WINDOWING_X11 */ + + if (compose_get_ext_editor_cmd_valid()) { ++#ifdef GDK_WINDOWING_X11 + if (compose_get_ext_editor_uses_socket() && GDK_IS_X11_DISPLAY(gdk_display_get_default())) { +-#ifndef G_OS_WIN32 + p = g_strdup(prefs_common_get_ext_editor_cmd()); + s = strstr(p, "%w"); + s[1] = 'u'; +@@ -9684,10 +9688,12 @@ static void compose_exec_ext_editor(Compose *compose) + else + cmd = g_strdup_printf(p, socket_wid, tmp); + g_free(p); +-#endif /* G_OS_WIN32 */ + } else { + cmd = g_strdup_printf(prefs_common_get_ext_editor_cmd(), tmp); + } ++#else ++ cmd = g_strdup_printf(prefs_common_get_ext_editor_cmd(), tmp); ++#endif /* GDK_WINDOWING_X11 */ + } else { + if (prefs_common_get_ext_editor_cmd()) + g_warning("external editor command-line is invalid: '%s'", +@@ -9776,10 +9782,12 @@ static void compose_ext_editor_closed_cb(GPid pid, gint exit_status, gpointer da + compose->exteditor_file = NULL; + compose->exteditor_pid = INVALID_PID; + compose->exteditor_tag = -1; ++#ifdef GDK_WINDOWING_X11 + if (compose->exteditor_socket && GDK_IS_X11_DISPLAY(gdk_display_get_default())) { + gtk_widget_destroy(compose->exteditor_socket); + compose->exteditor_socket = NULL; + } ++#endif /* GDK_WINDOWING_X11 */ + + } + +@@ -9887,6 +9895,7 @@ static void compose_set_ext_editor_sensitive(Compose *compose, + ext_editor_menu_entries[i], sensitive); + } + ++#ifdef GDK_WINDOWING_X11 + if (compose_get_ext_editor_uses_socket() && GDK_IS_X11_DISPLAY(gdk_display_get_default())) { + if (sensitive) { + if (compose->exteditor_socket) +@@ -9910,6 +9919,9 @@ static void compose_set_ext_editor_sensitive(Compose *compose, + } else { + gtk_widget_set_sensitive(compose->text, sensitive); + } ++#else ++ gtk_widget_set_sensitive(compose->text, sensitive); ++#endif /* GDK_WINDOWING_X11 */ + if (compose->toolbar->send_btn) + gtk_widget_set_sensitive(compose->toolbar->send_btn, sensitive); + if (compose->toolbar->sendl_btn) +@@ -9934,14 +9946,14 @@ static gboolean compose_get_ext_editor_uses_socket() + strstr(prefs_common_get_ext_editor_cmd(), "%w")); + } + +-#ifndef G_OS_WIN32 ++#ifdef GDK_WINDOWING_X11 + static gboolean compose_ext_editor_plug_removed_cb(GtkSocket *socket, Compose *compose) + { + compose->exteditor_socket = NULL; + /* returning FALSE allows destruction of the socket */ + return FALSE; + } +-#endif /* G_OS_WIN32 */ ++#endif /* GDK_WINDOWING_X11 */ + + /** + * compose_undo_state_changed: +diff --git a/src/plugins/dillo/dillo_viewer.c b/src/plugins/dillo/dillo_viewer.c +index d2690bff6..8a93511d7 100644 +--- a/src/plugins/dillo/dillo_viewer.c ++++ b/src/plugins/dillo/dillo_viewer.c +@@ -125,10 +125,15 @@ static void dillo_show_mimepart(MimeViewer *_viewer, + g_free(viewer->filename); + } + ++#ifdef GDK_WINDOWING_X11 + if (!GDK_IS_X11_DISPLAY(gdk_display_get_default())) { + debug_print("dillo viewer only works on X11\n"); + return; + } ++#else ++ debug_print("dillo viewer only works on X11\n"); ++ return; ++#endif + + viewer->filename = procmime_get_tmp_file_name(partinfo); + +-- +2.25.1 + |