mailutils-2.99.98-r1.ebuild 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. inherit autotools eutils flag-o-matic python-single-r1 toolchain-funcs
  6. DESCRIPTION="A useful collection of mail servers, clients, and filters"
  7. HOMEPAGE="https://www.gnu.org/software/mailutils/mailutils.html"
  8. #SRC_URI="mirror://gnu/mailutils/${P}.tar.xz"
  9. SRC_URI="mirror://gnu-alpha/mailutils/${P}.tar.xz"
  10. LICENSE="GPL-2 LGPL-2.1"
  11. SLOT="0"
  12. KEYWORDS="amd64 ~arm64 ~hppa ~ppc x86 ~ppc-macos ~x64-macos ~x86-macos"
  13. IUSE="berkdb bidi +clients gdbm sasl guile ipv6 kerberos ldap mysql nls pam postgres
  14. python servers ssl static-libs +threads tcpd tokyocabinet"
  15. # Drop the libtool dep once libltdl goes stable.
  16. RDEPEND="!mail-client/nmh
  17. !mail-filter/libsieve
  18. !mail-client/mailx
  19. !mail-client/nail
  20. sys-libs/ncurses:=
  21. sys-libs/readline:=
  22. || ( dev-libs/libltdl:0 <sys-devel/libtool-2.4.3-r2:2 )
  23. virtual/mta
  24. berkdb? ( sys-libs/db:= )
  25. bidi? ( dev-libs/fribidi )
  26. gdbm? ( sys-libs/gdbm )
  27. guile? ( dev-scheme/guile:= )
  28. kerberos? ( virtual/krb5 )
  29. ldap? ( net-nds/openldap )
  30. mysql? ( virtual/mysql )
  31. nls? ( sys-devel/gettext )
  32. pam? ( virtual/pam )
  33. postgres? ( dev-db/postgresql:= )
  34. python? ( ${PYTHON_DEPS} )
  35. sasl? ( virtual/gsasl )
  36. ssl? ( net-libs/gnutls:= )
  37. tcpd? ( sys-apps/tcp-wrappers )
  38. tokyocabinet? ( dev-db/tokyocabinet )"
  39. DEPEND="${RDEPEND}
  40. virtual/pkgconfig"
  41. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
  42. pkg_setup() {
  43. use python && python-single-r1_pkg_setup
  44. }
  45. src_prepare() {
  46. # Disable bytecompilation of Python modules.
  47. echo "#!/bin/sh" > build-aux/py-compile
  48. epatch "${FILESDIR}/${P}-array_bounds.patch"
  49. epatch "${FILESDIR}/${P}-readline-6.3.patch" #503954
  50. if use mysql; then
  51. sed -i -e /^INCLUDES/"s:$:$(mysql_config --include):" \
  52. sql/Makefile.am || die
  53. eautoreconf
  54. fi
  55. }
  56. src_configure() {
  57. append-flags -fno-strict-aliasing
  58. # maildir is the Gentoo default
  59. # but fails tests. So set it in config file instead.
  60. #econf MU_DEFAULT_SCHEME=maildir \
  61. econf CURSES_LIBS="$($(tc-getPKG_CONFIG) --libs ncurses)" \
  62. $(use_with berkdb berkeley-db) \
  63. $(use_with bidi fribidi) \
  64. $(use_enable ipv6) \
  65. $(use_with gdbm) \
  66. $(use_with sasl gsasl) \
  67. $(use_with guile) \
  68. $(use_with kerberos gssapi) \
  69. $(use_with ldap) \
  70. $(use_with mysql) \
  71. $(use_enable nls) \
  72. $(use_enable pam) \
  73. $(use_with postgres) \
  74. $(use_enable python) \
  75. $(use_with ssl gnutls) \
  76. $(use_enable static-libs static) \
  77. $(use_enable threads pthread) \
  78. $(use_with tokyocabinet) \
  79. $(use_enable servers build-servers) \
  80. $(use_enable clients build-clients) \
  81. --with-mail-spool=/var/spool/mail \
  82. --with-readline \
  83. --enable-sendmail \
  84. --disable-debug \
  85. --disable-rpath
  86. }
  87. src_install() {
  88. emake DESTDIR="${D}" install
  89. insinto /etc
  90. doins "${FILESDIR}/mailutils.rc"
  91. keepdir /etc/mailutils.d/
  92. insinto /etc/mailutils.d
  93. doins "${FILESDIR}/mail"
  94. if use python; then
  95. python_optimize
  96. if use static-libs; then
  97. rm -r "${D}$(python_get_sitedir)/mailutils"/*.{a,la} || die
  98. fi
  99. fi
  100. if use servers; then
  101. newinitd "${FILESDIR}"/imap4d.initd imap4d
  102. newinitd "${FILESDIR}"/pop3d.initd pop3d
  103. newinitd "${FILESDIR}"/comsatd.initd comsatd
  104. fi
  105. dodoc AUTHORS ChangeLog NEWS README* THANKS TODO
  106. # compatibility link
  107. use clients && dosym /usr/bin/mail /bin/mail
  108. use static-libs || find "${D}" -name "*.la" -delete
  109. }