1 |
commit: d5806bdf4686f5af5f9f7b06741578c3e40be456 |
2 |
Author: Arsen Arsenović <arsen <AT> aarsen <DOT> me> |
3 |
AuthorDate: Tue Aug 24 22:41:26 2021 +0000 |
4 |
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Aug 25 07:52:33 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5806bdf |
7 |
|
8 |
sys-apps/plocate: add version 1.1.10 |
9 |
|
10 |
Package-Manager: Portage-3.0.20, Repoman-3.0.3 |
11 |
Signed-off-by: Arsen Arsenović <arsen <AT> aarsen.me> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/22022 |
13 |
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org> |
14 |
|
15 |
sys-apps/plocate/Manifest | 1 + |
16 |
...0-meson-use-feature-option-for-libiouring.patch | 38 ++++++++++ |
17 |
sys-apps/plocate/plocate-1.1.10.ebuild | 81 ++++++++++++++++++++++ |
18 |
3 files changed, 120 insertions(+) |
19 |
|
20 |
diff --git a/sys-apps/plocate/Manifest b/sys-apps/plocate/Manifest |
21 |
index 4d4a1d480d4..7a35e770f07 100644 |
22 |
--- a/sys-apps/plocate/Manifest |
23 |
+++ b/sys-apps/plocate/Manifest |
24 |
@@ -1 +1,2 @@ |
25 |
+DIST plocate-1.1.10.tar.gz 72222 BLAKE2B 2d84177454380c9e806a46a6e7057aca15b65c9d83179ba35062d0b8772e7cb3ff50d594c294d73157e7705d4b2eea3f12d07e614076e6a6c7a9b532f42640f5 SHA512 eee4a8982b8fff18793cd06c35cdea501226fae6409df02e8bed3d14feb3ed4ba6c29e907f36f5efb74202e8926547def83379b03aeb6348e1a6e7b51f12fdb9 |
26 |
DIST plocate-1.1.8.tar.gz 71569 BLAKE2B 06ad0e9535b76bf0102cdeeb6014e2d84f85f51f5926520566e9c6871f04ac09651bb0674ed679d2a4c0d4e516e55dfef35a7021112fad3549bf76993554aeb5 SHA512 a685347df64ac1a3eb7789cb7023b4d0ffed5fb7435a4bd88c3943991e145a387829532ec0c01d30d851b97b8d3173ff4c7c274775e639b75f0b1b45e5bca2a6 |
27 |
|
28 |
diff --git a/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch b/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..183c9f8e7ff |
31 |
--- /dev/null |
32 |
+++ b/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch |
33 |
@@ -0,0 +1,38 @@ |
34 |
+From 562128212376305bac8edd10d80c24f1223f1870 Mon Sep 17 00:00:00 2001 |
35 |
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@××××××.me> |
36 |
+Date: Thu, 19 Aug 2021 12:03:39 +0200 |
37 |
+Subject: [PATCH plocate] meson: use feature option for libiouring |
38 |
+ |
39 |
+source-based distributions would prefer to allow this option to be |
40 |
+disabled without a hack, regardless of is libiouring installed or not, |
41 |
+and meson already supports feature options for this purpose. |
42 |
+--- |
43 |
+ meson.build | 2 +- |
44 |
+ meson_options.txt | 1 + |
45 |
+ 2 files changed, 2 insertions(+), 1 deletion(-) |
46 |
+ |
47 |
+diff --git a/meson.build b/meson.build |
48 |
+index 6fb0f74..fb79e3f 100644 |
49 |
+--- a/meson.build |
50 |
++++ b/meson.build |
51 |
+@@ -10,7 +10,7 @@ add_project_arguments('-DPACKAGE_VERSION="' + meson.project_version() + '"', lan |
52 |
+ add_project_arguments('-DPACKAGE_BUGREPORT="steinar+plocate@×××××××××.no"', language: 'cpp') |
53 |
+ |
54 |
+ cxx = meson.get_compiler('cpp') |
55 |
+-uringdep = dependency('liburing', required: false) |
56 |
++uringdep = dependency('liburing', required: get_option('use_libiouring')) |
57 |
+ zstddep = dependency('libzstd') |
58 |
+ threaddep = dependency('threads') |
59 |
+ atomicdep = cxx.find_library('atomic', required: false) |
60 |
+diff --git a/meson_options.txt b/meson_options.txt |
61 |
+index 8ac13c5..9c90bf0 100644 |
62 |
+--- a/meson_options.txt |
63 |
++++ b/meson_options.txt |
64 |
+@@ -3,3 +3,4 @@ option('install_systemd', type: 'boolean', value: true, description: 'Install sy |
65 |
+ option('systemunitdir', type: 'string', description: 'Where to install systemd units to (default: autodetect)') |
66 |
+ option('locategroup', type: 'string', value: 'plocate', description: 'Group that the install script will use for the .db file') |
67 |
+ option('updatedb_progname', type: 'string', value: 'updatedb', description: 'Binary name of updatedb') |
68 |
++option('use_libiouring', type: 'feature', value: 'auto', description: 'Enable libiouring dependency (default: autodetect)') |
69 |
+-- |
70 |
+2.31.1 |
71 |
+ |
72 |
|
73 |
diff --git a/sys-apps/plocate/plocate-1.1.10.ebuild b/sys-apps/plocate/plocate-1.1.10.ebuild |
74 |
new file mode 100644 |
75 |
index 00000000000..d198d630c59 |
76 |
--- /dev/null |
77 |
+++ b/sys-apps/plocate/plocate-1.1.10.ebuild |
78 |
@@ -0,0 +1,81 @@ |
79 |
+# Copyright 1999-2021 Gentoo Authors |
80 |
+# Distributed under the terms of the GNU General Public License v2 |
81 |
+ |
82 |
+EAPI=7 |
83 |
+ |
84 |
+inherit linux-info meson systemd |
85 |
+ |
86 |
+DESCRIPTION="Posting locate is a much faster locate" |
87 |
+HOMEPAGE="https://plocate.sesse.net/" |
88 |
+SRC_URI="https://plocate.sesse.net/download/${P}.tar.gz" |
89 |
+ |
90 |
+# GPL-2 for updatedb |
91 |
+# GPL-2+ for plocate itself |
92 |
+LICENSE="GPL-2 GPL-2+" |
93 |
+SLOT="0" |
94 |
+KEYWORDS="~amd64 ~arm64" |
95 |
+IUSE="+io-uring" |
96 |
+ |
97 |
+RDEPEND=" |
98 |
+ acct-group/locate |
99 |
+ app-arch/zstd:= |
100 |
+ io-uring? ( sys-libs/liburing:= ) |
101 |
+ !sys-apps/mlocate |
102 |
+" |
103 |
+DEPEND="${RDEPEND}" |
104 |
+ |
105 |
+CONFIG_CHECK="~IO_URING" |
106 |
+ERROR_IO_URING="required for USE=io-uring" |
107 |
+ |
108 |
+PATCHES=( |
109 |
+ "${FILESDIR}"/${PN}-1.1.10-meson-use-feature-option-for-libiouring.patch |
110 |
+) |
111 |
+ |
112 |
+src_prepare() { |
113 |
+ # We'll install the manpage ourself to locate.1 |
114 |
+ sed -i "/install_man('plocate.1')/d" meson.build || die |
115 |
+ |
116 |
+ default |
117 |
+} |
118 |
+ |
119 |
+src_configure() { |
120 |
+ local emesonargs=( |
121 |
+ -Dlocategroup=locate |
122 |
+ -Dinstall_systemd=true |
123 |
+ -Dinstall_cron=false |
124 |
+ -Dsystemunitdir="$(systemd_get_systemunitdir)" |
125 |
+ "$(meson_feature io-uring use_libiouring)" |
126 |
+ ) |
127 |
+ meson_src_configure |
128 |
+} |
129 |
+ |
130 |
+src_install() { |
131 |
+ meson_src_install |
132 |
+ dodoc README NEWS |
133 |
+ newman "${S}"/${PN}.1 locate.1 |
134 |
+ dosym plocate /usr/bin/locate |
135 |
+ |
136 |
+ insinto /etc |
137 |
+ doins "${FILESDIR}"/updatedb.conf |
138 |
+ doins "${FILESDIR}"/plocate-cron.conf |
139 |
+ fperms 0644 /etc/{updatedb,plocate-cron}.conf |
140 |
+ |
141 |
+ insinto /etc/cron.daily |
142 |
+ # Ensure that the cron file has the same name as the |
143 |
+ # systemd-timer, to avoid plocate being run twice daily on systems |
144 |
+ # with a systemd compatiblity layer. See also bug #780351. |
145 |
+ newins "${FILESDIR}"/plocate.cron plocate-updatedb |
146 |
+ fperms 0755 /etc/cron.daily/plocate-updatedb |
147 |
+ |
148 |
+ systemd_dounit "${BUILD_DIR}"/${PN}-updatedb.service "${S}"/${PN}-updatedb.timer |
149 |
+} |
150 |
+ |
151 |
+pkg_postinst() { |
152 |
+ if [[ -z "${REPLACING_VERSIONS}" ]] ; then |
153 |
+ elog "The database for the locate command is generated daily by a cron job," |
154 |
+ elog "if you install for the first time you can run the updatedb command manually now." |
155 |
+ elog |
156 |
+ elog "Note that the ${EROOT}/etc/updatedb.conf file is generic," |
157 |
+ elog "please customize it to your system requirements." |
158 |
+ fi |
159 |
+} |