1 |
commit: e59648f8c92c2513c91a5a5f0e151af83c414f54 |
2 |
Author: Arsen Arsenović <arsen <AT> aarsen <DOT> me> |
3 |
AuthorDate: Fri Nov 5 18:02:24 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Nov 22 09:27:22 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e59648f8 |
7 |
|
8 |
sys-libs/basu: add sys-libs/basu-0.2.0 |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Arsen Arsenović <arsen <AT> aarsen.me> |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
sys-libs/basu/Manifest | 1 + |
15 |
sys-libs/basu/basu-0.2.0.ebuild | 38 +++++++++++++++++ |
16 |
.../0001-basu-0.2.0-meson-add-libcap-option.patch | 39 +++++++++++++++++ |
17 |
...on-convert-audit-option-to-feature-object.patch | 49 ++++++++++++++++++++++ |
18 |
sys-libs/basu/metadata.xml | 19 +++++++++ |
19 |
5 files changed, 146 insertions(+) |
20 |
|
21 |
diff --git a/sys-libs/basu/Manifest b/sys-libs/basu/Manifest |
22 |
new file mode 100644 |
23 |
index 000000000000..bdca280686aa |
24 |
--- /dev/null |
25 |
+++ b/sys-libs/basu/Manifest |
26 |
@@ -0,0 +1 @@ |
27 |
+DIST basu-0.2.0.tar.gz 238861 BLAKE2B 4fcc664d031477c2ae82e535711561d1a7cb60503fb31fa80101c2046e3fe11f7886851649d38f3d5868a3266f45e651085d99ec95f6788baddbf78e893b1528 SHA512 dbc2f72b6e1a880fa41fe6067a38a301f456e4305dae6eb4d465089d7d9c2f629677ba23752b3e1a1fd476cb440db01ef3a218c1c976f38d0058eed584c80165 |
28 |
|
29 |
diff --git a/sys-libs/basu/basu-0.2.0.ebuild b/sys-libs/basu/basu-0.2.0.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..ea56c930ca40 |
32 |
--- /dev/null |
33 |
+++ b/sys-libs/basu/basu-0.2.0.ebuild |
34 |
@@ -0,0 +1,38 @@ |
35 |
+# Copyright 1999-2021 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=8 |
39 |
+ |
40 |
+inherit meson |
41 |
+ |
42 |
+DESCRIPTION="The sd-bus library, extracted from systemd" |
43 |
+HOMEPAGE="https://sr.ht/~emersion/basu/" |
44 |
+LICENSE="LGPL-2.1+" |
45 |
+SLOT="0" |
46 |
+ |
47 |
+SRC_URI="https://git.sr.ht/~emersion/basu/refs/download/v${PV}/basu-${PV}.tar.gz" |
48 |
+KEYWORDS="~amd64" |
49 |
+ |
50 |
+IUSE="audit caps" |
51 |
+ |
52 |
+DEPEND=" |
53 |
+ audit? ( sys-process/audit ) |
54 |
+ caps? ( sys-libs/libcap ) |
55 |
+" |
56 |
+ |
57 |
+RDEPEND="${DEPEND}" |
58 |
+# Needed to generate hash tables |
59 |
+BDEPEND="dev-util/gperf" |
60 |
+ |
61 |
+PATCHES=( |
62 |
+ "${FILESDIR}"/0001-"${PN}"-0.2.0-meson-add-libcap-option.patch |
63 |
+ "${FILESDIR}"/0002-"${PN}"-0.2.0-meson-convert-audit-option-to-feature-object.patch |
64 |
+) |
65 |
+ |
66 |
+src_configure() { |
67 |
+ local emesonargs=( |
68 |
+ $(meson_feature audit) |
69 |
+ $(meson_feature caps libcap) |
70 |
+ ) |
71 |
+ meson_src_configure |
72 |
+} |
73 |
|
74 |
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 |
75 |
new file mode 100644 |
76 |
index 000000000000..b2727b95a7d7 |
77 |
--- /dev/null |
78 |
+++ b/sys-libs/basu/files/0001-basu-0.2.0-meson-add-libcap-option.patch |
79 |
@@ -0,0 +1,39 @@ |
80 |
+From 64c1c624ea63f7a3eba4f0b7cf6a7d7aff952982 Mon Sep 17 00:00:00 2001 |
81 |
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@××××××.me> |
82 |
+Date: Fri, 5 Nov 2021 18:36:54 +0100 |
83 |
+Subject: [PATCH 1/2] meson: add libcap option |
84 |
+ |
85 |
+it's better to provide the user with this choice instead of |
86 |
+unconditionally magically depending on it |
87 |
+--- |
88 |
+ meson.build | 2 +- |
89 |
+ meson_options.txt | 3 +++ |
90 |
+ 2 files changed, 4 insertions(+), 1 deletion(-) |
91 |
+ |
92 |
+diff --git a/meson.build b/meson.build |
93 |
+index 056c7c4..357b346 100644 |
94 |
+--- a/meson.build |
95 |
++++ b/meson.build |
96 |
+@@ -231,7 +231,7 @@ threads = dependency('threads') |
97 |
+ librt = cc.find_library('rt') |
98 |
+ libm = cc.find_library('m') |
99 |
+ |
100 |
+-libcap = dependency('libcap', required: false) |
101 |
++libcap = dependency('libcap', required: get_option('libcap')) |
102 |
+ have_libcap = libcap.found() |
103 |
+ conf.set10('HAVE_LIBCAP', have_libcap) |
104 |
+ |
105 |
+diff --git a/meson_options.txt b/meson_options.txt |
106 |
+index 8cf3a33..ae5c7b1 100644 |
107 |
+--- a/meson_options.txt |
108 |
++++ b/meson_options.txt |
109 |
+@@ -14,3 +14,6 @@ option('system-bus-address', type : 'string', |
110 |
+ |
111 |
+ option('audit', type : 'combo', choices : ['auto', 'true', 'false'], |
112 |
+ description : 'libaudit support') |
113 |
++ |
114 |
++option('libcap', type : 'feature', |
115 |
++ description : 'libcap support') |
116 |
+-- |
117 |
+2.32.0 |
118 |
+ |
119 |
|
120 |
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 |
121 |
new file mode 100644 |
122 |
index 000000000000..3d32f0b2352b |
123 |
--- /dev/null |
124 |
+++ b/sys-libs/basu/files/0002-basu-0.2.0-meson-convert-audit-option-to-feature-object.patch |
125 |
@@ -0,0 +1,49 @@ |
126 |
+From 34d1b77f1dd15d55cfc12ef2ee52fd3b6b1d76ce Mon Sep 17 00:00:00 2001 |
127 |
+From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= <arsen@××××××.me> |
128 |
+Date: Fri, 5 Nov 2021 18:39:56 +0100 |
129 |
+Subject: [PATCH 2/2] meson: convert audit option to feature object |
130 |
+ |
131 |
+features are more idiomatic and ubiquitous |
132 |
+--- |
133 |
+ meson.build | 11 ++--------- |
134 |
+ meson_options.txt | 2 +- |
135 |
+ 2 files changed, 3 insertions(+), 10 deletions(-) |
136 |
+ |
137 |
+diff --git a/meson.build b/meson.build |
138 |
+index 357b346..1f29690 100644 |
139 |
+--- a/meson.build |
140 |
++++ b/meson.build |
141 |
+@@ -235,15 +235,8 @@ libcap = dependency('libcap', required: get_option('libcap')) |
142 |
+ have_libcap = libcap.found() |
143 |
+ conf.set10('HAVE_LIBCAP', have_libcap) |
144 |
+ |
145 |
+-want_audit = get_option('audit') |
146 |
+-if want_audit != 'false' |
147 |
+- libaudit = dependency('audit', required : want_audit == 'true') |
148 |
+- have = libaudit.found() |
149 |
+-else |
150 |
+- have = false |
151 |
+- libaudit = [] |
152 |
+-endif |
153 |
+-conf.set10('HAVE_AUDIT', have) |
154 |
++libaudit = dependency('audit', required : get_option('audit')) |
155 |
++conf.set10('HAVE_AUDIT', libaudit.found()) |
156 |
+ |
157 |
+ tests = [] |
158 |
+ |
159 |
+diff --git a/meson_options.txt b/meson_options.txt |
160 |
+index ae5c7b1..87adfc2 100644 |
161 |
+--- a/meson_options.txt |
162 |
++++ b/meson_options.txt |
163 |
+@@ -12,7 +12,7 @@ option('system-bus-address', type : 'string', |
164 |
+ description : 'The address of the sytem bus (defined at dbus compilation)', |
165 |
+ value : 'unix:path=/var/run/dbus/system_bus_socket') |
166 |
+ |
167 |
+-option('audit', type : 'combo', choices : ['auto', 'true', 'false'], |
168 |
++option('audit', type : 'feature', |
169 |
+ description : 'libaudit support') |
170 |
+ |
171 |
+ option('libcap', type : 'feature', |
172 |
+-- |
173 |
+2.32.0 |
174 |
+ |
175 |
|
176 |
diff --git a/sys-libs/basu/metadata.xml b/sys-libs/basu/metadata.xml |
177 |
new file mode 100644 |
178 |
index 000000000000..e97261f56145 |
179 |
--- /dev/null |
180 |
+++ b/sys-libs/basu/metadata.xml |
181 |
@@ -0,0 +1,19 @@ |
182 |
+<?xml version="1.0" encoding="UTF-8"?> |
183 |
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> |
184 |
+<pkgmetadata> |
185 |
+ <maintainer type="person"> |
186 |
+ <email>arsen@××××××.me</email> |
187 |
+ <name>Arsen Arsenović</name> |
188 |
+ </maintainer> |
189 |
+ <maintainer type="project"> |
190 |
+ <email>proxy-maint@g.o</email> |
191 |
+ <name>Proxy Maintainers</name> |
192 |
+ </maintainer> |
193 |
+ <longdescription> |
194 |
+ The sd-bus library, extracted from systemd. |
195 |
+ |
196 |
+ Some projects rely on the sd-bus library for DBus support. |
197 |
+ However not all systems have systemd or elogind installed. This |
198 |
+ library provides just sd-bus (and the busctl utility). |
199 |
+ </longdescription> |
200 |
+</pkgmetadata> |