Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 2004 00:47:52 +0200 (CEST)
From:      Danijel Tasov <dt@vosat.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/66780: make it possible to configure imap-uw
Message-ID:  <200405172247.i4HMlqh4098888@knast.server-king.de>
Resent-Message-ID: <200405172250.i4HMoLx2053943@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         66780
>Category:       ports
>Synopsis:       make it possible to configure imap-uw
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 17 15:50:21 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Danijel Tasov
>Release:        FreeBSD 5.2.1-RELEASE-p5 i386
>Organization:
KlagenfurT
>Environment:
System: FreeBSD knast 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #7: Sat May 1 02:03:31 CEST 2004 knarf@knast:/usr/obj/usr/src/sys/KLAGENFURT i386


>Description:

>From docs/CONFIG:
     Example 2: suppose you want to change c-client's idea of the
user's mailbox directory to be the "mail" subdirectory of the user's
home directory instead of the user's home directory.  You will want to
change variable mailsubdir, changing the line that reads:

static char *mailsubdir = NIL;  /* mail subdirectory name */
 to be:
static char *mailsubdir = "mail";/* mail subdirectory name */

Well, I need this feature, and it would be great if you commit the
following patch to make it possible to change this via a make option.

Maybe I've chosen the wrong make target, I'm not an experienced porter. ;)

I tried to make it easy to do this with the other variables too.

.if defined(WITH_VARIABLENAME)
	${SCRIPTDIR}/adjustvar <variablename> ${WITH_VARIABLENAME} ${WRKSRC}/src/osdep/unix/env_unix.c
.endif

>How-To-Repeat:
>Fix:
diff --unidirectional-new-file -ur /usr/ports/mail/imap-uw/Makefile imap-uw/Makefile
--- /usr/ports/mail/imap-uw/Makefile	Wed Jul 23 04:08:32 2003
+++ imap-uw/Makefile	Tue May 18 00:26:55 2004
@@ -55,6 +55,11 @@
 
 .include <bsd.port.pre.mk>
 
+post-extract:
+.if defined(WITH_MAILSUBDIR)
+	${SCRIPTDIR}/adjustvar mailsubdir ${WITH_MAILSUBDIR} ${WRKSRC}/src/osdep/unix/env_unix.c
+.endif
+
 pre-build:
 	@${SH} ${PKGREQ}.rev ${LOCALBASE}/include/c-client/portrevision.h ${PORTVERSION}
 .if !defined(WITHOUT_SSL)
diff --unidirectional-new-file -ur /usr/ports/mail/imap-uw/scripts/adjustvar imap-uw/scripts/adjustvar
--- /usr/ports/mail/imap-uw/scripts/adjustvar	Thu Jan  1 01:00:00 1970
+++ imap-uw/scripts/adjustvar	Mon May 17 22:55:07 2004
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+sed -ie '/^static.* \*'"$1"'/ {
+  s/NIL/"'"$2"'"/
+}' "$3"
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405172247.i4HMlqh4098888>