public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/basu/files/, sys-libs/basu/
Date: Mon, 22 Nov 2021 09:27:33 +0000 (UTC)	[thread overview]
Message-ID: <1637573242.e59648f8c92c2513c91a5a5f0e151af83c414f54.sam@gentoo> (raw)

commit:     e59648f8c92c2513c91a5a5f0e151af83c414f54
Author:     Arsen Arsenović <arsen <AT> aarsen <DOT> me>
AuthorDate: Fri Nov  5 18:02:24 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 22 09:27:22 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e59648f8

sys-libs/basu: add sys-libs/basu-0.2.0

Package-Manager: Portage-3.0.28, Repoman-3.0.3
Signed-off-by: Arsen Arsenović <arsen <AT> aarsen.me>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-libs/basu/Manifest                             |  1 +
 sys-libs/basu/basu-0.2.0.ebuild                    | 38 +++++++++++++++++
 .../0001-basu-0.2.0-meson-add-libcap-option.patch  | 39 +++++++++++++++++
 ...on-convert-audit-option-to-feature-object.patch | 49 ++++++++++++++++++++++
 sys-libs/basu/metadata.xml                         | 19 +++++++++
 5 files changed, 146 insertions(+)

diff --git a/sys-libs/basu/Manifest b/sys-libs/basu/Manifest
new file mode 100644
index 000000000000..bdca280686aa
--- /dev/null
+++ b/sys-libs/basu/Manifest
@@ -0,0 +1 @@
+DIST basu-0.2.0.tar.gz 238861 BLAKE2B 4fcc664d031477c2ae82e535711561d1a7cb60503fb31fa80101c2046e3fe11f7886851649d38f3d5868a3266f45e651085d99ec95f6788baddbf78e893b1528 SHA512 dbc2f72b6e1a880fa41fe6067a38a301f456e4305dae6eb4d465089d7d9c2f629677ba23752b3e1a1fd476cb440db01ef3a218c1c976f38d0058eed584c80165

diff --git a/sys-libs/basu/basu-0.2.0.ebuild b/sys-libs/basu/basu-0.2.0.ebuild
new file mode 100644
index 000000000000..ea56c930ca40
--- /dev/null
+++ b/sys-libs/basu/basu-0.2.0.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit meson
+
+DESCRIPTION="The sd-bus library, extracted from systemd"
+HOMEPAGE="https://sr.ht/~emersion/basu/"
+LICENSE="LGPL-2.1+"
+SLOT="0"
+
+SRC_URI="https://git.sr.ht/~emersion/basu/refs/download/v${PV}/basu-${PV}.tar.gz"
+KEYWORDS="~amd64"
+
+IUSE="audit caps"
+
+DEPEND="
+	audit? ( sys-process/audit )
+	caps? ( sys-libs/libcap )
+"
+
+RDEPEND="${DEPEND}"
+# Needed to generate hash tables
+BDEPEND="dev-util/gperf"
+
+PATCHES=(
+	"${FILESDIR}"/0001-"${PN}"-0.2.0-meson-add-libcap-option.patch
+	"${FILESDIR}"/0002-"${PN}"-0.2.0-meson-convert-audit-option-to-feature-object.patch
+)
+
+src_configure() {
+	local emesonargs=(
+		$(meson_feature audit)
+		$(meson_feature caps libcap)
+	)
+	meson_src_configure
+}

