Gentoo Archives: gentoo-dev

From: Nicolas Bock <nicolasbock@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] New package neomutt
Date: Thu, 10 Aug 2017 04:59:08
Message-Id: 20170810045857.e6qrvnimteopxgev@rubberducky.suse.de
In Reply to: [gentoo-dev] New package neomutt by Nicolas Bock
1 On Mon, Jul 31, 2017 at 09:11:19AM +0200, Nicolas Bock wrote:
2 >Hi,
3 >
4 >I would like to add neomutt to the tree. This new package is meant as
5 >an alternative and not a replacement of the existing mutt package.
6
7 Thanks for all of the great suggestions and feedback!
8
9 This is round two. I have update the ebuild with all your
10 suggestions. I have also added support for eselecting between mutt
11 and neomutt. Before the eselect ebuild can land though, we need to
12 rename the mutt binary so that the managed link can be called
13 mutt.
14
15
16 # Copyright 1999-2017 Gentoo Foundation
17 # Distributed under the terms of the GNU General Public License v2
18
19 EAPI=6
20
21 inherit autotools eutils flag-o-matic
22
23 if [[ ${PV} == 99999999 ]] ; then
24 # live ebuild
25 inherit git-r3
26 EGIT_REPO_URI="https://github.com/neomutt/neomutt.git"
27 EGIT_CHECKOUT_DIR="${WORKDIR}/neomutt-${P}"
28 KEYWORDS=""
29 else
30 SRC_URI="https://github.com/${PN}/${PN}/archive/${P}.tar.gz"
31 KEYWORDS="~amd64 ~x86"
32 fi
33
34 DESCRIPTION="Teaching an Old Dog New Tricks"
35 HOMEPAGE="https://www.neomutt.org/"
36
37 LICENSE="GPL-2"
38 SLOT="0"
39 IUSE="berkdb crypt debug doc gdbm gnutls gpg idn kerberos libressl mbox
40 nls notmuch qdbm sasl selinux slang smime ssl tokyocabinet kyotocabinet
41 lmdb"
42
43 CDEPEND="
44 app-eselect/eselect-mutt
45 app-misc/mime-types
46 nls? ( virtual/libintl )
47 tokyocabinet? ( dev-db/tokyocabinet )
48 qdbm? ( dev-db/qdbm )
49 gdbm? ( sys-libs/gdbm )
50 berkdb? ( >=sys-libs/db-4:= )
51 kyotocabinet? ( dev-db/kyotocabinet )
52 lmdb? ( dev-db/lmdb )
53 gnutls? ( >=net-libs/gnutls-1.0.17 )
54 !gnutls? (
55 ssl? (
56 !libressl? ( >=dev-libs/openssl-0.9.6:0 )
57 libressl? ( dev-libs/libressl )
58 )
59 )
60 sasl? ( >=dev-libs/cyrus-sasl-2 )
61 kerberos? ( virtual/krb5 )
62 idn? ( net-dns/libidn )
63 gpg? ( >=app-crypt/gpgme-0.9.0 )
64 smime? (
65 !libressl? ( >=dev-libs/openssl-0.9.6:0 )
66 libressl? ( dev-libs/libressl )
67 )
68 notmuch? ( net-mail/notmuch )
69 slang? ( sys-libs/slang )
70 !slang? ( >=sys-libs/ncurses-5.2:0 )
71 "
72 DEPEND="${CDEPEND}
73 net-mail/mailbase
74 doc? (
75 dev-libs/libxml2
76 dev-libs/libxslt
77 app-text/docbook-xsl-stylesheets
78 || ( www-client/lynx www-client/w3m www-client/elinks )
79 )"
80 RDEPEND="${CDEPEND}
81 selinux? ( sec-policy/selinux-mutt )
82 "
83
84 S="${WORKDIR}/${PN}-${P}"
85
86 src_prepare() {
87 eapply "${FILESDIR}/0001-Rename-mutt-to-neomutt.patch"
88 eapply_user
89 AT_M4DIR="m4" eautoreconf
90 }
91
92 src_configure() {
93 local myconf=(
94 "$(use_enable crypt pgp)"
95 "$(use_enable debug)"
96 "$(use_enable doc)"
97 "$(use_enable gpg gpgme)"
98 "$(use_enable nls)"
99 "$(use_enable smime)"
100 "$(use_enable notmuch)"
101 "$(use_with idn)"
102 "$(use_with kerberos gss)"
103 "$(use_with sasl)"
104 "$(use_with tokyocabinet)"
105 "$(use_with kyotocabinet)"
106 "$(use_with qdbm)"
107 "$(use_with gdbm)"
108 "$(use_with berkdb bdb)"
109 "$(use_with lmdb)"
110 "--with-$(use slang && echo slang || echo curses)=${EPREFIX}/usr"
111 "--sysconfdir=${EPREFIX}/etc/${PN}"
112 "--with-docdir=${EPREFIX}/usr/share/doc/${PN}-${PVR}"
113 )
114
115 if [[ ${CHOST} == *-solaris* ]] ; then
116 # arrows in index view do not show when using wchar_t
117 myconf+=( "--without-wc-funcs" )
118 fi
119
120 # there's no need for gnutls, ssl or sasl without socket support
121 if use gnutls; then
122 myconf+=( "--with-gnutls" )
123 elif use ssl; then
124 myconf+=( "--with-ssl" )
125 fi
126
127 if use mbox; then
128 myconf+=( "--with-mailpath=${EPREFIX}/var/spool/mail" )
129 else
130 myconf+=( "--with-homespool=Maildir" )
131 fi
132
133 econf "${myconf[@]}"
134 }
135
136 src_install() {
137 emake DESTDIR="${D}" install
138 if use mbox; then
139 insinto /etc/${PN}
140 newins "${FILESDIR}"/Muttrc.mbox Muttrc
141 else
142 insinto /etc/${PN}
143 doins "${FILESDIR}"/Muttrc
144 fi
145
146 # A newer file is provided by app-misc/mime-types. So we link it.
147 rm "${ED}"/etc/${PN}/mime.types || die
148 dosym /etc/mime.types /etc/${PN}/mime.types
149
150 # A man-page is always handy, so fake one
151 if use !doc; then
152 emake -C doc DESTDIR="${D}" muttrc.man
153 # make the fake slightly better, bug #413405
154 sed -e 's#@docdir@/manual.txt#http://www.mutt.org/doc/manual/#' \
155 -e 's#in @docdir@,#at http://www.mutt.org/,#' \
156 -e "s#@sysconfdir@#${EPREFIX}/etc/${PN}#" \
157 -e "s#@bindir@#${EPREFIX}/usr/bin#" \
158 doc/mutt.man > neomutt.1 || die
159 cp doc/muttrc.man neomuttrc.5 || die
160 doman neomutt.1 neomuttrc.5
161 else
162 # nuke manpages that should be provided by an MTA, bug #177605
163 rm "${ED}"/usr/share/man/man5/{mbox,mmdf}.5 \
164 || ewarn "failed to remove files, please file a bug"
165 fi
166
167 dodoc COPYRIGHT ChangeLog* OPS* README*
168 }
169
170 --
171 Nicolas Bock <nicolasbock@g.o>

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] New package neomutt "Michał Górny" <mgorny@g.o>
Re: [gentoo-dev] New package neomutt William Hubbs <williamh@g.o>