1 |
commit: fa4ef9f00e90f5dd9eaaf08594130a157661b4dc |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 27 16:07:45 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 27 16:08:10 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa4ef9f0 |
7 |
|
8 |
sys-apps/dbus: add 1.14.2 |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-apps/dbus/Manifest | 1 + |
13 |
sys-apps/dbus/dbus-1.14.2.ebuild | 290 +++++++++++++++++++++++++++++++++++++++ |
14 |
2 files changed, 291 insertions(+) |
15 |
|
16 |
diff --git a/sys-apps/dbus/Manifest b/sys-apps/dbus/Manifest |
17 |
index 7acceaef14bc..293fc3bc022b 100644 |
18 |
--- a/sys-apps/dbus/Manifest |
19 |
+++ b/sys-apps/dbus/Manifest |
20 |
@@ -1,3 +1,4 @@ |
21 |
DIST dbus-1.12.22.tar.gz 2108231 BLAKE2B 40c30ad9e48d8ac6b5f1c67726015eb17cb3501372ef2c8ffcd8ad73e4a2f186b80a7bbba094460d4093d1d0a3f1bbb8d83a27724397a8f5312bb8542237e6b7 SHA512 0a716022f9d693fcaf871b6dfb5f242b49a8dd05d3316ec3e530f5129f1d81a2fa9caec795fa62cfdcba6ed21549fdd2f896f9bf1cc9a96e2a7d04f2c7ec7be6 |
22 |
DIST dbus-1.14.0.tar.xz 1360228 BLAKE2B ae0ebc2779e840e2d83f633029f81fba0e35969648dddce0280640dd9bee3f9508aa7fb6aef696d1c4c56d40f91b754941f847525afaee5cc3170ad23a7eddbf SHA512 9bf17a3ebb3cf44722c6fbf24ee56e9dc14d6882fc312f26c7f07459d969424bc2fb63a229139e011804ecc479a8f0eb1a0c83286f8d5a664c5979d12634179f |
23 |
+DIST dbus-1.14.2.tar.xz 1362972 BLAKE2B 81c79bbdaa19b214d2462e5ebc42933b60c72c346c71e89e2b15ed17860257ec81c1dc86cd4726f7b352933b02bf5172c1466be0bc63e67a432c76d97fbbb68b SHA512 6e503385bfc1b17d4922dc6d2fb3fa10626ed306fe2b3a6a59f6cf81667c4cd63c2fc5e4fd040f48415235e9f4a75b10948ef512f022af1edab20f426271a9b4 |
24 |
DIST dbus-1.15.0.tar.xz 1391044 BLAKE2B 50cd9e5fc27f8ff53350f426d29b0ee7dd17a791e82e9d0465789c095443826d14396045c8301e73996d054e2b723b09c1c28dd392a240ed74b6c49c1369d480 SHA512 6f7e1d4ff525ce13c5f671f1b045a089c379cbfb777662ce7a55ffe4893a8ab2aaf38877a7b8f261823067a20f3b336437449eb353a97d30699496375e00bf1a |
25 |
|
26 |
diff --git a/sys-apps/dbus/dbus-1.14.2.ebuild b/sys-apps/dbus/dbus-1.14.2.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..9333216aff30 |
29 |
--- /dev/null |
30 |
+++ b/sys-apps/dbus/dbus-1.14.2.ebuild |
31 |
@@ -0,0 +1,290 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{8..10} ) |
38 |
+TMPFILES_OPTIONAL=1 |
39 |
+ |
40 |
+# At least at the moment, while a CMake port exists, it's not recommended |
41 |
+# for distributions. |
42 |
+# https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L189 |
43 |
+inherit autotools flag-o-matic linux-info python-any-r1 readme.gentoo-r1 systemd tmpfiles virtualx multilib-minimal |
44 |
+ |
45 |
+DESCRIPTION="A message bus system, a simple way for applications to talk to each other" |
46 |
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/dbus/" |
47 |
+SRC_URI="https://dbus.freedesktop.org/releases/dbus/${P}.tar.xz" |
48 |
+ |
49 |
+LICENSE="|| ( AFL-2.1 GPL-2 )" |
50 |
+SLOT="0" |
51 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
52 |
+IUSE="debug doc elogind selinux static-libs systemd test X" |
53 |
+RESTRICT="!test? ( test )" |
54 |
+ |
55 |
+REQUIRED_USE="?? ( elogind systemd )" |
56 |
+ |
57 |
+BDEPEND=" |
58 |
+ acct-user/messagebus |
59 |
+ app-text/xmlto |
60 |
+ app-text/docbook-xml-dtd:4.4 |
61 |
+ sys-devel/autoconf-archive |
62 |
+ virtual/pkgconfig |
63 |
+ doc? ( app-doc/doxygen ) |
64 |
+" |
65 |
+COMMON_DEPEND=" |
66 |
+ >=dev-libs/expat-2.1.0 |
67 |
+ elogind? ( sys-auth/elogind ) |
68 |
+ selinux? ( |
69 |
+ sys-process/audit |
70 |
+ sys-libs/libselinux |
71 |
+ ) |
72 |
+ systemd? ( sys-apps/systemd:0= ) |
73 |
+ X? ( |
74 |
+ x11-libs/libX11 |
75 |
+ x11-libs/libXt |
76 |
+ ) |
77 |
+" |
78 |
+DEPEND="${COMMON_DEPEND} |
79 |
+ dev-libs/expat |
80 |
+ test? ( |
81 |
+ ${PYTHON_DEPS} |
82 |
+ >=dev-libs/glib-2.40:2 |
83 |
+ ) |
84 |
+" |
85 |
+RDEPEND="${COMMON_DEPEND} |
86 |
+ acct-user/messagebus |
87 |
+ selinux? ( sec-policy/selinux-dbus ) |
88 |
+ systemd? ( virtual/tmpfiles ) |
89 |
+" |
90 |
+ |
91 |
+DOC_CONTENTS=" |
92 |
+ Some applications require a session bus in addition to the system |
93 |
+ bus. Please see \`man dbus-launch\` for more information. |
94 |
+" |
95 |
+ |
96 |
+# out of sources build dir for make check |
97 |
+TBD="${WORKDIR}/${P}-tests-build" |
98 |
+ |
99 |
+PATCHES=( |
100 |
+ "${FILESDIR}/dbus-enable-elogind.patch" |
101 |
+ "${FILESDIR}/dbus-daemon-optional.patch" # bug #653136 |
102 |
+) |
103 |
+ |
104 |
+pkg_setup() { |
105 |
+ use test && python-any-r1_pkg_setup |
106 |
+ |
107 |
+ if use kernel_linux; then |
108 |
+ CONFIG_CHECK="~EPOLL" |
109 |
+ linux-info_pkg_setup |
110 |
+ fi |
111 |
+} |
112 |
+ |
113 |
+src_prepare() { |
114 |
+ default |
115 |
+ |
116 |
+ if [[ ${CHOST} == *-solaris* ]]; then |
117 |
+ # fix standards conflict, due to gcc being c99 by default nowadays |
118 |
+ sed -i \ |
119 |
+ -e 's/_XOPEN_SOURCE=500/_XOPEN_SOURCE=600/' \ |
120 |
+ configure.ac || die |
121 |
+ fi |
122 |
+ |
123 |
+ # required for bug #263909, cross-compile so don't remove eautoreconf |
124 |
+ eautoreconf |
125 |
+} |
126 |
+ |
127 |
+src_configure() { |
128 |
+ local rundir=$(usex kernel_linux /run /var/run) |
129 |
+ |
130 |
+ sed -e "s;@rundir@;${EPREFIX}${rundir};g" "${FILESDIR}"/dbus.initd.in \ |
131 |
+ > "${T}"/dbus.initd || die |
132 |
+ |
133 |
+ multilib-minimal_src_configure |
134 |
+} |
135 |
+ |
136 |
+multilib_src_configure() { |
137 |
+ local docconf myconf testconf |
138 |
+ |
139 |
+ # so we can get backtraces from apps |
140 |
+ case ${CHOST} in |
141 |
+ *-mingw*) |
142 |
+ # error: unrecognized command line option '-rdynamic', bug #488036 |
143 |
+ ;; |
144 |
+ *) |
145 |
+ append-flags -rdynamic |
146 |
+ ;; |
147 |
+ esac |
148 |
+ |
149 |
+ # libaudit is *only* used in DBus wrt SELinux support, so disable it, if |
150 |
+ # not on an SELinux profile. |
151 |
+ myconf=( |
152 |
+ --localstatedir="${EPREFIX}/var" |
153 |
+ --runstatedir="${EPREFIX}${rundir}" |
154 |
+ $(use_enable static-libs static) |
155 |
+ $(use_enable debug verbose-mode) |
156 |
+ --disable-asserts |
157 |
+ --disable-checks |
158 |
+ $(use_enable selinux) |
159 |
+ $(use_enable selinux libaudit) |
160 |
+ --disable-apparmor |
161 |
+ $(use_enable kernel_linux inotify) |
162 |
+ --disable-kqueue |
163 |
+ $(use_enable elogind) |
164 |
+ $(use_enable systemd) |
165 |
+ $(use_enable systemd user-session) |
166 |
+ --disable-embedded-tests |
167 |
+ --disable-modular-tests |
168 |
+ $(use_enable debug stats) |
169 |
+ --with-session-socket-dir="${EPREFIX}"/tmp |
170 |
+ --with-system-pid-file="${EPREFIX}${rundir}"/dbus.pid |
171 |
+ --with-system-socket="${EPREFIX}${rundir}"/dbus/system_bus_socket |
172 |
+ --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" |
173 |
+ --with-systemduserunitdir="$(systemd_get_userunitdir)" |
174 |
+ --with-dbus-user=messagebus |
175 |
+ $(use_with X x) |
176 |
+ ) |
177 |
+ |
178 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
179 |
+ myconf+=( |
180 |
+ --enable-launchd |
181 |
+ --with-launchd-agent-dir="${EPREFIX}"/Library/LaunchAgents |
182 |
+ ) |
183 |
+ fi |
184 |
+ |
185 |
+ if multilib_is_native_abi; then |
186 |
+ docconf=( |
187 |
+ --enable-xml-docs |
188 |
+ $(use_enable doc doxygen-docs) |
189 |
+ ) |
190 |
+ else |
191 |
+ docconf=( |
192 |
+ --disable-xml-docs |
193 |
+ --disable-doxygen-docs |
194 |
+ ) |
195 |
+ myconf+=( |
196 |
+ --disable-daemon |
197 |
+ --disable-selinux |
198 |
+ --disable-libaudit |
199 |
+ --disable-elogind |
200 |
+ --disable-systemd |
201 |
+ --without-x |
202 |
+ ) |
203 |
+ fi |
204 |
+ |
205 |
+ einfo "Running configure in ${BUILD_DIR}" |
206 |
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${docconf[@]}" |
207 |
+ |
208 |
+ if multilib_is_native_abi && use test; then |
209 |
+ mkdir "${TBD}" || die |
210 |
+ cd "${TBD}" || die |
211 |
+ testconf=( |
212 |
+ $(use_enable test asserts) |
213 |
+ $(use_enable test checks) |
214 |
+ $(use_enable test embedded-tests) |
215 |
+ $(use_enable test stats) |
216 |
+ $(has_version dev-libs/dbus-glib && echo --enable-modular-tests) |
217 |
+ ) |
218 |
+ einfo "Running configure in ${TBD}" |
219 |
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" "${testconf[@]}" |
220 |
+ fi |
221 |
+} |
222 |
+ |
223 |
+multilib_src_compile() { |
224 |
+ if multilib_is_native_abi; then |
225 |
+ # After the compile, it uses a selinuxfs interface to |
226 |
+ # check if the SELinux policy has the right support |
227 |
+ use selinux && addwrite /selinux/access |
228 |
+ |
229 |
+ einfo "Running make in ${BUILD_DIR}" |
230 |
+ emake |
231 |
+ |
232 |
+ if use test; then |
233 |
+ einfo "Running make in ${TBD}" |
234 |
+ emake -C "${TBD}" |
235 |
+ fi |
236 |
+ else |
237 |
+ emake -C dbus libdbus-1.la |
238 |
+ fi |
239 |
+} |
240 |
+ |
241 |
+src_test() { |
242 |
+ # DBUS_TEST_MALLOC_FAILURES=0 to avoid huge test logs |
243 |
+ # https://gitlab.freedesktop.org/dbus/dbus/-/blob/master/CONTRIBUTING.md#L231 |
244 |
+ DBUS_TEST_MALLOC_FAILURES=0 DBUS_VERBOSE=1 virtx emake -j1 -C "${TBD}" check |
245 |
+ |
246 |
+} |
247 |
+ |
248 |
+multilib_src_install() { |
249 |
+ if multilib_is_native_abi; then |
250 |
+ emake DESTDIR="${D}" install |
251 |
+ else |
252 |
+ emake DESTDIR="${D}" install-pkgconfigDATA |
253 |
+ emake DESTDIR="${D}" -C dbus \ |
254 |
+ install-libLTLIBRARIES install-dbusincludeHEADERS \ |
255 |
+ install-nodist_dbusarchincludeHEADERS |
256 |
+ fi |
257 |
+} |
258 |
+ |
259 |
+multilib_src_install_all() { |
260 |
+ newinitd "${T}"/dbus.initd dbus |
261 |
+ |
262 |
+ if use X; then |
263 |
+ # dbus X session script (bug #77504) |
264 |
+ # turns out to only work for GDM (and startx). has been merged into |
265 |
+ # other desktop (kdm and such scripts) |
266 |
+ exeinto /etc/X11/xinit/xinitrc.d |
267 |
+ newexe "${FILESDIR}"/80-dbus-r1 80-dbus |
268 |
+ fi |
269 |
+ |
270 |
+ # Needs to exist for dbus sessions to launch |
271 |
+ keepdir /usr/share/dbus-1/services |
272 |
+ keepdir /etc/dbus-1/{session,system}.d |
273 |
+ # machine-id symlink from pkg_postinst() |
274 |
+ keepdir /var/lib/dbus |
275 |
+ # Let the init script create the /var/run/dbus directory |
276 |
+ rm -rf "${ED}"/var/run |
277 |
+ |
278 |
+ # bug #761763 |
279 |
+ rm -rf "${ED}"/usr/lib/sysusers.d |
280 |
+ |
281 |
+ dodoc AUTHORS NEWS README doc/TODO |
282 |
+ readme.gentoo_create_doc |
283 |
+ |
284 |
+ find "${ED}" -name '*.la' -delete || die |
285 |
+} |
286 |
+ |
287 |
+pkg_postinst() { |
288 |
+ readme.gentoo_print_elog |
289 |
+ |
290 |
+ if use systemd; then |
291 |
+ tmpfiles_process dbus.conf |
292 |
+ fi |
293 |
+ |
294 |
+ # Ensure unique id is generated and put it in /etc wrt bug #370451 but symlink |
295 |
+ # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse |
296 |
+ # dependencies with hardcoded paths (although the known ones got fixed already) |
297 |
+ # TODO: should be safe to remove at least the ln because of the above tmpfiles_process? |
298 |
+ dbus-uuidgen --ensure="${EROOT}"/etc/machine-id |
299 |
+ ln -sf "${EPREFIX}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id |
300 |
+ |
301 |
+ if [[ ${CHOST} == *-darwin* ]]; then |
302 |
+ local plist="org.freedesktop.dbus-session.plist" |
303 |
+ elog |
304 |
+ elog |
305 |
+ elog "For MacOS/Darwin we now ship launchd support for dbus." |
306 |
+ elog "This enables autolaunch of dbus at session login and makes" |
307 |
+ elog "dbus usable under MacOS/Darwin." |
308 |
+ elog |
309 |
+ elog "The launchd plist file ${plist} has been" |
310 |
+ elog "installed in ${EPREFIX}/Library/LaunchAgents." |
311 |
+ elog "For it to be used, you will have to do all of the following:" |
312 |
+ elog " + cd ~/Library/LaunchAgents" |
313 |
+ elog " + ln -s ${EPREFIX}/Library/LaunchAgents/${plist}" |
314 |
+ elog " + logout and log back in" |
315 |
+ elog |
316 |
+ elog "If your application needs a proper DBUS_SESSION_BUS_ADDRESS" |
317 |
+ elog "specified and refused to start otherwise, then export the" |
318 |
+ elog "the following to your environment:" |
319 |
+ elog " DBUS_SESSION_BUS_ADDRESS=\"launchd:env=DBUS_LAUNCHD_SESSION_BUS_SOCKET\"" |
320 |
+ fi |
321 |
+} |