+++ /dev/null
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils flag-o-matic autotools multilib toolchain-funcs
-
-CHAPPA_PL=115
-DESCRIPTION="An easy to use text-based based mail and news client"
-HOMEPAGE="http://alpine.x10host.com/alpine/ https://repo.or.cz/alpine.git/"
-SRC_URI="ftp://ftp.cac.washington.edu/alpine/${P}.tar.bz2
- chappa? ( http://alpine.x10host.com/alpine/patches/${P}/all.patch.gz
- -> ${P}-chappa-${CHAPPA_PL}-all.patch.gz )"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="alpha amd64 ia64 ppc sparc x86"
-IUSE="doc ipv6 kerberos ldap libressl nls onlyalpine passfile smime spell ssl threads +chappa"
-
-DEPEND="sys-libs/pam
- >=net-libs/c-client-2007f-r4[chappa=]
- >=sys-libs/ncurses-5.1:0=
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- ldap? ( net-nds/openldap )
- kerberos? ( app-crypt/mit-krb5 )
- spell? ( app-text/aspell )
-"
-RDEPEND="${DEPEND}
- app-misc/mime-types
- !onlyalpine? ( !mail-client/pine )
- !<=net-mail/uw-imap-2004g
-"
-
-src_prepare() {
- default
- use chappa && epatch "${DISTDIR}/${P}-chappa-${CHAPPA_PL}-all.patch.gz"
-
- # do not use the bundled c-client
- ebegin "Unbundling the c-client library"
- rm -rf "${S}"/imap
- local f
- while read f ; do
- sed -i -e \
- 's~^#include[[:blank:]]".*/c-client/\(.*\)"~#include <imap/\1>~g' "$f"
- done < <(find "${S}" -name "*.c" -o -name "*.h")
- eend $?
-
- epatch "${FILESDIR}"/2.00-lpam.patch
- epatch "${FILESDIR}"/2.00-lcrypto.patch
- epatch "${FILESDIR}"/2.00-c-client.patch
- epatch "${FILESDIR}"/2.00-qa.patch
- use chappa && epatch "${FILESDIR}/2.00-qa-chappa-${CHAPPA_PL}.patch"
-
- eautoreconf
-}
-
-src_configure() {
- local myconf="--without-tcl
- --with-system-pinerc=/etc/pine.conf
- --with-system-fixed-pinerc=/etc/pine.conf.fixed"
- #--disable-debug"
- # fixme
- # --with-system-mail-directory=DIR?
-
- if use ssl; then
- myconf+=" --with-ssl
- --with-ssl-include-dir=/usr
- --with-ssl-lib-dir=/usr/$(get_libdir)
- --with-ssl-certs-dir=/etc/ssl/certs"
- else
- myconf+="--without-ssl"
- fi
- econf \
- $(use_with ldap) \
- $(use_with passfile passfile .pinepwd) \
- $(use_with kerberos krb5) \
- $(use_with threads pthread) \
- $(use_with spell interactive-spellcheck /usr/bin/aspell) \
- $(use_enable nls) \
- $(use_with ipv6) \
- $(use_with smime) \
- ${myconf}
-}
-
-src_compile() {
- emake AR=$(tc-getAR)
-}
-
-src_install() {
- if use onlyalpine ; then
- dobin alpine/alpine
- doman doc/alpine.1
- else
- emake DESTDIR="${D}" install
- doman doc/rpdump.1 doc/rpload.1
- fi
-
- dodoc NOTICE README*
-
- if use doc ; then
- dodoc doc/brochure.txt doc/tech-notes.txt
-
- docinto html/tech-notes
- dohtml -r doc/tech-notes/
- fi
-}
+++ /dev/null
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools toolchain-funcs vcs-snapshot
-
-DESCRIPTION="An easy to use text-based based mail and news client"
-HOMEPAGE="http://alpine.x10host.com/alpine/ https://repo.or.cz/alpine.git/"
-GIT_COMMIT="672d6838a9babf2faeb9f79267525a4ab9d20b14"
-SRC_URI="https://repo.or.cz/alpine.git/snapshot/${GIT_COMMIT}.tar.gz -> ${P}.tar.gz"
-
-LICENSE="Apache-2.0"
-SLOT="0"
-KEYWORDS="alpha amd64 ia64 ppc sparc x86"
-IUSE="doc ipv6 kerberos ldap libressl nls onlyalpine passfile smime spell ssl threads"
-
-DEPEND="sys-libs/pam
- >=sys-libs/ncurses-5.1:0=
- ssl? (
- !libressl? ( dev-libs/openssl:0= )
- libressl? ( dev-libs/libressl:0= )
- )
- ldap? ( net-nds/openldap )
- kerberos? ( app-crypt/mit-krb5 )
- spell? ( app-text/aspell )
-"
-RDEPEND="${DEPEND}
- app-misc/mime-types
- !onlyalpine? ( !mail-client/pine )
- !<=net-mail/uw-imap-2004g
-"
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- myconf=(
- --without-tcl
- --with-system-pinerc="${EPREFIX}"/etc/pine.conf
- --with-system-fixed-pinerc="${EPREFIX}"/etc/pine.conf.fixed
- )
-
- if use ssl; then
- myconf+=(
- --with-ssl-include-dir="${EPREFIX}"/usr/include/openssl
- --with-ssl-lib-dir="${EPREFIX}"/usr/$(get_libdir)
- --with-ssl-certs-dir="${EPREFIX}"/etc/ssl/certs
- )
- fi
- econf \
- $(use_with ldap) \
- $(use_with ssl) \
- $(use_with passfile passfile .pinepwd) \
- $(use_with kerberos krb5) \
- $(use_with threads pthread) \
- $(use_with spell interactive-spellcheck /usr/bin/aspell) \
- $(use_enable nls) \
- $(use_with ipv6) \
- $(use_with smime) \
- "${myconf[@]}"
-}
-
-src_compile() {
- emake AR=$(tc-getAR)
-}
-
-src_install() {
- if use onlyalpine ; then
- dobin alpine/alpine
- doman doc/man1/alpine.1
- else
- emake DESTDIR="${D}" install
- doman doc/man1/*.1
- fi
-
- dodoc NOTICE README*
-
- if use doc ; then
- dodoc doc/brochure.txt
-
- docinto html/tech-notes
- dodoc -r doc/tech-notes/*.html
- dodoc -r doc/tech-notes/*.txt
- fi
-}
+++ /dev/null
---- Makefile.am 2012-10-10 12:30:39.442107211 +0000
-+++ Makefile.am 2012-10-10 12:31:17.235528699 +0000
-@@ -16,7 +16,7 @@
-
- SUBDIRS = m4 po $(REGEX_BUILD) pith pico alpine $(WEB_PUBCOOKIE_BUILD) $(WEB_BUILD)
-
--BUILT_SOURCES = c-client.d c-client $(WEB_PUBCOOKIE_LINK)
-+BUILT_SOURCES = $(WEB_PUBCOOKIE_LINK)
-
- CLEANFILES = c-client
-
-@@ -38,3 +38,4 @@
- man_MANS = doc/alpine.1 doc/pico.1 doc/pilot.1 doc/rpdump.1 doc/rpload.1
-
- ACLOCAL_AMFLAGS = -I m4
-+AM_LDFLAGS = -lc-client
---- pico/Makefile.am 2012-10-10 13:01:06.851900583 +0000
-+++ pico/Makefile.am 2012-10-10 13:07:40.960017458 +0000
-@@ -24,8 +24,9 @@
-
- pilot_LDADD = $(LDADD) $(INTLLIBS)
-
--LDADD = ../c-client/utf8.o libpico.a osdep/libpicoosd.a \
-+LDADD = libpico.a osdep/libpicoosd.a \
- ../pith/osdep/libpithosd.a ../pith/charconv/libpithcc.a
-+AM_LDFLAGS = -lc-client
-
- noinst_LIBRARIES = libpico.a
-
-diff --git a/alpine/callbacks.c b/alpine/callbacks.c
-new file mode 100644
-index 0000000..e92beb5
---- /dev/null
-+++ alpine/callbacks.c
-@@ -0,0 +1,184 @@
-+/* ========================================================================
-+ * Copyright 1988-2007 University of Washington
-+ *
-+ * Licensed under the Apache License, Version 2.0 (the "License");
-+ * you may not use this file except in compliance with the License.
-+ * You may obtain a copy of the License at
-+ *
-+ * http://www.apache.org/licenses/LICENSE-2.0
-+ *
-+ *
-+ * ========================================================================
-+ */
-+
-+#include <stdio.h>
-+#include <signal.h>
-+#include <imap/c-client.h>
-+
-+/* Excellent reasons to hate ifdefs, and why my real code never uses them */
-+
-+#ifndef unix
-+# define unix 0
-+#endif
-+
-+#if unix
-+# define UNIXLIKE 1
-+# define MACOS 0
-+# include <pwd.h>
-+#else
-+# define UNIXLIKE 0
-+# ifdef noErr
-+# define MACOS 1
-+# include <Memory.h>
-+# else
-+# define MACOS 0
-+# endif
-+#endif
-+
-+char *curhst = NIL; /* currently connected host */
-+char *curusr = NIL; /* current login user */
-+
-+
-+/* Interfaces to C-client */
-+
-+
-+void mm_searched (MAILSTREAM *stream,unsigned long number)
-+{
-+}
-+
-+
-+void mm_exists (MAILSTREAM *stream,unsigned long number)
-+{
-+}
-+
-+
-+void mm_expunged (MAILSTREAM *stream,unsigned long number)
-+{
-+}
-+
-+
-+void mm_flags (MAILSTREAM *stream,unsigned long number)
-+{
-+}
-+
-+
-+void mm_notify (MAILSTREAM *stream,char *string,long errflg)
-+{
-+ mm_log (string,errflg);
-+}
-+
-+
-+void mm_list (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
-+{
-+ putchar (' ');
-+ if (delimiter) putchar (delimiter);
-+ else fputs ("NIL",stdout);
-+ putchar (' ');
-+ fputs (mailbox,stdout);
-+ if (attributes & LATT_NOINFERIORS) fputs (", no inferiors",stdout);
-+ if (attributes & LATT_NOSELECT) fputs (", no select",stdout);
-+ if (attributes & LATT_MARKED) fputs (", marked",stdout);
-+ if (attributes & LATT_UNMARKED) fputs (", unmarked",stdout);
-+ putchar ('\n');
-+}
-+
-+
-+void mm_lsub (MAILSTREAM *stream,int delimiter,char *mailbox,long attributes)
-+{
-+ putchar (' ');
-+ if (delimiter) putchar (delimiter);
-+ else fputs ("NIL",stdout);
-+ putchar (' ');
-+ fputs (mailbox,stdout);
-+ if (attributes & LATT_NOINFERIORS) fputs (", no inferiors",stdout);
-+ if (attributes & LATT_NOSELECT) fputs (", no select",stdout);
-+ if (attributes & LATT_MARKED) fputs (", marked",stdout);
-+ if (attributes & LATT_UNMARKED) fputs (", unmarked",stdout);
-+ putchar ('\n');
-+}
-+
-+
-+void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status)
-+{
-+ printf (" Mailbox %s",mailbox);
-+ if (status->flags & SA_MESSAGES) printf (", %lu messages",status->messages);
-+ if (status->flags & SA_RECENT) printf (", %lu recent",status->recent);
-+ if (status->flags & SA_UNSEEN) printf (", %lu unseen",status->unseen);
-+ if (status->flags & SA_UIDVALIDITY) printf (", %lu UID validity",
-+ status->uidvalidity);
-+ if (status->flags & SA_UIDNEXT) printf (", %lu next UID",status->uidnext);
-+ printf ("\n");
-+}
-+
-+
-+void mm_log (char *string,long errflg)
-+{
-+ switch ((short) errflg) {
-+ case NIL:
-+ printf ("[%s]\n",string);
-+ break;
-+ case PARSE:
-+ case WARN:
-+ printf ("%%%s\n",string);
-+ break;
-+ case ERROR:
-+ printf ("?%s\n",string);
-+ break;
-+ }
-+}
-+
-+
-+void mm_dlog (char *string)
-+{
-+ puts (string);
-+}
-+
-+
-+void mm_login (NETMBX *mb,char *user,char *pwd,long trial)
-+{
-+ char *s,tmp[MAILTMPLEN];
-+ if (curhst) fs_give ((void **) &curhst);
-+ curhst = (char *) fs_get (1+strlen (mb->host));
-+ strcpy (curhst,mb->host);
-+ sprintf (s = tmp,"{%s/%s",mb->host,mb->service);
-+ if (*mb->user) sprintf (tmp+strlen (tmp),"/user=%s",strcpy (user,mb->user));
-+ if (*mb->authuser) sprintf (tmp+strlen (tmp),"/authuser=%s",mb->authuser);
-+ if (*mb->user) strcat (s = tmp,"} password:");
-+ else {
-+ printf ("%s} username: ",tmp);
-+ fgets (user,NETMAXUSER-1,stdin);
-+ user[NETMAXUSER-1] = '\0';
-+ if (s = strchr (user,'\n')) *s = '\0';
-+ s = "password: ";
-+ }
-+ if (curusr) fs_give ((void **) &curusr);
-+ curusr = cpystr (user);
-+ strcpy (pwd,getpass (s));
-+}
-+
-+
-+void mm_critical (MAILSTREAM *stream)
-+{
-+}
-+
-+
-+void mm_nocritical (MAILSTREAM *stream)
-+{
-+}
-+
-+
-+long mm_diskerror (MAILSTREAM *stream,long errcode,long serious)
-+{
-+#if UNIXLIKE
-+ kill (getpid (),SIGSTOP);
-+#else
-+ abort ();
-+#endif
-+ return NIL;
-+}
-+
-+
-+void mm_fatal (char *string)
-+{
-+ printf ("?%s\n",string);
-+}
-diff --git a/pico/Makefile.am b/pico/Makefile.am
-index f5f694b..e782324 100644
---- pico/Makefile.am
-+++ pico/Makefile.am
-@@ -16,9 +16,9 @@ SUBDIRS = osdep
-
- bin_PROGRAMS = pico pilot
-
--pico_SOURCES = main.c utf8stub.c
-+pico_SOURCES = main.c utf8stub.c ../alpine/callbacks.c
-
--pilot_SOURCES = pilot.c utf8stub.c
-+pilot_SOURCES = pilot.c utf8stub.c ../alpine/callbacks.c
-
- pico_LDADD = $(LDADD) $(INTLLIBS)
-
---- alpine/Makefile.am 2012-10-11 07:53:35.749024355 +0000
-+++ alpine/Makefile.am 2012-10-11 07:54:15.931528157 +0000
-@@ -35,11 +35,11 @@
- LDADD = ../pico/libpico.a ../pico/osdep/libpicoosd.a \
- ../pith/libpith.a ../pith/osdep/libpithosd.a \
- ../pith/charconv/libpithcc.a \
-- osdep/libpineosd.a ../c-client/c-client.a
-+ osdep/libpineosd.a
-
- AM_CPPFLAGS = -I$(top_builddir)/include -I$(top_srcdir)/include -DLOCALEDIR=\"$(localedir)\"
-
--AM_LDFLAGS = `cat $(top_srcdir)/c-client/LDFLAGS`
-+AM_LDFLAGS = -lc-client
-
- CLEANFILES = date.c
-
+++ /dev/null
---- pith/send.c 2012-10-11 11:21:43.027665295 +0000
-+++ pith/send.c 2012-10-11 11:42:37.659237275 +0000
-@@ -48,6 +48,7 @@
- #include <imap/smtp.h>
- #include <imap/nntp.h>
-
-+int maildir_file_path(char *name, char *tmp);
-
- /* this is used in pine_send and pine_simple_send */
- /* name::type::canedit::writehdr::localcopy::rcptto */
---- pith/pattern.c 2012-10-11 11:21:48.069603095 +0000
-+++ pith/pattern.c 2012-10-11 11:44:19.868974380 +0000
-@@ -91,6 +91,7 @@
- ACTION_S *combine_inherited_role_guts(ACTION_S *);
- int move_filtered_msgs(MAILSTREAM *, MSGNO_S *, char *, int, char *);
- void set_some_flags(MAILSTREAM *, MSGNO_S *, long, char **, char **, int, char *);
-+int maildir_file_path(char *name, char *tmp);
-
-
- /*
---- pith/folder.c 2012-10-15 08:19:22.933383126 +0000
-+++ pith/folder.c 2012-10-15 08:19:06.314585696 +0000
-@@ -28,6 +28,7 @@
- #include "../pith/status.h"
- #include "../pith/busy.h"
- #include "../pith/mailindx.h"
-+#include <imap/utf8aux.h>
-
-
- typedef struct _build_folder_list_data {
---- pith/state.c 2012-10-15 08:31:20.378623246 +0000
-+++ pith/state.c 2012-10-15 08:38:07.089630169 +0000
-@@ -38,6 +38,7 @@
- * Globals referenced throughout pine...
- */
- struct pine *ps_global; /* THE global variable! */
-+extern void free_allowed_qstr(void);
-
- #ifdef DEBUG
- /*