nmh-1.3-r3.ebuild 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # Copyright 1999-2012 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="2"
  4. inherit eutils base
  5. DESCRIPTION="New MH mail reader"
  6. HOMEPAGE="http://www.nongnu.org/nmh/"
  7. SRC_URI="https://savannah.nongnu.org/download/nmh/${P}.tar.gz"
  8. LICENSE="BSD"
  9. SLOT="0"
  10. KEYWORDS="~amd64 ~x86"
  11. IUSE="gdbm"
  12. DEPEND="gdbm? ( sys-libs/gdbm )
  13. !gdbm? ( sys-libs/db )
  14. >=sys-libs/ncurses-5.2
  15. net-libs/liblockfile
  16. >=app-misc/editor-wrapper-3
  17. !!media-gfx/pixie" # Bug #295996 media-gfx/pixie also uses show
  18. RDEPEND="${DEPEND}"
  19. DOCS=( ChangeLog DATE MACHINES README )
  20. src_prepare() {
  21. # Patches from bug #22173.
  22. epatch "${FILESDIR}"/${P}-inc-login.patch
  23. epatch "${FILESDIR}"/${P}-install.patch
  24. # bug #57886
  25. epatch "${FILESDIR}"/${P}-m_getfld.patch
  26. # bug #319937
  27. epatch "${FILESDIR}"/${P}-db5.patch
  28. # Allow parallel compiles/installs
  29. epatch "${FILESDIR}"/${P}-parallelmake.patch
  30. }
  31. src_configure() {
  32. # Bug 348816 & Bug 341741: The previous ebuild default of
  33. # /usr/bin caused unnecessary conflicts with other
  34. # packages. However, the default nmh libdir location causes
  35. # problems with cross-compiling, so we use, eg., /usr/lib64.
  36. # Users may use /usr/lib/nmh in scripts needing these support
  37. # programs in normal environments.
  38. local myconf="--libdir=/usr/$(get_libdir)/nmh"
  39. # Have gdbm use flag actually control which version of db in use
  40. if use gdbm; then
  41. myconf="${myconf} --with-ndbmheader=gdbm/ndbm.h --with-ndbm=gdbm_compat"
  42. else
  43. if has_version ">=sys-libs/db-2"; then
  44. myconf="${myconf} --with-ndbmheader=db.h --with-ndbm=db"
  45. else
  46. myconf="${myconf} --with-ndbmheader=db1/ndbm.h --with-ndbm=db1"
  47. fi
  48. fi
  49. # use wrapper scripts to avoid implicit dependencies (Bug #294762)
  50. EDITOR=/usr/libexec/editor
  51. PAGER=/usr/libexec/pager
  52. econf \
  53. --prefix=/usr \
  54. --mandir=/usr/share/man \
  55. --with-editor="${EDITOR}" \
  56. --with-pager="${PAGER}" \
  57. --enable-nmh-pop \
  58. --sysconfdir=/etc/nmh \
  59. ${myconf}
  60. }