1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{3_6,3_7} )
8 inherit eutils flag-o-matic toolchain-funcs python-any-r1
10 DESCRIPTION="GNU utilities for finding files"
11 HOMEPAGE="https://www.gnu.org/software/findutils/"
12 SRC_URI="mirror://gnu/${PN}/${P}.tar.gz"
16 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~ppc-aix ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
17 IUSE="nls selinux static test"
18 RESTRICT="!test? ( test )"
20 RDEPEND="selinux? ( sys-libs/libselinux )
21 nls? ( virtual/libintl )"
23 test? ( ${PYTHON_DEPS} )
24 nls? ( sys-devel/gettext )"
27 use test && python-any-r1_pkg_setup
31 # Don't build or install locate because it conflicts with slocate,
32 # which is a secure version of locate. See bug 18729
33 sed -i '/^SUBDIRS/s/locate//' Makefile.in
35 # Newer C libraries omit this include from sys/types.h.
36 # https://lists.gnu.org/archive/html/bug-gnulib/2016-03/msg00018.html
38 '/include.*config.h/a#ifdef MAJOR_IN_SYSMACROS\n#include <sys/sysmacros.h>\n#endif\n' \
39 gl/lib/mountlist.c || die
41 epatch "${FILESDIR}"/${P}-gnulib-mb.patch #576818
42 epatch "${FILESDIR}"/${P}-gnulib-S_MAGIC_NFS.patch #580032
43 epatch "${FILESDIR}"/${P}-glibc228.patch #663242
48 use static && append-ldflags -static
50 program_prefix=$(usex userland_GNU '' g)
52 --with-packager="Gentoo" \
53 --with-packager-version="${PVR}" \
54 --with-packager-bug-reports="https://bugs.gentoo.org/" \
55 --program-prefix=${program_prefix} \
58 --libexecdir='$(libdir)'/find
62 # We don't build locate, but the docs want a file in there.
63 emake -C locate dblocation.texi