Import heirloom-mailx-12.4 as mail/heirloom-mailx.

Based on PR 38262, some portability improvement and ipv6 support optionify.

mailx (Heirloom Mailx; formerly nail) is a mail user agent derived from
Berkeley Mail 8.1. It is intended to provide the functionality of the
POSIX.2 mailx command with built-in support for MIME messages. This means
it can handle international character sets as well as attachments. In
recent system environments, nail is Unicode/UTF-8 capable. It further
contains some minor enhancements like the ability to set a "From:" Address.
This commit is contained in:
obache 2008-10-30 13:01:00 +00:00
parent 9ecc0a69e2
commit 703a87c2ab
10 changed files with 179 additions and 0 deletions

View file

@ -0,0 +1,6 @@
mailx (Heirloom Mailx; formerly nail) is a mail user agent derived from
Berkeley Mail 8.1. It is intended to provide the functionality of the
POSIX.2 mailx command with built-in support for MIME messages. This means
it can handle international character sets as well as attachments. In
recent system environments, nail is Unicode/UTF-8 capable. It further
contains some minor enhancements like the ability to set a "From:" Address.

View file

@ -0,0 +1,12 @@
===========================================================================
$NetBSD: MESSAGE,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
To avoid conflicts with native mailx installations create symbolic links:
ex.
% ln -s ${PREFIX}/bin/mailx ${PREFIX}/bin/Mailx
% ln -s ${PREFIX}/man/man1/mailx.1 ${PREFIX}/man/man1/Mailx.1
Example configurations: ${PREFIX}/share/examples/mailx/nail.rc
Alternate docs: ${PREFIX}/share/doc/html/mailx/mailx.1.html
===========================================================================

View file

@ -0,0 +1,56 @@
# $NetBSD: Makefile,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
#
DISTNAME= mailx-12.4
PKGNAME= heirloom-${DISTNAME}
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=heirloom/}
EXTRACT_SUFX= .tar.bz2
MAINTAINER= jgw@freeshell.org
HOMEPAGE= http://heirloom.sourceforge.net/mailx.html
COMMENT= BSD mail utility with MIME extensions
PKG_DESTDIR_SUPPORT= user-destdir
USE_LANGUAGES= c
MAKE_FLAGS+= PREFIX=${PREFIX}
MAKE_FLAGS+= MANDIR=${PREFIX}/${PKGMANDIR}
MAKE_FLAGS+= UCBINSTALL=${INSTALL:Q}
BUILD_MAKE_FLAGS+= SYSCONFDIR=${PKG_SYSCONFDIR}
INSTALL_MAKE_FLAGS+= SYSCONFDIR=${EGDIR}
CPPFLAGS+= -DMIMEPATH=\"${PKG_SYSCONFDIR}/mime.types\"
.if exists(/usr/include/paths.h)
CPPFLAGS+= -DHAVE_PATHS_H
.endif
.include "../../mk/bsd.prefs.mk"
.if (${OPSYS} == "SunOS" || ${OPSYS} == "IRIX")
MAKE_FLAGS+= SENDMAIL=/usr/lib/sendmail
.else
MAKE_FLAGS+= SENDMAIL=/usr/sbin/sendmail
.endif
.include "options.mk"
SUBST_CLASSES+= sysconf
SUBST_STAGE.sysconf= pre-build
SUBST_FILES.sysconf= mime.c
SUBST_SED.sysconf= -e 's;/etc/mime.types;${PKG_SYSCONFDIR}/mime.types;g'
EGDIR= ${PREFIX}/share/examples/mailx
DOCDIR= ${PREFIX}/share/doc/mailx
CONF_FILES= ${EGDIR}/nail.rc ${PKG_SYSCONFDIR}/nail.rc
post-install:
${INSTALL_DATA_DIR} ${DESTDIR}${DOCDIR}
${INSTALL_DATA} ${WRKSRC}/mailx.1.html ${DESTDIR}${DOCDIR}
.include "../../converters/libiconv/buildlink3.mk"
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,7 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
bin/mailx
man/man1/mailx.1
share/doc/mailx/mailx.1.html
share/examples/mailx/nail.rc
@dirrm share/examples/mailx
@dirrm share/doc/mailx

