summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorjlam <jlam>2004-08-07 08:11:25 +0000
committerjlam <jlam>2004-08-07 08:11:25 +0000
commitccb00fc5a8df86d360f076cd7b519d6c1140dacd (patch)
treec7fbc69fc4c4137c3828decab89507b6f109a156 /mail
parent360acbdab1b54994c6ea6f905fecaf61c8a36c31 (diff)
downloadpkgsrc-ccb00fc5a8df86d360f076cd7b519d6c1140dacd.tar.gz
Mirror changes to mail/postfix:
Reduce the number of patches needed by Postfix by using the subst framework and also by explicitly specifying more default values for Postfix parameters. Also pass -I/usr/pkg/include/sasl to the compiler when building using Cyrus SASLv2, which allows me to remove the patches that added an unnecessary USE_SASL2_AUTH check.
Diffstat (limited to 'mail')
-rw-r--r--mail/postfix-current/Makefile37
-rw-r--r--mail/postfix-current/distinfo7
-rw-r--r--mail/postfix-current/options.mk8
-rw-r--r--mail/postfix-current/patches/patch-ab23
-rw-r--r--mail/postfix-current/patches/patch-ac23
-rw-r--r--mail/postfix-current/patches/patch-ae29
-rw-r--r--mail/postfix-current/patches/patch-af60
-rw-r--r--mail/postfix-current/patches/patch-ah23
8 files changed, 30 insertions, 180 deletions
diff --git a/mail/postfix-current/Makefile b/mail/postfix-current/Makefile
index 6529e660da0..67f7ebc21d6 100644
--- a/mail/postfix-current/Makefile
+++ b/mail/postfix-current/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.37 2004/08/05 03:04:33 jlam Exp $
+# $NetBSD: Makefile,v 1.38 2004/08/07 08:11:25 jlam Exp $
DISTNAME= postfix-2.2-20040628
CATEGORIES= mail
@@ -30,13 +30,34 @@ CCARGS= # empty
AUXLIBS= # empty
FIX_RPATH+= AUXLIBS
-CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
+# Set some default paths to override ${WRKSRC}/src/global/mail_params.h.
CCARGS+= -DDEF_QUEUE_DIR=\"${POSTFIX_QUEUE_DIR}\"
-CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
CCARGS+= -DDEF_DAEMON_DIR=\"${LIBEXECDIR}\"
+CCARGS+= -DDEF_COMMAND_DIR=\"${PREFIX}/sbin\"
+CCARGS+= -DDEF_CONFIG_DIR=\"${PKG_SYSCONFDIR}\"
CCARGS+= -DDEF_SENDMAIL_PATH=\"${PREFIX}/sbin/sendmail\"
CCARGS+= -DDEF_MAILQ_PATH=\"${PREFIX}/bin/mailq\"
CCARGS+= -DDEF_NEWALIAS_PATH=\"${PREFIX}/bin/newaliases\"
+CCARGS+= -DDEF_MANPAGE_DIR=\"${PREFIX}/man\"
+CCARGS+= -DDEF_SAMPLE_DIR=\"${EXAMPLEDIR}\"
+CCARGS+= -DDEF_README_DIR=\"${DOCDIR}\"
+
+# Override those same default paths in the installed example main.cf.
+SUBST_CLASSES+= postfix
+SUBST_STAGE.postfix= post-configure
+SUBST_FILES.postfix= conf/main.cf src/global/mail_params.h
+SUBST_SED.postfix= \
+ -e "s|^\(queue_directory\) =.*|\1 = ${POSTFIX_QUEUE_DIR}|" \
+ -e "s|^\(command_directory\) =.*|\1 = ${PREFIX}/sbin|" \
+ -e "s|^\(daemon_directory\) =.*|\1 = ${LIBEXECDIR}|" \
+ -e "s|^\(sendmail_path\) =.*|\1 = ${PREFIX}/sbin/sendmail|" \
+ -e "s|^\(newaliases_path\) =.*|\1 = ${PREFIX}/bin/newaliases|" \
+ -e "s|^\(mailq_path\) =.*|\1 = ${PREFIX}/bin/mailq|" \
+ -e "s|^\(setgid_group\) =.*|\1 = maildrop|" \
+ -e "s|^\(manpage_directory\) =.*|\1 = ${PREFIX}/man|" \
+ -e "s|^\(sample_directory\) =.*|\1 = ${EXAMPLEDIR}|" \
+ -e "s|^\(readme_directory\) =.*|\1 = ${DOCDIR}|" \
+ -e "/^\#define DEF_SGID_GROUP[ ]/s,postdrop,maildrop,g"
# options.mk appends to CCARGS and AUXLIBS the options needed to build
# Postfix with support for various add-on modules.
@@ -85,16 +106,6 @@ MAKE_DIRS+= ${SASLLIBDIR}
CONF_FILES+= ${EXAMPLEDIR}/smtpd.conf ${SASLLIBDIR}/smtpd.conf
.endif
-POSTFIX_CONF_FILES= conf/main.cf src/util/sys_defs.h \
- src/global/mail_params.h postfix-install
-
-pre-configure:
- @for i in ${POSTFIX_CONF_FILES}; do \
- ${CP} ${WRKSRC}/$${i} ${WRKSRC}/$${i}.dist; \
- ${SED} ${FILES_SUBST_SED} ${WRKSRC}/$${i}.dist \
- > ${WRKSRC}/$${i}; \
- done
-
do-configure:
cd ${WRKSRC} && \
${SETENV} ${MAKE_ENV} ${MAKE} -f Makefile.init makefiles \
diff --git a/mail/postfix-current/distinfo b/mail/postfix-current/distinfo
index 24c2c680489..360bdf8e72a 100644
--- a/mail/postfix-current/distinfo
+++ b/mail/postfix-current/distinfo
@@ -1,12 +1,7 @@
-$NetBSD: distinfo,v 1.8 2004/07/31 05:53:44 jlam Exp $
+$NetBSD: distinfo,v 1.9 2004/08/07 08:11:26 jlam Exp $
SHA1 (postfix/postfix-2.2-20040628.tar.gz) = f5fb9278cbcb86fd2d90ceea62e806894561a333
Size (postfix/postfix-2.2-20040628.tar.gz) = 2014579 bytes
SHA1 (patch-aa) = 279b54f19289b56a423214716386c5aab79a57d5
-SHA1 (patch-ab) = ac4c75fb7a36491edf03b54915c7a47461748b4d
-SHA1 (patch-ac) = b0d26742fe8496b2fd4729a41fecadc275e71cf2
-SHA1 (patch-ae) = 3c0884fc2969d8353809895479f0f58897c5f133
-SHA1 (patch-af) = 48f0f516f415b1faa1e9d2775e9446aa540d749d
SHA1 (patch-ag) = 292b3b5d87f4688930fd654edfc5cb83ca8a2652
-SHA1 (patch-ah) = 6beedd15ee3a7cfd46cf3ed0b9ee579b9906300b
SHA1 (patch-ai) = e7284d9b3d7b83def7994269867e443fc0394d40
diff --git a/mail/postfix-current/options.mk b/mail/postfix-current/options.mk
index 0b6e83b84d1..aa32df30fce 100644
--- a/mail/postfix-current/options.mk
+++ b/mail/postfix-current/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.1 2004/08/05 03:04:33 jlam Exp $
+# $NetBSD: options.mk,v 1.2 2004/08/07 08:11:26 jlam Exp $
# Global and legacy options
#
@@ -137,17 +137,19 @@ AUXLIBS+= -L${PGSQL_PREFIX}/lib -lpq \
.if !empty(PKG_OPTIONS:Msasl)
. if !defined(USE_SASL2) && !defined(USE_SASL)
. include "../../security/cyrus-sasl2/buildlink3.mk"
+BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
SASLLIBDIR= ${PREFIX}/lib/sasl2
PWCHECK_METHOD= auxprop
-CCARGS+= -DUSE_SASL2_AUTH
+CCARGS+= -DUSE_SASL_AUTH
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl2
. elif defined(USE_SASL2) && !empty(USE_SASL2:M[yY][eE][sS])
. include "../../security/cyrus-sasl2/buildlink3.mk"
+BUILDLINK_INCDIRS.cyrus-sasl= include/sasl
SASLLIBDIR= ${PREFIX}/lib/sasl2
PWCHECK_METHOD= auxprop
-CCARGS+= -DUSE_SASL2_AUTH
+CCARGS+= -DUSE_SASL_AUTH
AUXLIBS+= -L${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-Wl,${RPATH_FLAG}${BUILDLINK_PREFIX.cyrus-sasl}/lib \
-lsasl2
diff --git a/mail/postfix-current/patches/patch-ab b/mail/postfix-current/patches/patch-ab
deleted file mode 100644
index 6c535a114ab..00000000000
--- a/mail/postfix-current/patches/patch-ab
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ab,v 1.6 2004/07/02 08:03:04 martti Exp $
-
---- src/lmtp/lmtp.h.orig 2003-09-10 02:48:03.000000000 +0200
-+++ src/lmtp/lmtp.h 2004-01-20 20:30:12.000000000 +0100
-@@ -11,10 +11,18 @@
- /*
- * SASL library.
- */
-+#ifdef USE_SASL2_AUTH
-+#ifndef USE_SASL_AUTH
-+#define USE_SASL_AUTH
-+#endif
-+#include <sasl/sasl.h>
-+#include <sasl/saslutil.h>
-+#else
- #ifdef USE_SASL_AUTH
- #include <sasl.h>
- #include <saslutil.h>
- #endif
-+#endif
-
- /*
- * Utility library.
diff --git a/mail/postfix-current/patches/patch-ac b/mail/postfix-current/patches/patch-ac
deleted file mode 100644
index 26261cb6ccc..00000000000
--- a/mail/postfix-current/patches/patch-ac
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ac,v 1.4 2004/07/02 08:03:04 martti Exp $
-
---- src/smtp/smtp.h.orig 2002-05-23 21:18:02.000000000 +0200
-+++ src/smtp/smtp.h 2004-01-20 20:29:21.000000000 +0100
-@@ -11,10 +11,18 @@
- /*
- * SASL library.
- */
-+#ifdef USE_SASL2_AUTH
-+#ifndef USE_SASL_AUTH
-+#define USE_SASL_AUTH
-+#endif
-+#include <sasl/sasl.h>
-+#include <sasl/saslutil.h>
-+#else
- #ifdef USE_SASL_AUTH
- #include <sasl.h>
- #include <saslutil.h>
- #endif
-+#endif
-
- /*
- * Utility library.
diff --git a/mail/postfix-current/patches/patch-ae b/mail/postfix-current/patches/patch-ae
deleted file mode 100644
index 62818d309bd..00000000000
--- a/mail/postfix-current/patches/patch-ae
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD: patch-ae,v 1.5 2004/07/31 05:53:44 jlam Exp $
-
---- src/global/mail_params.h.orig 2004-04-21 14:56:04.000000000 -0400
-+++ src/global/mail_params.h 2004-05-23 22:44:13.000000000 -0400
-@@ -64,7 +64,7 @@
- extern gid_t var_owner_gid;
-
- #define VAR_SGID_GROUP "setgid_group"
--#define DEF_SGID_GROUP "postdrop"
-+#define DEF_SGID_GROUP "maildrop"
- extern char *var_sgid_group;
- extern gid_t var_sgid_gid;
-
-@@ -202,13 +202,13 @@
- */
- #define VAR_DAEMON_DIR "daemon_directory"
- #ifndef DEF_DAEMON_DIR
--#define DEF_DAEMON_DIR "/usr/libexec/postfix"
-+#define DEF_DAEMON_DIR "@PREFIX@/libexec/postfix"
- #endif
- extern char *var_daemon_dir;
-
- #define VAR_COMMAND_DIR "command_directory"
- #ifndef DEF_COMMAND_DIR
--#define DEF_COMMAND_DIR "/usr/sbin"
-+#define DEF_COMMAND_DIR "@PREFIX@/sbin"
- #endif
- extern char *var_command_dir;
-
diff --git a/mail/postfix-current/patches/patch-af b/mail/postfix-current/patches/patch-af
deleted file mode 100644
index 06bbcd5ed40..00000000000
--- a/mail/postfix-current/patches/patch-af
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD: patch-af,v 1.11 2004/07/31 05:53:44 jlam Exp $
-
---- conf/main.cf.orig 2004-04-15 09:27:21.000000000 -0400
-+++ conf/main.cf 2004-05-23 22:51:16.000000000 -0400
-@@ -32,13 +32,18 @@
- # The command_directory parameter specifies the location of all
- # postXXX commands.
- #
--command_directory = /usr/sbin
-+command_directory = @PREFIX@/sbin
-
- # The daemon_directory parameter specifies the location of all Postfix
- # daemon programs (i.e. programs listed in the master.cf file). This
- # directory must be owned by root.
- #
--daemon_directory = /usr/libexec/postfix
-+daemon_directory = @PREFIX@/libexec/postfix
-+
-+# Shared files and etc directory
-+etc_directory = @PKG_SYSCONFDIR@
-+share_directory = @PREFIX@/share/examples/postfix
-+man_directory = @PREFIX@/man
-
- # QUEUE AND PROCESS OWNERSHIP
- #
-@@ -56,7 +61,7 @@
- # These rights are used in the absence of a recipient user context.
- # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
- #
--#default_privs = nobody
-+default_privs = nobody
-
- # INTERNET HOST AND DOMAIN NAMES
- #
-@@ -611,7 +616,7 @@
- # commands. This must be a group name with a numerical group ID that
- # is not shared with other accounts, not even with the Postfix account.
- #
--setgid_group =
-+setgid_group = maildrop
-
- # html_directory: The location of the Postfix HTML documentation.
- #
-@@ -619,13 +624,13 @@
-
- # manpage_directory: The location of the Postfix on-line manual pages.
- #
--manpage_directory =
-+manpage_directory = @PREFIX@/man
-
- # sample_directory: The location of the Postfix sample configuration files.
- # This parameter is obsolete as of Postfix 2.1.
- #
--sample_directory =
-+sample_directory = @PREFIX@/share/examples/postfix
-
- # readme_directory: The location of the Postfix README files.
- #
--readme_directory =
-+readme_directory = @PREFIX@/share/doc/postfix
diff --git a/mail/postfix-current/patches/patch-ah b/mail/postfix-current/patches/patch-ah
deleted file mode 100644
index d83dbe02eb5..00000000000
--- a/mail/postfix-current/patches/patch-ah
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ah,v 1.4 2004/07/02 08:03:04 martti Exp $
-
---- src/smtpd/smtpd.h.orig 2003-10-02 06:48:30.000000000 -0400
-+++ src/smtpd/smtpd.h 2003-10-02 06:48:31.000000000 -0400
-@@ -16,10 +16,18 @@
- /*
- * SASL library.
- */
-+#ifdef USE_SASL2_AUTH
-+#ifndef USE_SASL_AUTH
-+#define USE_SASL_AUTH
-+#endif
-+#include <sasl/sasl.h>
-+#include <sasl/saslutil.h>
-+#else
- #ifdef USE_SASL_AUTH
- #include <sasl.h>
- #include <saslutil.h>
- #endif
-+#endif
-
- /*
- * Utility library.