git: 5fb471b83a71 - main - mail/panda-imap: catch-up with the latest patches

From: Thierry Thomas <thierry_at_FreeBSD.org>
Date: Tue, 19 Apr 2022 20:50:19 UTC
The branch main has been updated by thierry:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5fb471b83a7113dd263995ba17cb634768d06844

commit 5fb471b83a7113dd263995ba17cb634768d06844
Author:     Thierry Thomas <thierry@FreeBSD.org>
AuthorDate: 2022-04-19 20:17:57 +0000
Commit:     Thierry Thomas <thierry@FreeBSD.org>
CommitDate: 2022-04-19 20:49:43 +0000

    mail/panda-imap: catch-up with the latest patches
    
    Nothing has been released yet, but some interesting patches have been committed.
    See <https://github.com/nkhorman/panda-imap/commits/master>.
    
    Since I’m there, remove the option for better better interoperability with
    Netscape.
---
 mail/panda-imap/Makefile                           |  15 +-
 mail/panda-imap/distinfo                           |   5 +-
 mail/panda-imap/files/patch-Makefile               | 181 ++++++---------
 mail/panda-imap/files/patch-src-dmail-Makefile     |  13 +-
 mail/panda-imap/files/patch-src-mlock-Makefile     |   6 +-
 .../files/patch-src-osdep-unix-env_unix.c          |   6 +-
 mail/panda-imap/files/patch-src-tmail-Makefile     |  13 +-
 mail/panda-imap/files/patch-src__imapd__imapd.8    |   4 +-
 mail/panda-imap/files/patch-src__ipopd__ipopd.8    |   4 +-
 mail/panda-imap/files/patch-src_imapd_Makefile     |  19 +-
 mail/panda-imap/files/patch-src_ipopd_Makefile     |   8 +-
 mail/panda-imap/files/patch-src_ipopd_ipop3d.c     |   6 +-
 mail/panda-imap/files/patch-src_mailutil_Makefile  |   8 +-
 mail/panda-imap/files/patch-src_mtest_Makefile     |   8 +-
 mail/panda-imap/files/patch-src_mtest_mtest.c      |  12 +-
 .../panda-imap/files/patch-src_osdep_unix_Makefile | 245 ++++++++-------------
 ...nix_os_bsi.h => patch-src_osdep_unix_os__bsi.h} |  10 +-
 17 files changed, 222 insertions(+), 341 deletions(-)

diff --git a/mail/panda-imap/Makefile b/mail/panda-imap/Makefile
index 66b40ebea724..fbb3cc015958 100644
--- a/mail/panda-imap/Makefile
+++ b/mail/panda-imap/Makefile
@@ -2,7 +2,7 @@
 
 PORTNAME=	panda-imap
 PORTVERSION=	20130621
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	mail
 
 MAINTAINER=	thierry@FreeBSD.org
@@ -11,11 +11,11 @@ COMMENT=	IMAP4rev1/POP2/POP3 mail servers forked from imap-uw
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-LIB_DEPENDS=	libc-client4.so.10:mail/panda-cclient
+LIB_DEPENDS=	libc-client.so.2010:mail/panda-cclient
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	jonabbey
-GH_TAGNAME=	7905901
+GH_TAGNAME=	3452f1598a8b4eeb44b38aead1c1598e379b05de
 
 CONFLICTS_INSTALL=	imap-uw # bin/dmail
 
@@ -29,12 +29,11 @@ ALL_TARGET=	bsf
 # This port must have the same SSL settings as mail/cclient, which it depends on
 # To make MBX format the default mailbox format, change the settings of cclient
 
-OPTIONS_DEFINE=	SSL SSL_AND_PLAINTEXT NETSCAPE_BRAIN_DAMAGE DOCS
+OPTIONS_DEFINE=	DOCS SSL SSL_AND_PLAINTEXT
 OPTIONS_DEFAULT=	SSL
 OPTIONS_SUB=	yes
 
 SSL_AND_PLAINTEXT_DESC=	Allow plain text passwords and SSL
-NETSCAPE_BRAIN_DAMAGE_DESC=	See Makefile for documentation
 
 .include <bsd.port.options.mk>
 
@@ -49,11 +48,7 @@ MAKE_ARGS+=	SSLTYPE=unix.nopwd
 .endif
 .endif
 
-# Define this to get somewhat better interoperability with Netscape.
-.if ${PORT_OPTIONS:MNETSCAPE_BRAIN_DAMAGE}
-MAKE_ARGS+=	WITH_NETSCAPE_BRAIN_DAMAGE=yes
-.endif
-# See src/imapd/Makefile for more information about these three options.
+# See src/imapd/Makefile for more information about these two options.
 
 .include <bsd.port.pre.mk>
 post-patch:
