From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Jul 20 18:30:19 2005 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B3EC16A456 for ; Wed, 20 Jul 2005 18:30:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A7CC43D48 for ; Wed, 20 Jul 2005 18:30:19 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6KIUIJC047652 for ; Wed, 20 Jul 2005 18:30:18 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6KIUIbm047651; Wed, 20 Jul 2005 18:30:18 GMT (envelope-from gnats) Resent-Date: Wed, 20 Jul 2005 18:30:18 GMT Resent-Message-Id: <200507201830.j6KIUIbm047651@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Thomas-Martin Seck Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9FE4616A41F for ; Wed, 20 Jul 2005 18:27:48 +0000 (GMT) (envelope-from tmseck@netcologne.de) Received: from smtp4.netcologne.de (smtp4.netcologne.de [194.8.194.137]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1478743D45 for ; Wed, 20 Jul 2005 18:27:47 +0000 (GMT) (envelope-from tmseck@netcologne.de) Received: from laurel.tmseck.homedns.org (xdsl-213-196-227-84.netcologne.de [213.196.227.84]) by smtp4.netcologne.de (Postfix) with SMTP id 1F2EEDA78B for ; Wed, 20 Jul 2005 20:27:46 +0200 (CEST) Received: (qmail 1502 invoked by uid 1001); 20 Jul 2005 18:28:06 -0000 Message-Id: <20050720182806.1501.qmail@laurel.tmseck.homedns.org> Date: 20 Jul 2005 18:28:06 -0000 From: Thomas-Martin Seck To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/83804: [Maintainer] mail/usendmail: unbreak with gcc >= 3.4 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Thomas-Martin Seck List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jul 2005 18:30:19 -0000 >Number: 83804 >Category: ports >Synopsis: [Maintainer] mail/usendmail: unbreak with gcc >= 3.4 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Wed Jul 20 18:30:18 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Thomas-Martin Seck >Release: FreeBSD 4.11-STABLE i386 >Organization: a private site in Germany >Environment: FreeBSD ports collection as of July 20, 2005. >Description: - unbreak on 5.x and up (or respectively on systems where cc==gcc34+) (Patch supplied by usendmail's author) Thanks to garga@ for informing me about the breakage. - respect CC - use SUB_FILES and SUB_LIST for dynamic pkg-message generation, move pkg-message to files/pkg-message.in Note to committer: please 'cvs add' files/patch-src-Makefile files/patch-gcc34 files/pkg-message.in please 'cvs rm' pkg-message >How-To-Repeat: >Fix: Apply this patch: Index: pkg-message =================================================================== --- pkg-message (.../mail/usendmail) (revision 530) +++ pkg-message (.../local/usendmail) (revision 530) @@ -1,20 +0,0 @@ - -usendmail has been successfully installed! - -Now you have to change your sendmail(8) wrapping: - -If you are using mailwrapper(8), do the following: - -in /etc/mail/mailer.conf replace the lines - -sendmail %%QMAIL_DIR%%/bin/sendmail -send-mail %%QMAIL_DIR%%/bin/sendmail - -with - -sendmail %%PREFIX%%/sbin/usendmail -send-mail %%PREFIX%%/sbin/usendmail - -Otherwise replace the link from /usr/sbin/sendmail to -%%QMAIL_DIR%%/bin/sendmail with one to %%PREFIX%%/sbin/usendmail. - Index: files/patch-src-Makefile =================================================================== --- files/patch-src-Makefile (.../mail/usendmail) (revision 0) +++ files/patch-src-Makefile (.../local/usendmail) (revision 530) @@ -0,0 +1,11 @@ +--- src/Makefile.orig Tue Jul 19 20:04:09 2005 ++++ src/Makefile Tue Jul 19 20:04:17 2005 +@@ -5,7 +5,7 @@ + DEFS=-DDJBLIBS + + +-CC=gcc ++CC?=gcc + L=./auto-link.sh + C=./auto-compile.sh + W=./auto-compilew.sh Index: files/patch-gcc34 =================================================================== --- files/patch-gcc34 (.../mail/usendmail) (revision 0) +++ files/patch-gcc34 (.../local/usendmail) (revision 530) @@ -0,0 +1,58 @@ +--- src/env_get.c.orig Wed Jul 20 19:28:21 2005 ++++ src/env_get.c Wed Jul 20 19:28:43 2005 +@@ -4,7 +4,6 @@ + */ + #include "env.h" + +-extern char **environ; + char *env_get(const char *var) + { + int e; +--- src/uogetopt.c.orig Wed Jul 20 19:28:57 2005 ++++ src/uogetopt.c Wed Jul 20 19:31:50 2005 +@@ -116,7 +116,8 @@ + #define SETEXITVOID() do { SETEXIT(); return; } while(0) + #define SETEXITRET(x) do { SETEXIT(); return x; } while(0) + +-static void outplus(void (*out)(int, const char *), ++static attribute_regparm(2) void ++outplus(void (*out)(int, const char *), + const char *s) + { + unsigned int l; +@@ -140,7 +141,7 @@ + #define uogetopt_hlong(e,s,o) uogetopt_num(e,1,s,o) + + +-static unsigned int ++static attribute_regparm(2) unsigned int + outandcount(void (*out)(int iserr,const char *), const char *s) + { + if (!s) return 0; +@@ -231,7 +232,7 @@ + } while (EXPECT(*p,1) && EXPECT(p[1],1)); + } + +-static void ++static attribute_regparm(2) void + uogetopt_printver(uogetopt_env_t *env, int maxlen) + { + int l; +@@ -249,7 +250,7 @@ + env->out(0,env->version); + } + +-static void ++static attribute_regparm(3) void + handle_argopt(uogetopt_env_t *env, uogetopt_t *o, char *arg) + { + int at=o->argtype; +@@ -274,7 +275,7 @@ + #define PRINTHELP_MODE_SHORT 0 + #define PRINTHELP_MODE_NORM 1 + #define PRINTHELP_MODE_LONG 2 +-static void ++static attribute_regparm(2) void + uogetopt_printhelp(uogetopt_env_t *env, int mode) + { + uogetopt_t *opts=env->opts; Index: files/pkg-message.in =================================================================== --- files/pkg-message.in (.../mail/usendmail) (revision 0) +++ files/pkg-message.in (.../local/usendmail) (revision 530) @@ -0,0 +1,20 @@ + +usendmail has been successfully installed! + +Now you have to change your sendmail(8) wrapping: + +If you are using mailwrapper(8), do the following: + +in /etc/mail/mailer.conf replace the lines + +sendmail %%QMAIL_DIR%%/bin/sendmail +send-mail %%QMAIL_DIR%%/bin/sendmail + +with + +sendmail %%PREFIX%%/sbin/usendmail +send-mail %%PREFIX%%/sbin/usendmail + +Otherwise replace the link from /usr/sbin/sendmail to +%%QMAIL_DIR%%/bin/sendmail with one to %%PREFIX%%/sbin/usendmail. + Index: Makefile =================================================================== --- Makefile (.../mail/usendmail) (revision 530) +++ Makefile (.../local/usendmail) (revision 530) @@ -22,12 +22,13 @@ NO_SIZE= yes USE_REINPLACE= yes WRKSRC= ${WRKDIR}/mail/${DISTNAME} -PKGMESSAGE= ${WRKDIR}/pkg-message PLIST_FILES= sbin/usendmail PORTDOCS= NEWS README +SUB_FILES= pkg-message +SUB_LIST= QMAIL_DIR=${QMAIL_DIR} -do-patch: +post-patch: @${REINPLACE_CMD} -e 's,/var/qmail,${QMAIL_DIR},' \ ${WRKSRC}/src/usendmail.c @@ -40,11 +41,6 @@ @${MKDIR} ${DOCSDIR} cd ${WRKSRC}/src && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR} .endif - -post-install: - @${SED} -e 's:%%PREFIX%%:${PREFIX}:g' \ - -e's:%%QMAIL_DIR%%:${QMAIL_DIR}:g' ${PKGMESSAGE} @${CAT} ${PKGMESSAGE} .include >Release-Note: >Audit-Trail: >Unformatted: