Ignore:
Timestamp:
Sep 16, 2014, 9:28:51 PM (5 years ago)
Author:
mf2k@…
Message:

imap-uw: Update to version 2007f. Improve subdir variant description. (#44811)

Location:
trunk/dports/mail/imap-uw
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/mail/imap-uw/Portfile

    r114325 r125400  
    55
    66name                imap-uw
    7 version             2007e
     7version             2007f
    88categories          mail
    99license             Apache-2
     
    2222distname            imap-${version}
    2323extract.suffix      .tar.Z
    24 checksums           sha1    24c63cad8d0e74aa76e4341fcfa54d24f23a8c70 \
    25                     rmd160  7d6af203419975f763d7ec17b6a4544c94490b50
     24checksums           rmd160    14f40284e9e164c0ed7677f1e5d8e3309c7c58c1 \
     25                    sha256  870e95f6bd19265832a88fd89b77c54c841c59022fd21e69254050c8b1005e3c
    2626
    2727depends_lib         port:openssl port:gss
     
    8282
    8383# Variant to set the default mail subdirectory name to "Mail"
    84 variant subdir description { set "Mail" as subdirectory name } {
     84variant subdir description { set the contents of ~/.imap/MailboxDir.rc or else "Mail" as subdirectory name } {
    8585    patchfiles-append   patch-env_unix.c.diff
    8686}
  • trunk/dports/mail/imap-uw/files/patch-env_unix.c.diff

    r53675 r125400  
    1 --- src/osdep/unix/env_unix.c-orig      Wed Nov  5 17:09:13 2003
    2 +++ src/osdep/unix/env_unix.c   Wed Nov  5 17:11:16 2003
    3 @@ -68,7 +68,7 @@
     1--- src/osdep/unix/env_unix.c.orig      2011-07-23 02:20:10.000000000 +0200
     2+++ src/osdep/unix/env_unix.c   2014-08-29 22:53:25.000000000 +0200
     3@@ -28,6 +28,10 @@
     4 #include <signal.h>
     5 #include <sys/wait.h>
     6 
     7+#include <stdio.h>
     8+#include <string.h>
     9+#include <sys/param.h>
     10+
     11 
     12 /* in case stat.h is ancient */
     13 
     14@@ -66,7 +70,7 @@
    415 static char *myServerName = NIL;/* server name */
    516 static char *myLocalHost = NIL;        /* local host name */
    617 static char *myNewsrc = NIL;   /* newsrc file name */
    718-static char *mailsubdir = NIL; /* mailbox subdirectory name */
    8 +static char *mailsubdir = "Mail";      /* mailbox subdirectory name */
     19+static char *mailsubdir = ((char*)-1); /* mailbox subdirectory name */
    920 static char *sysInbox = NIL;   /* system inbox name */
    1021 static char *newsActive = NIL; /* news active file */
    1122 static char *newsSpool = NIL;  /* news spool */
     23@@ -965,7 +969,32 @@
     24   char *home = myhomedir ();
     25                                /* initialize if first time */
     26   if (!myMailboxDir && myHomeDir) {
     27-    if (mailsubdir) {
     28+    if (mailsubdir == ((char*)-1) ) {
     29+      char *rcfile = NULL;
     30+      FILE *fp;
     31+      asprintf( &rcfile, "%s/.imap/MailboxDir.rc", home );
     32+      if( rcfile && (fp = fopen( rcfile, "r" )) ){
     33+        char dirnm[MAXPATHLEN];
     34+        if( fgets( dirnm, MAXPATHLEN, fp ) > 0 ){
     35+          if( dirnm[strlen(dirnm)-1] == '\n' ){
     36+              dirnm[strlen(dirnm)-1] = '\0';
     37+          }
     38+          myMailboxDir = cpystr(dirnm);
     39+          snprintf( dirnm, MAXPATHLEN, "Mailbox dir set to %s", myMailboxDir );
     40+          MM_LOG( dirnm, WARN );
     41+        }
     42+        fclose(fp);
     43+      }
     44+      if( rcfile ){
     45+        free(rcfile);
     46+      }
     47+      if( !myMailboxDir ){
     48+        mailsubdir = "Mail";
     49+        goto useMail;
     50+      }
     51+    }
     52+    else if (mailsubdir) {
     53+useMail:;
     54       char tmp[MAILTMPLEN];
     55       sprintf (tmp,"%s/%s",home,mailsubdir);
     56       myMailboxDir = cpystr (tmp);/* use pre-defined subdirectory of home */
Note: See TracChangeset for help on using the changeset viewer.