ports/65852: New port: mail/pine+ipv6 or might be patch

Janos Mohacsi mohacsi at niif.hu
Wed Apr 21 14:50:24 UTC 2004


>Number:         65852
>Category:       ports
>Synopsis:       New port: mail/pine+ipv6 or might be patch
>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:   Wed Apr 21 07:50:23 PDT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Janos Mohacsi
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
NIIF
>Environment:
System: FreeBSD norfolk.ki.iif.hu 5.2-CURRENT FreeBSD 5.2-CURRENT #10: Wed Mar 24 17:08:06 CET 2004 root at norfolk.ki.iif.hu:/usr/obj/usr/src/sys/NORFOLK i386

>Description:
	New port: mail/pine+ipv6 version 4.58  
	- This is a modified port of mail/pine4
	- The patches are cleaned up 
	- It contains an IPv6 patch from NovaGnet
	- IPv6 tested with IPv6 capable imap server
	
	I need feedback: Should we have separate port for IPv6 patched pine like 
	apache13 or should I send a diff against the original net/pine4? 
	
>How-To-Repeat:
	Apply this tar.
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	pine+ipv6/
#	pine+ipv6/files
#	pine+ipv6/files/patch-imap_src_c-client_mail.c
#	pine+ipv6/files/patch-imap_src_osdep_unix_tcp__unix.c
#	pine+ipv6/files/patch-imap_src_osdep_unix_Makefile
#	pine+ipv6/files/patch-imap_Makefile
#	pine+ipv6/files/patch-pico_osdep_os-bsf.h
#	pine+ipv6/files/patch-pico_osdep_term.cap
#	pine+ipv6/files/patch-pico_search.c
#	pine+ipv6/files/patch-pico_edef.h
#	pine+ipv6/files/patch-pico_main.c
#	pine+ipv6/files/patch-pico_pilot.c
#	pine+ipv6/files/patch-pico_makefile.bsf
#	pine+ipv6/files/patch-pine_osdep_os-bsf.h
#	pine+ipv6/files/patch-pine_send.c
#	pine+ipv6/files/patch-pine_makefile.bsf
#	pine+ipv6/files/patch-pine_init.c
#	pine+ipv6/files/patch-pine_reply.c
#	pine+ipv6/files/patch-build
#	pine+ipv6/files/patch-doc_README.IPv6
#	pine+ipv6/pkg-message
#	pine+ipv6/pkg-install
#	pine+ipv6/pkg-descr
#	pine+ipv6/distinfo
#	pine+ipv6/Makefile
#	pine+ipv6/pkg-plist
#
echo c - pine+ipv6/
mkdir -p pine+ipv6/ > /dev/null 2>&1
echo c - pine+ipv6/files
mkdir -p pine+ipv6/files > /dev/null 2>&1
echo x - pine+ipv6/files/patch-imap_src_c-client_mail.c
sed 's/^X//' >pine+ipv6/files/patch-imap_src_c-client_mail.c << 'END-of-pine+ipv6/files/patch-imap_src_c-client_mail.c'
X
X$FreeBSD$
X
X--- imap/src/c-client/mail.c.orig	Tue Sep  9 19:18:53 2003
X+++ imap/src/c-client/mail.c	Wed Apr 21 15:36:05 2004
X@@ -626,9 +626,21 @@
X 				/* initialize structure */
X   memset (mb,'\0',sizeof (NETMBX));
X 				/* have host specification? */
X+#ifdef IPv6
X+/*
X+  IPv6 : Should accept new inbox names like [2003:4033:200a::1]
X+  So ":" is compromised under certain circunstances...
X+   name -> 10.0.0.2 , [10.0.0.2] , [2003:4033:200a::1]
X+*/
X+  if (!((*name++ == '{') && (((v = strchr (name,']'))?v++:NULL)  || (v = strpbrk (name,"/:}"))) &&
X+ (i = v - name) &&
X+	(i < NETMAXHOST) && (t = strchr (v,'}')) && ((j = t - v)<MAILTMPLEN) &&
X+	(strlen (t+1) < (size_t) NETMAXMBX))) return NIL;
X+#else
X   if (!((*name++ == '{') && (v = strpbrk (name,"/:}")) && (i = v - name) &&
X 	(i < NETMAXHOST) && (t = strchr (v,'}')) && ((j = t - v)<MAILTMPLEN) &&
X 	(strlen (t+1) < (size_t) NETMAXMBX))) return NIL;
X+#endif
X   strncpy (mb->host,name,i);	/* set host name */
X   strncpy (mb->orighost,name,i);
X   mb->host[i] = mb->orighost[i] = '\0';
END-of-pine+ipv6/files/patch-imap_src_c-client_mail.c
echo x - pine+ipv6/files/patch-imap_src_osdep_unix_tcp__unix.c
sed 's/^X//' >pine+ipv6/files/patch-imap_src_osdep_unix_tcp__unix.c << 'END-of-pine+ipv6/files/patch-imap_src_osdep_unix_tcp__unix.c'
X
X$FreeBSD$
X
X--- imap/src/osdep/unix/tcp_unix.c.orig	Thu Oct 31 21:04:41 2002
X+++ imap/src/osdep/unix/tcp_unix.c	Wed Apr 21 15:36:05 2004
X@@ -16,10 +16,41 @@
X  * Copyright 2002 University of Washington.
X  * The full text of our legal notices is contained in the file called
X  * CPYRIGHT, included with this Distribution.
X- */
X+ *
X+ * Notes to IPv6 porting:
X+ * In order to use abstract addresses, 
X+ * we must to use the new IPv6 API: getnameinfo(), getaddrinfo(), 
X+ * instead of [getipnodebyname(),getipnobyaddr(),inet_pton(),inet_ntop()]
X+ * working only with concrete instances of IP protocol (IPv4 | IPv6 ).
X+ *
X+*/
X+
X 
X #undef write			/* don't use redefined write() */
X- 
X+
X+#ifdef IPv6
X+#ifndef SA_LEN
X+#define SA_LEN(sa)	sa_len(sa)
X+
X+static size_t sa_len(struct sockaddr_storage *sa)
X+{
X+	switch(sa->ss_family) {
X+		case AF_INET:
X+			return sizeof(struct sockaddr_in);
X+		case AF_INET6:
X+			return sizeof(struct sockaddr_in6);
X+		default:
X+			return sizeof(struct sockaddr_storage);
X+	}
X+}
X+#endif /* SA_LEN */
X+#endif
X+
X+
X+/* TODO: IPv6 def
X+    - Maybe cpstr leaves memory with no control.
X+*/
X+
X static tcptimeout_t tmoh = NIL;	/* TCP timeout handler routine */
X static long ttmo_open = 0;	/* TCP timeouts, in seconds */
X static long ttmo_read = 0;
X@@ -36,11 +67,20 @@
X extern long maxposint;		/* get this from write.c */
X 
X /* Local function prototypes */
X-
X+#ifdef IPv6
X+int tcp_socket_open (struct sockaddr_storage *sa,char *tmp,int *ctr,char *hst,
X+		     unsigned long port);
X+#else
X int tcp_socket_open (struct sockaddr_in *sin,char *tmp,int *ctr,char *hst,
X 		     unsigned long port);
X+#endif
X+
X long tcp_abort (TCPSTREAM *stream);
X+#ifdef IPv6
X+char *tcp_name (struct sockaddr_storage *sa,long flag);
X+#else
X char *tcp_name (struct sockaddr_in *sin,long flag);
X+#endif
X long tcp_name_valid (char *s);
X 
X /* TCP/IP manipulate parameters
X@@ -138,8 +178,14 @@
X   int silent = (port & NET_SILENT) ? T : NIL;
X   int *ctrp = (port & NET_NOOPENTIMEOUT) ? NIL : &ctr;
X   char *s;
X+#ifdef IPv6
X+  struct sockaddr_storage sa;
X+  struct addrinfo hints,*res,*resave;
X+  int n;
X+#else
X   struct sockaddr_in sin;
X   struct hostent *he;
X+#endif
X   char hostname[MAILTMPLEN];
X   char tmp[MAILTMPLEN];
X   struct servent *sv = NIL;
X@@ -147,14 +193,81 @@
X   void *data;
X   port &= 0xffff;		/* erase flags */
X 				/* lookup service */
X+
X+#ifdef IPv6
X+  memset(&hints,0,sizeof(hints));
X+  hints.ai_family = PF_UNSPEC;  /* Protocol independent */
X+				/* look like domain literal? */
X+  if (host[0] == '[' && host[(strlen (host))-1] == ']') {
X+    hints.ai_flags = AI_NUMERICHOST ;  /* Don't want DNS resolution */
X+    strcpy (hostname,host+1);	/* yes, copy number part */
X+    hostname[(strlen (hostname))-1] = '\0';
X+    if (getaddrinfo (hostname,service,&hints,&res))
X+      sprintf (tmp,"Bad format domain-literal: %.80s",host);
X+    else
X+    {
X+      memset(&sa,0,sizeof(sa));
X+      memcpy (&sa,res->ai_addr,res->ai_addrlen);
X+      (*bn) (BLOCK_TCPOPEN,NIL);
X+			/* get an open socket for this system */
X+      sock = tcp_socket_open (&sa,tmp,ctrp,hostname,port);
X+      (*bn) (BLOCK_NONE,NIL);
X+      freeaddrinfo(res);
X+    }
X+  }
X+
X+  else {			/* lookup host name */
X+    hints.ai_flags = AI_CANONNAME ;  /* Want canonname */
X+    if (tcpdebug) {
X+      sprintf (tmp,"DNS resolution %.80s",host);
X+      mm_log (tmp,TCPDEBUG);
X+    }
X+    (*bn) (BLOCK_DNSLOOKUP,NIL);/* quell alarms */
X+    data = (*bn) (BLOCK_SENSITIVE,NIL);
X+    if ((n=getaddrinfo (lcase (strcpy (hostname,host)),service,&hints,&res)))
X+      sprintf (tmp,"No such host as %.80s",host);
X+    (*bn) (BLOCK_NONSENSITIVE,data);
X+    (*bn) (BLOCK_NONE,NIL);
X+    if (!n) {			/* DNS resolution won? */
X+      resave=res;
X+      if (tcpdebug) mm_log ("DNS resolution done",TCPDEBUG);
X+				/* copy host name */
X+      strcpy (hostname,res->ai_canonname);
X+#ifdef HOST_NOT_FOUND		/* muliple addresses only on DNS systems */
X+     for (sock = -1,i = 0; (sock < 0) && res; i++,res=res->ai_next) {
X+	if (i && !silent) mm_log (tmp,WARN);
X+        memset(&sa,0,sizeof(sa));
X+        memcpy (&sa,res->ai_addr,res->ai_addrlen);
X+	(*bn) (BLOCK_TCPOPEN,NIL);
X+			/* get an open socket for this system */
X+	sock = tcp_socket_open (&sa,tmp,ctrp,hostname,port);
X+	(*bn) (BLOCK_NONE,NIL);
X+     }
X+#else				/* the one true address then */
X+     memset(&sa,0,sizeof(sa));
X+     memcpy (&sa,res->ai_addr,res->ai_addrlen);
X+     (*bn) (BLOCK_TCPOPEN,NIL);
X+			/* get an open socket for this system */
X+     sock = tcp_socket_open (&sa,tmp,ctrp,hostname,port);
X+     (*bn) (BLOCK_NONE,NIL);
X+#endif
X+     freeaddrinfo(resave);
X+    }
X+  }
X+
X+
X+#else
X   if (service && (sv = getservbyname (service,"tcp")))
X     port = ntohs (sin.sin_port = sv->s_port);
X  				/* copy port number in network format */
X   else sin.sin_port = htons (port);
X+
X+ 				/* copy port number in network format */
X   /* The domain literal form is used (rather than simply the dotted decimal
X      as with other Unix programs) because it has to be a valid "host name"
X      in mailsystem terminology. */
X 				/* look like domain literal? */
X+
X   if (host[0] == '[' && host[(strlen (host))-1] == ']') {
X     strcpy (hostname,host+1);	/* yes, copy number part */
X     hostname[(strlen (hostname))-1] = '\0';
X@@ -184,6 +297,7 @@
X     if (he) {			/* DNS resolution won? */
X       if (tcpdebug) mm_log ("DNS resolution done",TCPDEBUG);
X 				/* copy address type */
X+
X       sin.sin_family = he->h_addrtype;
X 				/* copy host name */
X       strcpy (hostname,he->h_name);
X@@ -203,6 +317,7 @@
X #endif
X     }
X   }
X+#endif
X   if (sock >= 0)  {		/* won */
X     stream = (TCPSTREAM *) memset (fs_get (sizeof (TCPSTREAM)),0,
X 				   sizeof (TCPSTREAM));
X@@ -227,22 +342,39 @@
X  *	    port number for error message
X  * Returns: socket if success, else -1 with error string in scratch buffer
X  */
X-
X+#ifdef IPv6
X+int tcp_socket_open (struct sockaddr_storage *sa,char *tmp,int *ctr,char *hst,
X+		     unsigned long port)
X+#else
X int tcp_socket_open (struct sockaddr_in *sin,char *tmp,int *ctr,char *hst,
X 		     unsigned long port)
X+#endif
X {
X   int i,ti,sock,flgs;
X   time_t now;
X   struct protoent *pt = getprotobyname ("tcp");
X   fd_set fds,efds;
X   struct timeval tmo;
X+#ifdef IPv6
X+  char straddr[INET6_ADDRSTRLEN];
X+#endif
X   blocknotify_t bn = (blocknotify_t) mail_parameters (NIL,GET_BLOCKNOTIFY,NIL);
X 				/* fetid Solaris */
X   void *data = (*bn) (BLOCK_SENSITIVE,NIL);
X+#ifdef IPv6
X+  memset(straddr,0,INET6_ADDRSTRLEN);
X+  getnameinfo((const struct sockaddr *)sa,SA_LEN(sa),straddr,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST);
X+  sprintf (tmp,"Trying IP address [%s]",straddr);
X+#else
X   sprintf (tmp,"Trying IP address [%s]",inet_ntoa (sin->sin_addr));
X+#endif
X   mm_log (tmp,NIL);
X 				/* make a socket */
X+#ifdef IPv6
X+  if ((sock = socket (sa->ss_family,SOCK_STREAM,pt ? pt->p_proto : 0)) < 0) {
X+#else
X   if ((sock = socket (sin->sin_family,SOCK_STREAM,pt ? pt->p_proto : 0)) < 0) {
X+#endif
X     sprintf (tmp,"Unable to create TCP socket: %s",strerror (errno));
X     (*bn) (BLOCK_NONSENSITIVE,data);
X     return -1;
X@@ -251,8 +383,13 @@
X 				/* set non-blocking if want open timeout */
X   if (ctr) fcntl (sock,F_SETFL,flgs | FNDELAY);
X 				/* open connection */
X+#ifdef IPv6
X+  while ((i = connect (sock,(struct sockaddr *) sa,
X+		       SA_LEN(sa))) < 0 && (errno == EINTR));
X+#else
X   while ((i = connect (sock,(struct sockaddr *) sin,
X 		       sizeof (struct sockaddr_in))) < 0 && (errno == EINTR));
X+#endif
X   (*bn) (BLOCK_NONSENSITIVE,data);
X   if (i < 0) switch (errno) {	/* failed? */
X   case EAGAIN:			/* DG brain damage */
X@@ -312,6 +449,9 @@
X {
X   TCPSTREAM *stream = NIL;
X   struct hostent *he;
X+#ifdef IPv6
X+  struct addrinfo hints,*res;
X+#endif
X   char host[MAILTMPLEN],tmp[MAILTMPLEN],*path,*argv[MAXARGV+1];
X   int i,ti,pipei[2],pipeo[2];
X   time_t now;
X@@ -335,11 +475,23 @@
X   if (mb->host[0] == '[' && mb->host[i = (strlen (mb->host))-1] == ']') {
X     strcpy (host,mb->host+1);	/* yes, copy without brackets */
X     host[i-1] = '\0';
X+#ifdef IPv6
X+    memset(&hints,0,sizeof(hints));
X+    hints.ai_family=PF_UNSPEC;
X+    hints.ai_flags=AI_NUMERICHOST;
X+    if (getaddrinfo(host,NULL,&hints,&res )) { 
X+      sprintf (tmp,"Bad format domain-literal: %.80s",host);
X+      mm_log (tmp,ERROR);
X+      return NIL;
X+    }
X+    freeaddrinfo(res);
X+#else
X     if (inet_addr (host) == -1) {
X       sprintf (tmp,"Bad format domain-literal: %.80s",host);
X       mm_log (tmp,ERROR);
X       return NIL;
X     }
X+#endif
X   }
X   else {			/* note that Unix requires lowercase! */
X     (*bn) (BLOCK_DNSLOOKUP,NIL);
X@@ -348,8 +500,19 @@
X       sprintf (tmp,"DNS canonicalization for rsh/ssh %.80s",mb->host);
X       mm_log (tmp,TCPDEBUG);
X     }
X+#ifdef IPv6
X+    memset(&hints,0,sizeof(hints));
X+    hints.ai_flags=AI_CANONNAME;
X+    hints.ai_family=PF_UNSPEC;
X+    if (!getaddrinfo (lcase (strcpy (host,mb->host)),service,&hints,&res))
X+    {
X+      strcpy (host,res->ai_canonname);
X+      freeaddrinfo(res);
X+    }
X+#else
X     if (he = gethostbyname (lcase (strcpy (host,mb->host))))
X       strcpy (host,he->h_name);
X+#endif
X     if (tcpdebug) mm_log ("DNS canonicalization for rsh/ssh done",TCPDEBUG);
X     (*bn) (BLOCK_NONSENSITIVE,data);
X     (*bn) (BLOCK_NONE,NIL);
X@@ -700,12 +863,21 @@
X char *tcp_remotehost (TCPSTREAM *stream)
X {
X   if (!stream->remotehost) {
X+#ifdef IPv6
X+    struct sockaddr_storage sa;
X+    int salen = sizeof (struct sockaddr_storage);
X+    stream->remotehost =	/* get socket's peer name */
X+      (getpeername (stream->tcpsi,(struct sockaddr *) &sa,(void *) &salen) ||
X+       ((sa.ss_family != AF_INET) && (sa.ss_family != AF_INET6 ))) ?
X+	 cpystr (stream->host) : tcp_name (&sa,NIL);
X+#else
X     struct sockaddr_in sin;
X     int sinlen = sizeof (struct sockaddr_in);
X     stream->remotehost =	/* get socket's peer name */
X       (getpeername (stream->tcpsi,(struct sockaddr *) &sin,(void *) &sinlen) ||
X        (sin.sin_family != AF_INET)) ?
X 	 cpystr (stream->host) : tcp_name (&sin,NIL);
X+#endif
X   }
X   return stream->remotehost;
X }
X@@ -730,6 +902,15 @@
X char *tcp_localhost (TCPSTREAM *stream)
X {
X   if (!stream->localhost) {
X+#ifdef IPv6
X+    struct sockaddr_storage sa;
X+    int salen = sizeof (struct sockaddr_storage);
X+    stream->localhost =		/* get socket's name */
X+      ((stream->port & 0xffff000) ||
X+       getsockname (stream->tcpsi,(struct sockaddr *) &sa,(void *) &salen) ||
X+       ((sa.ss_family != AF_INET) && (sa.ss_family != AF_INET6 ))) ?
X+	 cpystr (mylocalhost ()) : tcp_name (&sa,NIL);
X+#else
X     struct sockaddr_in sin;
X     int sinlen = sizeof (struct sockaddr_in);
X     stream->localhost =		/* get socket's name */
X@@ -737,6 +918,7 @@
X        getsockname (stream->tcpsi,(struct sockaddr *) &sin,(void *) &sinlen) ||
X        (sin.sin_family != AF_INET)) ?
X 	 cpystr (mylocalhost ()) : tcp_name (&sin,NIL);
X+#endif
X   }
X   return stream->localhost;	/* return local host name */
X }
X@@ -746,16 +928,26 @@
X  */
X 
X static char *myClientAddr = NIL;
X-
X char *tcp_clientaddr ()
X {
X   if (!myClientAddr) {
X+#ifdef IPv6
X+    char straddr[INET6_ADDRSTRLEN]; 
X+    struct sockaddr_storage sa;
X+    int salen = sizeof (struct sockaddr_storage);
X+    		/* get stdin's peer name */
X+    myClientAddr =		/* get stdin's peer name */
X+      cpystr (getpeername (0,(struct sockaddr *) &sa,(void *) &salen) ?
X+	      "UNKNOWN" : ( getnameinfo((const struct sockaddr *)&sa,salen,straddr,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST) ? "NEITHER IPv4 NOR IPv6":straddr));
X+
X+#else
X     struct sockaddr_in sin;
X     int sinlen = sizeof (struct sockaddr_in);
X     myClientAddr =		/* get stdin's peer name */
X       cpystr (getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
X 	      "UNKNOWN" : ((sin.sin_family == AF_INET) ?
X 			   inet_ntoa (sin.sin_addr) : "NON-IPv4"));
X+#endif
X   }
X   return myClientAddr;
X }
X@@ -770,12 +962,21 @@
X char *tcp_clienthost ()
X {
X   if (!myClientHost) {
X+#ifdef IPv6
X+    struct sockaddr_storage sa;
X+    int salen = sizeof (struct sockaddr_storage);
X+    myClientHost =		/* get stdin's peer name */
X+      getpeername (0,(struct sockaddr *) &sa,(void *) &salen) ?
X+	cpystr ("UNKNOWN") : (((sa.ss_family == AF_INET) || (sa.ss_family == AF_INET6))?
X+			      tcp_name (&sa,T) : cpystr ("NEITHER IPv4 NOR IPv6"));
X+#else
X     struct sockaddr_in sin;
X     int sinlen = sizeof (struct sockaddr_in);
X     myClientHost =		/* get stdin's peer name */
X       getpeername (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
X 	cpystr ("UNKNOWN") : ((sin.sin_family == AF_INET) ?
X 			      tcp_name (&sin,T) : cpystr ("NON-IPv4"));
X+#endif
X   }
X   return myClientHost;
X }
X@@ -785,16 +986,24 @@
X  */
X 
X static char *myServerAddr = NIL;
X-
X char *tcp_serveraddr ()
X {
X   if (!myServerAddr) {
X+#ifdef IPv6
X+    char straddr[INET6_ADDRSTRLEN]; 
X+    struct sockaddr_storage sa;
X+    int salen = sizeof (struct sockaddr_storage);
X+    		/* get stdin's peer name */
X+      cpystr (getsockname (0,(struct sockaddr *) &sa,(void *) &salen) ?
X+	      "UNKNOWN" : ( getnameinfo((const struct sockaddr *)&sa,salen,straddr,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST) ? "NEITHER IPv4 NOR IPv6":straddr));
X+#else
X     struct sockaddr_in sin;
X     int sinlen = sizeof (struct sockaddr_in);
X     myServerAddr =		/* get stdin's peer name */
X       cpystr (getsockname (0,(struct sockaddr *) &sin,(void *) &sinlen) ?
X 	      "UNKNOWN" : ((sin.sin_family == AF_INET) ?
X 			   inet_ntoa (sin.sin_addr) : "NON-IPv4"));
X+#endif
X   }
X   return myServerAddr;
X }
X@@ -810,6 +1019,18 @@
X char *tcp_serverhost ()
X {
X   if (!myServerHost) {
X+#ifdef IPv6
X+    struct sockaddr_storage sa;
X+    int salen = sizeof (struct sockaddr_storage);
X+				/* get stdin's name */
X+    if (getsockname (0,(struct sockaddr *) &sa,(void *) &salen) ||
X+	((sa.ss_family != AF_INET) && (sa.ss_family != AF_INET6)))
X+	 myServerHost = cpystr (mylocalhost ());
X+    else {
X+      myServerHost = tcp_name (&sa,NIL);
X+      myServerPort = ntohs (((struct sockaddr_in *)&sa)->sin_port);
X+    }
X+#else
X     struct sockaddr_in sin;
X     int sinlen = sizeof (struct sockaddr_in);
X 				/* get stdin's name */
X@@ -819,6 +1040,7 @@
X       myServerHost = tcp_name (&sin,NIL);
X       myServerPort = ntohs (sin.sin_port);
X     }
X+#endif
X   }
X   return myServerHost;
X }
X@@ -842,7 +1064,12 @@
X char *tcp_canonical (char *name)
X {
X   char *ret,host[MAILTMPLEN];
X+#ifdef IPv6
X+  struct addrinfo hints,*res;
X+  int n;
X+#else
X   struct hostent *he;
X+#endif
X   blocknotify_t bn = (blocknotify_t) mail_parameters (NIL,GET_BLOCKNOTIFY,NIL);
X   void *data;
X 				/* look like domain literal? */
X@@ -854,8 +1081,15 @@
X     mm_log (host,TCPDEBUG);
X   }
X 				/* note that Unix requires lowercase! */
X+#ifdef IPv6
X+  hints.ai_flags=AI_CANONNAME;
X+  ret = cpystr ( (n=getaddrinfo(lcase (strcpy (host,name)),NULL,&hints ,&res))?
X+    name : (char *) res->ai_canonname );
X+  if (!n) freeaddrinfo(res);
X+#else
X   ret = (he = gethostbyname (lcase (strcpy (host,name)))) ?
X     (char *) he->h_name : name;
X+#endif
X   (*bn) (BLOCK_NONSENSITIVE,data);
X   (*bn) (BLOCK_NONE,NIL);	/* alarms OK now */
X   if (tcpdebug) mm_log ("DNS canonicalization done",TCPDEBUG);
X@@ -868,21 +1102,45 @@
X  *	    verbose flag
X  * Returns: cpystr name
X  */
X-
X+#ifdef IPv6
X+char *tcp_name (struct sockaddr_storage *sa,long flag)
X+#else
X char *tcp_name (struct sockaddr_in *sin,long flag)
X+#endif
X {
X   char *s,tmp[MAILTMPLEN];
X+#ifdef IPv6
X+  char straddr[INET6_ADDRSTRLEN];  /* Storing literral address */
X+  char hostname[INET6_ADDRSTRLEN]; /* Storing dns name */
X+  int n;
X+  memset(straddr,0,INET6_ADDRSTRLEN);
X+  memset(hostname,0,INET6_ADDRSTRLEN);
X+#endif
X   if (allowreversedns) {
X     struct hostent *he;
X+    int error;
X     blocknotify_t bn = (blocknotify_t)mail_parameters(NIL,GET_BLOCKNOTIFY,NIL);
X     void *data;
X     if (tcpdebug) {
X+#ifdef IPv6
X+      getnameinfo((const struct sockaddr *)sa,SA_LEN(sa),straddr,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST);
X+      sprintf (tmp,"Reverse DNS resolution [%s]",straddr);
X+#else
X       sprintf (tmp,"Reverse DNS resolution [%s]",inet_ntoa (sin->sin_addr));
X+#endif
X       mm_log (tmp,TCPDEBUG);
X     }
X     (*bn) (BLOCK_DNSLOOKUP,NIL); /* quell alarms */
X     data = (*bn) (BLOCK_SENSITIVE,NIL);
X-				/* translate address to name */
X+ 				/* translate address to name */
X+#ifdef IPv6
X+    n= getnameinfo((const struct sockaddr *)sa,SA_LEN(sa),hostname,INET6_ADDRSTRLEN,NULL,0,0);
X+    if ( n ||
X+	!tcp_name_valid ((char *) hostname))
X+	  sprintf (s = tmp,"[%s]",straddr);
X+    else if (flag)  sprintf (s = tmp," [%s] %s",hostname,straddr);
X+    else s = cpystr((char *) hostname);
X+#else
X     if (!(he = gethostbyaddr ((char *) &sin->sin_addr,
X 			      sizeof (struct in_addr),sin->sin_family)) ||
X 	!tcp_name_valid ((char *) he->h_name))
X@@ -890,11 +1148,20 @@
X     else if (flag) sprintf (s = tmp,"%s [%s]",he->h_name,
X 			    inet_ntoa (sin->sin_addr));
X     else s = (char *) he->h_name;
X+#endif
X     (*bn) (BLOCK_NONSENSITIVE,data);
X     (*bn) (BLOCK_NONE,NIL);	/* alarms OK now */
X     if (tcpdebug) mm_log ("Reverse DNS resolution done",TCPDEBUG);
X   }
X+#ifdef IPv6
X+  else
X+   {
X+      getnameinfo((const struct sockaddr *)sa,SA_LEN(sa),straddr,INET6_ADDRSTRLEN,NULL,0,NI_NUMERICHOST);
X+      sprintf (s = tmp,"[%s]",straddr);
X+   }
X+#else
X   else sprintf (s = tmp,"[%s]",inet_ntoa (sin->sin_addr));
X+#endif
X   return cpystr (s);
X }
X 
END-of-pine+ipv6/files/patch-imap_src_osdep_unix_tcp__unix.c
echo x - pine+ipv6/files/patch-imap_src_osdep_unix_Makefile
sed 's/^X//' >pine+ipv6/files/patch-imap_src_osdep_unix_Makefile << 'END-of-pine+ipv6/files/patch-imap_src_osdep_unix_Makefile'
X
X$FreeBSD$
X
X--- imap/src/osdep/unix/Makefile.orig	Tue Jul 15 03:35:30 2003
X+++ imap/src/osdep/unix/Makefile	Wed Apr 21 15:42:24 2004
X@@ -98,7 +98,7 @@
X # Commands possibly overriden by the individual port
X 
X ARRC=ar rc
X-CC=cc
X+#CC=cc
X LN=ln -s
X RANLIB=ranlib
X 
X@@ -116,7 +116,7 @@
X  dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
X  rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
X  unix.o mbox.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o
X-CFLAGS=-g
X+CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS)
X 
X CAT=cat
X MAKE=make
X@@ -218,8 +218,9 @@
X 	 SPOOLDIR=/var \
X 	 ACTIVEFILE=/usr/local/news/lib/active \
X 	 RSHPATH=/usr/bin/rsh \
X-	 BASECFLAGS="-g -O -pipe" \
X-	 BASELDFLAGS="-lcrypt"
X+	 LOCKPGM=$(PREFIX)/libexec/mlock \
X+	 BASECFLAGS="-DNFSKLUDGE" \
X+	 BASELDFLAGS="-lpam -lcrypt"
X 
X bsi:	# BSD/i386
X 	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
END-of-pine+ipv6/files/patch-imap_src_osdep_unix_Makefile
echo x - pine+ipv6/files/patch-imap_Makefile
sed 's/^X//' >pine+ipv6/files/patch-imap_Makefile << 'END-of-pine+ipv6/files/patch-imap_Makefile'
X
X$FreeBSD$
X
X--- imap/Makefile.orig	Wed Apr 21 15:36:05 2004
X+++ imap/Makefile	Wed Apr 21 15:42:41 2004
X@@ -455,16 +455,16 @@
X 	$(TOOLS)/$@ "$(LN)" src/ansilib c-client
X 	$(TOOLS)/$@ "$(LN)" src/charset c-client
X 	$(TOOLS)/$@ "$(LN)" src/osdep/$(SYSTEM) c-client
X-	$(TOOLS)/$@ "$(LN)" src/mtest mtest
X-	$(TOOLS)/$@ "$(LN)" src/ipopd ipopd
X-	$(TOOLS)/$@ "$(LN)" src/imapd imapd
X+#	$(TOOLS)/$@ "$(LN)" src/mtest mtest
X+#	$(TOOLS)/$@ "$(LN)" src/ipopd ipopd
X+#	$(TOOLS)/$@ "$(LN)" src/imapd imapd
X 	$(TOOLS)/$@ "$(LN)" src/mailutil mailutil
X 	$(TOOLS)/$@ "$(LN)" src/mlock mlock
X 	$(TOOLS)/$@ "$(LN)" src/dmail dmail
X 	$(TOOLS)/$@ "$(LN)" src/tmail tmail
X 	$(LN) $(TOOLS)/$@ .
X 
X-build:	OSTYPE rebuild rebuildclean bundled
X+build:	OSTYPE rebuild rebuildclean # bundled
X 
X OSTYPE:
X 	@echo Building c-client for $(BUILDTYPE)...
END-of-pine+ipv6/files/patch-imap_Makefile
echo x - pine+ipv6/files/patch-pico_osdep_os-bsf.h
sed 's/^X//' >pine+ipv6/files/patch-pico_osdep_os-bsf.h << 'END-of-pine+ipv6/files/patch-pico_osdep_os-bsf.h'
X
X$FreeBSD$
X
X--- pico/osdep/os-bsf.h.orig	Wed Feb  7 23:53:26 2001
X+++ pico/osdep/os-bsf.h	Wed Apr 21 15:43:12 2004
X@@ -153,13 +153,13 @@
X /*
X  * Place where mail gets delivered (for pico's new mail checking)
X  */
X-#define MAILDIR		"/usr/spool/mail"
X+#define MAILDIR		"/var/mail"
X 
X /*
X  * What and where the tool that checks spelling is located.  If this is
X  * undefined, then the spelling checker is not compiled into pico.
X  */
X-#define SPELLER		"/usr/bin/spell"
X+#define SPELLER		"@@PREFIX@@/bin/spell"
X 
X #ifdef	MOUSE
X #define	XTERM_MOUSE_ON	"\033[?1000h"	/* DECSET with parm 1000 */
END-of-pine+ipv6/files/patch-pico_osdep_os-bsf.h
echo x - pine+ipv6/files/patch-pico_osdep_term.cap
sed 's/^X//' >pine+ipv6/files/patch-pico_osdep_term.cap << 'END-of-pine+ipv6/files/patch-pico_osdep_term.cap'
X
X$FreeBSD$
X
X--- pico/osdep/term.cap.orig	Thu Nov 14 18:27:17 2002
X+++ pico/osdep/term.cap	Wed Apr 21 15:43:26 2004
X@@ -288,7 +288,8 @@
X     _kppu		= tgetstr("kP", &p);
X     _kppd		= tgetstr("kN", &p);
X     _kphome		= tgetstr("kh", &p);
X-    _kpend		= tgetstr("kH", &p);
X+    if((_kpend		= tgetstr("@7", &p)) == NULL)
X+      _kpend		= tgetstr("kH",&p);
X     _kpdel		= tgetstr("kD", &p);
X     _kf1		= tgetstr("k1", &p);
X     _kf2		= tgetstr("k2", &p);
END-of-pine+ipv6/files/patch-pico_osdep_term.cap
echo x - pine+ipv6/files/patch-pico_search.c
sed 's/^X//' >pine+ipv6/files/patch-pico_search.c << 'END-of-pine+ipv6/files/patch-pico_search.c'
X
X$FreeBSD$
X
X--- pico/search.c.orig	Wed Dec  4 02:15:06 2002
X+++ pico/search.c	Wed Apr 21 15:41:10 2004
X@@ -98,12 +98,15 @@
X int bc;
X int pc;
X {
X+    bc = (unsigned char)bc;
X+    pc = (unsigned char)pc;
X+
X     if ((curwp->w_bufp->b_mode & MDEXACT) == 0){
X-	if (bc>='a' && bc<='z')
X-	  bc -= 0x20;
X+	if (islower(bc))
X+	  bc = toupper(bc);
X 
X-	if (pc>='a' && pc<='z')
X-	  pc -= 0x20;
X+	if (islower(pc))
X+	  pc = toupper(pc);
X     }
X 
X     return(bc == pc);
X@@ -805,7 +808,7 @@
X int maxlength;	/* maximum chars in destination */
X 
X {
X-	char c;		/* current char to translate */
X+	unsigned char c;         /* current char to translate */
X 
X 	/* scan through the string */
X 	while ((c = *srcstr++) != 0) {
END-of-pine+ipv6/files/patch-pico_search.c
echo x - pine+ipv6/files/patch-pico_edef.h
sed 's/^X//' >pine+ipv6/files/patch-pico_edef.h << 'END-of-pine+ipv6/files/patch-pico_edef.h'
X
X$FreeBSD$
X
X--- pico/edef.h.orig	Tue Dec  3 07:31:22 2002
X+++ pico/edef.h	Wed Apr 21 15:43:37 2004
X@@ -59,7 +59,7 @@
X int	ComposerEditing = FALSE;	/* TRUE if message line is open */
X int	revexist = FALSE;		/* does reverse video exist?	*/
X char	modecode[] = "WCSEVO";		/* letters to represent modes	*/
X-long	gmode = MDWRAP;			/* global editor mode		*/
X+long	gmode = MDWRAP | MDTCAPWINS;	/* global editor mode		*/
X int     sgarbf  = TRUE;                 /* TRUE if screen is garbage	*/
X int     mpresf  = FALSE;                /* TRUE if message in last line */
X int	clexec	= FALSE;		/* command line execution flag	*/
END-of-pine+ipv6/files/patch-pico_edef.h
echo x - pine+ipv6/files/patch-pico_main.c
sed 's/^X//' >pine+ipv6/files/patch-pico_main.c << 'END-of-pine+ipv6/files/patch-pico_main.c'
X
X$FreeBSD$
X
X--- pico/main.c.orig	Wed Apr 16 08:16:34 2003
X+++ pico/main.c	Wed Apr 21 15:43:37 2004
X@@ -476,7 +476,7 @@
X 	    preserve_start_stop = 1;
X 	    break;
X 	  case 'q':			/* -q for termcap takes precedence */
X-	    gmode ^= MDTCAPWINS;
X+	    gmode |= MDTCAPWINS;
X 	    break;
X 	  case 't':			/* special shutdown mode */
X 	    gmode ^= MDTOOL;
END-of-pine+ipv6/files/patch-pico_main.c
echo x - pine+ipv6/files/patch-pico_pilot.c
sed 's/^X//' >pine+ipv6/files/patch-pico_pilot.c << 'END-of-pine+ipv6/files/patch-pico_pilot.c'
X
X$FreeBSD$
X
X--- pico/pilot.c.orig	Wed Apr  9 20:34:30 2003
X+++ pico/pilot.c	Wed Apr 21 15:43:37 2004
X@@ -237,7 +237,7 @@
X 	    sup_keyhelp = !sup_keyhelp;
X 	    break;
X 	  case 'q':			/* -q for termcap takes precedence */
X-	    gmode ^= MDTCAPWINS;
X+	    gmode |= MDTCAPWINS;
X 	    break;
X 	  case 'z':			/* -z to suspend */
X 	    gmode ^= MDSSPD;
END-of-pine+ipv6/files/patch-pico_pilot.c
echo x - pine+ipv6/files/patch-pico_makefile.bsf
sed 's/^X//' >pine+ipv6/files/patch-pico_makefile.bsf << 'END-of-pine+ipv6/files/patch-pico_makefile.bsf'
X
X$FreeBSD$
X
X--- pico/makefile.bsf.orig	Wed Oct 24 00:18:36 2001
X+++ pico/makefile.bsf	Wed Apr 21 15:43:57 2004
X@@ -37,7 +37,7 @@
X DEBUG=       -DDEBUG # -g
X 
X STDCFLAGS=	-DBSDI -DBSDI2 -DPOSIX -DJOB_CONTROL -DMOUSE
X-CFLAGS=         $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
X+CFLAGS+=        $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(STDCFLAGS)
X 
X # switches for library building
X LIBCMD=		ar
END-of-pine+ipv6/files/patch-pico_makefile.bsf
echo x - pine+ipv6/files/patch-pine_osdep_os-bsf.h
sed 's/^X//' >pine+ipv6/files/patch-pine_osdep_os-bsf.h << 'END-of-pine+ipv6/files/patch-pine_osdep_os-bsf.h'
X
X$FreeBSD$
X
X--- pine/osdep/os-bsf.h.orig	Fri May 23 18:05:21 2003
X+++ pine/osdep/os-bsf.h	Wed Apr 21 15:42:16 2004
X@@ -87,7 +87,7 @@
X    NOTE: You'll also have to make sure the appropriate osdep/postreap.*
X          file is included in the os-*.ic file for your system.
X  ----*/
X-/* #define BACKGROUND_POST */
X+#define BACKGROUND_POST
X 
X 
X 
X@@ -209,6 +209,8 @@
X #define DF_KBLOCK_PASSWD_COUNT    "1"
X #define DF_REMOTE_ABOOK_HISTORY   "3"
X 
X+#define DF_SPELLER                "@@PREFIX@@/bin/ispell"
X+
X /*----------------------------------------------------------------------
X    The default printer when pine starts up for the first time with no printer
X  ----*/
X@@ -280,7 +282,7 @@
X        8
X        9 logs gross details of command execution
X  ----*/
X-#define DEFAULT_DEBUG 2
X+#define DEFAULT_DEBUG 0
X 
X 
X 
END-of-pine+ipv6/files/patch-pine_osdep_os-bsf.h
echo x - pine+ipv6/files/patch-pine_send.c
sed 's/^X//' >pine+ipv6/files/patch-pine_send.c << 'END-of-pine+ipv6/files/patch-pine_send.c'
X
X$FreeBSD$
X
X--- pine/send.c.orig	Sat Aug 30 00:03:08 2003
X+++ pine/send.c	Wed Apr 21 15:42:33 2004
X@@ -8251,13 +8251,17 @@
X 		body->subtype = cpystr("octet-stream");
X 	    }
X 
X-	    /*
X-	     * Apply maximal encoding regardless of previous
X-	     * setting.  This segment's either not text, or is 
X-	     * unlikely to be readable with > 30% of the
X-	     * text encoded anyway, so we might as well save space...
X-	     */
X-	    new_encoding = ENCBINARY;   /*  > 30% 8 bit chars */
X+	    if(body->type == TYPETEXT)
X+              /* Use ENC8BIT rather than ENCBINARY for TEXT */
X+	      new_encoding = ENC8BIT;
X+	    else
X+	      /*
X+	       * Apply maximal encoding regardless of previous
X+	       * setting.  This segment's either not text, or is 
X+	       * unlikely to be readable with > 30% of the
X+	       * text encoded anyway, so we might as well save space...
X+	       */
X+	      new_encoding = ENCBINARY;   /*  > 30% 8 bit chars */
X 	}
X     }
X 
X@@ -9278,7 +9282,8 @@
X 
X 	switch (body->encoding) {	/* all else needs filtering */
X 	  case ENC8BIT:			/* encode 8BIT into QUOTED-PRINTABLE */
X-	    gf_link_filter(gf_8bit_qp, NULL);
X+	    if(F_OFF(F_ENABLE_8BIT, ps_global)) /* unless 8BIT enabled */
X+		gf_link_filter(gf_8bit_qp, NULL);
X 	    break;
X 
X 	  case ENCBINARY:		/* encode binary into BASE64 */
X@@ -9392,7 +9397,7 @@
X 	     && !(so_puts(so, "Content-Transfer-Encoding: ")
X 		  && so_puts(so, body_encodings[(body->encoding==ENCBINARY)
X 						? ENCBASE64
X-						: (body->encoding == ENC8BIT)
X+						: (body->encoding == ENC8BIT && F_OFF(F_ENABLE_8BIT, ps_global))
X 						  ? ENCQUOTEDPRINTABLE
X 						  : (body->encoding <= ENCMAX)
X 						    ? body->encoding
END-of-pine+ipv6/files/patch-pine_send.c
echo x - pine+ipv6/files/patch-pine_makefile.bsf
sed 's/^X//' >pine+ipv6/files/patch-pine_makefile.bsf << 'END-of-pine+ipv6/files/patch-pine_makefile.bsf'
X
X$FreeBSD$
X
X--- pine/makefile.bsf.orig	Tue Sep 10 23:39:15 2002
X+++ pine/makefile.bsf	Wed Apr 21 15:43:39 2004
X@@ -67,7 +67,7 @@
X              `cat $(CCLIENTDIR)/LDFLAGS`
X 
X STDCFLAGS=   -DBSDI -DSYSTYPE=\"BSF\" -DMOUSE
X-CFLAGS=      $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(LDAPCFLAGS) \
X+CFLAGS+=      $(OPTIMIZE) $(PROFILE) $(DEBUG) $(EXTRACFLAGS) $(LDAPCFLAGS) \
X 	     $(STDCFLAGS)
X 
X OFILES=	addrbook.o adrbkcmd.o adrbklib.o args.o bldaddr.o context.o filter.o \
END-of-pine+ipv6/files/patch-pine_makefile.bsf
echo x - pine+ipv6/files/patch-pine_init.c
sed 's/^X//' >pine+ipv6/files/patch-pine_init.c << 'END-of-pine+ipv6/files/patch-pine_init.c'
X
X$FreeBSD$
X
X--- pine/init.c.orig	Fri May 23 18:10:06 2003
X+++ pine/init.c	Wed Apr 21 15:43:49 2004
X@@ -1485,6 +1485,9 @@
X     GLO_NORM_FORE_COLOR		= cpystr(colorx(DEFAULT_NORM_FORE));
X     GLO_NORM_BACK_COLOR		= cpystr(colorx(DEFAULT_NORM_BACK));
X #endif
X+#ifdef DF_SPELLER
X+    GLO_SPELLER			= cpystr(DF_SPELLER);
X+#endif
X 
X     /*
X      * Default first value for addrbook list if none set.
END-of-pine+ipv6/files/patch-pine_init.c
echo x - pine+ipv6/files/patch-pine_reply.c
sed 's/^X//' >pine+ipv6/files/patch-pine_reply.c << 'END-of-pine+ipv6/files/patch-pine_reply.c'
X
X$FreeBSD$
X
X--- pine/reply.c.orig	Fri Aug 29 23:43:38 2003
X+++ pine/reply.c	Wed Apr 21 15:44:07 2004
X@@ -5183,7 +5183,10 @@
X char *
X generate_message_id()
X {
X-    static short osec = 0, cnt = 0;
X+    struct timeval tp;
X+    struct timezone tzp;
X+    static short osec = 0;
X+    static char cnt;
X     char        *id;
X     time_t       now;
X     struct tm   *now_x;
X@@ -5191,14 +5194,11 @@
X 
X     now   = time((time_t *)0);
X     now_x = localtime(&now);
X-    id    = (char *)fs_get(128 * sizeof(char));
X+    id    = (char *)fs_get(384 * sizeof(char));
X 
X-    if(now_x->tm_sec == osec)
X-      cnt++;
X-    else{
X-	cnt = 0;
X-	osec = now_x->tm_sec;
X-    }
X+    cnt = 'A';
X+    if(gettimeofday(&tp, &tzp) == 0)
X+	cnt += (time_t)tp.tv_usec % ('Z' - 'A');
X 
X     hostpart = F_ON(F_ROT13_MESSAGE_ID, ps_global)
X 		 ? rot13(ps_global->hostname)
X@@ -5207,8 +5207,8 @@
X     if(!hostpart)
X       hostpart = cpystr("huh");
X 
X-    sprintf(id,"<Pine.%.4s.%.20s.%02d%02d%02d%02d%02d%02d%X.%d@%.50s>",
X-	    SYSTYPE, pine_version, (now_x->tm_year) % 100, now_x->tm_mon + 1,
X+    sprintf(id,"<%d%02d%02d%02d%02d%02d.%c%d@%s>",
X+	    (now_x->tm_year) + 1900, now_x->tm_mon + 1,
X 	    now_x->tm_mday, now_x->tm_hour, now_x->tm_min, now_x->tm_sec, 
X 	    cnt, getpid(), hostpart);
X 
END-of-pine+ipv6/files/patch-pine_reply.c
echo x - pine+ipv6/files/patch-build
sed 's/^X//' >pine+ipv6/files/patch-build << 'END-of-pine+ipv6/files/patch-build'
X
X$FreeBSD$
X
X--- build.orig	Mon Dec  9 18:54:38 2002
X+++ build	Wed Apr 21 15:43:03 2004
X@@ -450,7 +450,7 @@
X         cd "$PHOME"
X         echo ''
X         echo "Links to executables are in bin directory:"
X-        size bin/pine bin/mtest bin/imapd bin/pico bin/pilot bin/rpdump bin/rpload bin/mailutil bin/ipop2d bin/ipop3d
X+        size bin/pine bin/pico bin/pilot bin/rpdump bin/rpload
X 	case $maketarg in
X 	    mnt)    echo "Fixing stacksizes ..."
X 		    fixstk 64K bin/pine bin/pico bin/imapd bin/mtest bin/pilot
END-of-pine+ipv6/files/patch-build
echo x - pine+ipv6/files/patch-doc_README.IPv6
sed 's/^X//' >pine+ipv6/files/patch-doc_README.IPv6 << 'END-of-pine+ipv6/files/patch-doc_README.IPv6'
X
X$FreeBSD$
X
X--- /dev/null	Wed Apr 21 16:00:01 2004
X+++ doc/README.IPv6	Wed Apr 21 16:05:33 2004
X@@ -0,0 +1,21 @@
X+Using IPv6 with Pine
X+--------------------
X+	This section is not intended to explain all the features of PINE.
X+	Please, refer to correspondent PINE guide if you want a detailed
X+	help. Just to remark: this patch has only sense if you read your
X+	mail by using directly IMAP , and not other POP3 programs to
X+	download mail locally (fetchmail). Otherwise IPv6 network routines
X+	will not operate:
X+
X+	At Setup,Config, change the value for
X+
X+	inbox-path = INBOX
X+	inbox-path = {lisa.consulintel.euro6ix.org/user=rrmt}INBOX
X+	inbox-path = {[10.0.0.2]/user=rrmt}INBOX
X+	inbox-path = {[2001:801:44::11]/user=rrmt}INBOX
X+
X+	Changing the correspoding IPv6 server name and user. Warning :
X+	When specifying IPv6 dotted addresses, use [] mandatory.
X+	Otherwise, you'll be prompt "Bad format litteral"
X+
X+	It should go also for other fields like nntp-server, smtp-sever
END-of-pine+ipv6/files/patch-doc_README.IPv6
echo x - pine+ipv6/pkg-message
sed 's/^X//' >pine+ipv6/pkg-message << 'END-of-pine+ipv6/pkg-message'
X
X***************************************************************************
X*** To use pgp with Pine, take a look at the mail/pine-pgp-filters port ***
X***************************************************************************
END-of-pine+ipv6/pkg-message
echo x - pine+ipv6/pkg-install
sed 's/^X//' >pine+ipv6/pkg-install << 'END-of-pine+ipv6/pkg-install'
X#!/bin/sh
X
Xif [ "$2" = "POST-INSTALL" -o -n "${BATCH}" -o -n "${PACKAGE_BUILDING}" ]; then
X  exit 0
Xfi
X
X/usr/bin/dialog --yesno "SECURITY NOTE: The pine software has had several remote vulnerabilities discovered in the past, which allowed remote attackers to execute arbitrary code as you on your local system, by the action of sending a specially-prepared email. All such KNOWN problems have been fixed, but the pine code is written in a very insecure style and the FreeBSD Security Officer believes there are likely to be other undiscovered vulnerabilities. Do you wish to proceed with the installation of pine anyway?" 12 70 || /usr/bin/false
END-of-pine+ipv6/pkg-install
echo x - pine+ipv6/pkg-descr
sed 's/^X//' >pine+ipv6/pkg-descr << 'END-of-pine+ipv6/pkg-descr'
XPine(tm) --a Program for Internet News & Email-- is a tool for reading,
Xsending, and managing electronic messages.  It was designed specifically
Xwith novice computer users in mind, but can be tailored to accommodate the
Xneeds of "power users" as well.  Pine uses Internet message protocols
X(e.g. RFC-822, SMTP, MIME, IMAP, NNTP) and runs on Unix and PCs.
X
XThe guiding principles for Pine's user-interface were:  careful limitation
Xof features, one-character mnemonic commands, always-present command
Xmenus, immediate user feedback, and high tolerance for user mistakes. It
Xis intended that Pine can be learned by exploration rather than reading
Xmanuals.
X
XPine's message composition editor (Pico) and its file browser (Pilot) are
Xalso available as separate stand-alone programs.  Pico is a very simple
Xand easy-to-use text editor offering paragraph justification, cut/paste,
Xand a spelling checker.
X
XWWW: http://www.washington.edu/pine/
X
X- Doug Barton
XDougB at FreeBSD.org
END-of-pine+ipv6/pkg-descr
echo x - pine+ipv6/distinfo
sed 's/^X//' >pine+ipv6/distinfo << 'END-of-pine+ipv6/distinfo'
XMD5 (pine4.58.tar.gz) = 9fff1ca5fa2363f5684c144a9da4c7ef
XSIZE (pine4.58.tar.gz) = 3841914
END-of-pine+ipv6/distinfo
echo x - pine+ipv6/Makefile
sed 's/^X//' >pine+ipv6/Makefile << 'END-of-pine+ipv6/Makefile'
X# New ports collection makefile for:	pine4+ipv6
X# Date created:		21 April 2004
X# Whom:			janos.mohacsi at bsd.hu
X#
X# $FreeBSD$
X#
X
XPORTNAME=	pine+ipv6
XPORTVERSION=	4.58
XCATEGORIES=	mail news ipv6
XMASTER_SITES=	ftp://ftp.cac.washington.edu/pine/ \
X		http://mirror.sit.wisc.edu/pub/net/mail/pine/ \
X		ftp://sunsite.icm.edu.pl/pub/unix/mail/pine/ \
X		ftp://mirrors.unam.mx/pub/pine/ \
X		ftp://ftp.uni-magdeburg.de/pub/mirror/ftp.cac.washington.edu/pine/ \
X		ftp://ftp.fu-berlin.de/unix/mail/pine/ \
X		ftp://ftp.ut.ee/pub/unix/mail/pine/ \
X		ftp://gd.tuwien.ac.at/infosys/mail/pine/
XDISTNAME=	pine${PORTVERSION}
X#PATCH_SITES=	http://www.ngn.euro6ix.org/IPv6/pine/
X#PATCHFILES=	pine-4.58-v6-20031001.diff
X#PATCH_DIST_STRIP=	-p0
X
XMAINTAINER=	janos.mohacsi at bsd.hu
XCOMMENT=	PINE(tm) -- a Program for Internet News & Email
X
XCONFLICTS=	pine-[.0-9]*
X
XRUN_DEPENDS=	ispell:${PORTSDIR}/textproc/ispell
X
Xpre-everything::
X.ifndef(WITHOUT_IPV6)
X	@${ECHO_MSG} '===> Define WITHOUT_IPV6 to disable IPv6 support'
X.endif
X.ifndef(WITHOUT_SSL)
X	@${ECHO_MSG} '===> Define WITHOUT_SSL to disable SSL support'
X.endif
X.ifndef(WITH_LDAP)
X	@${ECHO_MSG} '===> Define WITH_LDAP to enable LDAP support (warning OLD)'
X.endif
X
X# Define "WITH_LDAP" to include ldap support.
X# If the ldap port is installed somewhere other than /usr/local, define
X# LDAP_PREFIX as well.
X#
X.if defined(WITH_LDAP)
XLDAP_PREFIX?=	${LOCALBASE}
XBUILD_DEPENDS+=	${LDAP_PREFIX}/lib/libldap.a:${PORTSDIR}/net/openldap12
X.endif
X
X.if defined(WITHOUT_SSL)
XMAKE_ARGS+=	SSLTYPE=none
X.else
XUSE_OPENSSL=	yes
XEXTRA_OPTS=	SSLINCLUDE=${OPENSSLINC} SSLLIB=${OPENSSLLIB}
X.if defined(WITH_SSL_AND_PLAINTEXT)
XEXTRA_OPTS+=	SSLTYPE=unix
X.else
XEXTRA_OPTS+=	SSLTYPE=unix.nopwd
X.endif
X.endif
X
X.if !defined(WITHOUT_IPV6)
XEXTRACFLAGS=	"EXTRACFLAGS=-DIPv6"
X#PLIST_SUB+=	IPV6=''
X.else
X#PLIST_SUB+=	IPv6='@comment '
X.endif
X
XMAN1=		pine.1 pico.1 pilot.1 rpdump.1 rpload.1
X
Xpre-fetch:
X.if !defined(BATCH) && !defined(PACKAGE_BUILDING)
X	${SH} pkg-install
X.endif
X
Xpost-patch:
X	@for i in ${WRKSRC}/README ${WRKSRC}/doc/pine.1 \
X		${WRKSRC}/doc/tech-notes.txt ${WRKSRC}/doc/tech-notes/*.html \
X		${WRKSRC}/pico/osdep/os-bsf.h \
X		${WRKSRC}/pine/init.c ${WRKSRC}/pine/mailcap.c \
X		${WRKSRC}/pine/osdep/os-bsf.h ${WRKSRC}/pine/pine.hlp ; do \
X		${CP} $$i $$i.presed ; \
X		${SED}	-e "s:/usr/local/etc/:${PREFIX}/etc/:g" \
X			-e "s:/usr/local/lib/:${PREFIX}/etc/:g" \
X			-e "s:@@PREFIX@@:${PREFIX}:g" \
X			-e "s:/usr/local/pine.conf:${PREFIX}/etc/pine.conf:g" \
X			$$i.presed > $$i ; \
X	done
X.if defined(WITH_LDAP)
X	${MKDIR} ${WRKSRC}/ldap
X	${LN} -sf ${LDAP_PREFIX}/include ${WRKSRC}/ldap/include
X	${LN} -sf ${LDAP_PREFIX}/lib ${WRKSRC}/ldap/libraries
X.endif
X
Xdo-build:
X	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ./build ${EXTRACFLAGS} bsf ${EXTRA_OPTS})
X
Xdo-install:
X.for program in ${MAN1}
X	${INSTALL_PROGRAM} ${WRKSRC}/bin/${program:R} ${PREFIX}/bin
X.endfor
X.for manpage in ${MAN1}
X	${INSTALL_MAN} ${WRKSRC}/doc/${manpage} ${PREFIX}/man/man1
X.endfor
X.if !defined(NOPORTDOCS)
X	${INSTALL} -d -o ${SHAREOWN} -g ${SHAREGRP} ${DOCSDIR} \
X		${DOCSDIR}/tech-notes
X	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/CPYRIGHT ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/doc/brochure.txt ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/doc/tech-notes.txt ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/doc/README.IPv6 ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/doc/tech-notes/*.html ${DOCSDIR}/tech-notes
X.endif
X
Xpost-install:
X	${PREFIX}/bin/pine -P ${PREFIX}/etc/pine.conf -conf >${WRKSRC}/pine.conf
X	${INSTALL_DATA} ${WRKSRC}/pine.conf ${PREFIX}/etc/pine.conf
X
X	@${CAT} pkg-message
X
X.include <bsd.port.mk>
END-of-pine+ipv6/Makefile
echo x - pine+ipv6/pkg-plist
sed 's/^X//' >pine+ipv6/pkg-plist << 'END-of-pine+ipv6/pkg-plist'
X at unexec %D/bin/pine -conf >%D/etc/pine.conf.tmp
X at unexec if cmp -s %D/etc/pine.conf %D/etc/pine.conf.tmp; then rm -f %D/etc/pine.conf; fi
X at unexec rm -f %D/etc/pine.conf.tmp
Xbin/pico
Xbin/pilot
Xbin/pine
Xbin/rpdump
Xbin/rpload
X at exec %D/bin/pine -P %D/etc/pine.conf -conf >%D/etc/pine.conf.tmp
X at exec /bin/mv %D/etc/pine.conf.tmp %D/etc/pine.conf
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/CPYRIGHT
X%%PORTDOCS%%%%DOCSDIR%%/brochure.txt
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes.txt
X%%PORTDOCS%%%%DOCSDIR%%/README.IPv6
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/background.html
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/cmd-line.html
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/config-notes.html
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/config.html
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/index.html
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/installation.html
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/introduction.html
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/low-level.html
X%%PORTDOCS%%%%DOCSDIR%%/tech-notes/porting.html
X%%PORTDOCS%%@dirrm %%DOCSDIR%%/tech-notes
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-pine+ipv6/pkg-plist
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list