Ticket #24323: exim.patch

File exim.patch, 12.0 KB (added by pokui@…, 15 years ago)

patch exim port from 4.66 to 4.71

  • Portfile

    diff -Nru exim.orig/Portfile exim/Portfile
    old new  
     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
    12# $Id: Portfile 57752 2009-09-16 05:14:06Z jmr@macports.org $
    23
    3 PortSystem 1.0
     4PortSystem      1.0
    45name            exim
    5 version         4.66
    6 revision        1
     6version         4.71
    77categories      mail
    88description     complete replacement for sendmail
    99long_description        Exim is a mail transfer agent (MTA) developed \
     
    1515homepage        http://www.exim.org/
    1616platforms       darwin
    1717maintainers     nomaintainer
    18 master_sites    ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/ \
    19                 ftp://ftp.exim.org/pub/exim/exim4/
     18master_sites    ftp://ftp.exim.org/pub/exim/exim4/ \
     19                ftp://ftp.easynet.be/exim/exim/exim4/
    2020use_bzip2       yes
    21 checksums       md5 01288e44919d8abdde5a7bd2c200449b \
    22                 sha1 4a2ac2cd51865b57610e2b153e20c305b7f9f504 \
    23                 rmd160 4481c9ca4932be9ab5f4f0a66b99f3e2f8e6c5fa
    24 depends_build   path:bin/perl:perl5
     21checksums       md5 f9c5a2d94b5bb132d06e2fff85bef75e \
     22                sha1 4b8f853843edcfa4f3bfbb4bef45d8dcff2fc990 \
     23                rmd160 22e4ad1d43693d61fa1f2f2de40dda647599a087
     24depends_build   path:bin/perl:perl5 \
     25                port:pcre
    2526depends_lib     port:db44 port:openssl port:sqlite3
    2627
    27 patchfiles      patch-tls-openssl.c
    28 
    29 startupitem.create      yes
    30 startupitem.start       "${prefix}/share/exim/exim.sh start"
    31 startupitem.stop        "${prefix}/share/exim/exim.sh stop"
     28startupitem.create  yes
     29startupitem.start   "${prefix}/share/exim/exim.sh start"
     30startupitem.stop    "${prefix}/share/exim/exim.sh stop"
    3231
    3332set exim_user   exim
    3433
    35 use_parallel_build      no
     34use_parallel_build  no
    3635
    37 configure   {
    38                 copy ${worksrcpath}/src/EDITME ${worksrcpath}/Local/Makefile
    39                 reinplace "s|/usr/exim/bin|${prefix}/sbin|g" ${worksrcpath}/Local/Makefile
    40                 reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" ${worksrcpath}/Local/Makefile
    41                 reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" ${worksrcpath}/Local/Makefile
    42                 reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" ${worksrcpath}/Local/Makefile
    43                 reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" ${worksrcpath}/Local/Makefile
    44                 reinplace "s|# WITH_CONTENT_SCAN=yes|WITH_CONTENT_SCAN=yes|g" ${worksrcpath}/Local/Makefile
    45                 reinplace "s|# LOOKUP_PASSWD=yes|LOOKUP_PASSWD=yes|g" ${worksrcpath}/Local/Makefile
    46                 reinplace "s|# LOOKUP_CDB=yes|LOOKUP_CDB=yes|g" ${worksrcpath}/Local/Makefile
    47                 reinplace "s|# LOOKUP_DSEARCH=yes|LOOKUP_DSEARCH=yes|g" ${worksrcpath}/Local/Makefile
    48                 reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" ${worksrcpath}/Local/Makefile
    49                 reinplace "s|# TLS_LIBS=-L/usr/local/openssl/lib|TLS_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile
    50                 reinplace "s|# TLS_INCLUDE=-I/usr/local/openssl/include|TLS_INCLUDE=-I${prefix}/include/openssl|g" ${worksrcpath}/Local/Makefile
    51                 reinplace "s|CC=cc|CC=${configure.cc}|g" ${worksrcpath}/OS/Makefile-Darwin
    52                 reinplace "s|X11=/usr/X11R6|X11=${prefix}|g" ${worksrcpath}/OS/Makefile-Darwin
    53                 reinplace "s|# Exim: OS-specific make file for Darwin (Mac OS X).|INCLUDE=-I${prefix}/include/db44|g" ${worksrcpath}/OS/Makefile-Darwin
    54                 reinplace "s|DBMLIB =|DBMLIB=${prefix}/lib/db44/libdb-4.dylib|g" ${worksrcpath}/OS/Makefile-Darwin
    55                 reinplace "s|/etc/aliases|${destroot}${prefix}/etc/aliases|g" ${worksrcpath}/scripts/exim_install
    56                 adduser ${exim_user} gid=[existsgroup mail] }
     36configure {
     37    copy ${worksrcpath}/src/EDITME ${worksrcpath}/Local/Makefile
     38    reinplace "s|/usr/exim/bin|${prefix}/sbin|g" ${worksrcpath}/Local/Makefile
     39    reinplace "s|/usr/exim/configure|${prefix}/etc/exim/exim.conf|g" ${worksrcpath}/Local/Makefile
     40    reinplace "s|EXIM_USER=|EXIM_USER=${exim_user}|g" ${worksrcpath}/Local/Makefile
     41    reinplace "s|/var/spool/exim|${prefix}/var/spool/exim|g" ${worksrcpath}/Local/Makefile
     42    reinplace "s|EXIM_MONITOR=eximon.bin|#EXIM_MONITOR=eximon.bin|g" ${worksrcpath}/Local/Makefile
     43    reinplace "s|# WITH_CONTENT_SCAN=yes|WITH_CONTENT_SCAN=yes|g" ${worksrcpath}/Local/Makefile
     44    reinplace "s|# LOOKUP_PASSWD=yes|LOOKUP_PASSWD=yes|g" ${worksrcpath}/Local/Makefile
     45    reinplace "s|# LOOKUP_CDB=yes|LOOKUP_CDB=yes|g" ${worksrcpath}/Local/Makefile
     46    reinplace "s|# LOOKUP_DSEARCH=yes|LOOKUP_DSEARCH=yes|g" ${worksrcpath}/Local/Makefile
     47    reinplace "s|# SUPPORT_MAILDIR=yes|SUPPORT_MAILDIR=yes|g" ${worksrcpath}/Local/Makefile
     48    reinplace "s|# TLS_LIBS=-L/usr/local/openssl/lib|TLS_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile
     49    reinplace "s|# TLS_INCLUDE=-I/usr/local/openssl/include|TLS_INCLUDE=-I${prefix}/include/openssl|g" ${worksrcpath}/Local/Makefile
     50    reinplace "s|# INCLUDE=.*|INCLUDE=-I${prefix}/include|g" ${worksrcpath}/Local/Makefile
     51    reinplace "s|PCRE_LIBS=-lpcre|PCRE_LIBS=-L${prefix}/lib -lpcre|g" ${worksrcpath}/Local/Makefile
     52    reinplace "s|CC=cc|CC=${configure.cc}|g" ${worksrcpath}/OS/Makefile-Darwin
     53    reinplace "s|X11=/usr/X11R6|X11=${prefix}|g" ${worksrcpath}/OS/Makefile-Darwin
     54    reinplace "s|# Exim: OS-specific make file for Darwin (Mac OS X).|INCLUDE=-I${prefix}/include/db44|g" ${worksrcpath}/OS/Makefile-Darwin
     55    reinplace "s|DBMLIB =|DBMLIB=${prefix}/lib/db44/libdb-4.dylib|g" ${worksrcpath}/OS/Makefile-Darwin
     56    reinplace "s|/etc/aliases|${destroot}${prefix}/etc/aliases|g" ${worksrcpath}/scripts/exim_install
     57    adduser ${exim_user} gid=[existsgroup mail]
     58}
    5759
    5860destroot.destdir    ROOT=${destroot}
    5961destroot.keepdirs   ${destroot}${prefix}/var/spool/exim
    6062
    61 post-destroot { system "mv ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample"
    62                 xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim
    63                 system "cp -R ${worksrcpath}/doc/ ${destroot}${prefix}/share/exim"
    64                 xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim
    65                 xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d
    66                 xinstall -o root -m 755 -c \
    67                   ${portpath}/files/exim.sh ${destroot}${prefix}/share/exim
    68                 reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/share/exim/exim.sh }
     63post-destroot {
     64    system "mv ${destroot}${prefix}/etc/exim/exim.conf ${destroot}${prefix}/etc/exim/exim.conf.sample"
     65    xinstall -o root -m 755 -d ${destroot}${prefix}/share/exim
     66    system "cp -R ${worksrcpath}/doc/ ${destroot}${prefix}/share/exim"
     67    xinstall -o ${exim_user} -g mail -m 750 -d ${destroot}${prefix}/var/spool/exim
     68    xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d
     69    xinstall -o root -m 755 -c \
     70        ${portpath}/files/exim.sh ${destroot}${prefix}/share/exim
     71    reinplace "s|__PREFIX|${prefix}|g" ${destroot}${prefix}/share/exim/exim.sh
     72}
    6973
    70 variant mysql4 { depends_lib-append      lib:libmysqlclient:mysql4 }
     74variant mysql4 description {build exim with support for mysql4 lookups} {
     75    depends_lib-append  port:mysql4
     76}
     77
     78variant mysql5 conflicts mysql4 description {build exim with support for mysql5 lookups} {
     79    depends_lib-append  path:bin/mysql_config5:mysql5
     80}
     81
     82variant ldap conflicts macports_ldap description {build exim with support for ldap lookups using the shipped ldap} {
     83    # do nothing .. until post-configure
     84}
     85
     86variant macports_ldap conflicts ldap description {install exim with support for ldap lookups using macports ldap} {
     87    depends_lib-append  port:openldap
     88}
    7189
    7290post-configure {
    7391    reinplace "s|# AUTH_CRAM_MD5=yes|AUTH_CRAM_MD5=yes|g" ${worksrcpath}/Local/Makefile
     
    7694    reinplace "s|# SUPPORT_TLS=yes|SUPPORT_TLS=yes|g" ${worksrcpath}/Local/Makefile
    7795    reinplace "s|# TLS_LIBS=-lssl -lcrypto|TLS_LIBS=-lssl -lcrypto|g" ${worksrcpath}/Local/Makefile
    7896    reinplace "s|# LDAP_LIB_TYPE=OPENLDAP2|LDAP_LIB_TYPE=OPENLDAP2|g" ${worksrcpath}/Local/Makefile
    79     reinplace "s|# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds|LOOKUP_LIBS=-lldap|g" ${worksrcpath}/Local/Makefile
    80 
    81     if {[variant_isset mysql] || [variant_isset mysql4]} {
    82         reinplace "s|# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile
    83         reinplace "s|# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=-I ${prefix}/include/mysql -I ${prefix}/include -I /usr/include|g" ${worksrcpath}/Local/Makefile
     97   
     98    # settings common to any lookup
     99    if {[variant_isset mysql4]
     100        ||  [variant_isset mysql5]
     101        ||  [variant_isset ldap]
     102        ||  [variant_isset macports_ldap]
     103    } then {
     104        reinplace "s|^# LOOKUP_INCLUDE=.*|LOOKUP_INCLUDE=|g" ${worksrcpath}/Local/Makefile
     105        reinplace "s|^# LOOKUP_LIBS=.*|LOOKUP_LIBS=-L${prefix}/lib|g" ${worksrcpath}/Local/Makefile
     106        # lookup specific settings
     107        if {[variant_isset mysql4]} {
     108            reinplace "s|^# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile
     109            reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib/mysql -lmysqlclient|g" ${worksrcpath}/Local/Makefile
     110            reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include/mysql -I ${prefix}/include|g" ${worksrcpath}/Local/Makefile
     111        }
     112        if {[variant_isset mysql5]} {
     113            reinplace "s|^# LOOKUP_MYSQL=yes|LOOKUP_MYSQL=yes|g" ${worksrcpath}/Local/Makefile
     114            reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib/mysql5/mysql -lmysqlclient |g" ${worksrcpath}/Local/Makefile
     115            reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include/mysql5/mysql |g"  ${worksrcpath}/Local/Makefile
     116        }
     117        if {[variant_isset ldap]} {
     118            reinplace "s|^# LOOKUP_LDAP=yes|LOOKUP_LDAP=yes|g"  ${worksrcpath}/Local/Makefile
     119            reinplace "s|^LOOKUP_LIBS=.*|& -L/usr/lib -lldap -llber |g" ${worksrcpath}/Local/Makefile
     120            reinplace "s|^LOOKUP_INCLUDE=.*|& -I/usr/include |g"  ${worksrcpath}/Local/Makefile
     121        }
     122        if {[variant_isset macports_ldap]} {
     123            reinplace "s|^# LOOKUP_LDAP=yes|LOOKUP_LDAP=yes|g"  ${worksrcpath}/Local/Makefile
     124            reinplace "s|^LOOKUP_LIBS=.*|& -L${prefix}/lib -lldap -llber |g" ${worksrcpath}/Local/Makefile
     125            reinplace "s|^LOOKUP_INCLUDE=.*|& -I${prefix}/include |g"  ${worksrcpath}/Local/Makefile                       
     126        }
     127       
    84128    }
    85 
    86129}
    87130
    88 platform darwin 10 {
    89     patchfiles-append lresolv.diff
    90 }
     131livecheck.type      regex
     132livecheck.url       ${homepage}version.html
     133livecheck.regex     "The latest release is <b>(\\d+\\.\\d+)</b>"
  • files/lresolv.diff

    diff -Nru exim.orig/files/lresolv.diff exim/files/lresolv.diff
    old new  
    1 --- OS/Makefile-Darwin.orig     2007-01-09 01:25:36.000000000 +1100
    2 +++ OS/Makefile-Darwin  2009-09-16 15:08:12.000000000 +1000
    3 @@ -26,4 +26,6 @@
    4  EXIWHAT_EGREP_ARG='/exim( |$$)'
    5  EXIWHAT_KILL_SIGNAL=-USR1
    6  
    7 +LIBRESOLV=-lresolv
    8 +
    9  # End
  • files/patch-tls-openssl.c

    diff -Nru exim.orig/files/patch-tls-openssl.c exim/files/patch-tls-openssl.c
    old new  
    1 --- src/tls-openssl.c.orig      2007-01-09 01:25:37.000000000 +1100
    2 +++ src/tls-openssl.c   2009-09-16 14:45:26.000000000 +1000
    3 @@ -343,8 +343,8 @@
    4  /* Set up the information callback, which outputs if debugging is at a suitable
    5  level. */
    6  
    7 -if (!(SSL_CTX_set_info_callback(ctx, (void (*)())info_callback)))
    8 -  return tls_error(US"SSL_CTX_set_info_callback", host);
    9 +/* This function returns no diagnostic information! */
    10 +SSL_CTX_set_info_callback(ctx, (void (*)())info_callback);
    11  
    12  /* The following patch was supplied by Robert Roselius */
    13