Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-mail/mailutils/
Date: Wed, 09 Dec 2015 20:42:25
Message-Id: 1449693676.baeae35d6b890b75d225bcb6975e277257a6269e.mgorny@gentoo
1 commit: baeae35d6b890b75d225bcb6975e277257a6269e
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Dec 9 20:40:00 2015 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Dec 9 20:41:16 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baeae35d
7
8 net-mail/mailutils: Convert to python-single-r1
9
10 net-mail/mailutils/mailutils-2.99.98-r1.ebuild | 128 +++++++++++++++++++++++++
11 1 file changed, 128 insertions(+)
12
13 diff --git a/net-mail/mailutils/mailutils-2.99.98-r1.ebuild b/net-mail/mailutils/mailutils-2.99.98-r1.ebuild
14 new file mode 100644
15 index 0000000..167c47f
16 --- /dev/null
17 +++ b/net-mail/mailutils/mailutils-2.99.98-r1.ebuild
18 @@ -0,0 +1,128 @@
19 +# Copyright 1999-2015 Gentoo Foundation
20 +# Distributed under the terms of the GNU General Public License v2
21 +# $Id$
22 +
23 +EAPI=5
24 +PYTHON_COMPAT=( python2_7 )
25 +
26 +inherit autotools eutils flag-o-matic python-single-r1 toolchain-funcs
27 +
28 +DESCRIPTION="A useful collection of mail servers, clients, and filters"
29 +HOMEPAGE="https://www.gnu.org/software/mailutils/mailutils.html"
30 +#SRC_URI="mirror://gnu/mailutils/${P}.tar.xz"
31 +SRC_URI="mirror://gnu-alpha/mailutils/${P}.tar.xz"
32 +
33 +LICENSE="GPL-2 LGPL-2.1"
34 +SLOT="0"
35 +KEYWORDS="~amd64 ~arm64 ~hppa ~ppc ~x86 ~ppc-macos ~x64-macos ~x86-macos"
36 +IUSE="berkdb bidi +clients gdbm sasl guile ipv6 kerberos ldap mysql nls pam postgres
37 +python servers ssl static-libs +threads tcpd tokyocabinet"
38 +
39 +# Drop the libtool dep once libltdl goes stable.
40 +RDEPEND="!mail-client/nmh
41 + !mail-filter/libsieve
42 + !mail-client/mailx
43 + !mail-client/nail
44 + sys-libs/ncurses:*
45 + sys-libs/readline:*
46 + || ( dev-libs/libltdl:0 <sys-devel/libtool-2.4.3-r2:2 )
47 + virtual/mta
48 + berkdb? ( sys-libs/db:* )
49 + bidi? ( dev-libs/fribidi )
50 + gdbm? ( sys-libs/gdbm )
51 + guile? ( dev-scheme/guile:* )
52 + kerberos? ( virtual/krb5 )
53 + ldap? ( net-nds/openldap )
54 + mysql? ( virtual/mysql )
55 + nls? ( sys-devel/gettext )
56 + pam? ( virtual/pam )
57 + postgres? ( dev-db/postgresql:* )
58 + python? ( ${PYTHON_DEPS} )
59 + sasl? ( virtual/gsasl )
60 + ssl? ( net-libs/gnutls )
61 + tcpd? ( sys-apps/tcp-wrappers )
62 + tokyocabinet? ( dev-db/tokyocabinet )"
63 +
64 +DEPEND="${RDEPEND}
65 + virtual/pkgconfig"
66 +
67 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
68 +
69 +pkg_setup() {
70 + use python && python-single-r1_pkg_setup
71 +}
72 +
73 +src_prepare() {
74 + # Disable bytecompilation of Python modules.
75 + echo "#!/bin/sh" > build-aux/py-compile
76 + epatch "${FILESDIR}/${P}-array_bounds.patch"
77 + epatch "${FILESDIR}/${P}-readline-6.3.patch" #503954
78 + if use mysql; then
79 + sed -i -e /^INCLUDES/"s:$:$(mysql_config --include):" \
80 + sql/Makefile.am || die
81 + eautoreconf
82 + fi
83 +}
84 +
85 +src_configure() {
86 + append-flags -fno-strict-aliasing
87 +
88 + # maildir is the Gentoo default
89 + # but fails tests. So set it in config file instead.
90 + #econf MU_DEFAULT_SCHEME=maildir \
91 + econf CURSES_LIBS="$($(tc-getPKG_CONFIG) --libs ncurses)" \
92 + $(use_with berkdb berkeley-db) \
93 + $(use_with bidi fribidi) \
94 + $(use_enable ipv6) \
95 + $(use_with gdbm) \
96 + $(use_with sasl gsasl) \
97 + $(use_with guile) \
98 + $(use_with kerberos gssapi) \
99 + $(use_with ldap) \
100 + $(use_with mysql) \
101 + $(use_enable nls) \
102 + $(use_enable pam) \
103 + $(use_with postgres) \
104 + $(use_enable python) \
105 + $(use_with ssl gnutls) \
106 + $(use_enable static-libs static) \
107 + $(use_enable threads pthread) \
108 + $(use_with tokyocabinet) \
109 + $(use_enable servers build-servers) \
110 + $(use_enable clients build-clients) \
111 + --with-mail-spool=/var/spool/mail \
112 + --with-readline \
113 + --enable-sendmail \
114 + --disable-debug \
115 + --disable-rpath
116 +}
117 +
118 +src_install() {
119 + emake DESTDIR="${D}" install
120 +
121 + insinto /etc
122 + doins "${FILESDIR}/mailutils.rc"
123 + keepdir /etc/mailutils.d/
124 + insinto /etc/mailutils.d
125 + doins "${FILESDIR}/mail"
126 +
127 + if use python; then
128 + python_optimize
129 + if use static-libs; then
130 + rm -r "${D}$(python_get_sitedir)/mailutils"/*.{a,la} || die
131 + fi
132 + fi
133 +
134 + if use servers; then
135 + newinitd "${FILESDIR}"/imap4d.initd imap4d
136 + newinitd "${FILESDIR}"/pop3d.initd pop3d
137 + newinitd "${FILESDIR}"/comsatd.initd comsatd
138 + fi
139 +
140 + dodoc AUTHORS ChangeLog NEWS README* THANKS TODO
141 +
142 + # compatibility link
143 + use clients && dosym /usr/bin/mail /bin/mail
144 +
145 + use static-libs || find "${D}" -name "*.la" -delete
146 +}