diff --git a/mail/panda-imap/distinfo b/mail/panda-imap/distinfo
index d27871510c2f..a626c83eaa33 100644
--- a/mail/panda-imap/distinfo
+++ b/mail/panda-imap/distinfo
@@ -1,2 +1,3 @@
-SHA256 (jonabbey-panda-imap-20130621-7905901_GH0.tar.gz) = 58e6a922c0c2179164955ea0647d8ad0ab4ce830f5c1fc53a5f193c75c88d641
-SIZE (jonabbey-panda-imap-20130621-7905901_GH0.tar.gz) = 2062378
+TIMESTAMP = 1650387979
+SHA256 (jonabbey-panda-imap-20130621-3452f1598a8b4eeb44b38aead1c1598e379b05de_GH0.tar.gz) = e65063633743065848ce0b594acda52b5d149ae426104a7fc1742de9e042c233
+SIZE (jonabbey-panda-imap-20130621-3452f1598a8b4eeb44b38aead1c1598e379b05de_GH0.tar.gz) = 2066879
diff --git a/mail/panda-imap/files/patch-Makefile b/mail/panda-imap/files/patch-Makefile
index 1da592cee2a5..bcb02f7637c4 100644
--- a/mail/panda-imap/files/patch-Makefile
+++ b/mail/panda-imap/files/patch-Makefile
@@ -1,110 +1,71 @@
-*** Makefile.orig	Wed May  9 00:50:45 2007
---- Makefile	Mon Jul 23 17:45:00 2007
-***************
-*** 164,170 ****
-  # std	system standard (typically passwd file), determined by port
-  # two	try alternative (defined by CHECKPWALT), then std
-  
-! PASSWDTYPE=std
-  
-  
-  # SSL type.  Defines whether or not SSL support is on this system
---- 164,170 ----
-  # std	system standard (typically passwd file), determined by port
-  # two	try alternative (defined by CHECKPWALT), then std
-  
-! PASSWDTYPE=pam
-  
-  
-  # SSL type.  Defines whether or not SSL support is on this system
-***************
-*** 253,264 ****
-  #	British.  As of 2005, the Julian calendar and the Gregorian calendar
-  #	diverge by 15 days.
-  
-! EXTRACFLAGS=
-  
-  
-  # Extra linker flags (additional/alternative libraries, etc.)
-  
-! EXTRALDFLAGS=
-  
-  
-  # Special make flags (e.g. to override make environment variables)
---- 253,264 ----
-  #	British.  As of 2005, the Julian calendar and the Gregorian calendar
-  #	diverge by 15 days.
-  
-! EXTRACFLAGS=-I$(PREFIX)/include/c-client
-  
-  
-  # Extra linker flags (additional/alternative libraries, etc.)
-  
-! EXTRALDFLAGS=-L$(PREFIX)/lib -lc-client4
-  
-  
-  # Special make flags (e.g. to override make environment variables)
-***************
-*** 294,306 ****
-  
-  # Make the IMAP Toolkit
-  
-! all:	c-client SPECIALS rebuild bundled
-! 
-! c-client:
-! 	@echo Not processed yet.  In a first-time build, you must specify
-! 	@echo the system type so that the sources are properly processed.
-! 	@false
-! 
-  
-  SPECIALS:
-  	echo $(SPECIALS) > SPECIALS
---- 294,300 ----
-  
-  # Make the IMAP Toolkit
-  
-! all:	bundled
-  
-  SPECIALS:
-  	echo $(SPECIALS) > SPECIALS
-***************
-*** 559,567 ****
-  	@echo + In order to rectify this problem, you MUST build with:
-  	@echo ++ SSLTYPE=$(SSLTYPE).nopwd
-  	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- 	@echo
-- 	@echo Do you want to continue this build anyway?  Type y or n please:
-- 	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac'
-  
-  nounenc:
-  	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
---- 553,558 ----
-***************
-*** 582,590 ****
-  	@echo ++ SSLTYPE=nopwd
-  	@echo + You must also have OpenSSL or equivalent installed.
-  	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-- 	@echo
-- 	@echo Do you want to continue this build anyway?  Type y or n please:
-- 	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac'
-  
-  nonossl:
-  	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
---- 573,578 ----
-***************
-*** 659,665 ****
-  	$(TOOLS)/$@ "$(LN)" src/tmail tmail
-  	$(LN) $(TOOLS)/$@ .
-  
-! build:	OSTYPE rebuild rebuildclean bundled
-  
-  OSTYPE:
-  	@$(MAKE) ip$(IP)
---- 647,653 ----
-  	$(TOOLS)/$@ "$(LN)" src/tmail tmail
-  	$(LN) $(TOOLS)/$@ .
-  
-! build:	bundled
-  
-  OSTYPE:
-  	@$(MAKE) ip$(IP)
+--- Makefile.orig	2022-04-17 00:12:02 UTC
++++ Makefile
+@@ -166,7 +166,7 @@ EXTRADRIVERS=mbox
+ # std	system standard (typically passwd file), determined by port
+ # two	try alternative (defined by CHECKPWALT), then std
+ 
+-PASSWDTYPE=std
++PASSWDTYPE=pam
+ 
+ 
+ # SSL type.  Defines whether or not SSL support is on this system
+@@ -254,12 +254,12 @@ IP6=6
+ #	British.  As of 2005, the Julian calendar and the Gregorian calendar
+ #	diverge by 15 days.
+ 
+-EXTRACFLAGS=
++EXTRACFLAGS=-I$(PREFIX)/include/c-client
+ 
+ 
+ # Extra linker flags (additional/alternative libraries, etc.)
+ 
+-EXTRALDFLAGS=
++EXTRALDFLAGS=-L$(PREFIX)/lib -lc-client
+ 
+ 
+ # Special make flags (e.g. to override make environment variables)
+@@ -295,14 +295,8 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRACFLAGS)'\
+ 
+ # Make the IMAP Toolkit
+ 
+-all:	c-client SPECIALS rebuild bundled
++all:	bundled
+ 
+-c-client:
+-	@echo Not processed yet.  In a first-time build, you must specify
+-	@echo the system type so that the sources are properly processed.
+-	@false
+-
+-
+ SPECIALS:
+ 	echo $(SPECIALS) > SPECIALS
+ 
+@@ -587,9 +581,6 @@ sslunix sslsco:
+ 	@echo + In order to rectify this problem, you MUST build with:
+ 	@echo ++ SSLTYPE=$(SSLTYPE).nopwd
+ 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+-	@echo
+-	@echo Do you want to continue this build anyway?  Type y or n please:
+-	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nounenc;exit 1);; esac'
+ 
+ nounenc:
+ 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+@@ -610,9 +601,6 @@ sslnone:
+ 	@echo ++ SSLTYPE=nopwd
+ 	@echo + You must also have OpenSSL or equivalent installed.
+ 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+-	@echo
+-	@echo Do you want to continue this build anyway?  Type y or n please:
+-	@$(SH) -c 'read x; case "$$x" in y) exit 0;; *) (make nonossl;exit 1);; esac'
+ 
+ nonossl:
+ 	@echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+@@ -687,7 +675,7 @@ an ua:
+ 	$(TOOLS)/$@ "$(LN)" src/tmail tmail
+ 	$(LN) $(TOOLS)/$@ .
+ 
+-build:	OSTYPE rebuild rebuildclean bundled
++build:	bundled
+ 
+ OSTYPE:
+ 	@$(MAKE) ip$(IP)
diff --git a/mail/panda-imap/files/patch-src-dmail-Makefile b/mail/panda-imap/files/patch-src-dmail-Makefile
index ec87408b7a51..6985f77d9153 100644
--- a/mail/panda-imap/files/patch-src-dmail-Makefile
+++ b/mail/panda-imap/files/patch-src-dmail-Makefile
@@ -1,6 +1,6 @@
---- src/dmail/Makefile.orig	2008-06-04 20:18:34.000000000 +0200
-+++ src/dmail/Makefile	2009-01-16 10:28:52.000000000 +0100
-@@ -31,20 +31,12 @@
+--- src/dmail/Makefile.orig	2022-04-17 00:12:02 UTC
++++ src/dmail/Makefile
+@@ -31,19 +31,11 @@ SHELL = /bin/sh
  
  # Get local definitions from c-client directory
  
