mtools-4.0.18-r2.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit flag-o-matic eutils
  5. DESCRIPTION="utilities to access MS-DOS disks from Unix without mounting them"
  6. HOMEPAGE="https://www.gnu.org/software/mtools/ https://savannah.gnu.org/projects/mtools"
  7. SRC_URI="mirror://gnu/${PN}/${P}.tar.bz2"
  8. LICENSE="GPL-3"
  9. SLOT="0"
  10. KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x64-macos ~x64-solaris"
  11. IUSE="X elibc_glibc"
  12. DEPEND="
  13. !elibc_glibc? ( virtual/libiconv )
  14. X? (
  15. x11-libs/libICE
  16. x11-libs/libXau
  17. x11-libs/libSM
  18. x11-libs/libX11
  19. x11-libs/libXt
  20. )"
  21. RDEPEND="${DEPEND}"
  22. src_prepare() {
  23. # Don't throw errors on existing directories
  24. sed -i -e "s:mkdir:mkdir -p:" mkinstalldirs || die
  25. epatch "${FILESDIR}"/${P}-locking.patch # https://crbug.com/508713
  26. epatch "${FILESDIR}"/${P}-attr.patch # https://crbug.com/644387
  27. epatch "${FILESDIR}"/${P}-memset.patch
  28. }
  29. src_configure() {
  30. # 447688
  31. use elibc_glibc || append-libs iconv
  32. econf \
  33. --sysconfdir="${EPREFIX}"/etc/mtools \
  34. $(use_with X x)
  35. }
  36. src_install() {
  37. emake DESTDIR="${D}" install
  38. dodoc README* Release.notes
  39. insinto /etc/mtools
  40. doins mtools.conf
  41. # default is fine
  42. sed -i -e '/^SAMPLE FILE$/s:^:#:' "${ED}"/etc/mtools/mtools.conf || die
  43. }