!5 [sync] PR-4: fix build error of perl_plugin
From: @openeuler-sync-bot Reviewed-by: @peijiankang Signed-off-by: @peijiankang
This commit is contained in:
commit
c06b9292dc
@ -17,7 +17,7 @@ Obsoletes: claws-mail-plugins-dillo < 4.0.0-1
|
||||
|
||||
Name: claws-mail
|
||||
Version: 4.0.0
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: Email client and news reader based on GTK+
|
||||
License: GPLv3+
|
||||
URL: http://claws-mail.org
|
||||
@ -25,6 +25,10 @@ Source0: http://downloads.sourceforge.net/sylpheed-claws/%{name}-%{versio
|
||||
|
||||
# rhbz#1968349
|
||||
Patch1: claws-mail-4.0.0-pdf-gs-setpdfwrite.patch
|
||||
|
||||
#fix https://gitee.com/src-openeuler/claws-mail/issues/I7TY9F
|
||||
Patch2: fix-build-error-of-perl_plugin.patch
|
||||
|
||||
# rhbz#1179279
|
||||
Patch11: claws-mail-system-crypto-policies.patch
|
||||
|
||||
@ -412,6 +416,7 @@ exporting of your meetings or all your calendars.
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1 -b .gs-setpdfwrite
|
||||
%patch2 -p1
|
||||
|
||||
|
||||
%patch11 -p1 -b.syscrypto
|
||||
@ -623,5 +628,8 @@ touch -r NEWS %{buildroot}%{_includedir}/%{name}/config.h
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Aug 18 2023 peijiankang <peijiankang@kylinos.cn> - 4.0.0-2
|
||||
- add fix-build-error-of-perl_plugin.patch
|
||||
|
||||
* Wed Sep 22 2021 douyan <douyan@kylinos.cn> - 4.0.0-1
|
||||
- Init package for openEuler
|
||||
- Init package for openEuler
|
||||
|
||||
245
fix-build-error-of-perl_plugin.patch
Normal file
245
fix-build-error-of-perl_plugin.patch
Normal file
@ -0,0 +1,245 @@
|
||||
From fd2a1494ee76438a7b921236ff5a263c33abbd4e Mon Sep 17 00:00:00 2001
|
||||
From: peijiankang <peijiankang@kylinos.cn>
|
||||
Date: Fri, 18 Aug 2023 14:32:01 +0800
|
||||
Subject: [PATCH] fix build error of perl_plugin
|
||||
|
||||
---
|
||||
src/plugins/perl/perl_plugin.c | 177 +++++++++++++++++++++++++++------
|
||||
1 file changed, 144 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/src/plugins/perl/perl_plugin.c b/src/plugins/perl/perl_plugin.c
|
||||
index 3339752..88fcf6a 100644
|
||||
--- a/src/plugins/perl/perl_plugin.c
|
||||
+++ b/src/plugins/perl/perl_plugin.c
|
||||
@@ -573,76 +573,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;
|
||||
@@ -896,7 +1002,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() */
|
||||
--
|
||||
2.33.0
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user