@@ -8,19 +8,18 @@
 -CFLAGS = -I$C `cat $C/CFLAGS`
 -LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
 +CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
-+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
++LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client
  
 -dmail: $(CCLIENTLIB) dmail.o dquota.o
 +dmail: dmail.o dquota.o
  	$(CC) $(CFLAGS) -o dmail dmail.o dquota.o $(LDFLAGS)
- 
+-
 -dmail.o: $C/mail.h $C/misc.h $C/osdep.h dquota.h
 -
 -dquota.o: dquota.h
 -
 -$(CCLIENTLIB):
 -	cd $C;make
--
+ 
  clean:
  	rm -f *.o dmail
- 
diff --git a/mail/panda-imap/files/patch-src-mlock-Makefile b/mail/panda-imap/files/patch-src-mlock-Makefile
index 279633e872b9..e83aab417972 100644
--- a/mail/panda-imap/files/patch-src-mlock-Makefile
+++ b/mail/panda-imap/files/patch-src-mlock-Makefile
@@ -1,6 +1,6 @@
---- src/mlock/Makefile.orig	Wed Nov 27 04:06:19 2002
-+++ src/mlock/Makefile	Wed Nov 27 04:09:37 2002
-@@ -22,8 +22,7 @@
+--- src/mlock/Makefile.orig	2022-04-17 00:12:02 UTC
++++ src/mlock/Makefile
+@@ -30,8 +30,7 @@ SHELL = /bin/sh
  
  # Get local definitions from c-client directory
  
