ports/53432: [PATCH] a mechanism to include wish list patches in the Exim 4 build
Oliver Eikemeier
eikemeier at fillmore-labs.com
Wed Jun 18 01:50:15 UTC 2003
>Number: 53432
>Category: ports
>Synopsis: [PATCH] a mechanism to include wish list patches in the Exim 4 build
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 17 18:50:13 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Oliver Eikemeier
>Release: FreeBSD 4.8-STABLE i386
>Organization:
Fillmore Labs - http://www.fillmore-labs.com
>Environment:
System: FreeBSD nuuk.fillmore-labs.com 4.8-STABLE
>Description:
A proposed mechanism to include patches which are currently
not in the distribution, but (maybe) on the WishList(TM):
<ftp://ftp.csx.cam.ac.uk/pub/software/email/exim/exim4/WishList>
Patches are placed in ${PATCHDIR} and named "wishlist-XXX.patch" with
a short descriptive comment in the first lines of the file.
The patches are included when Exim is build with 'WITH_WISHLIST=yes'
and the comments are output to the terminal.
One patch (Exim 4 wish list item #163) is included.
>How-To-Repeat:
>Fix:
cat exim-wishlist.patch | patch -p0 -d /usr/ports
find /usr/ports/mail/exim -name '*.orig' -delete
--- exim-wishlist.patch begins here ---
diff -Nur mail/exim/Makefile.orig mail/exim/Makefile
--- mail/exim/Makefile.orig Fri Jun 13 15:20:56 2003
+++ mail/exim/Makefile Wed Jun 18 03:03:11 2003
@@ -145,7 +145,10 @@
#
# Disable support for the LMTP (RFC 2033 "SMTP over command pipe")
# transport.
-#WITHOUT_LMTP
+#WITHOUT_LMTP= yes
+#
+# Include the unsupported patches in ${PATCHDIR}/wishlist-*.patch
+#WITH_WISHLIST= yes
# You should not need to fiddle with anything below this point.
@@ -153,6 +156,10 @@
RUN_DEPENDS= ${LOCALBASE}/sbin/eximon:${PORTSDIR}/mail/exim-monitor
.endif
+.if defined(WITH_WISHLIST)
+EXTRA_PATCHES+= `${FIND} ${PATCHDIR} -name 'wishlist-*.patch'`
+.endif
+
.include <bsd.port.pre.mk>
PORTDOC_FILES= Exim3.upgrade Exim4.upgrade OptionLists.txt README \
@@ -336,6 +343,14 @@
.if !defined(WITHOUT_LMTP)
SEDLIST+= -e 's,^\# TRANSPORT_LMTP=,TRANSPORT_LMTP=,'
+.endif
+
+pre-everything::
+.if empty(.MAKEFLAGS:M-s) && defined(WITH_WISHLIST)
+ @${ECHO} ''
+ @${ECHO} 'Included extra patches:'
+ @${FIND} ${PATCHDIR} -name 'wishlist-*.patch' -exec ${SED} -ne 's,^# , ,p' {} \;
+ @${ECHO} ''
.endif
post-patch:
diff -Nur mail/exim/files/wishlist-suppress-received.patch.orig mail/exim/files/wishlist-suppress-received.patch
--- mail/exim/files/wishlist-suppress-received.patch.orig Thu Jan 1 01:00:00 1970
+++ mail/exim/files/wishlist-suppress-received.patch Wed Jun 18 03:10:48 2003
@@ -0,0 +1,25 @@
+#
+# (Exim 4 wish list #163) suppress the "Received:" header if received_header_text is empty
+#
+--- src/receive.c.orig Mon May 12 15:39:21 2003
++++ src/receive.c Fri Jun 13 03:17:26 2003
+@@ -1915,9 +1915,17 @@
+ /* The first element on the header chain is reserved for the Received
+ header, so all we have to do is fill in the text pointer. */
+
+-header_list->text = string_sprintf("%s; %s\n", received, timestamp);
++if (received[0] == 0)
++ {
++ header_list->text = string_sprintf("Received: ; %s\n", timestamp);
++ header_list->type = htype_old;
++ }
++else
++ {
++ header_list->text = string_sprintf("%s; %s\n", received, timestamp);
++ header_list->type = htype_received;
++ }
+ header_list->slen = Ustrlen(header_list->text);
+-header_list->type = htype_received;
+
+
+ /* If there is no From: header, generate one. If there is no sender address,
--- exim-wishlist.patch ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list