mailutils-3.1.1.ebuild 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  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/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 kyotocabinet ldap \
  14. mysql nls pam postgres python servers ssl static-libs +threads tcpd \
  15. tokyocabinet"
  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
  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. kyotocabinet? ( dev-db/kyotocabinet )
  30. ldap? ( net-nds/openldap )
  31. mysql? ( virtual/mysql )
  32. nls? ( sys-devel/gettext )
  33. pam? ( virtual/pam )
  34. postgres? ( dev-db/postgresql:= )
  35. python? ( ${PYTHON_DEPS} )
  36. sasl? ( virtual/gsasl )
  37. ssl? ( net-libs/gnutls:= )
  38. tcpd? ( sys-apps/tcp-wrappers )
  39. tokyocabinet? ( dev-db/tokyocabinet )"
  40. DEPEND="${RDEPEND}
  41. virtual/pkgconfig"
  42. REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )
  43. servers? ( tcpd )"
  44. pkg_setup() {
  45. use python && python-single-r1_pkg_setup
  46. }
  47. src_prepare() {
  48. # Disable bytecompilation of Python modules.
  49. echo "#!/bin/sh" > build-aux/py-compile
  50. eapply "${FILESDIR}/${PN}-2.99.98-readline-6.3.patch" #503954
  51. # bug 567976
  52. sed -i -e /AM_GNU_GETTEXT_VERSION/s/0.18/0.19/ configure.ac || die
  53. # add missing tests so that make check doesn't fail
  54. cp "${FILESDIR}"/{hdr,nohdr,twomsg,weed}.at "${S}"/readmsg/tests || die
  55. if use mysql; then
  56. sed -i -e /^INCLUDES/"s:$:$(mysql_config --include):" \
  57. sql/Makefile.am || die
  58. fi
  59. eapply_user
  60. eautoreconf
  61. }
  62. src_configure() {
  63. append-flags -fno-strict-aliasing
  64. # maildir is the Gentoo default
  65. econf MU_DEFAULT_SCHEME=maildir \
  66. CURSES_LIBS="$($(tc-getPKG_CONFIG) --libs ncurses)" \
  67. $(use_with berkdb berkeley-db) \
  68. $(use_with bidi fribidi) \
  69. $(use_enable ipv6) \
  70. $(use_with gdbm) \
  71. $(use_with sasl gsasl) \
  72. $(use_with guile) \
  73. $(use_with kerberos gssapi) \
  74. $(use_with ldap) \
  75. $(use_with mysql) \
  76. $(use_enable nls) \
  77. $(use_enable pam) \
  78. $(use_with postgres) \
  79. $(use_enable python) \
  80. $(use_with ssl gnutls) \
  81. $(use_enable static-libs static) \
  82. $(use_enable threads pthread) \
  83. $(use_with tokyocabinet) \
  84. $(use_with kyotocabinet) \
  85. $(use_with tcpd tcp-wrappers) \
  86. $(use_enable servers build-servers) \
  87. $(use_enable clients build-clients) \
  88. --with-mail-spool=/var/spool/mail \
  89. --with-readline \
  90. --enable-sendmail \
  91. --disable-debug \
  92. --disable-rpath
  93. }
  94. src_install() {
  95. emake DESTDIR="${D}" install
  96. insinto /etc
  97. doins "${FILESDIR}/mailutils.rc"
  98. keepdir /etc/mailutils.d/
  99. insinto /etc/mailutils.d
  100. doins "${FILESDIR}/mail"
  101. if use python; then
  102. python_optimize
  103. if use static-libs; then
  104. rm -r "${D}$(python_get_sitedir)/mailutils"/*.{a,la} || die
  105. fi
  106. fi
  107. if use servers; then
  108. newinitd "${FILESDIR}"/imap4d.initd imap4d
  109. newinitd "${FILESDIR}"/pop3d.initd pop3d
  110. newinitd "${FILESDIR}"/comsatd.initd comsatd
  111. fi
  112. dodoc AUTHORS ChangeLog NEWS README* THANKS TODO
  113. # compatibility link
  114. use clients && dosym /usr/bin/mail /bin/mail
  115. use static-libs || find "${D}" -name "*.la" -delete
  116. }