Gentoo Archives: gentoo-commits

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