View file

@ -0,0 +1,9 @@
$NetBSD: distinfo,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
SHA1 (mailx-12.4.tar.bz2) = b1e105adf9d36269daf317dedf68b6e4cca404a7
RMD160 (mailx-12.4.tar.bz2) = 8244d04d0a0058fdbe9867ca503c7cda8d580154
Size (mailx-12.4.tar.bz2) = 271482 bytes
SHA1 (patch-ac) = cb9d4b12f26bb5f90947e1dbcb06960de8144f11
SHA1 (patch-ae) = 257317452b39d0b609885c637242145cf4e04c4d
SHA1 (patch-af) = 22676bcb00593de777cf897c450e14130f3f0616
SHA1 (patch-ag) = 20e3429d4f1164c5235a23c8ab772ff2b7fa7951

View file

@ -0,0 +1,16 @@
# $NetBSD: options.mk,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.heirloom-mailx
PKG_SUPPORTED_OPTIONS= inet6
.include "../../mk/bsd.prefs.mk"
.if !empty(IPV6_READY:M[Yy][Ee][Ss])
PKG_SUGGESTED_OPTIONS+= inet6
.endif
.include "../../mk/bsd.options.mk"
.if !empty(PKG_OPTIONS:Minet6)
MAKE_ENV+= IPv6=-DHAVE_IPv6_FUNCS
.endif

View file

@ -0,0 +1,13 @@
$NetBSD: patch-ac,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
--- nail.rc.orig 2006-03-04 00:01:19.000000000 +0000
+++ nail.rc
@@ -59,5 +59,8 @@ set autocollapse
ignore received in-reply-to message-id references
ignore mime-version content-transfer-encoding
+# Be xBSD compliant
+set bsdcompat
+
# Only include selected header fields when forwarding messages.
fwdretain subject date from to

View file

@ -0,0 +1,20 @@
$NetBSD: patch-ae,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
--- dotlock.c.orig 2006-03-20 15:49:46.000000000 +0000
+++ dotlock.c
@@ -52,6 +52,15 @@ static char sccsid[] = "@(#)dotlock.c 2.
#define O_SYNC 0
#endif
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
+#ifdef _PATH_MAILDIR
+#undef MAILSPOOL
+#define MAILSPOOL _PATH_MAILDIR
+#endif
+
static int maildir_access(const char *fname);
static int perhaps_setgid(const char *name, gid_t gid);
static int create_exclusive(const char *fname);

View file

@ -0,0 +1,20 @@
$NetBSD: patch-af,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
--- sendout.c.orig 2008-07-04 06:09:57.000000000 +0000
+++ sendout.c
@@ -51,6 +51,15 @@ static char sccsid[] = "@(#)sendout.c 2.
#include <time.h>
#include "md5.h"
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
+#ifdef _PATH_SENDMAIL
+#undef SENDMAIL
+#define SENDMAIL _PATH_SENDMAIL
+#endif
+
/*
* Mail -- a mail program
*

View file

@ -0,0 +1,20 @@
$NetBSD: patch-ag,v 1.1.1.1 2008/10/30 13:01:00 obache Exp $
--- v7.local.c.orig 2006-03-04 00:01:19.000000000 +0000
+++ v7.local.c
@@ -56,6 +56,15 @@ static char sccsid[] = "@(#)v7.local.c 2
#include <fcntl.h>
#include <unistd.h>
+#ifdef HAVE_PATHS_H
+#include <paths.h>
+#endif
+
+#ifdef _PATH_MAILDIR
+#undef MAILSPOOL
+#define MAILSPOOL _PATH_MAILDIR
+#endif
+
/*
* Locate the user's mailbox file (ie, the place where new, unread
* mail is queued).