diff --git a/mail/panda-imap/files/patch-src-osdep-unix-env_unix.c b/mail/panda-imap/files/patch-src-osdep-unix-env_unix.c
index 034709596f47..58a0c03100fc 100644
--- a/mail/panda-imap/files/patch-src-osdep-unix-env_unix.c
+++ b/mail/panda-imap/files/patch-src-osdep-unix-env_unix.c
@@ -1,6 +1,6 @@
---- src/osdep/unix/env_unix.c.orig	2013-06-21 23:29:17.000000000 +0200
-+++ src/osdep/unix/env_unix.c	2014-11-23 22:48:04.000000000 +0100
-@@ -76,7 +76,7 @@
+--- src/osdep/unix/env_unix.c.orig	2022-04-17 00:12:02 UTC
++++ src/osdep/unix/env_unix.c
+@@ -79,7 +79,7 @@ static char *sslDHParams = NIL;	/* specified SSL Diffi
  static short anonymous = NIL;	/* is anonymous */
  static short blackBox = NIL;	/* is a black box */
  static short closedBox = NIL;	/* is a closed box (uses chroot() jail) */
diff --git a/mail/panda-imap/files/patch-src-tmail-Makefile b/mail/panda-imap/files/patch-src-tmail-Makefile
index f45c29d32d2d..e011d9ebe366 100644
--- a/mail/panda-imap/files/patch-src-tmail-Makefile
+++ b/mail/panda-imap/files/patch-src-tmail-Makefile
@@ -1,6 +1,6 @@
---- src/tmail/Makefile.orig	2008-06-04 20:18:34.000000000 +0200
-+++ src/tmail/Makefile	2009-01-16 10:30:24.000000000 +0100
-@@ -31,20 +31,12 @@
+--- src/tmail/Makefile.orig	2022-04-17 00:12:02 UTC
++++ src/tmail/Makefile
+@@ -31,19 +31,11 @@ SHELL = /bin/sh
  
  # Get local definitions from c-client directory
  
@@ -8,19 +8,18 @@
 -CFLAGS = -I$C `cat $C/CFLAGS`
 -LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
 +CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
-+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
++LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client
  
 -tmail: $(CCLIENTLIB) tmail.o tquota.o
 +tmail: tmail.o tquota.o
  	$(CC) $(CFLAGS) -o tmail tmail.o tquota.o $(LDFLAGS)
- 
+-
 -tmail.o: $C/mail.h $C/misc.h $C/osdep.h tquota.h
 -
 -tquota.o: tquota.h
 -
 -$(CCLIENTLIB):
 -	cd $C;make
--
+ 
  clean:
  	rm -f *.o tmail
- 
diff --git a/mail/panda-imap/files/patch-src__imapd__imapd.8 b/mail/panda-imap/files/patch-src__imapd__imapd.8
index dfc14334836e..911efa4393a3 100644
--- a/mail/panda-imap/files/patch-src__imapd__imapd.8
+++ b/mail/panda-imap/files/patch-src__imapd__imapd.8
@@ -1,5 +1,5 @@
---- src/imapd/imapd.8.orig	Sun Sep 30 16:06:25 2007
-+++ src/imapd/imapd.8	Sun Sep 30 16:06:38 2007
+--- src/imapd/imapd.8.orig	2022-04-17 00:12:02 UTC
++++ src/imapd/imapd.8
 @@ -16,7 +16,7 @@
  .SH NAME
  IMAPd \- Internet Message Access Protocol server
diff --git a/mail/panda-imap/files/patch-src__ipopd__ipopd.8 b/mail/panda-imap/files/patch-src__ipopd__ipopd.8
index a712defab505..c3a38e3d036a 100644
--- a/mail/panda-imap/files/patch-src__ipopd__ipopd.8
+++ b/mail/panda-imap/files/patch-src__ipopd__ipopd.8
@@ -1,5 +1,5 @@
---- src/ipopd/ipopd.8.orig	Sun Sep 30 16:08:01 2007
-+++ src/ipopd/ipopd.8	Sun Sep 30 16:08:10 2007
+--- src/ipopd/ipopd.8.orig	2022-04-17 00:12:02 UTC
++++ src/ipopd/ipopd.8
 @@ -16,9 +16,9 @@
  .SH NAME
  IPOPd \- Post Office Protocol server
diff --git a/mail/panda-imap/files/patch-src_imapd_Makefile b/mail/panda-imap/files/patch-src_imapd_Makefile
index 14db253bf9bd..5a40b12c55c4 100644
--- a/mail/panda-imap/files/patch-src_imapd_Makefile
+++ b/mail/panda-imap/files/patch-src_imapd_Makefile
@@ -1,5 +1,5 @@
---- src/imapd/Makefile.orig	2013-06-21 23:29:17.000000000 +0200
-+++ src/imapd/Makefile	2014-12-14 14:44:16.000000000 +0100
+--- src/imapd/Makefile.orig	2022-04-17 00:12:02 UTC
++++ src/imapd/Makefile
 @@ -26,11 +26,11 @@
  #     http://www.apache.org/licenses/LICENSE-2.0
  
@@ -16,18 +16,7 @@
  SHELL= /bin/sh
  
  
