summaryrefslogtreecommitdiff
path: root/net-mail/cyrus-imapd/files/cyrus-imapd-sieve-libs-v4.patch
blob: 4a7bac2e3c1f151418bbf2f0aee807dc475a5fd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
--- a/configure.ac	2017-04-20 04:21:48.000000000 +0300
+++ b/configure.ac	2017-05-16 10:30:37.337965921 +0300
@@ -666,7 +666,9 @@
         fi
 
         if test "$cyrus_cv_pcre_utf8" = "yes"; then
-                LIBS="$LIBS -lpcre -lpcreposix";
+                PCRE_LIBS="-lpcre -lpcreposix"
+                AC_SUBST(PCRE_LIBS)
+                LIBS="$LIBS $PCRE_LIBS"
                 AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?])
                 AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?])
         else
@@ -1938,6 +1940,7 @@
     fi
 
     LIBS="${LIBS} ${SQLITE_LIBADD}"
+    AC_SUBST(SQLITE_LIBADD)
     CPPFLAGS="${SQLITE_INCADD} ${CPPFLAGS}"
     AC_DEFINE(HAVE_SQLITE,[],[Build in SQLite support?])
   else
--- a/perl/imap/Makefile.PL.in	2017-04-07 08:31:10.000000000 +0300
+++ b/perl/imap/Makefile.PL.in	2017-05-16 10:26:08.193965921 +0300
@@ -90,7 +90,7 @@
     '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@"],
+    'LIBS'      => [ "$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"],
     '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],
--- a/perl/sieve/managesieve/Makefile.PL.in	2017-04-07 08:31:10.000000000 +0300
+++ b/perl/sieve/managesieve/Makefile.PL.in	2017-05-16 10:26:31.048965921 +0300
@@ -69,7 +69,7 @@
     '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@"],
+    'LIBS'      => ["$LIB_SASL @SSL_LIBS@ @LIB_RT@ @LIB_UUID@ @ZLIB@ @PCRE_LIBS@ @SQLITE_LIBADD@"],
     'CCFLAGS'	=> '@GCOV_CFLAGS@',
     '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@",
--- a/configure.ac	2017-05-16 15:18:23.648756211 +0300
+++ b/configure.ac	2017-05-16 15:26:49.241756211 +0300
@@ -633,8 +633,6 @@
 
 AC_ARG_ENABLE(sieve,
         [AS_HELP_STRING([--disable-sieve], [disable Sieve support])],,[enable_sieve="yes";])
-AC_ARG_ENABLE(pcre,
-        [AS_HELP_STRING([--disable-pcre], [disable PCRE library])])
 
 if test "$enable_sieve" != "no"; then
         AC_DEFINE(USE_SIEVE,[],[Build in Sieve support?])
@@ -650,42 +648,46 @@
         if test -z "$ac_cv_prog_LEX"; then
             AC_MSG_ERROR([Sieve requires flex/lex, but none is installed])
         fi
+fi
+AM_CONDITIONAL([SIEVE], [test "${enable_sieve}" != "no"])
+
 
-        if test "$enable_pcre" != "no"; then
-            AC_CHECK_HEADER(pcreposix.h)
-            if test "$ac_cv_header_pcreposix_h" = "yes"; then
-                    AC_MSG_CHECKING(for utf8 enabled pcre)
-                    AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include <pcreposix.h>
+AC_ARG_ENABLE(pcre,
+        [AS_HELP_STRING([--disable-pcre], [disable PCRE library])])
+	
+if test "$enable_pcre" != "no"; then
+        AC_CHECK_HEADER(pcreposix.h)
+        if test "$ac_cv_header_pcreposix_h" = "yes"; then
+                AC_MSG_CHECKING(for utf8 enabled pcre)
+                AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include <pcreposix.h>
 #ifndef REG_UTF8
 #include </nonexistent>
 #endif],cyrus_cv_pcre_utf8=yes,cyrus_cv_pcre_utf8=no))
-                    AC_MSG_RESULT($cyrus_cv_pcre_utf8)
-            else
-                    cyrus_cv_pcre_utf8="no"
-            fi
+                AC_MSG_RESULT($cyrus_cv_pcre_utf8)
+        else
+                cyrus_cv_pcre_utf8="no"
         fi
+fi
 
-        if test "$cyrus_cv_pcre_utf8" = "yes"; then
-                PCRE_LIBS="-lpcre -lpcreposix"
-                AC_SUBST(PCRE_LIBS)
-                LIBS="$LIBS $PCRE_LIBS"
-                AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?])
-                AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?])
+if test "$cyrus_cv_pcre_utf8" = "yes"; then
+        PCRE_LIBS="-lpcre -lpcreposix"
+        AC_SUBST(PCRE_LIBS)
+        LIBS="$LIBS $PCRE_LIBS"
+        AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?])
+        AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?])
+else
+        AC_CHECK_HEADERS(rxposix.h)
+        if test "$ac_cv_header_rxposix_h" = "yes"; then
+                LIBS="$LIBS -lrx"
+                AC_DEFINE(ENABLE_REGEX, [],
+                          [Do we have a regex library?])
         else
-                AC_CHECK_HEADERS(rxposix.h)
-                if test "$ac_cv_header_rxposix_h" = "yes"; then
-                        LIBS="$LIBS -lrx"
-                        AC_DEFINE(ENABLE_REGEX, [],
-                                  [Do we have a regex library?])
-                else
-                        AC_SEARCH_LIBS(regcomp, regex,
-                                        AC_DEFINE(ENABLE_REGEX, [],
-                                        [Do we have a regex library?]), [])
-                fi
+                AC_SEARCH_LIBS(regcomp, regex,
+                    AC_DEFINE(ENABLE_REGEX, [],
+                        [Do we have a regex library?]), [])
         fi
 fi
 
-AM_CONDITIONAL([SIEVE], [test "${enable_sieve}" != "no"])
 
 dnl look for an option to disable sign-comparison warnings (needed for
 dnl flex-generated sieve sources when building with -Werror)