[125400] trunk/dports/mail/imap-uw
mf2k at macports.org
mf2k at macports.org
Tue Sep 16 14:28:51 PDT 2014
Revision: 125400
https://trac.macports.org/changeset/125400
Author: mf2k at macports.org
Date: 2014-09-16 14:28:51 -0700 (Tue, 16 Sep 2014)
Log Message:
-----------
imap-uw: Update to version 2007f. Improve subdir variant description. (#44811)
Modified Paths:
--------------
trunk/dports/mail/imap-uw/Portfile
trunk/dports/mail/imap-uw/files/patch-env_unix.c.diff
Modified: trunk/dports/mail/imap-uw/Portfile
===================================================================
--- trunk/dports/mail/imap-uw/Portfile 2014-09-16 21:25:19 UTC (rev 125399)
+++ trunk/dports/mail/imap-uw/Portfile 2014-09-16 21:28:51 UTC (rev 125400)
@@ -4,7 +4,7 @@
PortSystem 1.0
name imap-uw
-version 2007e
+version 2007f
categories mail
license Apache-2
maintainers nomaintainer
@@ -21,8 +21,8 @@
distname imap-${version}
extract.suffix .tar.Z
-checksums sha1 24c63cad8d0e74aa76e4341fcfa54d24f23a8c70 \
- rmd160 7d6af203419975f763d7ec17b6a4544c94490b50
+checksums rmd160 14f40284e9e164c0ed7677f1e5d8e3309c7c58c1 \
+ sha256 870e95f6bd19265832a88fd89b77c54c841c59022fd21e69254050c8b1005e3c
depends_lib port:openssl port:gss
@@ -81,7 +81,7 @@
}
# Variant to set the default mail subdirectory name to "Mail"
-variant subdir description { set "Mail" as subdirectory name } {
+variant subdir description { set the contents of ~/.imap/MailboxDir.rc or else "Mail" as subdirectory name } {
patchfiles-append patch-env_unix.c.diff
}
Modified: trunk/dports/mail/imap-uw/files/patch-env_unix.c.diff
===================================================================
--- trunk/dports/mail/imap-uw/files/patch-env_unix.c.diff 2014-09-16 21:25:19 UTC (rev 125399)
+++ trunk/dports/mail/imap-uw/files/patch-env_unix.c.diff 2014-09-16 21:28:51 UTC (rev 125400)
@@ -1,11 +1,56 @@
---- src/osdep/unix/env_unix.c-orig Wed Nov 5 17:09:13 2003
-+++ src/osdep/unix/env_unix.c Wed Nov 5 17:11:16 2003
-@@ -68,7 +68,7 @@
+--- src/osdep/unix/env_unix.c.orig 2011-07-23 02:20:10.000000000 +0200
++++ src/osdep/unix/env_unix.c 2014-08-29 22:53:25.000000000 +0200
+@@ -28,6 +28,10 @@
+ #include <signal.h>
+ #include <sys/wait.h>
+
++#include <stdio.h>
++#include <string.h>
++#include <sys/param.h>
++
+
+ /* in case stat.h is ancient */
+
+@@ -66,7 +70,7 @@
static char *myServerName = NIL;/* server name */
static char *myLocalHost = NIL; /* local host name */
static char *myNewsrc = NIL; /* newsrc file name */
-static char *mailsubdir = NIL; /* mailbox subdirectory name */
-+static char *mailsubdir = "Mail"; /* mailbox subdirectory name */
++static char *mailsubdir = ((char*)-1); /* mailbox subdirectory name */
static char *sysInbox = NIL; /* system inbox name */
static char *newsActive = NIL; /* news active file */
static char *newsSpool = NIL; /* news spool */
+@@ -965,7 +969,32 @@
+ char *home = myhomedir ();
+ /* initialize if first time */
+ if (!myMailboxDir && myHomeDir) {
+- if (mailsubdir) {
++ if (mailsubdir == ((char*)-1) ) {
++ char *rcfile = NULL;
++ FILE *fp;
++ asprintf( &rcfile, "%s/.imap/MailboxDir.rc", home );
++ if( rcfile && (fp = fopen( rcfile, "r" )) ){
++ char dirnm[MAXPATHLEN];
++ if( fgets( dirnm, MAXPATHLEN, fp ) > 0 ){
++ if( dirnm[strlen(dirnm)-1] == '\n' ){
++ dirnm[strlen(dirnm)-1] = '\0';
++ }
++ myMailboxDir = cpystr(dirnm);
++ snprintf( dirnm, MAXPATHLEN, "Mailbox dir set to %s", myMailboxDir );
++ MM_LOG( dirnm, WARN );
++ }
++ fclose(fp);
++ }
++ if( rcfile ){
++ free(rcfile);
++ }
++ if( !myMailboxDir ){
++ mailsubdir = "Mail";
++ goto useMail;
++ }
++ }
++ else if (mailsubdir) {
++useMail:;
+ char tmp[MAILTMPLEN];
+ sprintf (tmp,"%s/%s",home,mailsubdir);
+ myMailboxDir = cpystr (tmp);/* use pre-defined subdirectory of home */
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140916/6e440542/attachment.html>
More information about the macports-changes
mailing list