-@@ -38,7 +38,9 @@
- # causes the "Manage Mail" menu item to open the given URL, e.g. to point to
- # an alternative IMAP client (e.g. Pine) or perhaps to a homebrew mail
- # account management page.
--#NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://sourceforge.net/projects/re-alpine\"
-+.if defined(WITH_NETSCAPE_BRAIN_DAMAGE)
-+NSBD= -DNETSCAPE_BRAIN_DAMAGE=\"http://sourceforge.net/projects/re-alpine\"
-+.endif
- 
- # Un-comment to enable the ESEARCH command.  Unfortunately, the iOS4 Mail
- # client misinterprets the ESEARCH results due to an ambiguity in RFC 4731.
-@@ -46,23 +44,17 @@
+@@ -46,23 +46,17 @@ SHELL= /bin/sh
  
  # Get local definitions from c-client directory
  
@@ -40,7 +29,7 @@
  	-DALERTFILE=\"$(ALERT)\" -DNNTPFILE=\"$(NNTP)\" \
  	-DUSERALERTFILE=\"$(USERALERT)\" -DSHUTDOWNFILE=\"$(SHUTDOWN)\"
 -LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
-+LDFLAGS+=	$(EXTRALDFLAGS) -L$(LOCALBASE)/lib -lc-client4
++LDFLAGS+=	$(EXTRALDFLAGS) -L$(LOCALBASE)/lib -lc-client
  
  all:	imapd
  
diff --git a/mail/panda-imap/files/patch-src_ipopd_Makefile b/mail/panda-imap/files/patch-src_ipopd_Makefile
index a538cb910b16..30d8f83777d9 100644
--- a/mail/panda-imap/files/patch-src_ipopd_Makefile
+++ b/mail/panda-imap/files/patch-src_ipopd_Makefile
@@ -1,6 +1,6 @@
---- src/ipopd/Makefile.orig	Wed Oct 25 01:55:07 2000
-+++ src/ipopd/Makefile	Mon Oct  1 03:44:26 2001
-@@ -19,29 +19,21 @@
+--- src/ipopd/Makefile.orig	2022-04-17 00:12:02 UTC
++++ src/ipopd/Makefile
+@@ -26,29 +26,21 @@
  
  
  C = ../c-client
@@ -14,7 +14,7 @@
 -CFLAGS = -I$C `cat $C/CFLAGS`
 -LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
 +CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
-+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
++LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client
  
  ipopd: ipop2d ipop3d
  
diff --git a/mail/panda-imap/files/patch-src_ipopd_ipop3d.c b/mail/panda-imap/files/patch-src_ipopd_ipop3d.c
index 0b3fb92483ee..9fd3c8e6e4a0 100644
--- a/mail/panda-imap/files/patch-src_ipopd_ipop3d.c
+++ b/mail/panda-imap/files/patch-src_ipopd_ipop3d.c
@@ -1,6 +1,6 @@
---- src/ipopd/ipop3d.c.orig	2008-06-04 20:18:34.000000000 +0200
-+++ src/ipopd/ipop3d.c	2009-01-16 10:19:50.000000000 +0100
-@@ -113,7 +113,7 @@
+--- src/ipopd/ipop3d.c.orig	2022-04-17 00:12:02 UTC
++++ src/ipopd/ipop3d.c
+@@ -113,7 +113,7 @@ int main (int argc,char *argv[])
      (((s = strrchr (argv[0],'/')) || (s = strrchr (argv[0],'\\'))) ?
       s+1 : argv[0]) : "ipop3d";
  				/* set service name before linkage */
diff --git a/mail/panda-imap/files/patch-src_mailutil_Makefile b/mail/panda-imap/files/patch-src_mailutil_Makefile
index eb7a3dd9f880..e1da0cc48b33 100644
--- a/mail/panda-imap/files/patch-src_mailutil_Makefile
+++ b/mail/panda-imap/files/patch-src_mailutil_Makefile
@@ -1,6 +1,6 @@
---- src/mailutil/Makefile.orig	Tue Nov 19 01:41:46 2002
-+++ src/mailutil/Makefile	Wed Nov 27 03:51:27 2002
-@@ -19,22 +19,15 @@
+--- src/mailutil/Makefile.orig	2022-04-17 00:12:02 UTC
++++ src/mailutil/Makefile
+@@ -26,22 +26,15 @@
  
  
  C = ../c-client
@@ -13,7 +13,7 @@
 -CFLAGS = -I$C `cat $C/CFLAGS`
 -LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
 +CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
-+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
++LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client
  
 -mailutil: $(CCLIENTLIB) mailutil.o
 +mailutil: mailutil.o
