Gentoo Archives: gentoo-commits

From: Johannes Huber <johu@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/betagarden:master commit in: sys-apps/dbus/
Date: Thu, 03 May 2012 11:42:16
Message-Id: 1336044561.06095c1925f8049077e4ac061cf479171ea8085d.johu@gentoo
1 commit: 06095c1925f8049077e4ac061cf479171ea8085d
2 Author: Johannes Huber <johu <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 3 11:29:21 2012 +0000
4 Commit: Johannes Huber <johu <AT> gentoo <DOT> org>
5 CommitDate: Thu May 3 11:29:21 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=06095c19
7
8 [sys-apps/dbus] Sync with tree. Move to git-2 eclass.
9
10 (Portage version: 2.2.0_alpha101/git/Linux i686, signed Manifest commit with key F3CFD2BD)
11
12 ---
13 sys-apps/dbus/dbus-9999.ebuild | 154 +++++++++++++++++++++-------------------
14 sys-apps/dbus/metadata.xml | 8 ++
15 2 files changed, 90 insertions(+), 72 deletions(-)
16
17 diff --git a/sys-apps/dbus/dbus-9999.ebuild b/sys-apps/dbus/dbus-9999.ebuild
18 index 3dc7b05..05f0316 100644
19 --- a/sys-apps/dbus/dbus-9999.ebuild
20 +++ b/sys-apps/dbus/dbus-9999.ebuild
21 @@ -1,10 +1,9 @@
22 -# Copyright 1999-2010 Gentoo Foundation
23 +# Copyright 1999-2012 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 # $Header: $
26
27 -EAPI="3"
28 -
29 -inherit autotools eutils multilib flag-o-matic git
30 +EAPI=4
31 +inherit autotools eutils multilib flag-o-matic python systemd virtualx git-2
32
33 DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
34 HOMEPAGE="http://dbus.freedesktop.org/"
35 @@ -12,20 +11,29 @@ EGIT_REPO_URI="git://anongit.freedesktop.org/${PN}/${PN}"
36
37 LICENSE="|| ( GPL-2 AFL-2.1 )"
38 SLOT="0"
39 -KEYWORDS="~amd64 ~x86"
40 -IUSE="debug doc selinux test X systemd"
41 -
42 -RDEPEND="X? ( x11-libs/libXt x11-libs/libX11 )
43 - selinux? ( sys-libs/libselinux
44 - sec-policy/selinux-dbus )
45 - >=dev-libs/expat-1.95.8
46 - !<sys-apps/dbus-0.91"
47 +KEYWORDS=""
48 +IUSE="debug doc selinux static-libs test X"
49 +
50 +RDEPEND=">=dev-libs/expat-2
51 + selinux? (
52 + sec-policy/selinux-dbus
53 + sys-libs/libselinux
54 + )
55 + X? (
56 + x11-libs/libX11
57 + x11-libs/libXt
58 + )"
59 DEPEND="${RDEPEND}
60 - dev-util/pkgconfig
61 + virtual/pkgconfig
62 doc? (
63 app-doc/doxygen
64 + app-text/docbook-xml-dtd:4.1.2
65 app-text/xmlto
66 - app-text/docbook-xml-dtd:4.1.2 )"
67 + )
68 + test? (
69 + >=dev-libs/glib-2.24
70 + dev-lang/python:2.7
71 + )"
72
73 # out of sources build directory
74 BD=${WORKDIR}/${P}-build
75 @@ -34,47 +42,65 @@ TBD=${WORKDIR}/${P}-tests-build
76
77 pkg_setup() {
78 enewgroup messagebus
79 - enewuser messagebus -1 "-1" -1 messagebus
80 -}
81 + enewuser messagebus -1 -1 -1 messagebus
82
83 -src_unpack() {
84 - git_src_unpack
85 + # FIXME: Test suite fails with Python 3.2 (last checked: 1.4.20)
86 + if use test; then
87 + python_set_active_version 2
88 + python_pkg_setup
89 + fi
90 }
91
92 src_prepare() {
93 - sed 's/-Wno-pointer-sign//g' -i configure.in || die "sed failed"
94 - sed -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
95 - -e '/"dispatch"/d' -i "${S}/bus/test-main.c"
96 + # Tests were restricted because of this
97 + sed -i \
98 + -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
99 + -e '/"dispatch"/d' \
100 + bus/test-main.c || die
101 +
102 + # epatch "${FILESDIR}"/${PN}-1.4.0-asneeded.patch
103 +
104 + # required for asneeded patch but also for bug 263909, cross-compile so
105 + # don't remove eautoreconf
106 eautoreconf
107 }
108
109 src_configure() {
110 - local my_conf
111 + local myconf
112 +
113 + # so we can get backtraces from apps
114 + append-flags -rdynamic
115
116 # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
117 # not on an SELinux profile.
118 - my_conf="$(use_with X x)
119 + myconf=(
120 + --disable-asserts
121 + --disable-checks
122 + --disable-embedded-tests
123 + --disable-modular-tests
124 + $(use_with X x)
125 $(use_enable debug verbose-mode)
126 - $(use_enable debug asserts)
127 $(use_enable kernel_linux inotify)
128 $(use_enable kernel_FreeBSD kqueue)
129 $(use_enable selinux)
130 $(use_enable selinux libaudit)
131 + $(use_enable static-libs static)
132 + --enable-shared
133 --with-xml=expat
134 --with-system-pid-file=/var/run/dbus.pid
135 --with-system-socket=/var/run/dbus/system_bus_socket
136 --with-session-socket-dir=/tmp
137 --with-dbus-user=messagebus
138 - --localstatedir=/var"
139 -
140 - if use systemd; then
141 - my_conf+=" --with-systemdsystemunitdir=/lib/systemd/system"
142 - fi
143 + "$(systemd_with_unitdir)"
144 + --localstatedir=/var
145 + --docdir=/usr/share/doc/${PF}
146 + --htmldir=/usr/share/doc/${PF}/html
147 + )
148
149 mkdir "${BD}"
150 cd "${BD}"
151 einfo "Running configure in ${BD}"
152 - ECONF_SOURCE="${S}" econf ${my_conf} \
153 + ECONF_SOURCE="${S}" econf "${myconf[@]}" \
154 $(use_enable doc doxygen-docs) \
155 $(use_enable doc xml-docs)
156
157 @@ -82,11 +108,11 @@ src_configure() {
158 mkdir "${TBD}"
159 cd "${TBD}"
160 einfo "Running configure in ${TBD}"
161 - ECONF_SOURCE="${S}" econf \
162 - ${my_conf} \
163 + ECONF_SOURCE="${S}" econf "${myconf[@]}" \
164 $(use_enable test checks) \
165 - $(use_enable test tests) \
166 - $(use_enable test asserts)
167 + $(use_enable test embedded-tests) \
168 + $(use_enable test asserts) \
169 + $(has_version dev-libs/dbus-glib && echo --enable-modular-tests)
170 fi
171 }
172
173 @@ -97,56 +123,43 @@ src_compile() {
174
175 cd "${BD}"
176 einfo "Running make in ${BD}"
177 - emake || die "make failed"
178 -
179 - if use doc; then
180 - einfo "Building API documentation..."
181 - doxygen || die "doxygen failed"
182 - fi
183 + emake
184
185 if use test; then
186 cd "${TBD}"
187 einfo "Running make in ${TBD}"
188 - emake || die "make failed"
189 + emake
190 fi
191 }
192
193 src_test() {
194 cd "${TBD}"
195 - DBUS_VERBOSE=1 make check || die "make check failed"
196 + DBUS_VERBOSE=1 Xemake -j1 check
197 }
198
199 src_install() {
200 - # initscript
201 - newinitd "${FILESDIR}"/dbus.init-1.0 dbus
202 + newinitd "${FILESDIR}"/dbus.initd dbus
203
204 - if use X ; then
205 + if use X; then
206 # dbus X session script (#77504)
207 - # turns out to only work for GDM. has been merged into other desktop
208 - # (kdm and such scripts)
209 - exeinto /etc/X11/xinit/xinitrc.d/
210 - doexe "${FILESDIR}"/30-dbus || die "doexe failed"
211 + # turns out to only work for GDM (and startx). has been merged into
212 + # other desktop (kdm and such scripts)
213 + exeinto /etc/X11/xinit/xinitrc.d
214 + doexe "${FILESDIR}"/80-dbus
215 fi
216
217 - # needs to exist for the system socket
218 - keepdir /var/run/dbus
219 - # needs to exist for machine id
220 - keepdir /var/lib/dbus
221 # needs to exist for dbus sessions to launch
222 -
223 - keepdir /usr/lib/dbus-1.0/services
224 keepdir /usr/share/dbus-1/services
225 - keepdir /etc/dbus-1/system.d/
226 - keepdir /etc/dbus-1/session.d/
227 + keepdir /etc/dbus-1/system.d
228 + keepdir /etc/dbus-1/session.d
229 + keepdir /var/lib/dbus # See pkg_postinst() for symlink creation
230
231 - dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO || die "dodoc failed"
232 + dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
233
234 cd "${BD}"
235 - # FIXME: split dtd's in dbus-dtd ebuild
236 - emake DESTDIR="${D}" install || die "make install failed"
237 - if use doc; then
238 - dohtml doc/*.html doc/api/html/* || die "dohtml failed"
239 - fi
240 + emake DESTDIR="${D}" install
241 +
242 + find "${ED}" -type f -name '*.la' -exec rm -f {} +
243 }
244
245 pkg_postinst() {
246 @@ -159,14 +172,11 @@ pkg_postinst() {
247 elog
248 ewarn "You must restart D-Bus \`/etc/init.d/dbus restart\` to run"
249 ewarn "the new version of the daemon."
250 + ewarn "Don't do this while X is running because it will restart your X as well."
251
252 - if has_version "x11-base/xorg-server[hal]"; then
253 - elog
254 - ewarn "You are currently running X with the hal useflag enabled"
255 - ewarn "restarting the dbus service WILL restart X as well"
256 - ebeep 5
257 - fi
258 -
259 - # Ensure unique id is generated
260 - dbus-uuidgen --ensure="${ROOT}"/var/lib/dbus/machine-id
261 + # Ensure unique id is generated and put it in /etc wrt #370451 but symlink
262 + # for DBUS_MACHINE_UUID_FILE (see tools/dbus-launch.c) and reverse
263 + # dependencies with hardcoded paths (although the known ones got fixed already)
264 + dbus-uuidgen --ensure="${EROOT}"/etc/machine-id
265 + ln -sf "${EROOT}"/etc/machine-id "${EROOT}"/var/lib/dbus/machine-id
266 }
267
268 diff --git a/sys-apps/dbus/metadata.xml b/sys-apps/dbus/metadata.xml
269 new file mode 100644
270 index 0000000..9879e83
271 --- /dev/null
272 +++ b/sys-apps/dbus/metadata.xml
273 @@ -0,0 +1,8 @@
274 +<?xml version="1.0" encoding="UTF-8"?>
275 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
276 +<pkgmetadata>
277 + <herd>freedesktop</herd>
278 + <maintainer>
279 + <email>freedesktop-bugs@g.o</email>
280 + </maintainer>
281 +</pkgmetadata>