source: trunk/dports/mail/exim/Portfile

Last change on this file was 146517, checked in by raimue@…, 17 months ago

Mass rev-bump dependents of port openssl due to ABI change

Disabling SSLv2 in r146162 changed the ABI of the library, leading to loading
errors for binaries with references to SSLv2 symbols.

https://lists.macosforge.org/pipermail/macports-dev/2016-March/032531.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 146517 2016-03-10 17:49:28Z ryandesign@macports.org $
3
4PortSystem              1.0
5
6name                    exim
7version                 4.82.1
8revision                2
9checksums               rmd160  2caa80ed8b5fef07fd0449dc5ac7958681466a2d \
10                        sha256  51798cead70b9ca03df88afb63f7a0cabedee8ef82c02bd18d67591c08b14500
11
12categories              mail
13license                 GPL-2
14
15description             complete replacement for sendmail
16
17long_description        Exim is a mail transfer agent (MTA) developed at the \
18                        University of Cambridge for use on Unix systems \
19                        connected to the Internet. In overall style it is \
20                        similar to Smail 3, but its facilities are more \
21                        extensive.
22
23homepage                http://www.exim.org/
24platforms               darwin
25maintainers             nomaintainer
26master_sites            ftp://ftp.exim.org/pub/exim/exim4/ \
27                        ftp://ftp.exim.org/pub/exim/exim4/old/ \
28                        ftp://ftp.easynet.be/exim/exim/exim4/ \
29                        ftp://ftp.easynet.be/exim/exim/exim4/old/
30use_bzip2               yes
31
32depends_build           path:bin/perl:perl5 \
33                        port:pcre
34
35depends_lib             port:db44 \
36                        path:lib/libssl.dylib:openssl \
37                        port:sqlite3
38
39startupitem.create      yes
40startupitem.start       "${prefix}/share/exim/exim.sh start"
41startupitem.stop        "${prefix}/share/exim/exim.sh stop"
42
43set exim_user           exim
44
45use_parallel_build      no
46
47universal_variant       no
48
49configure {
50    copy ${worksrcpath}/src/EDITME ${worksrcpath}/Local/Makefile
51    reinplace "s|/usr/exim/bin|${prefix}/sbin|g" ${worksrcpath}/Local/Makefile
52    reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" ${worksrcpath}/Local/Makefile
53    reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" ${worksrcpath}/Local/Makefile
54    reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" ${worksrcpath}/Local/Makefile
55    reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" ${worksrcpath}/Local/Makefile
56    reinplace "s|# WITH_CONTENT_SCAN=yes|WITH_CONTENT_SCAN=yes|g" ${worksrcpath}/Local/Makefile
57    reinplace "s|# LOOKUP_PASSWD=yes|LOOKUP_PASSWD=yes|g" ${worksrcpath}/Local/Makefile
58    reinplace "s|# LOOKUP_CDB=yes|LOOKUP_CDB=yes|g" ${worksrcpath}/Local/Makefile
59    reinplace "s|# LOOKUP_DSEARCH=yes|LOOKUP_DSEARCH=yes|g" ${worksrcpath}/Local/Makefile
60    reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" ${worksrcpath}/Local/Makefile
61    reinplace "s|# TLS_LIBS=-L/usr/local/openssl/lib|TLS_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile
62    reinplace "s|# TLS_INCLUDE=-I/usr/local/openssl/include|TLS_INCLUDE=-I${prefix}/include/openssl|g" ${worksrcpath}/Local/Makefile
63    reinplace "s|# INCLUDE=.*|INCLUDE=-I${prefix}/include|g" ${worksrcpath}/Local/Makefile
64    reinplace "s|PCRE_LIBS=-lpcre|PCRE_LIBS=-L${prefix}/lib -lpcre|g" ${worksrcpath}/Local/Makefile
65    # Setting TMPDIR="/tmp" (which is the default), breaks the build because clang tries to use it as temporary dir including the quotes.
66    reinplace "s|^TMPDIR=|# TMPDIR=|g" ${worksrcpath}/Local/Makefile
67    reinplace "s|CC=cc|CC=${configure.cc}|g" ${worksrcpath}/OS/Makefile-Darwin
68    reinplace "s|X11=/usr/X11R6|X11=${prefix}|g" ${worksrcpath}/OS/Makefile-Darwin
69    reinplace "s|# Exim: OS-specific make file for Darwin (Mac OS X).|INCLUDE=-I${prefix}/include/db44|g" ${worksrcpath}/OS/Makefile-Darwin
70    reinplace "s|DBMLIB =|DBMLIB=${prefix}/lib/db44/libdb-4.dylib|g" ${worksrcpath}/OS/Makefile-Darwin
71    reinplace "s|/etc/aliases|${destroot}${prefix}/etc/aliases|g" ${worksrcpath}/scripts/exim_install
72    adduser ${exim_user} gid=[existsgroup mail]
73}
74
75build.args              FULLECHO=
76
77destroot.destdir        ROOT=${destroot}
78destroot.keepdirs       ${destroot}${prefix}/var/spool/exim
79
80post-destroot {
81    move ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample
82
83    xinstall -o root -m 755 -d ${destroot}${prefix}/share/doc
84    copy ${worksrcpath}/doc ${destroot}${prefix}/share/doc/exim
85
86    xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim
87
88    xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim
89    xinstall -o root -m 755 -c ${filespath}/exim.sh ${destroot}${prefix}/share/exim
90    reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/share/exim/exim.sh
91}
92
93variant mysql4 conflicts mysql5 description {build exim with support for mysql4 lookups} {
94    depends_lib-append  port:mysql4
95}
96
97variant mysql5 conflicts mysql4 description {build exim with support for mysql5 lookups} {
98    depends_lib-append  path:bin/mysql_config5:mysql5
99}
100
101variant ldap conflicts macports_ldap description {build exim with support for ldap lookups using the shipped ldap} {
102    # do nothing .. until post-configure
103}
104
105variant macports_ldap conflicts ldap description {install exim with support for ldap lookups using macports ldap} {
106    depends_lib-append  port:openldap
107}
108
109post-configure {
110    reinplace "s|# AUTH_CRAM_MD5=yes|AUTH_CRAM_MD5=yes|g" ${worksrcpath}/Local/Makefile
111    reinplace "s|# AUTH_PLAINTEXT=yes|AUTH_PLAINTEXT=yes|g" ${worksrcpath}/Local/Makefile
112    reinplace "s|# AUTH_SPA=yes|AUTH_SPA=yes|g" ${worksrcpath}/Local/Makefile
113    reinplace "s|# SUPPORT_TLS=yes|SUPPORT_TLS=yes|g" ${worksrcpath}/Local/Makefile
114    reinplace "s|# TLS_LIBS=-lssl -lcrypto|TLS_LIBS=-lssl -lcrypto|g" ${worksrcpath}/Local/Makefile
115    reinplace "s|# LDAP_LIB_TYPE=OPENLDAP2|LDAP_LIB_TYPE=OPENLDAP2|g" ${worksrcpath}/Local/Makefile
116   
117    # settings common to any lookup
118    if {[variant_isset mysql4]
119        ||  [variant_isset mysql5]
120        ||  [variant_isset ldap]
121        ||  [variant_isset macports_ldap]
122    } then {
123        reinplace "s|^# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=|g" ${worksrcpath}/Local/Makefile
124        reinplace "s|^# LOOKUP_LIBS=.*|LOOKUP_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile
125        # lookup specific settings
126        if {[variant_isset mysql4]} {
127            reinplace "s|^# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile
128            reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib/mysql -lmysqlclient|g" ${worksrcpath}/Local/Makefile
129            reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include/mysql -I ${prefix}/include|g" ${worksrcpath}/Local/Makefile
130        }
131        if {[variant_isset mysql5]} {
132            reinplace "s|^# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile
133            reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib/mysql5/mysql -lmysqlclient |g" ${worksrcpath}/Local/Makefile
134            reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include/mysql5/mysql |g"  ${worksrcpath}/Local/Makefile
135        }
136        if {[variant_isset ldap]} {
137            reinplace "s|^# LOOKUP_LDAP=yes|LOOKUP_LDAP=yes|g"  ${worksrcpath}/Local/Makefile
138            reinplace "s|^LOOKUP_LIBS=.*|& -L/usr/lib -lldap -llber |g" ${worksrcpath}/Local/Makefile
139            reinplace "s|^LOOKUP_INCLUDE=.*|& -I/usr/include |g"  ${worksrcpath}/Local/Makefile
140        }
141        if {[variant_isset macports_ldap]} {
142            reinplace "s|^# LOOKUP_LDAP=yes|LOOKUP_LDAP=yes|g"  ${worksrcpath}/Local/Makefile
143            reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib -lldap -llber |g" ${worksrcpath}/Local/Makefile
144            reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include |g"  ${worksrcpath}/Local/Makefile
145        }
146    }
147}
148
149livecheck.type          regex
150livecheck.url           ${homepage}
151livecheck.regex         {Latest Version: ([0-9.]+)}
Note: See TracBrowser for help on using the repository browser.