[68844] trunk/dports/mail/postfix

jmr at macports.org jmr at macports.org
Tue Jun 15 09:52:48 PDT 2010


Revision: 68844
          http://trac.macports.org/changeset/68844
Author:   jmr at macports.org
Date:     2010-06-15 09:52:44 -0700 (Tue, 15 Jun 2010)
Log Message:
-----------
postfix:
 * update to 2.7.1
 * take maintainership
 * add license
 * refresh master_sites
 * use correct compiler and arch flags
 * set up default config files in post-activate
 * use notes
 * add postgresql84 variant
 * general cleanup

Modified Paths:
--------------
    trunk/dports/mail/postfix/Portfile
    trunk/dports/mail/postfix/files/patch-mail_params.h
    trunk/dports/mail/postfix/files/patch-postfix-install
    trunk/dports/mail/postfix/files/patch-sys_defs.h

Removed Paths:
-------------
    trunk/dports/mail/postfix/files/nameser8_compat.diff

Modified: trunk/dports/mail/postfix/Portfile
===================================================================
--- trunk/dports/mail/postfix/Portfile	2010-06-15 16:40:06 UTC (rev 68843)
+++ trunk/dports/mail/postfix/Portfile	2010-06-15 16:52:44 UTC (rev 68844)
@@ -3,9 +3,10 @@
 PortSystem  1.0
 
 name            postfix
-version         2.6.2
+version         2.7.1
 categories      mail
-maintainers     nomaintainer
+license         IBMPL-1.0
+maintainers     jmr openmaintainer
 description     Fast and robust mail transfer agent
 long_description    Postfix attempts to be fast, easy to administer, and \
             secure, while at the same time being \
@@ -14,13 +15,16 @@
             Postfix act as delivery daemon for ezmlm-idx.
 homepage        http://www.postfix.org/
 platforms       darwin
-checksums       md5     1f0edbd521d2b0473626f4d61e8bb4eb \
-                sha1    a3b349df60bca947f3b94ff484b699d176777b4a \
-                rmd160  a86c829c3c17746986a0ea013674b6bec49d74ea
+checksums       md5     b7a5c3ccd309156a65d6f8d2683d4fa1 \
+                sha1    94259e8f008b5b1853292e3de5e0ae3abcfe8c81 \
+                rmd160  dba0622cf6e21908f27bee0c9da42ab3c189d4bd
 
-master_sites    http://www.swissrave.ch/mirror/postfix-source/official/ \
-    ftp://ftp.its.cz/MIRRORS/ftp.porcupine.org/mirrors/postfix-release/official/ \
-    ftp://ftp.club-internet.fr/pub/mirrors/ftp.porcupine.org/postfix-release/official/
+master_sites    http://archive.mgm51.com/mirrors/postfix-source/official/ \
+                http://de.postfix.org/ftpmirror/official/ \
+                ftp://ftp.its.cz/MIRRORS/ftp.porcupine.org/mirrors/postfix-release/official/ \
+                ftp://ftp.cuhk.edu.hk/pub/packages/mail-server/postfix/official/ \
+                http://mirror.postfix.jp/postfix-release/official/ \
+                http://postfix.bbnx.net/source/official/
 
 patchfiles     patch-sys_defs.h patch-mail_params.h patch-postfix-install
 
