/[gentoo-x86]/sys-apps/dbus/dbus-1.3.0.ebuild
Gentoo

Contents of /sys-apps/dbus/dbus-1.3.0.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Sat Aug 8 20:45:16 2009 UTC (5 years, 1 month ago) by flameeyes
Branch: MAIN
Changes since 1.4: +3 -2 lines
Add patch from upstream to fix check for cloexec (bug #280299). No revbump, but it didn't use cloexec there before.
(Portage version: 2.2_rc36/cvs/Linux x86_64)

1 steev 1.1 # Copyright 1999-2009 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 flameeyes 1.5 # $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-1.3.0.ebuild,v 1.4 2009/08/08 19:25:26 flameeyes Exp $
4 steev 1.1
5 ssuominen 1.2 inherit autotools eutils multilib flag-o-matic
6 steev 1.1
7     DESCRIPTION="A message bus system, a simple way for applications to talk to each other"
8     HOMEPAGE="http://dbus.freedesktop.org/"
9     SRC_URI="http://dbus.freedesktop.org/releases/dbus/${P}.tar.gz"
10    
11     LICENSE="|| ( GPL-2 AFL-2.1 )"
12     SLOT="0"
13 flameeyes 1.5 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
14 steev 1.1 IUSE="debug doc selinux test X"
15    
16     RDEPEND="X? ( x11-libs/libXt x11-libs/libX11 )
17     selinux? ( sys-libs/libselinux
18     sec-policy/selinux-dbus )
19     >=dev-libs/expat-1.95.8
20     !<sys-apps/dbus-0.91"
21     DEPEND="${RDEPEND}
22     dev-util/pkgconfig
23     doc? ( app-doc/doxygen
24     app-text/xmlto )"
25    
26     src_unpack() {
27     unpack ${A}
28     cd "${S}"
29    
30     # Tests were restricted because of this
31     sed -e 's/.*bus_dispatch_test.*/printf ("Disabled due to excess noise\\n");/' \
32     -e '/"dispatch"/d' -i "${S}/bus/test-main.c"
33 ssuominen 1.2 epatch "${FILESDIR}"/${P}-asneeded.patch
34 flameeyes 1.5 epatch "${FILESDIR}"/${P}-no-cloexec.patch
35 ssuominen 1.3 # required for asneeded patch but also for bug 263909, cross-compile so
36     # don't remove eautoreconf
37 ssuominen 1.2 eautoreconf
38 steev 1.1 }
39    
40     src_compile() {
41     # so we can get backtraces from apps
42     append-flags -rdynamic
43    
44     # libaudit is *only* used in DBus wrt SELinux support, so disable it, if
45     # not on an SELinux profile.
46     econf \
47     $(use_with X x) \
48     $(use_enable kernel_linux inotify) \
49     $(use_enable kernel_FreeBSD kqueue) \
50     $(use_enable selinux) \
51     $(use_enable selinux libaudit) \
52     $(use_enable debug verbose-mode) \
53     $(use_enable debug asserts) \
54     $(use_enable test tests) \
55     $(use_enable test asserts) \
56     --with-xml=expat \
57     --with-system-pid-file=/var/run/dbus.pid \
58     --with-system-socket=/var/run/dbus/system_bus_socket \
59     --with-session-socket-dir=/tmp \
60     --with-dbus-user=messagebus \
61     --localstatedir=/var \
62     $(use_enable doc doxygen-docs) \
63     --disable-xml-docs \
64     || die "econf failed"
65    
66     # after the compile, it uses a selinuxfs interface to
67     # check if the SELinux policy has the right support
68     use selinux && addwrite /selinux/access
69    
70     emake || die "make failed"
71     }
72    
73     src_test() {
74     DBUS_VERBOSE=1 make check || die "make check failed"
75     }
76    
77     src_install() {
78     emake DESTDIR="${D}" install || die "make install failed"
79    
80     # initscript
81     newinitd "${FILESDIR}"/dbus.init-1.0 dbus
82    
83     if use X ; then
84     # dbus X session script (#77504)
85     # turns out to only work for GDM. has been merged into other desktop
86     # (kdm and such scripts)
87     exeinto /etc/X11/xinit/xinitrc.d/
88     doexe "${FILESDIR}"/30-dbus
89     fi
90    
91     # needs to exist for the system socket
92     keepdir /var/run/dbus
93     # needs to exist for machine id
94     keepdir /var/lib/dbus
95     # needs to exist for dbus sessions to launch
96    
97     keepdir /usr/lib/dbus-1.0/services
98     keepdir /usr/share/dbus-1/services
99     keepdir /etc/dbus-1/system.d/
100     keepdir /etc/dbus-1/session.d/
101    
102     dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
103     if use doc; then
104     dohtml doc/*html
105     fi
106     }
107    
108     pkg_preinst() {
109     enewgroup messagebus
110     enewuser messagebus -1 "-1" -1 messagebus
111     }
112    
113     pkg_postinst() {
114     elog "To start the D-Bus system-wide messagebus by default"
115     elog "you should add it to the default runlevel :"
116     elog "\`rc-update add dbus default\`"
117     elog
118     elog "Some applications require a session bus in addition to the system"
119     elog "bus. Please see \`man dbus-launch\` for more information."
120     elog
121     elog
122     ewarn "You MUST run 'revdep-rebuild' after emerging this package"
123     elog
124     ewarn "You must restart D-Bus \`/etc/init.d/dbus restart\` to run"
125     ewarn "the new version of the daemon."
126    
127     if has_version x11-base/xorg-server && built_with_use x11-base/xorg-server hal; then
128     elog
129     ewarn "You are currently running X with the hal useflag enabled"
130     ewarn "restarting the dbus service WILL restart X as well"
131     ebeep 5
132     fi
133    
134     if use test; then
135     elog
136     ewarn "You have unit tests enabled, this results in an insecure library"
137     ewarn "It is recommended that you reinstall *without* FEATURES=test"
138     fi
139     }

  ViewVC Help
Powered by ViewVC 1.1.20