File cyrus-imapd-3.0.18-fix-perl-linking.patch of Package cyrus-imapd

From: Matthias Fehring <buschmann23@opensuse.org>
Date: 2024-06-17 17:13:00 +0200
Subject: Fix Perl linking
References: https://github.com/cyrusimap/cyrus-imapd/issues/2629#issuecomment-456925909
Upstream: no

Adds libpcreposix and libcap to the linked libraries.

---
 imap/Makefile.PL.in              |   14 +++++++-------
 sieve/managesieve/Makefile.PL.in |    4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

--- a/perl/imap/Makefile.PL.in	2023-02-13 00:41:05.000000000 +0100
+++ b/perl/imap/Makefile.PL.in	2024-06-17 17:11:54.185281604 +0200
@@ -1,11 +1,11 @@
-# 
+#
 #
 # Redistribution and use in source and binary forms, with or without
 # modification, are permitted provided that the following conditions
 # are met:
 #
 # 1. Redistributions of source code must retain the above copyright
-#    notice, this list of conditions and the following disclaimer. 
+#    notice, this list of conditions and the following disclaimer.
 #
 # 2. Redistributions in binary form must reproduce the above copyright
 #    notice, this list of conditions and the following disclaimer in
@@ -15,7 +15,7 @@
 # 3. The name "Carnegie Mellon University" must not be used to
 #    endorse or promote products derived from this software without
 #    prior written permission. For permission or any other legal
-#    details, please contact  
+#    details, please contact
 #      Office of Technology Transfer
 #      Carnegie Mellon University
 #      5000 Forbes Avenue
@@ -80,7 +80,7 @@
 EOT
 }
 
-WriteMakefile( 
+WriteMakefile(
     'NAME'	=> 'Cyrus::IMAP',
     'ABSTRACT'  => 'Cyrus administrative interface',
     'VERSION_FROM' => "@top_srcdir@/perl/imap/IMAP.pm", # finds $VERSION
@@ -90,9 +90,9 @@
     'clean'	=> {'FILES' => 'libcyrperl.a cyradm'},
     'OBJECT'    => 'IMAP.o',
     'MYEXTLIB'  => '@top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
-    'LIBS'	=> [ "$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@"],
-    'DEFINE'	=> '-DPERL_POLLUTE',    # e.g., '-DHAVE_SOMETHING' 
-    'INC'	=> "-I@top_srcdir@ -I@top_srcdir@/com_err/et @SASLFLAGS@ @SSL_CPPFLAGS@ -I@top_srcdir@/perl/imap", 
+    'LIBS'	=> [ "$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ -lcap -lpcreposix"],
+    'DEFINE'	=> '-DPERL_POLLUTE',    # e.g., '-DHAVE_SOMETHING'
+    'INC'	=> "-I@top_srcdir@ -I@top_srcdir@/com_err/et @SASLFLAGS@ @SSL_CPPFLAGS@ -I@top_srcdir@/perl/imap",
     'EXE_FILES' => [cyradm],
     # This is a disgusting hack to effectively disable the stupid
     # behaviour of the generated Makefile which moves itself aside
--- a/perl/sieve/managesieve/Makefile.PL.in	2023-02-13 00:41:05.000000000 +0100
+++ b/perl/sieve/managesieve/Makefile.PL.in	2024-06-17 17:12:13.774842820 +0200
@@ -69,9 +69,9 @@
     'ABSTRACT'  => 'Cyrus Sieve management interface',
     'VERSION_FROM' => "@top_srcdir@/perl/sieve/managesieve/managesieve.pm", # finds $VERSION
     'MYEXTLIB'  => '../lib/.libs/libisieve.a @top_builddir@/perl/.libs/libcyrus.a @top_builddir@/perl/.libs/libcyrus_min.a',
-    'LIBS'	=> ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ @SQLITE_LIBADD@ @MYSQL_LIBADD@ @PGSQL_LIBADD@"],
+    'LIBS'	=> ["$LIB_SASL @SSL_LIBS@ @LIB_UUID@ @ZLIB@ @SQLITE_LIBADD@ @MYSQL_LIBADD@ @PGSQL_LIBADD@ -lcap -lpcreposix"],
     'CCFLAGS'	=> '@GCOV_CFLAGS@',
-    'DEFINE'	=> '-DPERL_POLLUTE',     # e.g., '-DHAVE_SOMETHING' 
+    'DEFINE'	=> '-DPERL_POLLUTE',     # e.g., '-DHAVE_SOMETHING'
     'INC'	=> "-I@top_srcdir@/lib -I@top_srcdir@/perl/sieve -I@top_srcdir@/perl/sieve/lib @SASLFLAGS@ @SSL_CPPFLAGS@",
     'OBJECT'    => 'managesieve.o',
     'LD'	=> $Config{ld} . ' @GCOV_LDFLAGS@',
openSUSE Build Service is sponsored by