summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@aarsen.me>2021-11-05 19:02:24 +0100
committerSam James <sam@gentoo.org>2021-11-22 09:27:22 +0000
commite59648f8c92c2513c91a5a5f0e151af83c414f54 (patch)
treeeeb5e9ce8d2b2a8ce0ec02e686acd22a7495698c /sys-libs/basu
parentapp-misc/task: add fish completions (diff)
downloadgentoo-e59648f8c92c2513c91a5a5f0e151af83c414f54.tar.gz
gentoo-e59648f8c92c2513c91a5a5f0e151af83c414f54.tar.bz2
gentoo-e59648f8c92c2513c91a5a5f0e151af83c414f54.zip
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@aarsen.me> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/basu')
-rw-r--r--sys-libs/basu/Manifest1
-rw-r--r--sys-libs/basu/basu-0.2.0.ebuild38
-rw-r--r--sys-libs/basu/files/0001-basu-0.2.0-meson-add-libcap-option.patch39
-rw-r--r--sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch49
-rw-r--r--sys-libs/basu/metadata.xml19
5 files changed, 146 insertions, 0 deletions
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>