Import s-nail-14.2.

S-nail is a fork of Heirloom mailx, formerly known as nail.  It is a mail user
agent derived from Berkeley Mail 8.1 and is intended to provide the
functionality of the POSIX.2 mailx command with additional support for MIME
messages, Maildir, POP3, IMAP, SMTP, threading, spam control, and other
features.

ok sthen@
This commit is contained in:
william 2013-03-29 03:54:33 +00:00
parent 8e2f10daea
commit 2a128cb094
6 changed files with 116 additions and 0 deletions

33
mail/s-nail/Makefile Normal file
View File

@ -0,0 +1,33 @@
# $OpenBSD: Makefile,v 1.1.1.1 2013/03/29 03:54:33 william Exp $
COMMENT= enhanced, MIME capable Berkeley Mail
DISTNAME= s-nail-14.2
DISTFILES= ${DISTNAME:S/./_/}.tar.gz
CATEGORIES= mail
HOMEPAGE= http://sdaoden.users.sourceforge.net/code.html#s-nail
# BSD
PERMIT_PACKAGE_CDROM= Yes
WANTLIB= c crypto gssapi idn krb5 ssl
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=s-nail/}
MAINTAINER= William Yodlowsky <william@openbsd.org>
MODULES= devel/gettext
MAKE_FLAGS= CFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
LDFLAGS="${LDFLAGS} -L${LOCALBASE}/lib" \
SYSCONFDIR=${SYSCONFDIR} \
CONFIG=CUSTOM
LIB_DEPENDS= devel/libidn
NO_TEST= Yes
post-install:
ln -sf ${TRUEPREFIX}/bin/s-nail ${PREFIX}/bin/nail
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/s-nail
mv ${DESTDIR}${SYSCONFDIR}/s-nail.rc ${PREFIX}/share/examples/s-nail
.include <bsd.port.mk>

2
mail/s-nail/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (s-nail-14_2.tar.gz) = T02Y5tChotCqrsFCI9BJmuPbNPtGxVa7J70qNUc0pzU=
SIZE (s-nail-14_2.tar.gz) = 349557

View File

@ -0,0 +1,53 @@
$OpenBSD: patch-cmd1_c,v 1.1.1.1 2013/03/29 03:54:34 william Exp $
fix bsdcompat message index, from upstream:
cmd1.c:hprf(): fix subject length calculation..
--- cmd1.c.orig Fri Mar 15 07:20:17 2013
+++ cmd1.c Wed Mar 27 14:26:05 2013
@@ -582,9 +582,8 @@ jputc:
fromlen = ABS(n);
if (isto) /* XXX tr()! */
fromlen -= 3;
- fprintf(f, "%s%s", isto ? "To " : "",
+ subjlen -= fprintf(f, "%s%s", isto ? "To " : "",
colalign(name, fromlen, n));
- subjlen -= ABS(n);
break;
case 'd':
if (datefmt != NULL) {
@@ -613,6 +612,7 @@ jputc:
subjlen -= fprintf(f, "%*ld", n,
mp->m_xlines);
else {
+ n = ABS(n);
subjlen -= n;
while (n--)
putc(' ', f);
@@ -633,11 +633,12 @@ jputc:
B = 1;
/*FALLTHRU*/
case 's':
- n = (n != 0) ? n : subjlen - 2;
+ if (n == 0)
+ n = subjlen - 2;
if (n > 0 && s < 0)
n = -n;
if (B)
- n -= 2;
+ n -= (n < 0) ? -2 : 2;
if (subjline != NULL && n != 0) {
/* pretty pathetic */
fprintf(f, B ? "\"%s\"" : "%s",
@@ -667,9 +668,8 @@ jputc:
for (i=msgCount; i>999; i/=10)
n++;
}
- fprintf(f, "%*ld", n, threaded ?
+ subjlen -= fprintf(f, "%*ld", n, threaded ?
mp->m_threadpos : mesg);
- subjlen -= n;
break;
case 'c':
#ifdef USE_SCORE

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-nail_rc,v 1.1.1.1 2013/03/29 03:54:34 william Exp $
--- nail.rc.orig Fri Mar 3 19:01:19 2006
+++ nail.rc Mon Apr 24 10:44:06 2006
@@ -17,6 +17,9 @@ set append
# Ask for a message subject.
set ask
+# Use the traditional BSD Mail interface style.
+set bsdcompat
+
# Assume a CRT-like terminal and invoke a pager.
set crt

5
mail/s-nail/pkg/DESCR Normal file
View File

@ -0,0 +1,5 @@
S-nail is a fork of Heirloom mailx, formerly known as nail. It is a mail user
agent derived from Berkeley Mail 8.1 and is intended to provide the
functionality of the POSIX.2 mailx command with additional support for MIME
messages, Maildir, POP3, IMAP, SMTP, threading, spam control, and other
features.

9
mail/s-nail/pkg/PLIST Normal file
View File

@ -0,0 +1,9 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2013/03/29 03:54:34 william Exp $
@conflict nail-*
@pkgpath mail/nail
bin/nail
@bin bin/s-nail
@man man/man1/s-nail.1
share/examples/s-nail/
share/examples/s-nail/s-nail.rc
@sample ${SYSCONFDIR}/s-nail.rc