From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id EC5C7158086 for ; Mon, 22 Nov 2021 09:27:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0DAD9E0896; Mon, 22 Nov 2021 09:27:37 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id C9D11E0841 for ; Mon, 22 Nov 2021 09:27:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E7B77343288 for ; Mon, 22 Nov 2021 09:27:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5A9041D8 for ; Mon, 22 Nov 2021 09:27:33 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1637573242.e59648f8c92c2513c91a5a5f0e151af83c414f54.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/basu/files/, sys-libs/basu/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-libs/basu/Manifest sys-libs/basu/basu-0.2.0.ebuild sys-libs/basu/files/0001-basu-0.2.0-meson-add-libcap-option.patch sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch sys-libs/basu/metadata.xml X-VCS-Directories: sys-libs/basu/ sys-libs/basu/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: e59648f8c92c2513c91a5a5f0e151af83c414f54 X-VCS-Branch: master Date: Mon, 22 Nov 2021 09:27:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ba841988-d6d3-492d-9c0a-f2312d1ac003 X-Archives-Hash: e2b3f293d6c1c32b1912aacd750f8fa0 commit: e59648f8c92c2513c91a5a5f0e151af83c414f54 Author: Arsen Arsenović aarsen me> AuthorDate: Fri Nov 5 18:02:24 2021 +0000 Commit: Sam James gentoo 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ć aarsen.me> Signed-off-by: Sam James 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?= +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?= +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 @@ + + + + + arsen@aarsen.me + Arsen Arsenović + + + proxy-maint@gentoo.org + Proxy Maintainers + + + 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). + +