aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authoradamw <adamw@FreeBSD.org>2016-03-19 00:21:28 +0800
committeradamw <adamw@FreeBSD.org>2016-03-19 00:21:28 +0800
commit461349572f2d6e7e7ae900ac52a7962260f68e52 (patch)
treefba1dd33785d47aabb7a4ed541c2507fe78bb298 /mail
parent3407369a0a4a9067fab8694c07d247b3d0cd0716 (diff)
downloadfreebsd-ports-gnome-461349572f2d6e7e7ae900ac52a7962260f68e52.tar.gz
freebsd-ports-gnome-461349572f2d6e7e7ae900ac52a7962260f68e52.tar.zst
freebsd-ports-gnome-461349572f2d6e7e7ae900ac52a7962260f68e52.zip
Remove metamail dependency, and add a mailcap.5 manpage.
The intention of r411160 was to provide a mailcap manpage, as referenced in multiple places by the mutt(1) and muttrc(5) manpages. Although mail/metamail provides a mailcap.4 manpage, metamail is not particularly relevant as a mailcap provider. The main external filter that mutt needs is something to render text/html mime parts, but the last metamail release was in 1994, 22 years ago. This commit removes that metamail dependency, and adds a mailcap.5 manpage written by Udo Schweigert (mail/mutt's maintainer), based off metamail's mailcap.4 manpage. PR: 207727 Submitted by: Udo Schweigert (maintainer)
Diffstat (limited to 'mail')
-rw-r--r--mail/mutt/Makefile6
-rw-r--r--mail/mutt/files/mailcap.5143
-rw-r--r--mail/mutt/pkg-plist1
3 files changed, 148 insertions, 2 deletions
diff --git a/mail/mutt/Makefile b/mail/mutt/Makefile
index f28a37053270..5c7ca71a7dee 100644
--- a/mail/mutt/Makefile
+++ b/mail/mutt/Makefile
@@ -3,7 +3,7 @@
PORTNAME= mutt
PORTVERSION= 1.5.24
-PORTREVISION?= 5
+PORTREVISION?= 6
CATEGORIES+= mail ipv6
MASTER_SITES= ftp://ftp.mutt.org/mutt/ \
ftp://ftp.fu-berlin.de/pub/unix/mail/mutt/ \
@@ -111,7 +111,6 @@ OPTIONS_DEFAULT= COMPRESSED_FOLDERS HTML ICONV IDN IFDEF_PATCH \
RUN_DEPENDS+= ${LOCALBASE}/etc/mime.types:${PORTSDIR}/misc/mime-support
.if !defined (LITE)
-RUN_DEPENDS+= ${LOCALBASE}/etc/mailcap.sample:${PORTSDIR}/mail/metamail
ASPELL_BUILD_DEPENDS= aspell:${PORTSDIR}/textproc/aspell
ASPELL_RUN_DEPENDS= aspell:${PORTSDIR}/textproc/aspell
ISPELL_BUILD_DEPENDS= ispell:${PORTSDIR}/textproc/aspell-ispell
@@ -279,6 +278,9 @@ post-patch-NNTP-off:
@${PATCH} ${PATCH_ARGS} -p1 < ${PATCHDIR}/extra-patch-maildir-mtime
.endif
+post-install:
+ ${INSTALL_MAN} ${FILESDIR}/mailcap.5 ${STAGEDIR}${MANPREFIX}/man/man5
+
post-install-NNTP-on:
${INSTALL_DATA} ${WRKSRC}/ChangeLog.nntp ${STAGEDIR}${DOCSDIR}
diff --git a/mail/mutt/files/mailcap.5 b/mail/mutt/files/mailcap.5
new file mode 100644
index 000000000000..bb20c9fde377
--- /dev/null
+++ b/mail/mutt/files/mailcap.5
@@ -0,0 +1,143 @@
+.\"/* Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
+.\" *
+.\" * Permission to use, copy, modify, and distribute this material
+.\" * for any purpose and without fee is hereby granted, provided
+.\" * that the above copyright notice and this permission notice
+.\" * appear in all copies, and that the name of Bellcore not be
+.\" * used in advertising or publicity pertaining to this
+.\" * material without the specific, prior written permission
+.\" * of an authorized representative of Bellcore. BELLCORE
+.\" * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
+.\" * OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS",
+.\" * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+.\" *
+.\" * Copyright (c) 2016 Udo Schweigert
+.\" */
+.Dd March 16, 2016
+.Dt MAILCAP 5
+.Sh NAME
+.Nm mailcap
+.Nd mail capabilities file
+.Sh DESCRIPTION
+The
+.Nm
+file is read by the
+.Xr mutt 1
+program to determine how to display non-text content.
+.Pp
+The syntax of a
+.Nm
+file is quite simple. Any line that starts with "#" is a comment. Blank lines are ignored. Otherwise, each line defines a single mailcap entry for a single content type. Long lines may be continued by ending them with a backslash character, \\.
+.Pp
+Each individual mailcap entry consists of a content-type specification, a command to execute, and (possibly) a set of optional "flag" values. For example, a very simple mailcap entry would look like this:
+.Bd -literal
+ text/plain; cat %s
+.Ed
+.Pp
+The optional flags can be used to specify additional information about the mail-handling command. For example:
+.Bd -literal
+ text/plain; cat %s; copiousoutput
+.Ed
+.Pp
+can be used to indicate that the output of the
+.Xr cat 1
+command may be voluminous, requiring either a scrolling window, a pager, or some other appropriate coping mechanism.
+.Pp
+The
+.Em type
+field ("text/plain", in the above example) is simply any legal content type name, as defined by RFC 822.
+In practice, this is almost any string.
+It is the string that will be matched against the
+.Em Content-type
+header to decide if this is the mailcap entry that matches the current message.
+Additionally, the type field may specify a subtype (e.g. "text/ISO-8859-1") or a wildcard to match all subtypes (e.g. "image/*").
+.Pp
+The
+.Em command
+field is any UNIX command ("cat %s" in the above example), and is used to specify the interpreter for the given type of message.
+Semicolons and backslashes within the command must be quoted with backslashes.
+If the command contains "%s", those two characters will be replaced by the name of a file that contains the body of the message.
+If it contains "%t', those two characters will be replaced by the content-type field, including the subtype, if any.
+(That is, if the content-type was "image/pbm; opt1=something-else", then "%t" would be replaced by "image/pbm".)
+If the command field contains "%{" followed by a parameter name and a closing "}", then all those characters will be replaced by the value of the named parameter, if any, from the Content-type header.
+Thus, in the previous example, "%{opt1}" will be replaced by "something-else".
+Finally, if the command contains "\%", those two characters will be replaced by a single % character.
+(In fact, the backslash can be used to quote any character, including itself.)
+.Pp
+If no "%s" appears in the command field, then instead of placing the message body in a temporary file, mutt will pass the body to the command on the standard input.
+.Pp
+The
+.Em test=xxx
+field is a command that is executed to determine whether or not the mailcap line actually applies.
+That is, if the content-type field matches the content-type on the message, but a
+.Em test=
+field is present, then the test must succeed before the mailcap line is considered to "match" the message being viewed.
+The command may be any UNIX command, using the same syntax and the same %-escapes as for the viewing command, as described above.
+A command is considered to succeed if it exits with a zero exit status, and to fail otherwise.
+.Pp
+The
+.Em print=xxx
+field is a command that is executed to print the data instead of display it interactively.
+.Pp
+The
+.Em compose
+field may be used to specify a program that can be used to compose a new body or body part in the given format.
+Its intended use is to support mail composing agents that support the composition of multiple types of mail using external composing agents.
+As with the view-command, the compose command will be executed after replacing certain escape sequences starting with "%".
+In particular, %s should be replaced by the name of a file to which the composed data is to be written by the specified composing program, thus allowing the calling program (mutt) to tell the called program where to store the composed data.
+If %s does not appear, then the composed data will be assumed to be written by the composing programs to standard output.
+The result of the composing program may be data that is NOT yet suitable for mail transport -- that is, a Content-Transfer-Encoding may still need to be applied to the data.
+.Pp
+The
+.Em composetyped
+field is similar to the
+.Em compose
+field, but is to be used when the composing program needs to specify the Content-type header field to be applied to the composed data.
+The
+.Em compose
+field is simpler, and is preferred for use with existing (non-mail-oriented) programs for composing data in a given format.
+The
+.Em composetyped
+field is necessary when the Content-type information must include auxilliary parameters, and the composition program must then know enough about mail formats to produce output that includes the mail type information, and to apply any necessary Content-Transfer-Encoding.
+Conceptually,
+.Em compose
+specifies a program that simply outputs the specified type of data in its raw form, while
+.Em composetyped
+specifies a program that outputs the data as a MIME object, with all necessary Content-* headers already in place.
+.Pp
+The
+.Em edit
+field may be used to specify a program that can be used to edit a body or body part in the given format.
+In many cases, it may be identical in content to the
+.Em compose
+field, and shares the operating-system dependent semantics for program execution.
+.Pp
+The
+.Em nametemplate
+field gives a file name format, in which %s will be replaced by a short unique string to give the name of the temporary file to be passed to the viewing command.
+This is only expected to be relevant in environments where filename extensions are meaningful, e.g., one coulld specify that a GIF file being passed to a gif viewer should have a name eding in ".gif" by using "nametemplate=%s.gif".
+.Pp
+.Em needsterminal
+If this flag is given, the named interpreter needs to interact with the user on a terminal.
+In some environments this will require the creation of a new terminal emulation window, while in most environments it will not.
+.Pp
+.Em copiousoutput
+This flag should be given whenever the interpreter is capable of producing more than a few lines of output on stdout, and does no interaction with the user.
+If the mailcap entry specifies copiousoutput then the output of the command being executed will be piped through the pagination program as specified in the .muttrc file by the
+.Ev pager
+variable.
+.Pp
+.Sh SEE ALSO
+.Xr mutt 1 ,
+.Xr muttrc 5
+.Sh AUTHORS
+This
+.Xr mailcap 5
+manpage is based on the manpage provided by
+.Xr metamail 1
+and the corresponding RFC 1524. Both were written by
+Nathaniel S. Borenstein
+at Bell Communications Research, Inc. (Bellcore).
+.Pp
+mutt specific changes have been applied by
+Udo Schweigert.
diff --git a/mail/mutt/pkg-plist b/mail/mutt/pkg-plist
index 9b9da6a7ce60..1b636ab3b1ba 100644
--- a/mail/mutt/pkg-plist
+++ b/mail/mutt/pkg-plist
@@ -13,6 +13,7 @@ man/man1/muttbug.1.gz
man/man1/pgpewrap.1.gz
man/man1/pgpring.1.gz
man/man1/smime_keys.1.gz
+man/man5/mailcap.5.gz
%%MAILBOX_MANPAGES%%man/man5/mbox.5.gz
%%MAILBOX_MANPAGES%%man/man5/mmdf.5.gz
man/man5/muttrc.5.gz