[packages/mutt] Up to 2.0.6.
glen
glen at pld-linux.org
Fri Apr 9 10:43:06 CEST 2021
commit 8d0135202c87e55e6f3b74eff2e52e6a00dfa2e2
Author: Paweł Zuzelski <pawelz at execve.pl>
Date: Wed Apr 7 18:33:32 2021 +0000
Up to 2.0.6.
- drop the xface patch. The code changed a lot and the patch seems unmaintained. At least the website of its author doesn't exist anymore.
mutt-Muttrc_mbox_path.patch | 24 +-
mutt-bj.status-time.patch | 17 +-
mutt-cd.signatures_menu.patch | 2 +-
mutt-crypt-autoselectkey.patch | 2 +-
mutt-db.patch | 19 +-
mutt-folder_columns.patch | 2 +-
mutt-keep_to.patch | 20 +-
mutt-vvv.nntp.patch | 22 +-
mutt-vvv.quote.patch | 13 +-
mutt-xface.patch | 538 -----------------------------------------
mutt.spec | 28 ++-
11 files changed, 72 insertions(+), 615 deletions(-)
---
diff --git a/mutt.spec b/mutt.spec
index 2fc8114..367e394 100644
--- a/mutt.spec
+++ b/mutt.spec
@@ -30,13 +30,13 @@ Summary(ru.UTF-8): Почтовая клиентская программа Mutt
Summary(tr.UTF-8): Mutt elektronik posta programı
Summary(uk.UTF-8): Поштова клієнтська програма Mutt
Name: mutt
-Version: 1.12.2
+Version: 2.0.6
Release: 1
Epoch: 6
License: GPL v2+
Group: Applications/Mail
Source0: ftp://ftp.mutt.org/pub/mutt/%{name}-%{version}.tar.gz
-# Source0-md5: abf850465e7793d91ce9d39a9de61816
+# Source0-md5: 585072c134ac5cd9e264187685dcd4ae
Source1: %{name}.desktop
Source2: %{name}.png
Source3: %{name}.1.pl
@@ -49,15 +49,14 @@ Patch4: %{name}-cd.signatures_menu.patch
# http://www.mutt.ca/patches/ (dw.crypt-autoselectkey)
Patch5: %{name}-crypt-autoselectkey.patch
Patch6: %{name}-manual.patch
-Patch7: %{name}-xface.patch
-Patch8: %{name}-Muttrc_mbox_path.patch
-Patch9: %{name}-po.patch
-Patch10: %{name}-Muttrc.head.patch
-Patch11: %{name}-smime.rc.patch
-Patch12: %{name}-db.patch
-Patch13: format-security.patch
-Patch14: %{name}-keep_to.patch
-Patch15: %{name}-vvv.initials.patch
+Patch7: %{name}-Muttrc_mbox_path.patch
+Patch8: %{name}-po.patch
+Patch9: %{name}-Muttrc.head.patch
+Patch10: %{name}-smime.rc.patch
+Patch11: %{name}-db.patch
+Patch12: format-security.patch
+Patch13: %{name}-keep_to.patch
+Patch14: %{name}-vvv.initials.patch
# applied during %%install
Patch50: %{name}-Muttrc.patch
# bcond-related patches
@@ -168,7 +167,6 @@ Mutt - це невеликий, але потужний повноекранни
%patch12 -p1
%patch13 -p1
%patch14 -p1
-%patch15 -p1
%{?with_home_etc:%patch101 -p1}
%{?with_nntp:%patch102 -p1}
@@ -177,7 +175,7 @@ Mutt - це невеликий, але потужний повноекранни
%{?with_imap_recent:%patch104 -p1}
# force regeneration (manual.sgml is modified by some patches)
-%{__rm} doc/{manual*.html,manual.txt}
+%{__rm} doc/manual*.html
%build
%{__aclocal} -I m4
@@ -249,6 +247,10 @@ EOF
%{__rm} $RPM_BUILD_ROOT%{_mandir}/man5/mbox.5*
# belongs to mailcap
%{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/mime.types
+# don't litter
+%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.dist
+%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/Muttrc.orig
+%{__rm} -r $RPM_BUILD_ROOT%{_sysconfdir}/mime.types.dist
%find_lang %{name}
diff --git a/mutt-Muttrc_mbox_path.patch b/mutt-Muttrc_mbox_path.patch
index 30b1aef..0586e0c 100644
--- a/mutt-Muttrc_mbox_path.patch
+++ b/mutt-Muttrc_mbox_path.patch
@@ -1,11 +1,13 @@
---- mutt-1.5.18.orig/doc/Muttrc 2004-03-04 18:10:37.000000000 +0100
-+++ mutt-1.5.18/doc/Muttrc 2004-03-04 18:17:10.000000000 +0100
-@@ -1360,7 +1360,7 @@
- # will be shown. The match is always case-sensitive.
- #
- #
--# set mbox="~/mbox"
-+set mbox="~/Mail/mbox"
- #
- # Name: mbox
- # Type: path
+--- mutt-2.0.6/contrib/sample.muttrc~ 2020-05-02 21:08:56.000000000 +0000
++++ mutt-2.0.6/contrib/sample.muttrc 2021-04-07 17:41:06.290790494 +0000
+@@ -12,8 +12,8 @@
+
+ # Note: $folder should be set _before_ any other path vars where `+' or `='
+ # is used because paths are expanded when parsed
+-#
+-#set folder=~/Mail # where i keep my mailboxes
++
++set folder=~/Mail # where i keep my mailboxes
+
+ #set abort_unmodified=yes # automatically abort replies if I don't
+ # change the message
diff --git a/mutt-bj.status-time.patch b/mutt-bj.status-time.patch
index 0d4dccb..baba344 100644
--- a/mutt-bj.status-time.patch
+++ b/mutt-bj.status-time.patch
@@ -20,10 +20,9 @@ diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/curs_main.c mutt-1.5.10/curs_main
WHERE short TimeInc;
WHERE short Timeout;
WHERE short Wrap;
-diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/init.h mutt-1.5.10/init.h
---- mutt-1.5.10.orig/init.h 2005-10-07 09:28:10.000000000 +0200
-+++ mutt-1.5.10/init.h 2005-10-07 09:28:24.000000000 +0200
-@@ -2626,6 +2626,8 @@
+--- mutt-2.0.6/init.h.orig 2021-03-06 19:06:37.000000000 +0000
++++ mutt-2.0.6/init.h 2021-04-07 17:25:21.720777040 +0000
+@@ -4197,6 +4197,8 @@
** .dt %u .dd number of unread messages *
** .dt %v .dd Mutt version string
** .dt %V .dd currently active limit pattern, if any *
@@ -32,11 +31,11 @@ diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/init.h mutt-1.5.10/init.h
** .dt %>X .dd right justify the rest of the string and pad with ``X''
** .dt %|X .dd pad to the end of the line with ``X''
** .dt %*X .dd soft-fill with character ``X'' as pad
-@@ -2671,6 +2674,16 @@
- ** Setting this variable causes the ``status bar'' to be displayed on
- ** the first line of the screen rather than near the bottom.
+@@ -4248,6 +4250,16 @@
+ ** the first line of the screen rather than near the bottom. If $$help
+ ** is \fIset\fP, too it'll be placed at the bottom.
*/
-+ { "status_update", DT_NUM, R_NONE, UL &StatusUpdate, -1 },
++ { "status_update", DT_NUM, R_NONE, {.p=&StatusUpdate}, {.l=-1} },
+ /*
+ ** .pp
+ ** This variable controls, if positive, the maximum interval in seconds
@@ -46,7 +45,7 @@ diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/init.h mutt-1.5.10/init.h
+ ** If it is negative, the status time will only be updated
+ ** if it necessary to update to the status line for some other reason.
+ */
- { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, OPTSTRICTTHREADS, 0 },
+ { "strict_threads", DT_BOOL, R_RESORT|R_RESORT_INIT|R_INDEX, {.l=OPTSTRICTTHREADS}, {.l=0} },
/*
** .pp
diff -dur -x '*~' -x '*.orig' mutt-1.5.10.orig/menu.c mutt-1.5.10/menu.c
diff --git a/mutt-cd.signatures_menu.patch b/mutt-cd.signatures_menu.patch
index 2267d31..5d62c0e 100644
--- a/mutt-cd.signatures_menu.patch
+++ b/mutt-cd.signatures_menu.patch
@@ -105,7 +105,7 @@ diff -pruN2 mutt-1.3.27.orig/init.h mutt-1.3.27/init.h
@@ -1954,4 +1954,12 @@ struct option_t MuttVars[] = {
** its stdout.
*/
-+ { "signatures_directory", DT_PATH, R_NONE, UL &SigDirectory, UL "" },
++ { "signatures_directory", DT_PATH, R_NONE, {.p=&SigDirectory}, {.p=""} },
+ /*
+ ** .pp
+ ** Specifies the path where your signatures are located. In the files of
diff --git a/mutt-crypt-autoselectkey.patch b/mutt-crypt-autoselectkey.patch
index fa550d9..e9d6e1e 100644
--- a/mutt-crypt-autoselectkey.patch
+++ b/mutt-crypt-autoselectkey.patch
@@ -8,7 +8,7 @@
*/
+
+
-+ { "pgp_autoselectkey", DT_SYN, R_NONE, UL "crypt_autoselectkey", 0 },
++ { "pgp_autoselectkey", DT_SYN, R_NONE, {.p="crypt_autoselectkey"}, {.l=0} },
+ { "crypt_autoselectkey", DT_BOOL, R_NONE, OPTCRYPTAUTOSELECT, 0 },
+ /*
+ ** .pp
diff --git a/mutt-db.patch b/mutt-db.patch
index c2fbcb9..e2c0f16 100644
--- a/mutt-db.patch
+++ b/mutt-db.patch
@@ -1,11 +1,6 @@
---- mutt-1.5.21/configure.ac.orig 2012-04-06 17:33:23.905605556 +0200
-+++ mutt-1.5.21/configure.ac 2012-04-07 07:42:20.793977750 +0200
-@@ -985,20 +985,20 @@
- bdbpfx="$bdbpfx $d/$v"
- done
- done
-- BDB_VERSIONS="db-4 db4 db-5 db5 db-5.2 db5.2 db52 db-5.1 db5.1 db51 db-5.0 db5.0 db50 db-4.8 db4.8 db48 db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db ''"
-+ BDB_VERSIONS="db-6.1 db-6.0 db-5.3 db-5.2 db5.2 db52 db-5.1 db5.1 db51 db-5.0 db5.0 db50 db-5 db5 db-4.8 db4.8 db48 db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4 db4 db ''"
+--- mutt-2.0.6/configure.ac.orig 2021-03-06 19:06:37.000000000 +0000
++++ mutt-2.0.6/configure.ac 2021-04-07 17:45:51.050794394 +0000
+@@ -1180,16 +1180,16 @@
AC_MSG_CHECKING([for BerkeleyDB > 4.0])
for d in $bdbpfx; do
BDB_INCLUDE_DIR=""
@@ -18,16 +13,16 @@
- test -d "$bdblibdir" || continue
- BDB_LIB_DIR="$bdblibdir"
+ for bdblibdir in '' "$d/lib/$v" "$d/lib"; do
-+ test -z "$bdblibdir" -o -d "$bdblibdir" || continue
-+ BDB_LIB_L="${bdblibdir:+-L$bdblibdir}"
++ test -z "$bdblibdir" -o -d "$bdblibdir" || continue
++ BDB_LIB_L="${bdblibdir:+-L$bdblibdir}"
for l in `echo $BDB_VERSIONS`; do
CPPFLAGS="$OLDCPPFLAGS -I$BDB_INCLUDE_DIR"
- LIBS="$OLDLIBS -L$BDB_LIB_DIR -l$l"
-+ LIBS="$OLDLIBS $BDB_LIB_L -l$l"
++ LIBS="$OLDLIBS $BDB_LIB_L -l$l"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <db.h>
-@@ -1021,7 +1021,7 @@
+@@ -1212,7 +1212,7 @@
then
AC_MSG_RESULT(yes)
CPPFLAGS="$OLDCPPFLAGS -I$BDB_INCLUDE_DIR"
diff --git a/mutt-folder_columns.patch b/mutt-folder_columns.patch
index 57cbff4..44ba9e5 100644
--- a/mutt-folder_columns.patch
+++ b/mutt-folder_columns.patch
@@ -14,7 +14,7 @@
** you use `+' or `=' for any other variables since expansion takes place
** during the `set' command.
*/
-+ { "folder_columns", DT_NUM, R_NONE, UL &FolderColumns, UL 1 },
++ { "folder_columns", DT_NUM, R_NONE, {.p=&FolderColumns}, {.l=1} },
+ /*
+ ** .pp
+ ** Specifies the number of folder columns in folder browser.
diff --git a/mutt-keep_to.patch b/mutt-keep_to.patch
index f99fd29..13cf57b 100644
--- a/mutt-keep_to.patch
+++ b/mutt-keep_to.patch
@@ -14,10 +14,9 @@ diff -urN mutt-1.5.23.orig/send.c mutt-1.5.23/send.c
rfc822_append (&out->cc, in->to, 1);
else
rfc822_append (&out->to, in->to, 1);
-diff -ur mutt-1.5.23.orig/init.h mutt-1.5.23/init.h
---- mutt-1.5.23.orig/init.h 2014-10-12 17:17:05.716118306 +0200
-+++ mutt-1.5.23/init.h 2014-10-12 17:24:08.119438749 +0200
-@@ -1344,6 +1344,12 @@
+--- mutt-2.0.6/init.h.orig 2021-04-07 17:47:28.950795784 +0000
++++ mutt-2.0.6/init.h 2021-04-07 17:48:57.734130406 +0000
+@@ -1874,6 +1874,12 @@
** from your spool mailbox to your $$mbox mailbox, or as a result of
** a ``$mbox-hook'' command.
*/
@@ -27,17 +26,16 @@ diff -ur mutt-1.5.23.orig/init.h mutt-1.5.23/init.h
+ ** Controls where recipients from ``To:'' list go on group-reply. If \fIset\fP
+ ** they are copied to ``To:'' otherwise to ``Cc:''.
+ */
- { "mail_check", DT_NUM, R_NONE, UL &BuffyTimeout, 5 },
+ { "mail_check", DT_NUM, R_NONE, {.p=&BuffyTimeout}, {.l=5} },
/*
** .pp
-diff -ur mutt-1.5.23.orig/mutt.h mutt-1.5.23/mutt.h
---- mutt-1.5.23.orig/mutt.h 2014-10-12 17:17:05.722784972 +0200
-+++ mutt-1.5.23/mutt.h 2014-10-12 17:24:50.006104137 +0200
-@@ -391,6 +391,7 @@
- OPTIMPLICITAUTOVIEW,
+--- mutt-2.0.6/mutt.h.orig 2021-04-07 17:47:28.950795784 +0000
++++ mutt-2.0.6/mutt.h 2021-04-07 17:50:34.977465090 +0000
+@@ -479,6 +479,7 @@
+ OPTINCLUDEENCRYPTED,
OPTINCLUDEONLYFIRST,
OPTKEEPFLAGGED,
+ OPTKEEPTO,
+ OPTMUTTLISPINLINEEVAL,
OPTMAILCAPSANITIZE,
OPTMAILCHECKRECENT,
- OPTMAILDIRTRASH,
diff --git a/mutt-vvv.nntp.patch b/mutt-vvv.nntp.patch
index c99ab70..e1bc4af 100644
--- a/mutt-vvv.nntp.patch
+++ b/mutt-vvv.nntp.patch
@@ -3214,7 +3214,7 @@ diff -udprP mutt-1.12.1.orig/init.h mutt-1.12.1/init.h
** ``Franklin'' to ``Franklin, Steve''.
*/
+#ifdef USE_NNTP
-+ { "group_index_format", DT_STR, R_BOTH, UL &GroupFormat, UL "%4C %M%N %5s %-45.45f %d" },
++ { "group_index_format", DT_STR, R_BOTH, {.p=&GroupFormat}, {.p="%4C %M%N %5s %-45.45f %d"} },
+ /*
+ ** .pp
+ ** This variable allows you to customize the newsgroup browser display to
@@ -3258,7 +3258,7 @@ diff -udprP mutt-1.12.1.orig/init.h mutt-1.12.1/init.h
** and $$post_indent_string.
*/
+#ifdef USE_NNTP
-+ { "inews", DT_PATH, R_NONE, UL &Inews, UL "" },
++ { "inews", DT_PATH, R_NONE, {.p={&Inews}, {.p=""} },
+ /*
+ ** .pp
+ ** If set, specifies the program and arguments used to deliver news posted
@@ -3300,14 +3300,14 @@ diff -udprP mutt-1.12.1.orig/init.h mutt-1.12.1/init.h
** into this command.
*/
+#ifdef USE_NNTP
-+ { "news_cache_dir", DT_PATH, R_NONE, UL &NewsCacheDir, UL "~/.mutt" },
++ { "news_cache_dir", DT_PATH, R_NONE, {.p=&NewsCacheDir}, {.p="~/.mutt"} },
+ /*
+ ** .pp
+ ** This variable pointing to directory where Mutt will save cached news
+ ** articles and headers in. If \fIunset\fP, articles and headers will not be
+ ** saved at all and will be reloaded from the server each time.
+ */
-+ { "news_server", DT_STR, R_NONE, UL &NewsServer, 0 },
++ { "news_server", DT_STR, R_NONE, {.p=&NewsServer}, {.l=0} },
+ /*
+ ** .pp
+ ** This variable specifies domain name or address of NNTP server. It
@@ -3317,12 +3317,12 @@ diff -udprP mutt-1.12.1.orig/init.h mutt-1.12.1/init.h
+ ** .pp
+ ** [[s]news://][username[:password]@]server[:port]
+ */
-+ { "newsgroups_charset", DT_STR, R_NONE, UL &NewsgroupsCharset, UL "utf-8" },
++ { "newsgroups_charset", DT_STR, R_NONE, &{.p=NewsgroupsCharset}, "{.p=utf-8"} },
+ /*
+ ** .pp
+ ** Character set of newsgroups descriptions.
+ */
-+ { "newsrc", DT_PATH, R_NONE, UL &NewsRc, UL "~/.newsrc" },
++ { "newsrc", DT_PATH, R_NONE, &{.p=NewsRc}, "{.p=~/.newsrc"} },
+ /*
+ ** .pp
+ ** The file, containing info about subscribed newsgroups - names and
@@ -3337,7 +3337,7 @@ diff -udprP mutt-1.12.1.orig/init.h mutt-1.12.1/init.h
+ ** .dt %u .dd username
+ ** .de
+ */
-+ { "nntp_authenticators", DT_STR, R_NONE, UL &NntpAuthenticators, UL 0 },
++ { "nntp_authenticators", DT_STR, R_NONE, &{.p=NntpAuthenticators}, {.l=0} },
+ /*
+ ** .pp
+ ** This is a colon-delimited list of authentication methods mutt may
@@ -3357,7 +3357,7 @@ diff -udprP mutt-1.12.1.orig/init.h mutt-1.12.1/init.h
+ ** the previous methods are unavailable. If a method is available but
+ ** authentication fails, mutt will not connect to the IMAP server.
+ */
-+ { "nntp_context", DT_NUM, R_NONE, UL &NntpContext, 1000 },
++ { "nntp_context", DT_NUM, R_NONE, &{.p=NntpContext}, {.l=1000} },
+ /*
+ ** .pp
+ ** This variable defines number of articles which will be in index when
@@ -3378,19 +3378,19 @@ diff -udprP mutt-1.12.1.orig/init.h mutt-1.12.1/init.h
+ ** must be loaded when newsgroup is added to list (first time list
+ ** loading or new newsgroup adding).
+ */
-+ { "nntp_user", DT_STR, R_NONE, UL &NntpUser, UL "" },
++ { "nntp_user", DT_STR, R_NONE, {.p=&NntpUser}, {.p=""} },
+ /*
+ ** .pp
+ ** Your login name on the NNTP server. If \fIunset\fP and NNTP server requires
+ ** authentification, Mutt will prompt you for your account name when you
+ ** connect to news server.
+ */
-+ { "nntp_pass", DT_STR, R_NONE, UL &NntpPass, UL "" },
++ { "nntp_pass", DT_STR, R_NONE, &{.p=NntpPass}, {.p=""} },
+ /*
+ ** .pp
+ ** Your password for NNTP account.
+ */
-+ { "nntp_poll", DT_NUM, R_NONE, UL &NewsPollTimeout, 60 },
++ { "nntp_poll", DT_NUM, R_NONE, &{.p=NewsPollTimeout}, {.l=60} },
+ /*
+ ** .pp
+ ** The time in seconds until any operations on newsgroup except post new
diff --git a/mutt-vvv.quote.patch b/mutt-vvv.quote.patch
index 47efb7f..2df3a83 100644
--- a/mutt-vvv.quote.patch
+++ b/mutt-vvv.quote.patch
@@ -48,27 +48,26 @@ diff -udprP mutt-1.12.1.orig/handler.c mutt-1.12.1/handler.c
handler = rfc3676_handler;
else
handler = text_plain_handler;
-diff -udprP mutt-1.12.1.orig/init.h mutt-1.12.1/init.h
---- mutt-1.12.1.orig/init.h 2019-06-15 18:57:01.000000000 +0300
-+++ mutt-1.12.1/init.h 2019-08-11 19:32:51.179165947 +0300
-@@ -2745,6 +2745,19 @@ struct option_t MuttVars[] = {
+--- mutt-2.0.6/init.h.orig 2021-04-07 17:27:35.690778943 +0000
++++ mutt-2.0.6/init.h 2021-04-07 17:29:10.704113619 +0000
+@@ -2966,6 +2966,19 @@
** have no effect, and if it is set to \fIask-yes\fP or \fIask-no\fP, you are
** prompted for confirmation when you try to quit.
*/
-+ { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
++ { "quote_empty", DT_BOOL, R_NONE, OPTQUOTEEMPTY, 1 },
+ /*
+ ** .pp
+ ** Controls whether or not empty lines will be quoted using
+ ** ``$indent_string''.
+ */
-+ { "quote_quoted", DT_BOOL, R_NONE, OPTQUOTEQUOTED, 0 },
++ { "quote_quoted", DT_BOOL, R_NONE, OPTQUOTEQUOTED, 0 },
+ /*
+ ** .pp
+ ** Controls how quoted lines will be quoted. If set, one quote
+ ** character will be added to the end of existing prefix. Otherwise,
+ ** quoted lines will be prepended by ``$indent_string''.
+ */
- { "quote_regexp", DT_RX, R_PAGER, UL &QuoteRegexp, UL "^([ \t]*[|>:}#])+" },
+ { "quote_regexp", DT_RX, R_PAGER, {.p=&QuoteRegexp}, {.p="^([ \t]*[|>:}#])+"} },
/*
** .pp
diff -udprP mutt-1.12.1.orig/mutt.h mutt-1.12.1/mutt.h
diff --git a/mutt-xface.patch b/mutt-xface.patch
deleted file mode 100644
index 230aced..0000000
--- a/mutt-xface.patch
+++ /dev/null
@@ -1,538 +0,0 @@
-x-face patch for Mutt 1.5.6
-
-Copied from Debian's slrnface package:
-
- http://dave.willfork.com/slrnface/
- Upstream Author: Drazen Kacar <dave at arsdigita.com>
- Copyright: /usr/share/common-licenses/GPL
-
-
---- mutt-1.4./README.xface Thu Jan 1 01:00:00 1970
-+++ mutt-1.4/README.xface Sat Aug 24 02:29:23 2002
-@@ -0,0 +1,80 @@
-+This is slrnface, a small helper utility which displays X-Faces on behalf
-+of programs like slrn and mutt when they are run in the X11 terminal
-+emulator.
-+
-+Requirements:
-+
-+a) X11.
-+b) Terminal emulator which sets WINDOWID environment variable. Most of the
-+ ones in common use will set it. If you're using some terminal emulator
-+ which doesn't have this capability, you'll have to set it yourself.
-+
-+How to build:
-+
-+a) Install libcompface. I recommend getting the source from the nearest
-+ Debian GNU/Linux mirror because there's a patch which adds the
-+ ability to output XBM image, as well as the historic brain dead
-+ format. Slrnface doesn't use that feature, but it might be handy for
-+ something else.
-+
-+b) Edit Makefile.
-+
-+c) Invoke make.
-+
-+d) Install with "make install".
-+
-+Upgrading from version 1.x:
-+
-+ If you have used one of the older versions of slrnface, you probably
-+ have .slrnface file in your home directory. You can delete it, because
-+ the new version doesn't use it any more. Instead, the pipes will be
-+ created in $HOME/.slrnfaces directory. There are no other user visible
-+ changes.
-+
-+Using slrnface with slrn:
-+
-+ This version requires S-Lang 1.4 or later and slrn 0.9.7.4. It might
-+ work with slrn 0.9.7.3, but I haven't tested that configuration. It
-+ will not work properly with older versions.
-+
-+ In case you can't or won't upgrade, take a look at the slrnface home
-+ page. You'll find older versions which might work with what you have.
-+
-+ Take a look at slrnface.sl, edit if you want and then include it in
-+ your .slrnrc, like this:
-+
-+ interpret slrnface.sl
-+
-+ Run slrn.
-+
-+Using slrnface with mutt:
-+
-+ Mutt doesn't have a way to use some kind of embeded interpreter, like
-+ S-Lang. Since Mutt's current capabilities are not good enough for our
-+ purposes, a patch for the source is provided. It has been tested with
-+ mutt 1.4, but it should work with the 1.3.x series, if x is high
-+ enough.
-+
-+ Uncompress mutt 1.4 source and apply mutt.patch from the slrnface
-+ distribution.
-+
-+ Compile mutt as usual.
-+
-+ Edit your ~/.muttrc and add:
-+
-+ set xface=yes
-+
-+ Run mutt.
-+
-+If you think X-Faces are not placed at the appropriate location on your
-+terminal emulator window or you don't like the colors, set some X resources.
-+Read the man page for more information. Additional documentation is in the
-+doc directory.
-+
-+Licence: GPL. See file called COPYING.
-+
-+Special thanks to Mark R. Bowyer for proofreading the man page.
-+
-+Home page: http://dave.willfork.com/slrnface/
-+
-+dave at willfork.com
-diff -urp ../MUTT/mutt/PATCHES mutt/PATCHES
---- ../MUTT/mutt/PATCHES 2002-12-09 18:44:54.000000000 +0100
-+++ mutt/PATCHES 2004-07-21 16:02:16.000000000 +0200
-@@ -0,0 +1 @@
-+patch-1.5.6.cb.xface.1
-diff -urp ../MUTT/mutt/globals.h mutt/globals.h
---- ../MUTT/mutt/globals.h.orig 2007-03-26 14:49:03.226880430 +0200
-+++ mutt/globals.h 2007-03-26 14:51:13.227945753 +0200
-@@ -218,6 +218,8 @@
- WHERE ALIAS *Aliases INITVAL (0);
- WHERE LIST *UserHeader INITVAL (0);
-
-+WHERE int slrnface_fd INITVAL (-1);
-+
- /*-- formerly in pgp.h --*/
- WHERE REGEXP PgpGoodSign;
- WHERE char *PgpSignAs;
-diff -urp ../MUTT/mutt/init.c mutt/init.c
---- ../MUTT/mutt/init.c 2004-07-18 01:25:28.000000000 +0200
-+++ mutt/init.c 2004-07-21 13:33:47.000000000 +0200
-@@ -43,6 +43,8 @@
- #include <string.h>
- #include <sys/utsname.h>
- #include <errno.h>
-+#include <sys/types.h>
-+#include <fcntl.h>
- #include <sys/wait.h>
-
- void toggle_quadoption (int opt)
-@@ -2356,3 +2358,130 @@ int mutt_get_hook_type (const char *name
-
- return 1;
- }
-+void mutt_start_slrnface(void)
-+{
-+ char *fifo;
-+ int pathlen, status;
-+ pid_t pid, pidst;
-+ struct utsname u;
-+
-+ if (!option(OPTXFACE))
-+ return;
-+
-+ /*
-+ * If we don't have display, there's no point. The user probably knows,
-+ * so fail silently.
-+ */
-+ if (!getenv("DISPLAY"))
-+ return;
-+ /* If there is no WINDOWID, complain. */
-+ if (!getenv ("WINDOWID"))
-+ {
-+ mutt_error (_("Cannot run slrnface: WINDOWID not found in environment."));
-+ return;
-+ }
-+
-+ uname (&u);
-+ pathlen = strlen (Homedir) + sizeof("/.slrnfaces/")
-+ + strlen (u.nodename) + 30;
-+ fifo = safe_malloc (pathlen);
-+ sprintf (fifo, "%s/.slrnfaces", Homedir);
-+ if (mkdir (fifo, 0700))
-+ {
-+ if (errno != EEXIST)
-+ {
-+ mutt_error (_("Cannot run slrnface: failed to create %s: %s."),
-+ fifo, strerror(errno));
-+ return;
-+ }
-+ }
-+ else
-+ {
-+ FILE *fp;
-+
-+ /* We'll abuse fifo filename memory here. It's long enough. */
-+ sprintf (fifo, "%s/.slrnfaces/README", Homedir);
-+ if ((fp = fopen (fifo, "w")) != NULL)
-+ {
-+ fputs (_(
-+"This directory is used to create named pipes for communication between\n"
-+"slrnface and its parent process. It should normally be empty because\n"
-+"the pipe is deleted right after it has been opened by both processes.\n\n"
-+"File names generated by slrnface have the form \"hostname.pid\". It is\n"
-+"probably an error if they linger here longer than a fraction of a second.\n\n"
-+"However, if the directory is mounted from an NFS server, you might see\n"
-+"special files created by your NFS server while slrnface is running.\n"
-+"Do not try to remove them.\n"), fp);
-+ fclose (fp);
-+ }
-+ }
-+
-+ status = snprintf (fifo, pathlen, "%s/.slrnfaces/%s.%ld", Homedir,
-+ u.nodename, (long)getpid());
-+ if (status < 0)
-+ goto clean_face;
-+
-+ unlink (fifo);
-+ if (mkfifo (fifo, 0600) < 0)
-+ {
-+ mutt_error (_("Cannot run slrnface, failed to create %s: %s."), fifo,
-+ strerror(errno));
-+ goto clean_face;
-+ }
-+
-+ pid = fork();
-+ switch (pid)
-+ {
-+ case -1: break;
-+ case 0: execlp ("slrnface", "slrnface", fifo, (char *)0);
-+ /* This is child, exit on error. */
-+ _exit (10);
-+ default: do {
-+ pidst = waitpid (pid, &status, 0);
-+ } while (pidst == -1 && errno == EINTR);
-+
-+ if (!WIFEXITED (status))
-+ mutt_error (_("Slrnface abnormaly exited, code %d."), status);
-+ else
-+ {
-+ char *message;
-+
-+ switch (WEXITSTATUS (status))
-+ {
-+ case 0: /* All fine, open the pipe */
-+ slrnface_fd = open (fifo, O_WRONLY, 0600);
-+ write (slrnface_fd, "start\n", sizeof "start");
-+ goto clean_face;
-+ case 1: message = "couldn't connect to display";
-+ break;
-+ case 2: message = "WINDOWID not found in environment";
-+ break;
-+ case 3: message = "couldn't find controlling terminal";
-+ break;
-+ case 4: message = "terminal doesn't export width and height";
-+ break;
-+ case 5: message = "cannot open FIFO";
-+ break;
-+ case 6: message = "fork() failed";
-+ break;
-+ case 10: message = "executable not found";
-+ break;
-+ default: message = "unknown error";
-+ }
-+ mutt_error (_("Slrnface failed: %s."), message);
-+ }
-+ }
-+
-+clean_face:
-+ unlink (fifo);
-+ free (fifo);
-+}
-+
-+void mutt_stop_slrnface(void)
-+{
-+ if (slrnface_fd >= 0)
-+ close(slrnface_fd);
-+ slrnface_fd = -1;
-+
-+ /* FIFO has been unlinked in the startup function. */
-+}
-diff -urp ../MUTT/mutt/init.h mutt/init.h
---- ../MUTT/mutt/init.h 2004-07-21 13:33:02.000000000 +0200
-+++ mutt/init.h 2004-07-21 13:33:47.000000000 +0200
-@@ -2736,6 +2736,12 @@ struct option_t MuttVars[] = {
- ** Controls whether mutt writes out the Bcc header when preparing
- ** messages to be sent. Exim users may wish to use this.
- */
-+ { "xface", DT_BOOL, R_NONE, OPTXFACE, 0 },
-+ /*
-+ ** .pp
-+ ** Controls whether mutt uses slrnface to display X-Faces when run
-+ ** in an X11 terminal emulator.
-+ */
- /*--*/
- { NULL }
- };
-diff -urp ../MUTT/mutt/main.c mutt/main.c
---- ../MUTT/mutt/main.c 2004-06-18 17:24:22.000000000 +0200
-+++ mutt/main.c 2004-07-21 13:33:47.000000000 +0200
-@@ -905,6 +905,8 @@ int main (int argc, char **argv)
-
- mutt_folder_hook (folder);
-
-+ mutt_start_slrnface();
-+
- Context = mx_open_mailbox (mutt_b2s (folder),
- ((flags & MUTT_RO) || option (OPTREADONLY)) ? MUTT_READONLY : 0,
- NULL);
-@@ -913,6 +915,8 @@ int main (int argc, char **argv)
- }
-
- exit_endwin_msg = Errorbuf;
-+
-+ mutt_stop_slrnface();
- }
-
- exit_code = 0;
-diff -urp ../MUTT/mutt/mutt.h mutt/mutt.h
---- ../MUTT/mutt/mutt.h 2004-07-21 13:33:02.000000000 +0200
-+++ mutt/mutt.h 2004-07-21 13:33:47.000000000 +0200
-@@ -435,6 +435,7 @@ enum
- OPTWRAP,
- OPTWRAPSEARCH,
- OPTWRITEBCC, /* write out a bcc header? */
-+ OPTXFACE,
- OPTXMAILER,
-
- OPTCRYPTUSEGPGME,
-@@ -577,6 +578,7 @@ typedef struct envelope
- BUFFER *spam;
- LIST *references; /* message references (in reverse order) */
- LIST *in_reply_to; /* in-reply-to header content */
-+ LIST *x_face; /* X-Face header content */
- LIST *userhdrs; /* user defined headers */
- } ENVELOPE;
-
-diff -urp ../MUTT/mutt/muttlib.c mutt/muttlib.c
---- ../MUTT/mutt/muttlib.c 2004-07-18 01:25:28.000000000 +0200
-+++ mutt/muttlib.c 2004-07-21 13:33:47.000000000 +0200
-@@ -651,6 +651,7 @@ void mutt_free_envelope (ENVELOPE **p)
- FREE (&(*p)->date);
- mutt_free_list (&(*p)->references);
- mutt_free_list (&(*p)->in_reply_to);
-+ mutt_free_list (&(*p)->x_face);
- mutt_free_list (&(*p)->userhdrs);
- FREE (p);
- }
-diff -urp ../MUTT/mutt/pager.c mutt/pager.c
---- ../MUTT/mutt/pager.c 2004-07-18 01:25:28.000000000 +0200
-+++ mutt/pager.c 2004-07-21 13:36:34.000000000 +0200
-@@ -1527,6 +1527,66 @@ upNLines (int nlines, struct line_t *inf
- return cur;
- }
-
-+static void
-+mutt_display_xface (HEADER *hdr)
-+{
-+ LIST *face;
-+ char buf[2000];
-+
-+ if (slrnface_fd < 0)
-+ return;
-+
-+ if (!hdr)
-+ return;
-+
-+ face = hdr->env->x_face;
-+
-+ if (face == NULL || face->data == NULL)
-+ write(slrnface_fd, "clear\n", sizeof "clear");
-+ else
-+ do {
-+ int len;
-+
-+ len = snprintf (buf, sizeof (buf), "xface %s\n", face->data);
-+ if (len <= sizeof (buf))
-+ {
-+ write (slrnface_fd, buf, len);
-+ break;
-+ }
-+ /*
-+ * slrnface will ignore X-Faces larger than approx. 2000 chars, so
-+ * try the next one, if it exists.
-+ */
-+ } while (face = face->next);
-+}
-+
-+static void
-+mutt_clear_xface (void)
-+{
-+ if (slrnface_fd < 0)
-+ return;
-+
-+ write(slrnface_fd, "clear\n", sizeof "clear");
-+}
-+
-+static void
-+mutt_suppress_xface (void)
-+{
-+ if (slrnface_fd < 0)
-+ return;
-+
-+ write(slrnface_fd, "suppress\n", sizeof "suppress");
-+}
-+
-+static void
-+mutt_show_xface (void)
-+{
-+ if (slrnface_fd < 0)
-+ return;
-+
-+ write(slrnface_fd, "show\n", sizeof "show");
-+}
-+
- static const struct mapping_t PagerHelp[] = {
- { N_("Exit"), OP_EXIT },
- { N_("PrevPg"), OP_PREV_PAGE },
-@@ -1545,6 +1605,9 @@ mutt_pager (const char *banner, const ch
- snprintf (helpstr, sizeof (helpstr), "%s %s", tmphelp, buffer);
- }
-
-+ if (IsHeader (extra))
-+ mutt_display_xface(extra->hdr);
-+
- while (ch != -1)
- {
- mutt_curs_set (0);
-@@ -2067,7 +2130,9 @@ search_next:
- if (! InHelp)
- {
- InHelp = 1;
-+ mutt_suppress_xface ();
- mutt_help (MENU_PAGER);
-+ mutt_show_xface ();
- pager_menu->redraw = REDRAW_FULL;
- InHelp = 0;
- }
-@@ -2649,7 +2649,9 @@
- case OP_MAIL:
- CHECK_MODE(IsHeader (extra) && !IsAttach (extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
- ci_send_message (0, NULL, NULL, extra->ctx, NULL);
-+ mutt_show_xface();
- pager_menu->redraw = REDRAW_FULL;
- break;
-
-@@ -2662,6 +2664,7 @@
-
- CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
-
- replyflags = SENDREPLY |
- (ch == OP_GROUP_REPLY ? SENDGROUPREPLY : 0) |
-@@ -2673,6 +2676,7 @@
- extra->bdy, replyflags);
- else
- ci_send_message (replyflags, NULL, NULL, extra->ctx, extra->hdr);
-+ mutt_show_xface();
- pager_menu->redraw = REDRAW_FULL;
- break;
- }
-@@ -2680,19 +2684,23 @@
- case OP_RECALL_MESSAGE:
- CHECK_MODE(IsHeader (extra) && !IsAttach(extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
- ci_send_message (SENDPOSTPONED, NULL, NULL, extra->ctx, extra->hdr);
-+ mutt_show_xface();
- pager_menu->redraw = REDRAW_FULL;
- break;
-
- case OP_FORWARD_MESSAGE:
- CHECK_MODE(IsHeader (extra) || IsMsgAttach (extra));
- CHECK_ATTACH;
-+ mutt_suppress_xface();
- if (IsMsgAttach (extra))
- mutt_attach_forward (extra->fp, extra->hdr, extra->actx,
- extra->bdy);
- else
- ci_send_message (SENDFORWARD, NULL, NULL, extra->ctx, extra->hdr);
- pager_menu->redraw = REDRAW_FULL;
-+ mutt_show_xface();
- break;
-
- case OP_DECRYPT_SAVE:
-@@ -2485,7 +2562,9 @@ CHECK_IMAP_ACL(IMAP_ACL_WRITE);
- break;
-
- case OP_SHELL_ESCAPE:
-+ mutt_suppress_xface ();
- mutt_shell_escape ();
-+ mutt_show_xface ();
- break;
-
- case OP_TAG:
-@@ -2644,5 +2723,6 @@ CHECK_IMAP_ACL(IMAP_ACL_DELETE);
- FREE (&rd.pager_status_window);
- FREE (&rd.pager_window);
-
-+ mutt_clear_xface ();
- return (rc != -1 ? rc : 0);
- }
-diff -urp ../MUTT/mutt/parse.c mutt/parse.c
---- ../MUTT/mutt/parse.c 2004-07-21 13:33:02.000000000 +0200
-+++ mutt/parse.c 2004-07-21 13:33:47.000000000 +0200
-@@ -85,6 +85,27 @@ static char *read_rfc822_line (FILE *f,
- /* not reached */
- }
-
-+static LIST *mutt_add_x_face (LIST *lst, char *face)
-+{
-+ LIST *n;
-+
-+ n = safe_malloc(sizeof(LIST));
-+ n->data = safe_strdup(face);
-+ n->next = NULL;
-+
-+ if (lst)
-+ {
-+ LIST *l;
-+
-+ for(l = lst; l->next; l = l->next);
-+ l->next = n;
-+ }
-+ else
-+ lst = n;
-+
-+ return lst;
-+}
-+
- static LIST *mutt_parse_references (char *s, int in_reply_to)
- {
- LIST *t, *lst = NULL;
-@@ -1231,6 +1252,11 @@ int mutt_parse_rfc822_line (ENVELOPE *e,
- e->x_label = safe_strdup(p);
- matched = 1;
- }
-+ else if (ascii_strcasecmp (line+1, "-face") == 0)
-+ {
-+ e->x_face = mutt_add_x_face (e->x_face, p);
-+ matched = 1;
-+ }
-
- default:
- break;
-diff -urp ../MUTT/mutt/sendlib.c mutt/sendlib.c
---- ../MUTT/mutt/sendlib.c 2004-07-21 13:33:02.000000000 +0200
-+++ mutt/sendlib.c 2004-07-21 13:37:16.000000000 +0200
-@@ -1697,6 +1697,15 @@ int mutt_write_rfc822_header (FILE *fp,
- }
- }
-
-+ /* Add X-Face headers */
-+ if (env->x_face)
-+ {
-+ LIST *face;
-+
-+ for (face = env->x_face; face; face = face->next)
-+ fprintf (fp, "X-Face: %s\n", face->data);
-+ }
-+
- if (mode == MUTT_WRITE_HEADER_NORMAL && !privacy &&
- option (OPTXMAILER) && !has_agent)
- {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mutt.git/commitdiff/8d0135202c87e55e6f3b74eff2e52e6a00dfa2e2
More information about the pld-cvs-commit
mailing list