aboutsummaryrefslogtreecommitdiff
path: root/mail/panda-cclient
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2018-10-28 17:54:22 +0000
committerThierry Thomas <thierry@FreeBSD.org>2018-10-28 17:54:22 +0000
commitbfadce864b81e2cf44abce21ba35713782d07126 (patch)
treecd421e81e95aeab1a966e716bfe1417c233112a7 /mail/panda-cclient
parent1d90df1583706f37969151c84f23c118e364ef4c (diff)
downloadports-bfadce864b81e2cf44abce21ba35713782d07126.tar.gz
ports-bfadce864b81e2cf44abce21ba35713782d07126.zip
Fix in head and with openssl-devel.
Obtained from: openembedded/meta-openembedded
Notes
Notes: svn path=/head/; revision=483321
Diffstat (limited to 'mail/panda-cclient')
-rw-r--r--mail/panda-cclient/Makefile9
-rw-r--r--mail/panda-cclient/files/patch-Makefile128
-rw-r--r--mail/panda-cclient/files/patch-src_osdep_unix_Makefile22
-rw-r--r--mail/panda-cclient/files/patch-src_osdep_unix_os__bsi.h21
-rw-r--r--mail/panda-cclient/files/patch-src_osdep_unix_ssl__unix.c63
5 files changed, 147 insertions, 96 deletions
diff --git a/mail/panda-cclient/Makefile b/mail/panda-cclient/Makefile
index a612b766ea8c..7536683223cc 100644
--- a/mail/panda-cclient/Makefile
+++ b/mail/panda-cclient/Makefile
@@ -3,6 +3,7 @@
PORTNAME= cclient
PORTVERSION= 20130621
+PORTREVISION= 1
CATEGORIES= mail devel ipv6
PKGNAMEPREFIX= panda-
@@ -33,12 +34,6 @@ USES+= ssl
PKGMESSAGE= pkg-message-ssl
.endif
-.include <bsd.port.pre.mk>
-
-.if ${PORT_OPTIONS:MSSL} && ${SSL_DEFAULT:Mopenssl-devel}
-BROKEN= Does not build with openssl-devel
-.endif
-
USE_LDCONFIG= yes
ALL_TARGET= bsf
.if ! ${PORT_OPTIONS:MSSL}
@@ -113,4 +108,4 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/c-client/OSCFLAGS ${STAGEDIR}${PREFIX}/include/c-client
${INSTALL_DATA} ${PORTREV_H} ${STAGEDIR}${PREFIX}/include/c-client
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/mail/panda-cclient/files/patch-Makefile b/mail/panda-cclient/files/patch-Makefile
index 1e10918790a8..b2e152746329 100644
--- a/mail/panda-cclient/files/patch-Makefile
+++ b/mail/panda-cclient/files/patch-Makefile
@@ -1,78 +1,50 @@
-*** Makefile.orig Wed May 9 00:50:45 2007
---- Makefile Mon Jul 23 16:02:26 2007
-***************
-*** 294,300 ****
-
- # Make the IMAP Toolkit
-
-! all: c-client SPECIALS rebuild bundled
-
- c-client:
- @echo Not processed yet. In a first-time build, you must specify
---- 294,300 ----
-
- # Make the IMAP Toolkit
-
-! all: c-client SPECIALS rebuild
-
- c-client:
- @echo Not processed yet. In a first-time build, you must specify
-***************
-*** 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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
---- 559,564 ----
-***************
-*** 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 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
---- 579,584 ----
-***************
-*** 659,665 ****
- $(TOOLS)/$@ "$(LN)" src/tmail tmail
- $(LN) $(TOOLS)/$@ .
-
-! build: OSTYPE rebuild rebuildclean bundled
-
- OSTYPE:
- @$(MAKE) ip$(IP)
---- 653,659 ----
- $(TOOLS)/$@ "$(LN)" src/tmail tmail
- $(LN) $(TOOLS)/$@ .
-
-! build: OSTYPE rebuild rebuildclean
-
- OSTYPE:
- @$(MAKE) ip$(IP)
-***************
-*** 679,686 ****
- @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
- @echo Rebuilding c-client for `$(CAT) OSTYPE`...
- @$(TOUCH) SPECIALS
-! $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \
-! CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
-
- rebuildclean:
- $(SH) -c '$(RM) rebuild || true'
---- 673,679 ----
- @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
- @echo Rebuilding c-client for `$(CAT) OSTYPE`...
- @$(TOUCH) SPECIALS
-! $(CD) c-client;$(MAKE) all CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
-
- rebuildclean:
- $(SH) -c '$(RM) rebuild || true'
+--- Makefile.orig 2013-06-21 21:29:17 UTC
++++ Makefile
+@@ -295,7 +295,7 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRA
+
+ # Make the IMAP Toolkit
+
+-all: c-client SPECIALS rebuild bundled
++all: c-client SPECIALS rebuild
+
+ c-client:
+ @echo Not processed yet. In a first-time build, you must specify
+@@ -587,9 +587,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 +607,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 +681,7 @@ an ua:
+ $(TOOLS)/$@ "$(LN)" src/tmail tmail
+ $(LN) $(TOOLS)/$@ .
+
+-build: OSTYPE rebuild rebuildclean bundled
++build: OSTYPE rebuild rebuildclean
+
+ OSTYPE:
+ @$(MAKE) ip$(IP)
+@@ -707,8 +701,7 @@ rebuild:
+ @$(SH) -c '(test $(BUILDTYPE) = rebuild -o $(BUILDTYPE) = `$(CAT) OSTYPE`) || (echo Already built for `$(CAT) OSTYPE` -- you must do \"make clean\" first && exit 1)'
+ @echo Rebuilding c-client for `$(CAT) OSTYPE`...
+ @$(TOUCH) SPECIALS
+- $(CD) c-client;$(MAKE) all CC=`$(CAT) CCTYPE` \
+- CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
++ $(CD) c-client;$(MAKE) all CFLAGS="`$(CAT) CFLAGS`" `$(CAT) SPECIALS`
+
+ rebuildclean:
+ $(SH) -c '$(RM) rebuild || true'
diff --git a/mail/panda-cclient/files/patch-src_osdep_unix_Makefile b/mail/panda-cclient/files/patch-src_osdep_unix_Makefile
index a86ec16f592d..f9b3effab3e0 100644
--- a/mail/panda-cclient/files/patch-src_osdep_unix_Makefile
+++ b/mail/panda-cclient/files/patch-src_osdep_unix_Makefile
@@ -1,5 +1,5 @@
---- src/osdep/unix/Makefile.orig 2013-06-21 23:29:17.000000000 +0200
-+++ src/osdep/unix/Makefile 2014-12-01 22:35:23.000000000 +0100
+--- src/osdep/unix/Makefile.orig 2013-06-21 21:29:17 UTC
++++ src/osdep/unix/Makefile
@@ -30,9 +30,9 @@
EXTRAAUTHENTICATORS=
@@ -13,7 +13,7 @@
# The optimization level here for GCC ports is set here for a reason. It's
-@@ -56,13 +56,13 @@
+@@ -56,13 +56,13 @@ GCC4CFLAGS= $(GCCCFLAGS) -Wno-pointer-si
# Extended flags needed for SSL. You may need to modify.
@@ -30,7 +30,7 @@
# Older versions of MIT Kerberos also have a libcrypto. If so, you may need
# to use this instead
-@@ -89,7 +89,7 @@
+@@ -89,7 +89,7 @@ AFSLDFLAGS=-L$(AFSLIB)/afs -L$(AFSLIB) -
# AFSLDFLAGS may also need -L/usr/ucblib -lucb
DCECFLAGS= -DDCE_MINIMAL -DPASSWD_OVERRIDE=\"/opt/pop3/passwd/passwd\"
DCELDFLAGS= -ldce
@@ -39,7 +39,7 @@
# Build parameters normally set by the individual port
-@@ -132,7 +132,7 @@
+@@ -132,7 +132,7 @@ EMPTYPROTO=unixproto
# Commands possibly overriden by the individual port
ARRC=ar rc
@@ -48,7 +48,7 @@
LN=ln -s
RANLIB=ranlib
-@@ -156,7 +156,7 @@
+@@ -156,7 +156,7 @@ BINARIES=osdep.o mail.o misc.o newsrc.o
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
@@ -57,7 +57,7 @@
CAT=cat
MAKE=make
-@@ -173,6 +173,10 @@
+@@ -173,6 +173,10 @@ BUILD=$(MAKE) build EXTRACFLAGS='$(EXTRA
PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)
@@ -68,7 +68,7 @@
# Here if no make argument established
missing: osdep.h
-@@ -261,13 +265,14 @@
+@@ -261,13 +265,14 @@ bsd: # BSD UNIX
BASECFLAGS="-g -Dconst="
bsf: # FreeBSD
@@ -85,7 +85,7 @@
bsi: # BSD/i386
$(BUILD) `$(CAT) SPECIALS` OS=$@ \
-@@ -863,23 +868,31 @@
+@@ -863,23 +868,31 @@ vu2: # VAX Ultrix 2.3, etc.
# Build it!
@@ -120,7 +120,7 @@
# Dependencies
-@@ -914,7 +927,7 @@
+@@ -914,7 +927,7 @@ utf8aux.o: mail.h misc.h osdep.h utf8.h
# OS-dependent
@@ -129,7 +129,7 @@
osdep.h env_unix.h tcp_unix.h \
osdep.c env_unix.c fs_unix.c ftl_unix.c nl_unix.c tcp_unix.c ip_unix.c\
auths.c crexcl.c flockcyg.c flocklnx.c flocksim.c fsync.c \
-@@ -928,12 +941,19 @@
+@@ -928,12 +941,19 @@ osdep.o:mail.h misc.h env.h fs.h ftl.h n
write.c sslstdio.c \
strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
OSCFLAGS
diff --git a/mail/panda-cclient/files/patch-src_osdep_unix_os__bsi.h b/mail/panda-cclient/files/patch-src_osdep_unix_os__bsi.h
new file mode 100644
index 000000000000..ade4d1289237
--- /dev/null
+++ b/mail/panda-cclient/files/patch-src_osdep_unix_os__bsi.h
@@ -0,0 +1,21 @@
+--- src/osdep/unix/os_bsi.h.orig Wed Apr 11 10:53:03 2001
++++ src/osdep/unix/os_bsi.h Wed Apr 11 10:55:32 2001
+@@ -22,7 +22,18 @@
+ #include <unistd.h>
+ #include <string.h>
+ #include <sys/types.h>
++
++/*
++ * FreeBSD v3.x and onward whines about <sys/dir.h> being obsolete, so switch
++ * to POSIX semantics.
++ */
++#if __FreeBSD__ >= 3
++#include <dirent.h>
++#define direct dirent
++#else
+ #include <sys/dir.h>
++#endif
++
+ #include <fcntl.h>
+ #include <syslog.h>
+ #include <sys/file.h>
diff --git a/mail/panda-cclient/files/patch-src_osdep_unix_ssl__unix.c b/mail/panda-cclient/files/patch-src_osdep_unix_ssl__unix.c
new file mode 100644
index 000000000000..15f471074d0b
--- /dev/null
+++ b/mail/panda-cclient/files/patch-src_osdep_unix_ssl__unix.c
@@ -0,0 +1,63 @@
+--- src/osdep/unix/ssl_unix.c.orig 2013-06-21 21:29:17 UTC
++++ src/osdep/unix/ssl_unix.c
+@@ -22,6 +22,10 @@
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
++
++/* Patch for OPENSSL_VERSION_NUMBER >= 0x10100000 obtained from
++ * openembedded/meta-openembedded (on GitHub)
++ */
+
+ #define crypt ssl_private_crypt
+ #define STRING OPENSSL_STRING
+@@ -241,8 +245,16 @@ static char *ssl_start_work (SSLSTREAM *
+ /* disable certificate validation? */
+ if (flags & NET_NOVALIDATECERT)
+ SSL_CTX_set_verify (stream->context,SSL_VERIFY_NONE,NIL);
+- else SSL_CTX_set_verify (stream->context,SSL_VERIFY_PEER,ssl_open_verify);
++ else {
++#if OPENSSL_VERSION_NUMBER >= 0x10100000
++ X509_VERIFY_PARAM *param = SSL_CTX_get0_param(stream->context);
++ X509_VERIFY_PARAM_set_hostflags(param, X509_CHECK_FLAG_NO_PARTIAL_WILDCARDS);
++ X509_VERIFY_PARAM_set1_host(param, host, 0);
++#endif
++
++ SSL_CTX_set_verify (stream->context,SSL_VERIFY_PEER,ssl_open_verify);
+ /* set default paths to CAs... */
++ }
+ SSL_CTX_set_default_verify_paths (stream->context);
+ /* ...unless a non-standard path desired */
+ if (s = (char *) mail_parameters (NIL,GET_SSLCAPATH,NIL))
+@@ -280,6 +292,7 @@ static char *ssl_start_work (SSLSTREAM *
+ if (SSL_write (stream->con,"",0) < 0)
+ return ssl_last_error ? ssl_last_error : "SSL negotiation failed";
+ /* need to validate host names? */
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ if (!(flags & NET_NOVALIDATECERT) &&
+ (err = ssl_validate_cert (cert = SSL_get_peer_certificate (stream->con),
+ host))) {
+@@ -289,6 +302,7 @@ static char *ssl_start_work (SSLSTREAM *
+ sprintf (tmp,"*%.128s: %.255s",err,cert ? cert->name : "???");
+ return ssl_last_error = cpystr (tmp);
+ }
++#endif
+ return NIL;
+ }
+
+@@ -327,6 +341,7 @@ static int ssl_open_verify (int ok,X509_
+ * Returns: NIL if validated, else string of error message
+ */
+
++#if OPENSSL_VERSION_NUMBER < 0x10100000
+ static char *ssl_validate_cert (X509 *cert,char *host)
+ {
+ int i,n;
+@@ -356,6 +371,7 @@ static char *ssl_validate_cert (X509 *ce
+ else ret = "Unable to locate common name in certificate";
+ return ret;
+ }
++#endif
+
+ /* Case-independent wildcard pattern match
+ * Accepts: base string