diff --git a/mail/panda-imap/files/patch-src_mtest_Makefile b/mail/panda-imap/files/patch-src_mtest_Makefile
index 041d6a63b98e..1de39d32aec0 100644
--- a/mail/panda-imap/files/patch-src_mtest_Makefile
+++ b/mail/panda-imap/files/patch-src_mtest_Makefile
@@ -1,6 +1,6 @@
---- src/mtest/Makefile.orig	Wed Oct 25 01:55:39 2000
-+++ src/mtest/Makefile	Mon Oct  1 03:42:11 2001
-@@ -19,24 +19,17 @@
+--- src/mtest/Makefile.orig	2022-04-17 00:12:02 UTC
++++ src/mtest/Makefile
+@@ -26,24 +26,17 @@
  
  
  C = ../c-client
@@ -13,7 +13,7 @@
 -CFLAGS = -I$C `cat $C/CFLAGS`
 -LDFLAGS = $(CCLIENTLIB) `cat $C/LDFLAGS`
 +CFLAGS+=	-DNFSKLUDGE -I$(LOCALBASE)/include/c-client
-+LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client4
++LDFLAGS+=	-L$(LOCALBASE)/lib -lc-client
  
  all:	mtest
  
diff --git a/mail/panda-imap/files/patch-src_mtest_mtest.c b/mail/panda-imap/files/patch-src_mtest_mtest.c
index a3b490909a09..e75b0f18ed30 100644
--- a/mail/panda-imap/files/patch-src_mtest_mtest.c
+++ b/mail/panda-imap/files/patch-src_mtest_mtest.c
@@ -1,6 +1,6 @@
---- src/mtest/mtest.c.orig	Sat May 29 08:07:06 1999
-+++ src/mtest/mtest.c	Sun Dec 19 15:29:29 1999
-@@ -95,6 +95,7 @@
+--- src/mtest/mtest.c.orig	2022-04-17 00:12:02 UTC
++++ src/mtest/mtest.c
+@@ -79,6 +79,7 @@ void display_body (BODY *body,char *pfx,long i);
  void status (MAILSTREAM *stream);
  void prompt (char *msg,char *txt);
  void smtptest (long debug);
@@ -8,7 +8,7 @@
  
  /* Main program - initialization */
  
-@@ -528,7 +529,7 @@
+@@ -603,7 +604,7 @@ void status (MAILSTREAM *stream)
  void prompt (char *msg,char *txt)
  {
    printf ("%s",msg);
@@ -17,7 +17,7 @@
  }
  
  /* Interfaces to C-client */
-@@ -713,7 +714,7 @@
+@@ -787,7 +788,7 @@ void smtptest (long debug)
    puts (" Msg (end with a line with only a '.'):");
    body->type = TYPETEXT;
    *text = '\0';
