Ticket #504: patch-exim-20030428-2

File patch-exim-20030428-2, 4.6 KB (added by bchesneau@…, 16 years ago)

add mysql + maildir variants

Line 
1--- Portfile-old        Mon Apr 28 02:44:31 2003
2+++ Portfile    Mon Apr 28 04:42:06 2003
3@@ -2,34 +2,34 @@
4 
5 PortSystem 1.0
6 name            exim
7-version         4.14
8-revision        1
9-categories      mail
10+version                4.14
11+revision       1
12+categories     mail
13 description     complete replacement for sendmail
14-long_description        Exim is a mail transfer agent (MTA) developed \
15-                        at the University of Cambridge for use on Unix \
16-                        systems connected to the Internet. It is freely \
17-                        available under the terms of the GNU General \
18-                        Public Licence. In overall style it is similar \
19-                        to Smail 3, but its facilities are more extensive.
20-homepage        http://www.exim.org/
21-platforms       darwin
22+long_description       Exim is a mail transfer agent (MTA) developed \
23+                       at the University of Cambridge for use on Unix \
24+                       systems connected to the Internet. It is freely \
25+                       available under the terms of the GNU General \
26+                       Public Licence. In overall style it is similar \
27+                       to Smail 3, but its facilities are more extensive.
28+homepage       http://www.exim.org/
29+platforms      darwin
30 maintainers     fkr@opendarwin.org
31 master_sites    ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/ \
32                 ftp://ftp.exim.org/pub/exim/exim4/
33-checksums       exim-4.14.tar.gz md5 bebd65023b117e2fa7dcea46f1129556
34+checksums      exim-4.14.tar.gz md5 bebd65023b117e2fa7dcea46f1129556
35 depends_lib     path:/usr/include/netinet/ip_var.h:netinet-headers
36-depends_build   bin:perl:perl5.8=09
37+depends_build  bin:perl:perl5.8=09
38 
39-set exim_user   exim
40+set exim_user  exim
41 
42-configure   {   cd ${worksrcpath}
43-                system "cp src/EDITME Local/Makefile"
44-                reinplace "s|/usr/exim/bin|${prefix}/sbin|g" Local/Makefile
45-                reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" Local/Makefile
46-                reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" Local/Makefile
47-                reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" Local/Makefile
48-                reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" Local/Makefile
49+configure   {  cd ${worksrcpath}
50+                       system "cp src/EDITME Local/Makefile"
51+                       reinplace "s|/usr/exim/bin|${prefix}/sbin|g" Local/Makefile
52+                       reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" Local/Makefile
53+                       reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" Local/Makefile
54+                       reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" Local/Makefile
55+                       reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" Local/Makefile
56 
57 #Should be in pre-deployment/user addition phase
58 
59@@ -45,14 +45,33 @@
60                      ${portpath}/files/exim.sh ${prefix}/etc/rc.d"
61                  reinplace "s|__PREFIX|${prefix}|g" ${prefix}/etc/rc.d/exim.sh }
62 
63-variant smtp-auth {
64-                post-configure { reinplace "s|#AUTH_CRAM_MD5=yes|AUTH_CRAM_MD5=yes|g" Local/Makefile
65-                                 reinplace "s|#AUTH_PLAINTEXT=yes|AUTH_PLAINTEXT=yes|g" Local/Makefile
66-                                 reinplace "s|#AUTH_SPA=yes|AUTH_SPA=yes|g" Local/Makefile } }
67+variant smtp-auth { }
68 
69 variant exiscan {
70-                patch_sites             http://duncanthrax.net/exiscan/
71-                patchfiles              exiscan-4.14-26.tar.gz
72-                checksums-append        exiscan-4.14-26.tar.gz md5 3bd9b18f55c079bcd9af2eb07fec469b
73-                patch.pre_args          -p1 }
74+               patch_sites             http://duncanthrax.net/exiscan/
75+               patchfiles              exiscan-4.14-26.tar.gz
76+               checksums-append        exiscan-4.14-26.tar.gz md5 3bd9b18f55c079bcd9af2eb07fec469b
77+               patch.pre_args          -p1 }
78+
79+variant mysql {
80+       depends_lib-append      lib:libmysqlclient:mysql
81+}
82+
83+variant        maildir { }
84+
85+post-configure {
86+       if {[variant_isset mysql]} {
87+               reinplace "s|# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" Local/Makefile
88+               reinplace "s|# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=-I ${prefix}/include/mysql -I ${prefix}/include -I /usr/include|g" Local/Makefile
89+               reinplace "s|# LOOKUP_LIBS=.*|LOOKUP_LIBS=-L${prefix}/lib/mysql -L${prefix}/lib -L/usr/lib -lmysqlclient|g" Local/Makefile
90+       }
91+       if {[variant_isset maildir ]} {
92+               reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" Local/Makefile       
93+       }
94+       if {[variant_isset smtp_auth ]} {
95+               reinplace "s|#AUTH_CRAM_MD5=yes|AUTH_CRAM_MD5=yes|g" Local/Makefile
96+                reinplace "s|#AUTH_PLAINTEXT=yes|AUTH_PLAINTEXT=yes|g" Local/Makefile
97+                reinplace "s|#AUTH_SPA=yes|AUTH_SPA=yes|g" Local/Makefile     
98+       }
99+}
100