public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Florian Schmaus" <flow@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/, sys-apps/plocate/files/
Date: Wed,  2 Feb 2022 06:56:58 +0000 (UTC)	[thread overview]
Message-ID: <1643785013.0c6c1f4b7652a338391635dc2c96f87704034506.flow@gentoo> (raw)

commit:     0c6c1f4b7652a338391635dc2c96f87704034506
Author:     Arsen Arsenović <arsen <AT> aarsen <DOT> me>
AuthorDate: Mon Jan 31 21:31:09 2022 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Wed Feb  2 06:56:53 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c6c1f4b

sys-apps/plocate: bump to 1.1.15

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Arsen Arsenović <arsen <AT> aarsen.me>
Closes: https://github.com/gentoo/gentoo/pull/24035
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>

 sys-apps/plocate/Manifest                          |  1 +
 ...5-meson-use-feature-option-for-libiouring.patch | 41 +++++++++++
 sys-apps/plocate/plocate-1.1.15.ebuild             | 81 ++++++++++++++++++++++
 3 files changed, 123 insertions(+)

diff --git a/sys-apps/plocate/Manifest b/sys-apps/plocate/Manifest
index 40b1ce5f21ff..7f58f5dc35ac 100644
--- a/sys-apps/plocate/Manifest
+++ b/sys-apps/plocate/Manifest
@@ -1,3 +1,4 @@
 DIST plocate-1.1.11.tar.gz 72366 BLAKE2B 2b945b3e61244670e2295e1e5abc2af65d2cdbb2393a96961cd4ae97384a735c327037771e6f41927cec0860207a6f98b7b0c2b03d08678bdb0d72a94dfa04f7 SHA512 59f88a11ebbac5f350acca6d1a5890ac1c1cb10c1de2e4e149df60fc63673eefa7f143b06f79ec4e59c65d435b3e222eba5618c48afab97983d76f56fbe8b433
 DIST plocate-1.1.13.tar.gz 72741 BLAKE2B 251c5ff570bda125c839e125eab093e15545beb24e75d29c21f13050fc088653f11ba1acbf4c4f6f6aaca4f134908b8084ad4b1e8b0cad83a1a05e1bc2973cdc SHA512 a7c761e4da169716686f438846587e4bdb6df4de039cd7b4fed455e5f52b8aa235714f0c1059787f65f1553a07929802d0ecda0b26111d4f0f811af96a48cb7d
 DIST plocate-1.1.14.tar.gz 73037 BLAKE2B 032963fa268d31664a8abd38ca501aacda4cfe29c8fd1e41228a4cfd5976174736e8d8f8aa1265de8953ec63211700da73e4cdd3eef42c059a638cdd9cd59379 SHA512 c97c9e4aed785af6bd8c2a30d5d5c7190cb4c513f1d6b66bb2885c9550b4cd39f097fac4bd736c211a921955422d0c27b5f35713f03ebe136450cb724fcfe600