@@ -30,8 +34,8 @@
           [glob ${worksrcpath}/man/man5/*] \
           [glob ${worksrcpath}/man/man8/*]
 
-     reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/src/util/sys_defs.h
-     reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/src/global/mail_params.h
+     reinplace "s|__PREFIX|${prefix}|g" ${worksrcpath}/src/util/sys_defs.h \
+                                        ${worksrcpath}/src/global/mail_params.h
 
      reinplace "s|ls |/bin/ls |g" \
           ${worksrcpath}/conf/postfix-script
@@ -49,10 +53,19 @@
           ${worksrcpath}/conf/main.cf
 }
 
-set CCARGS  -DNO_PCRE
-set AUXLIBS "-L${prefix}/lib -R${prefix}/lib -L${prefix}/lib"
+set CCARGS  [list -DNO_PCRE]
+set AUXLIBS [list "-L${prefix}/lib" "-R${prefix}/lib" "-L${prefix}/lib"]
+if {[variant_isset universal]} {
+    set CCARGS [concat ${CCARGS} ${configure.universal_cflags}]
+    set AUXLIBS [concat ${AUXLIBS} ${configure.universal_ldflags}]
+} else {
+    set CCARGS [concat ${CCARGS} ${configure.cc_archflags}]
+    set AUXLIBS [concat ${AUXLIBS} ${configure.ld_archflags}]
+}
 set pf_mail_owner "_postfix"
 set pf_setgid_group "_postdrop"
+set config_files [list main.cf master.cf access aliases canonical generic \
+                  header_checks relocated transport virtual]
 
 # Beginning with Mac OS X 10.5, the user 'postfix' changed to '_postfix'
 platform darwin 8 {
@@ -63,12 +76,12 @@
 }
 
 platform darwin 10 {
-    patchfiles-append nameser8_compat.diff
-    set AUXLIBS     [concat ${AUXLIBS} -lresolv]
+    lappend AUXLIBS -lresolv
 }
 
 configure {
-    system "cd ${worksrcpath} && make makefiles CCARGS=\"${CCARGS}\" AUXLIBS=\"${AUXLIBS}\""
+    system "cd ${worksrcpath} && make makefiles CC='${configure.cc}' \
+        OPT='${configure.optflags}' CCARGS='${CCARGS}' AUXLIBS='${AUXLIBS}'"
 }
 
 build.target
@@ -99,71 +112,77 @@
         mail_owner=${pf_mail_owner} \
         setgid_group=${pf_setgid_group}"
 
-# This makes sure we don't overwrite user /etc files. This now breaks postfix
-# "just working" on fresh installs.
-# YOU MUST MOVE THE SAMPLE FILES TO THE CORRECT NAMESPACE.
-# XXX unsure if this still an issue 07/07/05 yeled@
-
-        file rename ${destroot}${prefix}/etc/postfix/main.cf \
-            ${destroot}${prefix}/etc/postfix/main.cf.sample
-        file rename ${destroot}${prefix}/etc/postfix/master.cf \
-            ${destroot}${prefix}/etc/postfix/master.cf.sample
-        file rename ${destroot}${prefix}/etc/postfix/aliases \
-            ${destroot}${prefix}/etc/postfix/aliases.sample
+        # This makes sure we don't overwrite user cf files.
+        foreach f $config_files {
+            move ${destroot}${prefix}/etc/postfix/${f} \
+                 ${destroot}${prefix}/etc/postfix/${f}.sample
+        }
 }
 
 pre-install {
         system "chown ${pf_mail_owner} ${destroot}${prefix}/var/spool/postfix/public/.turd_postfix"
 }
 
-post-install {
-    # Tell the user about renaming the sample configuration files.
-ui_msg "\n
-To get postfix working, you need to copy the sample configuration
-files and edit them (${prefix}/etc/postfix/*.sample).  You may also
-want to turn off Apple's built-in MTA.  For example, on 10.4:
-
-sudo launchctl unload -w /System/Library/LaunchDaemons/org.postfix.master.plist
-\n"
+post-activate {
+    foreach f $config_files {
+        if {![file exists ${prefix}/etc/postfix/${f}]} {
+            copy ${prefix}/etc/postfix/${f}.sample \
+                 ${prefix}/etc/postfix/${f}
+        }
+    }
 }
 
+# Tell the user about renaming the sample configuration files.
+notes \
+"To get postfix working, you need to edit the configuration
+files (${prefix}/etc/postfix/*).  You may also
+want to turn off Apple's built-in MTA.  For example:
+
+sudo launchctl unload -w /System/Library/LaunchDaemons/org.postfix.master.plist"
+
 variant pcre description "add pcre support" {
     set CCARGS      [ldelete ${CCARGS} -DNO_PCRE]
-    set CCARGS      [concat  ${CCARGS} -DHAS_PCRE -I${prefix}/include]
-    set AUXLIBS     [concat ${AUXLIBS} -L${prefix}/lib -lpcre]
+    lappend CCARGS  -DHAS_PCRE "-I${prefix}/include"
+    lappend AUXLIBS "-L${prefix}/lib" -lpcre
     depends_lib-append  port:pcre
 }
 
 variant tls description "add tls support via openssl" {
     depends_lib-append  port:openssl
-    set CCARGS      [concat ${CCARGS} -DUSE_TLS -DHAS_SSL -I${prefix}/include]
-    set AUXLIBS     [concat ${AUXLIBS} -lssl -lcrypto]
+    lappend CCARGS  -DUSE_TLS -DHAS_SSL "-I${prefix}/include"
+    lappend AUXLIBS -lssl -lcrypto
 }
 
 variant sasl description "add sasl support via cyrus-sasl2" {
     depends_lib-append  port:cyrus-sasl2
-    set CCARGS      [concat ${CCARGS} -DUSE_CYRUS_SASL -DUSE_SASL_AUTH -I${prefix}/include/sasl]
-    set AUXLIBS     [concat ${AUXLIBS} -lsasl2]
+    lappend CCARGS  -DUSE_CYRUS_SASL -DUSE_SASL_AUTH "-I${prefix}/include/sasl"
+    lappend AUXLIBS -lsasl2
 }
 
 variant ldap description "add ldap support via openldap" {
     depends_lib-append  port:openldap
-    set CCARGS      [concat ${CCARGS} -DHAS_LDAP]
-    set AUXLIBS     [concat ${AUXLIBS} -lldap -llber]
+    lappend CCARGS  -DHAS_LDAP
+    lappend AUXLIBS -lldap -llber
 }
 
 variant mysql5  description "add mysql support via mysql5" {
     depends_lib-append path:bin/mysql_config5:mysql5
-    set CCARGS      [concat ${CCARGS} -DHAS_MYSQL -I${prefix}/include/mysql5/mysql]
-    set AUXLIBS     [concat ${AUXLIBS} -L${prefix}/lib/mysql5/mysql -lmysqlclient -lz -lm]
+    lappend CCARGS  -DHAS_MYSQL "-I${prefix}/include/mysql5/mysql"
+    lappend AUXLIBS "-L${prefix}/lib/mysql5/mysql" -lmysqlclient -lz -lm
 }
 
-variant postgresql83 description "add postgresql support via postgresql83" {
+variant postgresql83 conflicts postgresql84 description "add postgresql support via postgresql83" {
     depends_lib-append port:postgresql83
-    set CCARGS      [concat ${CCARGS} -DHAS_PGSQL -I${prefix}/include/postgresql83]
-    set AUXLIBS     [concat ${AUXLIBS} -L${prefix}/lib/postgresql83 -lpq]
+    lappend CCARGS  -DHAS_PGSQL "-I${prefix}/include/postgresql83"
+    lappend AUXLIBS "-L${prefix}/lib/postgresql83" -lpq
 }
 
+variant postgresql84 conflicts postgresql83 description "add postgresql support via postgresql84" {
+    depends_lib-append port:postgresql84
+    lappend CCARGS  -DHAS_PGSQL "-I${prefix}/include/postgresql84"
+    lappend AUXLIBS "-L${prefix}/lib/postgresql84" -lpq
+}
+
 variant dovecot_sasl description "add Dovecot SASL support " {
-    set CCARGS      [concat ${CCARGS} -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\\\\"dovecot\\\\\\"]
+    lappend CCARGS  -DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\\\\\\"dovecot\\\\\\"
 }

Deleted: trunk/dports/mail/postfix/files/nameser8_compat.diff
===================================================================
--- trunk/dports/mail/postfix/files/nameser8_compat.diff	2010-06-15 16:40:06 UTC (rev 68843)
+++ trunk/dports/mail/postfix/files/nameser8_compat.diff	2010-06-15 16:52:44 UTC (rev 68844)
@@ -1,10 +0,0 @@
---- src/util/sys_defs.h.orig	2009-08-31 05:27:40.000000000 +1000
-+++ src/util/sys_defs.h	2009-08-31 05:29:28.000000000 +1000
-@@ -203,7 +203,6 @@
- #define DEF_DB_TYPE	"hash"
- #define ALIAS_DB_MAP	"hash:__PREFIX/etc/postfix/aliases"
- #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
--#define RESOLVE_H_NEEDS_NAMESER8_COMPAT_H
- #define ROOT_PATH	"__PREFIX/bin:/usr/bin:/sbin:/usr/sbin"
- #define USE_STATFS
- #define STATFS_IN_SYS_MOUNT_H

Modified: trunk/dports/mail/postfix/files/patch-mail_params.h
===================================================================
--- trunk/dports/mail/postfix/files/patch-mail_params.h	2010-06-15 16:40:06 UTC (rev 68843)
+++ trunk/dports/mail/postfix/files/patch-mail_params.h	2010-06-15 16:52:44 UTC (rev 68844)
@@ -57,7 +57,7 @@
  #define VAR_MANPAGE_DIR			"manpage_directory"
  #ifndef DEF_MANPAGE_DIR
 -#define DEF_MANPAGE_DIR			"/usr/local/man"
-+#define DEF_MANPAGE_DIR			"__PREFIX/local/man"
++#define DEF_MANPAGE_DIR			"__PREFIX/share/man"
  #endif
  
  #define VAR_SAMPLE_DIR			"sample_directory"

Modified: trunk/dports/mail/postfix/files/patch-postfix-install
===================================================================
--- trunk/dports/mail/postfix/files/patch-postfix-install	2010-06-15 16:40:06 UTC (rev 68843)
+++ trunk/dports/mail/postfix/files/patch-postfix-install	2010-06-15 16:52:44 UTC (rev 68844)
@@ -7,7 +7,7 @@
 -    # If installing from source code, apply special permissions or ownership.
 -    # If building a package, don't apply special permissions or ownership.
 +	# We want ownership changed even if we install in a different root.
-+	# (dports)
++	# (macports)
  
 -    case $install_root in
 -    "") case $owner in

Modified: trunk/dports/mail/postfix/files/patch-sys_defs.h
===================================================================
--- trunk/dports/mail/postfix/files/patch-sys_defs.h	2010-06-15 16:40:06 UTC (rev 68843)
+++ trunk/dports/mail/postfix/files/patch-sys_defs.h	2010-06-15 16:52:44 UTC (rev 68844)
@@ -1,19 +1,18 @@
---- src/util/sys_defs.h.org	2007-10-17 21:27:59.000000000 -0700
-+++ src/util/sys_defs.h	2007-10-17 21:32:35.000000000 -0700
-@@ -185,10 +185,10 @@
+--- src/util/sys_defs.h.orig	2010-06-02 09:56:57.000000000 +1000
++++ src/util/sys_defs.h	2010-06-16 00:51:47.000000000 +1000
+@@ -206,9 +206,9 @@
  #define HAS_DB
  #define HAS_SA_LEN
  #define DEF_DB_TYPE	"hash"
 -#define ALIAS_DB_MAP	"hash:/etc/aliases"
 +#define ALIAS_DB_MAP	"hash:__PREFIX/etc/postfix/aliases"
  #define GETTIMEOFDAY(t) gettimeofday(t,(struct timezone *) 0)
- #define RESOLVE_H_NEEDS_NAMESER8_COMPAT_H
 -#define ROOT_PATH	"/bin:/usr/bin:/sbin:/usr/sbin"
-+#define ROOT_PATH	"__PREFIX/bin:/usr/bin:/sbin:/usr/sbin"
++#define ROOT_PATH	"__PREFIX/bin:/bin:/usr/bin:/sbin:/usr/sbin"
  #define USE_STATFS
  #define STATFS_IN_SYS_MOUNT_H
  #define HAS_POSIX_REGEXP
-@@ -203,11 +203,11 @@
+@@ -223,11 +223,11 @@
  # define HAVE_GETIFADDRS
  #endif
  #define HAS_FUTIMES			/* XXX Guessing */
@@ -29,4 +28,4 @@
 +#define NATIVE_DAEMON_DIR "__PREFIX/libexec/postfix"
  #define SOCKADDR_SIZE	socklen_t
  #define SOCKOPT_SIZE	socklen_t
- #endif
+ #ifndef NO_KQUEUE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100615/44f8d846/attachment-0001.html>


More information about the macports-changes mailing list