findutils-4.4.2-r2.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit eutils flag-o-matic toolchain-funcs
  5. SELINUX_PATCH="findutils-4.4.2-selinux.diff"
  6. DESCRIPTION="GNU utilities for finding files"
  7. HOMEPAGE="https://www.gnu.org/software/findutils/"
  8. SRC_URI="mirror://gnu-alpha/${PN}/${P}.tar.gz
  9. mirror://gnu/${PN}/${P}.tar.gz"
  10. LICENSE="GPL-3+"
  11. SLOT="0"
  12. KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
  13. IUSE="debug nls selinux static"
  14. RDEPEND="selinux? ( sys-libs/libselinux )
  15. nls? ( virtual/libintl )"
  16. DEPEND="${RDEPEND}
  17. nls? ( sys-devel/gettext )"
  18. src_prepare() {
  19. epatch "${FILESDIR}"/${P}-gnulib-date-x32.patch
  20. # Don't build or install locate because it conflicts with slocate,
  21. # which is a secure version of locate. See bug 18729
  22. sed -i '/^SUBDIRS/s/locate//' Makefile.in
  23. use selinux && epatch "${FILESDIR}/${SELINUX_PATCH}"
  24. }
  25. src_configure() {
  26. use static && append-ldflags -static
  27. program_prefix=$(usex userland_GNU '' g)
  28. econf \
  29. --program-prefix=${program_prefix} \
  30. $(use_enable debug) \
  31. $(use_enable nls) \
  32. --libexecdir='$(libdir)'/find
  33. }
  34. src_compile() {
  35. emake AR="$(tc-getAR)"
  36. }
  37. src_install() {
  38. default
  39. # We don't need this, so punt it.
  40. rm "${ED}"/usr/bin/${program_prefix}oldfind || die
  41. }