@@ -26,7 +26,7 @@
      if (line[0] == '.') {
        if (line[1] == '\0') break;
        else strcat (text,".");
-@@ -744,4 +745,18 @@
+@@ -818,4 +819,18 @@ void smtptest (long debug)
    else puts ("[Can't open connection to any server]");
    mail_free_envelope (&msg);
    mail_free_body (&body);
diff --git a/mail/panda-imap/files/patch-src_osdep_unix_Makefile b/mail/panda-imap/files/patch-src_osdep_unix_Makefile
index d81228f915c0..ba25baaf621c 100644
--- a/mail/panda-imap/files/patch-src_osdep_unix_Makefile
+++ b/mail/panda-imap/files/patch-src_osdep_unix_Makefile
@@ -1,154 +1,91 @@
-*** src/osdep/unix/Makefile.orig	Sun Jun 17 17:37:44 2007
---- src/osdep/unix/Makefile	Mon Jul 23 17:34:03 2007
-***************
-*** 54,66 ****
-  
-  # Extended flags needed for SSL.  You may need to modify.
-  
-! SSLDIR=/usr/local/ssl
-! SSLCERTS=$(SSLDIR)/certs
-  SSLKEYS=$(SSLCERTS)
-  SSLINCLUDE=$(SSLDIR)/include
-  SSLLIB=$(SSLDIR)/lib
-  
-! SSLCRYPTO=-lcrypto
-  
-  # Older versions of MIT Kerberos also have a libcrypto.  If so, you may need
-  # to use this instead
---- 54,66 ----
-  
-  # Extended flags needed for SSL.  You may need to modify.
-  
-! #SSLDIR=/usr/local/ssl
-! SSLCERTS=$(PREFIX)/certs
-  SSLKEYS=$(SSLCERTS)
-  SSLINCLUDE=$(SSLDIR)/include
-  SSLLIB=$(SSLDIR)/lib
-  
-! SSLCRYPTO=-lcrypto -lcrypt
-  
-  # Older versions of MIT Kerberos also have a libcrypto.  If so, you may need
-  # to use this instead
-***************
-*** 73,79 ****
-  
-  SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\
-   -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\"
-! SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
-  
-  
-  # Extended flags needed for non-standard passwd types.  You may need to modify.
---- 73,79 ----
-  
-  SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\
-   -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\"
-! SSLLDFLAGS= # -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
-  
-  
-  # Extended flags needed for non-standard passwd types.  You may need to modify.
-***************
-*** 87,93 ****
-  # AFSLDFLAGS may also need -L/usr/ucblib -lucb
-  DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\"
-  DCELDFLAGS= -ldce
-! PAMLDFLAGS= -lpam -ldl
-  
-  
-  # Build parameters normally set by the individual port
---- 87,93 ----
-  # AFSLDFLAGS may also need -L/usr/ucblib -lucb
-  DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\"
-  DCELDFLAGS= -ldce
-! PAMLDFLAGS= # -lpam -lcrypt
-  
-  
-  # Build parameters normally set by the individual port
-***************
-*** 125,131 ****
-  # Commands possibly overriden by the individual port
-  
-  ARRC=ar rc
-! CC=cc
-  LN=ln -s
-  RANLIB=ranlib
-  
---- 125,131 ----
-  # Commands possibly overriden by the individual port
-  
-  ARRC=ar rc
-! CC?=cc
-  LN=ln -s
-  RANLIB=ranlib
-  
-***************
-*** 149,155 ****
-   dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
-   rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
-   unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
-! CFLAGS=-g
-  
-  CAT=cat
-  MAKE=make
---- 149,155 ----
-   dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
-   rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
-   unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
-! CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS)
-  
-  CAT=cat
-  MAKE=make
-***************
-*** 232,237 ****
---- 232,246 ----
-  	 BASECFLAGS="-g -B/usr/lib/big/ -Dvoid=char -Dconst=" \
-  	 RANLIB=true ARRC="ar -rc"
-  
-+ bfp:	# FreeBSD Pluggable Authentication Modules
-+ 	$(BUILD) `cat SPECIALS` OS=bsi SIGTYPE=psx CHECKPW=pam \
-+ 	 SPOOLDIR=/var \
-+ 	 ACTIVEFILE=/usr/local/news/lib/active \
-+ 	 RSHPATH=/usr/bin/rsh \
-+ 	 LOCKPGM=$(PREFIX)/libexec/mlock \
-+ 	 BASECFLAGS="-DNFSKLUDGE" \
-+ 	 BASELDFLAGS="-lpam -lcrypt"
-+ 
-  bs3:	# BSD/i386 3.0 or higher
-  	$(BUILD) `$(CAT) SPECIALS` OS=bsi \
-  	 CHECKPW=bsi LOGINPW=bsi CRXTYPE=nfs \
-***************
-*** 251,258 ****
-  	 SPOOLDIR=/var \
-  	 ACTIVEFILE=/usr/local/news/lib/active \
-  	 RSHPATH=/usr/bin/rsh \
-  	 BASECFLAGS="$(GCCCFLAGS)" \
-! 	 BASELDFLAGS="-lcrypt"
-  
-  bsi:	# BSD/i386
-  	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
---- 260,268 ----
-  	 SPOOLDIR=/var \
-  	 ACTIVEFILE=/usr/local/news/lib/active \
-  	 RSHPATH=/usr/bin/rsh \
-+ 	 LOCKPGM=$(PREFIX)/libexec/mlock \
-  	 BASECFLAGS="$(GCCCFLAGS)" \
-! 	 BASELDFLAGS=""
-  
-  bsi:	# BSD/i386
-  	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
-***************
-*** 842,848 ****
-  
-  build:	clean once $(ARCHIVE)
-  
-! all:	$(ARCHIVE)
-  
-  $(ARCHIVE): $(BINARIES)
-  	sh -c '$(RM) $(ARCHIVE) || true'
---- 852,858 ----
-  
-  build:	clean once $(ARCHIVE)
-  
-! all:	onceenv
-  
-  $(ARCHIVE): $(BINARIES)
-  	sh -c '$(RM) $(ARCHIVE) || true'
+--- src/osdep/unix/Makefile.orig	2022-04-17 00:12:02 UTC
++++ src/osdep/unix/Makefile
+@@ -56,13 +56,13 @@ GCC4CFLAGS= $(GCCCFLAGS) -Wno-pointer-sign
+ 
+ # Extended flags needed for SSL.  You may need to modify.
+ 
+-SSLDIR=/usr/local/ssl
+-SSLCERTS=$(SSLDIR)/certs
++#SSLDIR=/usr/local/ssl
++SSLCERTS=$(PREFIX)/certs
+ SSLKEYS=$(SSLCERTS)
+ SSLINCLUDE=$(SSLDIR)/include
+ SSLLIB=$(SSLDIR)/lib
+ 
+-SSLCRYPTO=-lcrypto
++SSLCRYPTO=-lcrypto -lcrypt
+ 
+ # Older versions of MIT Kerberos also have a libcrypto.  If so, you may need
+ # to use this instead
+@@ -75,7 +75,7 @@ SSLRSA= # -lRSAglue -lrsaref
+ 
+ SSLCFLAGS= -I$(SSLINCLUDE) -I$(SSLINCLUDE)/openssl\
+  -DSSL_CERT_DIRECTORY=\"$(SSLCERTS)\" -DSSL_KEY_DIRECTORY=\"$(SSLKEYS)\"
+-SSLLDFLAGS= -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
++SSLLDFLAGS= # -L$(SSLLIB) -lssl $(SSLCRYPTO) $(SSLRSA)
+ 
+ 
+ # Extended flags needed for non-standard passwd types.  You may need to modify.
+@@ -89,7 +89,7 @@ AFSLDFLAGS=-L$(AFSLIB)/afs -L$(AFSLIB) -L$(AFSDIR)/dom
+ # AFSLDFLAGS may also need -L/usr/ucblib -lucb
+ DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\"
+ DCELDFLAGS= -ldce
+-PAMLDFLAGS= -lpam -ldl
++PAMLDFLAGS= # -lpam -lcrypt
+ 
+ 
+ # Build parameters normally set by the individual port
+@@ -132,7 +132,7 @@ EMPTYPROTO=unixproto
+ # Commands possibly overriden by the individual port
+ 
+ ARRC=ar rc
+-CC=cc
++CC?=cc
+ LN=ln -s
+ RANLIB=ranlib
+ 
+@@ -156,7 +156,7 @@ BINARIES=osdep.o mail.o misc.o newsrc.o smanager.o utf
+  dummy.o pseudo.o netmsg.o flstring.o fdstring.o \
+  rfc822.o nntp.o smtp.o imap4r1.o pop3.o \
+  unix.o mbx.o mmdf.o tenex.o mtx.o news.o phile.o mh.o mx.o mix.o
+-CFLAGS=-g
++CFLAGS+=$(BASECFLAGS) $(EXTRACFLAGS)
+ 
+ CAT=cat
+ MAKE=make
+@@ -251,6 +251,15 @@ aux:	# A/UX
+ 	 BASECFLAGS="-g -B/usr/lib/big/ -Dvoid=char -Dconst=" \
+ 	 RANLIB=true ARRC="ar -rc"
+ 
++bfp:	# FreeBSD Pluggable Authentication Modules
++	$(BUILD) `cat SPECIALS` OS=bsi SIGTYPE=psx CHECKPW=pam \
++	 SPOOLDIR=/var \
++	 ACTIVEFILE=/usr/local/news/lib/active \
++	 RSHPATH=/usr/bin/rsh \
++	 LOCKPGM=$(PREFIX)/libexec/mlock \
++	 BASECFLAGS="-DNFSKLUDGE" \
++	 BASELDFLAGS="-lpam -lcrypt"
++
+ bs3:	# BSD/i386 3.0 or higher
+ 	$(BUILD) `$(CAT) SPECIALS` OS=bsi \
+ 	 CHECKPW=bsi LOGINPW=bsi CRXTYPE=nfs \
+@@ -270,8 +279,9 @@ bsf:	# FreeBSD
+ 	 SPOOLDIR=/var \
+ 	 ACTIVEFILE=/usr/local/news/lib/active \
+ 	 RSHPATH=/usr/bin/rsh \
++	 LOCKPGM=$(PREFIX)/libexec/mlock \
+ 	 BASECFLAGS="$(GCCCFLAGS)" \
+-	 BASELDFLAGS="-lcrypt"
++	 BASELDFLAGS=""
+ 
+ bsi:	# BSD/i386
+ 	$(BUILD) `$(CAT) SPECIALS` OS=$@ \
+@@ -869,7 +879,7 @@ vu2:	# VAX Ultrix 2.3, etc.
+ 
+ build:	clean once all
+ 
+-all:	$(ARCHIVE) `$(CAT) SHLIBNAME`
++all:	onceenv `$(CAT) SHLIBNAME`
+ 
+ $(ARCHIVE): $(BINARIES)
+ 	sh -c '$(RM) $(ARCHIVE) || true'
diff --git a/mail/panda-imap/files/patch-src_osdep_unix_os_bsi.h b/mail/panda-imap/files/patch-src_osdep_unix_os__bsi.h
similarity index 63%
rename from mail/panda-imap/files/patch-src_osdep_unix_os_bsi.h
rename to mail/panda-imap/files/patch-src_osdep_unix_os__bsi.h
index 4615f235b3fb..ca6caf9d5f3c 100644
--- a/mail/panda-imap/files/patch-src_osdep_unix_os_bsi.h
+++ b/mail/panda-imap/files/patch-src_osdep_unix_os__bsi.h
@@ -1,6 +1,6 @@
---- src/osdep/unix/os_bsi.h.orig	Sat Oct 19 20:30:04 1996
-+++ src/osdep/unix/os_bsi.h	Sun May 24 10:46:33 1998
-@@ -37,7 +37,18 @@
+--- src/osdep/unix/os_bsi.h.orig	2022-04-17 00:12:02 UTC
++++ src/osdep/unix/os_bsi.h
+@@ -27,7 +27,18 @@
  #include <unistd.h>
  #include <string.h>
  #include <sys/types.h>
@@ -17,5 +17,5 @@
 +#endif
 +
  #include <fcntl.h>
- #include <syslog.h>
- #include <sys/file.h>
+ #include <time.h>
+ #include <utime.h>