1 |
commit: d7c50bf2f0b12fba15bcd5f7ffde684e7b61c4b5 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Oct 30 12:53:18 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Oct 30 15:50:17 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7c50bf2 |
7 |
|
8 |
sys-apps/findutils: Install as gfind, gxargs for better BSD compat. |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
sys-apps/findutils/findutils-4.9.0-r2.ebuild | 97 ++++++++++++++++++++++++++++ |
14 |
1 file changed, 97 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/findutils/findutils-4.9.0-r2.ebuild b/sys-apps/findutils/findutils-4.9.0-r2.ebuild |
17 |
new file mode 100644 |
18 |
index 000000000000..86f171f6797f |
19 |
--- /dev/null |
20 |
+++ b/sys-apps/findutils/findutils-4.9.0-r2.ebuild |
21 |
@@ -0,0 +1,97 @@ |
22 |
+# Copyright 1999-2022 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=8 |
26 |
+ |
27 |
+PYTHON_COMPAT=( python3_{8..11} ) |
28 |
+VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/usr/share/openpgp-keys/findutils.asc |
29 |
+inherit flag-o-matic python-any-r1 verify-sig |
30 |
+ |
31 |
+DESCRIPTION="GNU utilities for finding files" |
32 |
+HOMEPAGE="https://www.gnu.org/software/findutils/" |
33 |
+SRC_URI="mirror://gnu/${PN}/${P}.tar.xz" |
34 |
+SRC_URI+=" verify-sig? ( mirror://gnu/${PN}/${P}.tar.xz.sig )" |
35 |
+ |
36 |
+LICENSE="GPL-3+" |
37 |
+SLOT="0" |
38 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
39 |
+IUSE="nls selinux static test" |
40 |
+RESTRICT="!test? ( test )" |
41 |
+ |
42 |
+RDEPEND=" |
43 |
+ selinux? ( sys-libs/libselinux ) |
44 |
+ nls? ( virtual/libintl ) |
45 |
+" |
46 |
+DEPEND="${RDEPEND}" |
47 |
+BDEPEND=" |
48 |
+ nls? ( sys-devel/gettext ) |
49 |
+ test? ( |
50 |
+ ${PYTHON_DEPS} |
51 |
+ dev-util/dejagnu |
52 |
+ ) |
53 |
+ verify-sig? ( sec-keys/openpgp-keys-findutils ) |
54 |
+" |
55 |
+ |
56 |
+pkg_setup() { |
57 |
+ use test && python-any-r1_pkg_setup |
58 |
+} |
59 |
+ |
60 |
+src_prepare() { |
61 |
+ # Don't build or install locate because it conflicts with mlocate, |
62 |
+ # which is a secure version of locate. See bug 18729 |
63 |
+ sed \ |
64 |
+ -e '/^SUBDIRS/s@locate@@' \ |
65 |
+ -e '/^built_programs/s@ frcode locate updatedb@@' \ |
66 |
+ -i Makefile.in || die |
67 |
+ |
68 |
+ default |
69 |
+} |
70 |
+ |
71 |
+src_configure() { |
72 |
+ if use static; then |
73 |
+ append-flags -pthread |
74 |
+ append-ldflags -static |
75 |
+ fi |
76 |
+ |
77 |
+ append-lfs-flags |
78 |
+ |
79 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
80 |
+ # https://lists.gnu.org/archive/html/bug-findutils/2021-01/msg00050.html |
81 |
+ # https://lists.gnu.org/archive/html/bug-findutils/2021-01/msg00051.html |
82 |
+ append-cppflags '-D__nonnull\(X\)=' |
83 |
+ fi |
84 |
+ |
85 |
+ local myeconfargs=( |
86 |
+ --with-packager="Gentoo" |
87 |
+ --with-packager-version="${PVR}" |
88 |
+ --with-packager-bug-reports="https://bugs.gentoo.org/" |
89 |
+ $(use_enable nls) |
90 |
+ $(use_with selinux) |
91 |
+ --libexecdir='$(libdir)'/find |
92 |
+ # rename to gfind, gxargs for better BSD compatibility |
93 |
+ --program-prefix=g |
94 |
+ ) |
95 |
+ econf "${myeconfargs[@]}" |
96 |
+} |
97 |
+ |
98 |
+src_test() { |
99 |
+ local -x SANDBOX_PREDICT=${SANDBOX_PREDICT} |
100 |
+ addpredict / |
101 |
+ default |
102 |
+} |
103 |
+ |
104 |
+src_compile() { |
105 |
+ # We don't build locate, but the docs want a file in there. |
106 |
+ emake -C locate dblocation.texi |
107 |
+ default |
108 |
+} |
109 |
+ |
110 |
+src_install() { |
111 |
+ default |
112 |
+ |
113 |
+ # symlink to the standard names |
114 |
+ dosym gfind /usr/bin/find |
115 |
+ dosym gxargs /usr/bin/xargs |
116 |
+ dosym gfind.1 /usr/share/man/man1/find.1 |
117 |
+ dosym gxargs.1 /usr/share/man/man1/xargs.1 |
118 |
+} |