summaryrefslogtreecommitdiff
path: root/mail/panda-cclient
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2014-12-14 17:56:14 +0000
committerThierry Thomas <thierry@FreeBSD.org>2014-12-14 17:56:14 +0000
commit69d0a0a2587baa86415d5b3cdc6a59afa7ae2ca1 (patch)
tree04a33ff4ac942f99bcc586ad49b302bf830b43bf /mail/panda-cclient
parent- Install missing file latency.txt (diff)
Adding mail/panda-cclient and mail/panda-imap.
Since Mark Crispin left the UW, development on UW-IMAP paused. Mark however continued developing the toolkit under the name Panda-IMAP. Since Mark passed, Jonathan Abbey created a project on GitHub, by concatenating all of the public releases of UW IMAP with the last version of Panda IMAP. Add conflict lines with the original ports.
Notes
Notes: svn path=/head/; revision=374717
Diffstat (limited to 'mail/panda-cclient')
-rw-r--r--mail/panda-cclient/Makefile115
-rw-r--r--mail/panda-cclient/distinfo2
-rw-r--r--mail/panda-cclient/files/patch-Makefile78
-rw-r--r--mail/panda-cclient/files/patch-src_osdep_unix_Makefile152
-rw-r--r--mail/panda-cclient/files/patch-src_osdep_unix_os_bsi.h21
-rw-r--r--mail/panda-cclient/pkg-descr9
-rw-r--r--mail/panda-cclient/pkg-message-ssl5
-rw-r--r--mail/panda-cclient/pkg-plist36
8 files changed, 418 insertions, 0 deletions
diff --git a/mail/panda-cclient/Makefile b/mail/panda-cclient/Makefile
new file mode 100644
index 000000000000..f763b515c635
--- /dev/null
+++ b/mail/panda-cclient/Makefile
@@ -0,0 +1,115 @@
+# Created by: Kelly Yancey <kbyanc@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= cclient
+PORTVERSION= 20130621
+CATEGORIES= mail devel ipv6
+PKGNAMEPREFIX= panda-
+DISTNAME= panda-imap-${PORTVERSION}
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= Mark Crispin's C-client mail access routines forked from UW
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USE_GITHUB= yes
+GH_ACCOUNT= jonabbey
+GH_PROJECT= ${PORTNAME}
+GH_TAGNAME= ${GH_COMMIT}
+GH_COMMIT= 7905901
+
+CONFLICTS_INSTALL= cclient-20*
+
+OPTIONS_DEFINE= SSL SSL_AND_PLAINTEXT IPV6 MBX_DEFAULT
+OPTIONS_DEFAULT= SSL
+SSL_AND_PLAINTEXT_DESC= Allow plain text passwords and SSL
+MBX_DEFAULT_DESC= Use MBX as default mailbox format
+
+MAKE_JOBS_UNSAFE= yes
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MSSL}
+USE_OPENSSL= yes
+PKGMESSAGE= pkg-message-ssl
+.endif
+
+.include <bsd.port.pre.mk>
+
+USE_LDCONFIG= yes
+ALL_TARGET= bsf
+.if ! ${PORT_OPTIONS:MSSL}
+MAKE_ARGS+= SSLTYPE=none SSLDIR=${OPENSSLBASE}
+.else
+.if ${PORT_OPTIONS:MSSL_AND_PLAINTEXT}
+MAKE_ARGS+= SSLTYPE=unix SSLDIR=${OPENSSLDIR}
+.else
+MAKE_ARGS+= SSLTYPE=unix.nopwd SSLDIR=${OPENSSLDIR}
+.endif
+.endif
+
+WRKSRC= ${WRKDIR}/${GH_ACCOUNT}-${DISTNAME:C|${PORTVERSION}|${GH_COMMIT}|}
+MAKE_ARGS+= EXTRACFLAGS="${CFLAGS}"
+
+SHLIBBASE= c-client4
+SHLIBMAJ= 10
+SHLIBNAME= lib${SHLIBBASE}.so.${SHLIBMAJ}
+MAKE_ENV+= SHLIBNAME=${SHLIBNAME} SHLIBBASE=${SHLIBBASE}
+PLIST_SUB= SHLIBNAME=${SHLIBNAME} SHLIBBASE=${SHLIBBASE}
+
+pre-configure:
+.for file in Makefile src/osdep/unix/Makefile src/osdep/unix/Makefile.gss
+ ${REINPLACE_CMD} -e "s|/usr/local|${PREFIX}|g" ${WRKSRC}/${file}
+.endfor
+ ${REINPLACE_CMD} -e "s:/etc/ssl/certs:${PREFIX}/certs:g; \
+ s:/etc/ssl/private:${PREFIX}/certs:g" ${WRKSRC}/Makefile
+ ${REINPLACE_CMD} -e "s:/etc/c-client.cf:${PREFIX}/etc/c-client.cf:" \
+ ${WRKSRC}/src/osdep/unix/env_unix.h
+.if ${PORT_OPTIONS:MSSL}
+ ${REINPLACE_CMD} -e " \
+ s:SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib:SSLINCLUDE=${OPENSSLINC} SSLLIB=${OPENSSLLIB}: \
+ " ${WRKSRC}/Makefile
+.endif
+.if ${PORT_OPTIONS:MIPV6}
+ ${REINPLACE_CMD} -e "s|^IP=4|IP=6|" ${WRKSRC}/Makefile \
+ ${WRKSRC}/src/osdep/unix/Makefile
+.endif
+.if ${PORT_OPTIONS:MMBX_DEFAULT}
+ ${REINPLACE_CMD} -e "s|^CREATEPROTO=unixproto|CREATEPROTO=mbxproto|" \
+ ${WRKSRC}/src/osdep/unix/Makefile
+.endif
+
+post-configure:
+ @${ECHO_MSG} ">> The c-client shared library will be named ${SHLIBNAME}"
+
+HEADERS= c-client.h dummy.h env.h env_unix.h fdstring.h flockcyg.h \
+ flocksim.h flstring.h fs.h ftl.h imap4r1.h linkage.c linkage.h \
+ mail.h misc.h netmsg.h newsrc.h nl.h nntp.h osdep.h pseudo.h \
+ rfc822.h smtp.h sslio.h tcp.h tcp_unix.h unix.h utf8.h \
+ utf8aux.h
+PORTREV_H= ${WRKDIR}/portrevision.h
+
+post-build:
+ @${ECHO_CMD} "#define CCLIENT_PORTVERSION \"${PORTVERSION}\"" >${PORTREV_H}
+.if ${PORT_OPTIONS:MSSL}
+ @${ECHO_CMD} "#define CCLIENT_SSLENABLED \"yes\"" >>${PORTREV_H}
+.else
+ @${ECHO_CMD} "#define CCLIENT_SSLENABLED \"no\"" >>${PORTREV_H}
+.endif
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${PREFIX}/include/c-client
+.for f in ${HEADERS}
+ ${INSTALL_DATA} ${WRKSRC}/c-client/${f} ${STAGEDIR}${PREFIX}/include/c-client
+.endfor
+ ${INSTALL_LIB} ${WRKSRC}/c-client/${SHLIBNAME} ${STAGEDIR}${PREFIX}/lib
+ ${LN} -sf ${SHLIBNAME} ${STAGEDIR}${PREFIX}/lib/lib${SHLIBBASE}.so
+ ${INSTALL_DATA} ${WRKSRC}/c-client/c-client.a \
+ ${STAGEDIR}${PREFIX}/lib/lib${SHLIBBASE}.a
+ ${INSTALL_DATA} ${WRKSRC}/c-client/CFLAGS ${STAGEDIR}${PREFIX}/include/c-client
+ ${INSTALL_DATA} ${WRKSRC}/c-client/LDFLAGS ${STAGEDIR}${PREFIX}/include/c-client
+ ${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>
diff --git a/mail/panda-cclient/distinfo b/mail/panda-cclient/distinfo
new file mode 100644
index 000000000000..4c9501f1047c
--- /dev/null
+++ b/mail/panda-cclient/distinfo
@@ -0,0 +1,2 @@
+SHA256 (panda-imap-20130621.tar.gz) = 75696352efb56ac1c652e8df4f54ea6c3160fd6aa2cf078f793fac06733bc5b1
+SIZE (panda-imap-20130621.tar.gz) = 2065425
diff --git a/mail/panda-cclient/files/patch-Makefile b/mail/panda-cclient/files/patch-Makefile
new file mode 100644
index 000000000000..1e10918790a8
--- /dev/null
+++ b/mail/panda-cclient/files/patch-Makefile
@@ -0,0 +1,78 @@
+*** 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'
diff --git a/mail/panda-cclient/files/patch-src_osdep_unix_Makefile b/mail/panda-cclient/files/patch-src_osdep_unix_Makefile
new file mode 100644
index 000000000000..a86ec16f592d
--- /dev/null
+++ b/mail/panda-cclient/files/patch-src_osdep_unix_Makefile
@@ -0,0 +1,152 @@
+--- 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
+@@ -30,9 +30,9 @@
+
+ EXTRAAUTHENTICATORS=
+ EXTRADRIVERS=mbox
+-PASSWDTYPE=std
+-SSLTYPE=nopwd
+-IP=4
++PASSWDTYPE=pam
++SSLTYPE=unix.nopwd
++IP=6
+
+
+ # The optimization level here for GCC ports is set here for a reason. It's
+@@ -56,13 +56,13 @@
+
+ # 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
+@@ -89,7 +89,7 @@
+ # 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 @@
+ # Commands possibly overriden by the individual port
+
+ ARRC=ar rc
+-CC=cc
++#CC=cc
+ LN=ln -s
+ RANLIB=ranlib
+
+@@ -156,7 +156,7 @@
+ 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
+@@ -173,6 +173,10 @@
+ PASSWDTYPE=$(PASSWDTYPE) SSLTYPE=$(SSLTYPE) IP=$(IP)
+
+
++# Need this for the shared library rule to work correctly
++.SUFFIXES: .o .so
++SOFILES=${BINARIES:.o=.so}
++
+ # Here if no make argument established
+
+ missing: osdep.h
+@@ -261,13 +265,14 @@
+ BASECFLAGS="-g -Dconst="
+
+ bsf: # FreeBSD
+- $(BUILD) `$(CAT) SPECIALS` OS=$@ \
++ $(BUILD) `$(CAT) SPECIALS` OS=$@ CHECKPW=pam \
+ SIGTYPE=psx CRXTYPE=nfs \
+ SPOOLDIR=/var \
+ ACTIVEFILE=/usr/local/news/lib/active \
+ RSHPATH=/usr/bin/rsh \
++ LOCKPGM=$(PREFIX)/libexec/mlock \
+ BASECFLAGS="$(GCCCFLAGS)" \
+- BASELDFLAGS="-lcrypt"
++ BASELDFLAGS="-lpam"
+
+ bsi: # BSD/i386
+ $(BUILD) `$(CAT) SPECIALS` OS=$@ \
+@@ -863,23 +868,31 @@
+
+ # Build it!
+
+-build: clean once $(ARCHIVE)
++build: clean once $(ARCHIVE) $(SHLIBNAME)
+
+-all: $(ARCHIVE)
++all: $(ARCHIVE) $(SHLIBNAME)
+
+ $(ARCHIVE): $(BINARIES)
+ sh -c '$(RM) $(ARCHIVE) || true'
+ @$(CAT) ./ARCHIVE
+ @$(SH) ./ARCHIVE
+
++$(SHLIBNAME): $(SOFILES)
++ $(CC) -shared -Wl,-soname=$(SHLIBNAME) -o $(SHLIBNAME) $(SOFILES) `cat LDFLAGS`
++ $(LN) $(SHLIBNAME) lib$(SHLIBBASE).so
++
++.c.so: osdep.h
++ $(CC) -fPIC -DPIC -c `cat CFLAGS` ${@:.so=.c} -o $@
++
+ .c.o:
+- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` $*.c
++ $(CC) -c `cat CFLAGS` $*.c
+
+
+ # Cleanup
+
+ clean:
+ sh -c '$(RM) auths.c crexcl.c ip_unix.c linkage.[ch] siglocal.c osdep*.[ch] *.o ARCHIVE *FLAGS *TYPE $(ARCHIVE) || true'
++ sh -c '$(RM) *.so $(SHLIBNAME)'
+
+
+ # Dependencies
+@@ -914,7 +927,7 @@
+
+ # OS-dependent
+
+-osdep.o:mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
++OSDEPS= mail.h misc.h env.h fs.h ftl.h nl.h tcp.h \
+ 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 @@
+ write.c sslstdio.c \
+ strerror.c strpbrk.c strstr.c strtok.c strtoul.c \
+ OSCFLAGS
++
++osdep.o: $(OSDEPS)
++ $(CC) `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
++ @echo ========================================================================
+ @echo Building OS-dependent module
+ @echo If you get No such file error messages for files x509.h, ssl.h,
+ @echo pem.h, buffer.h, bio.h, and crypto.h, that means that OpenSSL
+ @echo is not installed on your system. Either install OpenSSL first
+ @echo or build with command: make `$(CAT) OSTYPE` SSLTYPE=none
+- `$(CAT) CCTYPE` -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` -c osdep.c
++ @echo ========================================================================
++
++osdep.so: $(OSDEPS)
++ $(CC) -fPIC -DPIC -c `$(CAT) CFLAGS` `$(CAT) OSCFLAGS` osdep.c -o $@
+
+ osdep.c: osdepbas.c osdepckp.c osdeplog.c osdepssl.c
+ $(CAT) osdepbas.c osdepckp.c osdeplog.c osdepssl.c > osdep.c
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/pkg-descr b/mail/panda-cclient/pkg-descr
new file mode 100644
index 000000000000..922dcd510fc0
--- /dev/null
+++ b/mail/panda-cclient/pkg-descr
@@ -0,0 +1,9 @@
+C-client is a common API for accessing mailboxes. It is used internally by
+the popular PINE mail reader as well as the University of Washington's IMAP
+server.
+
+This is the version forked from UW by the original author Mark Crispin.
+
+For more information, please see the UW IMAP homepage:
+
+WWW: http://www.washington.edu/imap/
diff --git a/mail/panda-cclient/pkg-message-ssl b/mail/panda-cclient/pkg-message-ssl
new file mode 100644
index 000000000000..e73be9237982
--- /dev/null
+++ b/mail/panda-cclient/pkg-message-ssl
@@ -0,0 +1,5 @@
+================================================================================
+Warning: You have chosen to include SSL support. Applications/ports that use
+the cclient library but do not support SSL may stop working or have problems
+linking. Linking them explicitly with ssl (-lssl -lcrypto) may or may not help.
+================================================================================
diff --git a/mail/panda-cclient/pkg-plist b/mail/panda-cclient/pkg-plist
new file mode 100644
index 000000000000..f948c0970bee
--- /dev/null
+++ b/mail/panda-cclient/pkg-plist
@@ -0,0 +1,36 @@
+include/c-client/c-client.h
+include/c-client/dummy.h
+include/c-client/env.h
+include/c-client/env_unix.h
+include/c-client/fdstring.h
+include/c-client/flockcyg.h
+include/c-client/flocksim.h
+include/c-client/flstring.h
+include/c-client/fs.h
+include/c-client/ftl.h
+include/c-client/imap4r1.h
+include/c-client/linkage.c
+include/c-client/linkage.h
+include/c-client/mail.h
+include/c-client/misc.h
+include/c-client/netmsg.h
+include/c-client/newsrc.h
+include/c-client/nl.h
+include/c-client/nntp.h
+include/c-client/osdep.h
+include/c-client/pseudo.h
+include/c-client/rfc822.h
+include/c-client/smtp.h
+include/c-client/sslio.h
+include/c-client/tcp.h
+include/c-client/tcp_unix.h
+include/c-client/unix.h
+include/c-client/utf8.h
+include/c-client/utf8aux.h
+include/c-client/portrevision.h
+include/c-client/CFLAGS
+include/c-client/LDFLAGS
+include/c-client/OSCFLAGS
+lib/%%SHLIBNAME%%
+lib/libc-client4.a
+lib/libc-client4.so