diff --git a/sys-libs/basu/files/0001-basu-0.2.0-meson-add-libcap-option.patch b/sys-libs/basu/files/0001-basu-0.2.0-meson-add-libcap-option.patch
new file mode 100644
index 000000000000..b2727b95a7d7
--- /dev/null
+++ b/sys-libs/basu/files/0001-basu-0.2.0-meson-add-libcap-option.patch
@@ -0,0 +1,39 @@
+From 64c1c624ea63f7a3eba4f0b7cf6a7d7aff952982 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Fri, 5 Nov 2021 18:36:54 +0100
+Subject: [PATCH 1/2] meson: add libcap option
+
+it's better to provide the user with this choice instead of
+unconditionally magically depending on it
+---
+ meson.build       | 2 +-
+ meson_options.txt | 3 +++
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 056c7c4..357b346 100644
+--- a/meson.build
++++ b/meson.build
+@@ -231,7 +231,7 @@ threads = dependency('threads')
+ librt = cc.find_library('rt')
+ libm = cc.find_library('m')
+ 
+-libcap = dependency('libcap', required: false)
++libcap = dependency('libcap', required: get_option('libcap'))
+ have_libcap = libcap.found()
+ conf.set10('HAVE_LIBCAP', have_libcap)
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index 8cf3a33..ae5c7b1 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -14,3 +14,6 @@ option('system-bus-address', type : 'string',
+ 
+ option('audit', type : 'combo', choices : ['auto', 'true', 'false'],
+        description : 'libaudit support')
++
++option('libcap', type : 'feature',
++       description : 'libcap support')
+-- 
+2.32.0
+

diff --git a/sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch b/sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch
new file mode 100644
index 000000000000..3d32f0b2352b
--- /dev/null
+++ b/sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch
@@ -0,0 +1,49 @@
+From 34d1b77f1dd15d55cfc12ef2ee52fd3b6b1d76ce Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@aarsen.me>
+Date: Fri, 5 Nov 2021 18:39:56 +0100
+Subject: [PATCH 2/2] meson: convert audit option to feature object
+
+features are more idiomatic and ubiquitous
+---
+ meson.build       | 11 ++---------
+ meson_options.txt |  2 +-
+ 2 files changed, 3 insertions(+), 10 deletions(-)
+
+diff --git a/meson.build b/meson.build
+index 357b346..1f29690 100644
+--- a/meson.build
++++ b/meson.build
+@@ -235,15 +235,8 @@ libcap = dependency('libcap', required: get_option('libcap'))
+ have_libcap = libcap.found()
+ conf.set10('HAVE_LIBCAP', have_libcap)
+ 
+-want_audit = get_option('audit')
+-if want_audit != 'false'
+-        libaudit = dependency('audit', required : want_audit == 'true')
+-        have = libaudit.found()
+-else
+-        have = false
+-        libaudit = []
+-endif
+-conf.set10('HAVE_AUDIT', have)
++libaudit = dependency('audit', required : get_option('audit'))
++conf.set10('HAVE_AUDIT', libaudit.found())
+ 
+ tests = []
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index ae5c7b1..87adfc2 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -12,7 +12,7 @@ option('system-bus-address', type : 'string',
+        description : 'The address of the sytem bus (defined at dbus compilation)',
+        value : 'unix:path=/var/run/dbus/system_bus_socket')
+ 
+-option('audit', type : 'combo', choices : ['auto', 'true', 'false'],
++option('audit', type : 'feature',
+        description : 'libaudit support')
+ 
+ option('libcap', type : 'feature',
+-- 
+2.32.0
+

diff --git a/sys-libs/basu/metadata.xml b/sys-libs/basu/metadata.xml
new file mode 100644
index 000000000000..e97261f56145
--- /dev/null
+++ b/sys-libs/basu/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>arsen@aarsen.me</email>
+		<name>Arsen Arsenović</name>
+	</maintainer>
+	<maintainer type="project">
+		<email>proxy-maint@gentoo.org</email>
+		<name>Proxy Maintainers</name>
+	</maintainer>
+	<longdescription>
+		The sd-bus library, extracted from systemd.
+
+		Some projects rely on the sd-bus library for DBus support.
+		However not all systems have systemd or elogind installed. This
+		library provides just sd-bus (and the busctl utility).
+	</longdescription>
+</pkgmetadata>


                 reply	other threads:[~2021-11-22  9:27 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1637573242.e59648f8c92c2513c91a5a5f0e151af83c414f54.sam@gentoo \
    --to=sam@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