+DIST plocate-1.1.15.tar.gz 73274 BLAKE2B 72dba287ba3357d2fa541542bf5e9d283eac672b7f3b2eebab687ecec930d6e91400eeb0f24c97d6133d69cae0308bc4473b7c8cbc5e263dd18ae8a7728a42a4 SHA512 772f82af38fd7b61fa51ac31f71d4a855542cfa617867da54b5ad8202f49f9e1861064a01e9b8f0937c3da902d84f19a50c1d0e4f037a491a9a6819b2413cfa1

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
new file mode 100644
index 000000000000..dec128cddf6d
--- /dev/null
+++ b/sys-apps/plocate/files/plocate-1.1.15-meson-use-feature-option-for-libiouring.patch
@@ -0,0 +1,41 @@
+From e61f3b1dfcc883b701cf6dd331f2d93dcc8919f5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Thu, 19 Aug 2021 12:03:39 +0200
+Subject: [PATCH plocate] meson: use feature option for libiouring
+
+source-based distributions would prefer to allow this option to be
+disabled without a hack, regardless of is libiouring installed or not,
+and meson already supports feature options for this purpose.
+---
+rebased from plocate-1.1.10-meson-use-feature-option-for-libiouring.patch on
+top of 1.1.15
+
+ meson.build       | 2 +-
+ meson_options.txt | 1 +
+ 2 files changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 2a7d20c..81bc891 100644
+--- a/meson.build
++++ b/meson.build
+@@ -9,7 +9,7 @@ add_project_arguments('-DPACKAGE_VERSION="' + meson.project_version() + '"', lan
+ add_project_arguments('-DPACKAGE_BUGREPORT="steinar+plocate@gunderson.no"', language: 'cpp')
+ 
+ cxx = meson.get_compiler('cpp')
+-uringdep = dependency('liburing', required: false)
++uringdep = dependency('liburing', required: get_option('use_libiouring'))
+ zstddep = dependency('libzstd')
+ threaddep = dependency('threads')
+ atomicdep = cxx.find_library('atomic', required: false)
+diff --git a/meson_options.txt b/meson_options.txt
+index a9f3358..1f2274f 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -4,3 +4,4 @@ option('systemunitdir', type: 'string', description: 'Where to install systemd u
+ option('locategroup', type: 'string', value: 'plocate', description: 'Group that the install script will use for the .db file')
+ option('updatedb_progname', type: 'string', value: 'updatedb', description: 'Binary name of updatedb')
+ option('dbpath', type: 'string', value: 'plocate/plocate.db', description: 'Path to plocate database relative to "sharedstatedir"')
++option('use_libiouring', type: 'feature', value: 'auto', description: 'Enable libiouring dependency (default: autodetect)')
+-- 
+2.34.1
+

diff --git a/sys-apps/plocate/plocate-1.1.15.ebuild b/sys-apps/plocate/plocate-1.1.15.ebuild
new file mode 100644
index 000000000000..8e6ca0baf328
--- /dev/null
+++ b/sys-apps/plocate/plocate-1.1.15.ebuild
@@ -0,0 +1,81 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit linux-info meson systemd
+
+DESCRIPTION="Posting locate is a much faster locate"
+HOMEPAGE="https://plocate.sesse.net/"
+SRC_URI="https://plocate.sesse.net/download/${P}.tar.gz"
+
+# GPL-2 for updatedb
+# GPL-2+ for plocate itself
+LICENSE="GPL-2 GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64"
+IUSE="+io-uring"
+
+RDEPEND="
+	acct-group/locate
+	app-arch/zstd:=
+	io-uring? ( sys-libs/liburing:= )
+	!sys-apps/mlocate
+"
+DEPEND="${RDEPEND}"
+
+CONFIG_CHECK="~IO_URING"
+ERROR_IO_URING="required for USE=io-uring"
+
+PATCHES=(
+	"${FILESDIR}"/${PN}-1.1.15-meson-use-feature-option-for-libiouring.patch
+)
+
+src_prepare() {
+	# We'll install the manpage ourself to locate.1
+	sed -i "/install_man('plocate.1')/d" meson.build || die
+
+	default
+}
+
+src_configure() {
+	local emesonargs=(
+		-Dlocategroup=locate
+		-Dinstall_systemd=true
+		-Dinstall_cron=false
+		-Dsystemunitdir="$(systemd_get_systemunitdir)"
+		"$(meson_feature io-uring use_libiouring)"
+	)
+	meson_src_configure
+}
+
+src_install() {
+	meson_src_install
+	dodoc README NEWS
+	newman "${S}"/${PN}.1 locate.1
+	dosym plocate /usr/bin/locate
+
+	insinto /etc
+	doins "${FILESDIR}"/updatedb.conf
+	doins "${FILESDIR}"/plocate-cron.conf
+	fperms 0644 /etc/{updatedb,plocate-cron}.conf
+
+	insinto /etc/cron.daily
+	# Ensure that the cron file has the same name as the
+	# systemd-timer, to avoid plocate being run twice daily on systems
+	# with a systemd compatiblity layer. See also bug #780351.
+	newins "${FILESDIR}"/plocate.cron plocate-updatedb
+	fperms 0755 /etc/cron.daily/plocate-updatedb
+
+	systemd_dounit "${BUILD_DIR}"/${PN}-updatedb.service "${S}"/${PN}-updatedb.timer
+}
+
+pkg_postinst() {
+	if [[ -z "${REPLACING_VERSIONS}" ]] ; then
+		elog "The database for the locate command is generated daily by a cron job,"
+		elog "if you install for the first time you can run the updatedb command manually now."
+		elog
+		elog "Note that the ${EROOT}/etc/updatedb.conf file is generic,"
+		elog "please customize it to your system requirements."
+	fi
+}


             reply	other threads:[~2022-02-02  6:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02  6:56 Florian Schmaus [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-09-21 20:44 [gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/, sys-apps/plocate/files/ Florian Schmaus
2023-03-04  7:39 Sam James
2021-08-19  2:24 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1643785013.0c6c1f4b7652a338391635dc2c96f87704034506.flow@gentoo \
    --to=flow@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox