/[gentoo-alt]/trunk/overlay/sys-apps/dbus/dbus-0.62.ebuild
Gentoo

Contents of /trunk/overlay/sys-apps/dbus/dbus-0.62.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1309 - (show annotations) (download)
Thu Jul 20 01:47:34 2006 UTC (7 years, 11 months ago) by flameeyes
File size: 3981 byte(s)
Add dbus with patch from bug #140570 thanks to Timothy Redaelli.
1 # Copyright 1999-2006 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-apps/dbus/dbus-0.62.ebuild,v 1.8 2006/07/04 04:00:27 cardoe Exp $
4
5 inherit eutils mono python multilib debug qt3 autotools
6
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/${P}.tar.gz"
10
11 SLOT="0"
12 LICENSE="|| ( GPL-2 AFL-2.1 )"
13 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
14 IUSE="doc gtk mono python qt3 qt4 selinux X"
15
16 RDEPEND=">=dev-libs/glib-2.6
17 X? ( || ( ( x11-libs/libXt x11-libs/libX11 ) virtual/x11 ) )
18 gtk? ( >=x11-libs/gtk+-2.6 )
19 mono? ( >=dev-lang/mono-0.95 )
20 python? ( >=dev-lang/python-2.4 >=dev-python/pyrex-0.9.3-r2 )
21 qt3? ( $(qt_min_version 3.3) )
22 qt4? ( >=x11-libs/qt-4.1.3 )
23 selinux? ( sys-libs/libselinux )
24 >=dev-libs/libxml2-2.6.21"
25 # expat code now sucks.. libxml2 is the default
26
27 DEPEND="${RDEPEND}
28 dev-util/pkgconfig
29 doc? ( app-doc/doxygen
30 app-text/xmlto
31 mono? ( >=dev-util/monodoc-1.1.10 ) )"
32
33 pkg_setup() {
34 PKG_CONFIG_PATH="${QTDIR}/lib/pkgconfig"
35 }
36
37 src_unpack() {
38 unpack ${A}
39 cd ${S}
40
41 #fix mono-tools depend
42 epatch "${FILESDIR}"/${PN}-0.61-mono-tools-update.diff
43
44 #fix libxml dep
45 epatch "${FILESDIR}"/${PN}-0.61-libxml-dep.patch
46
47 epatch "${FILESDIR}/${PN}-freebsd.patch"
48
49 eautoreconf
50 }
51
52 src_compile() {
53 local myconf=""
54
55 # Only enable mono-docs if both mono and doc is defined
56 use mono && myconf="${myconf} $(use_enable doc mono-docs)"
57
58 if use qt3; then
59 myconf="${myconf} --enable-qt3=${QTDIR} --with-qt3-moc=${QTDIR}/bin/moc "
60 else
61 myconf="${myconf} --disable-qt3 --without-qt3-moc"
62 fi
63
64 if use qt4; then
65 myconf="${myconf} --enable-qt --with-qt-moc=/usr/bin/moc"
66 else
67 myconf="${myconf} --disable-qt --without-qt-moc"
68 fi
69
70 econf \
71 $(use_with X x) \
72 $(use_enable gtk) \
73 $(use_enable python) \
74 $(use_enable mono) \
75 $(use_enable kernel_linux dnotify) \
76 --disable-gcj \
77 $(use_enable selinux) \
78 $(use_enable debug verbose-mode) \
79 $(use_enable debug checks) \
80 $(use_enable debug asserts) \
81 --enable-glib \
82 --with-xml=libxml \
83 --with-system-pid-file=/var/run/dbus.pid \
84 --with-system-socket=/var/run/dbus/system_bus_socket \
85 --with-session-socket-dir=/tmp \
86 --with-dbus-user=messagebus \
87 --localstatedir=/var \
88 $(use_enable doc doxygen-docs) \
89 --disable-xml-docs \
90 ${myconf} \
91 || die "econf failed"
92
93 # Don't build the mono examples, they require gtk-sharp
94 touch ${S}/mono/example/{bus-listener,echo-{server,client}}.exe
95
96 # after the compile, it uses a selinuxfs interface to
97 # check if the SELinux policy has the right support
98 use selinux && addwrite /selinux/access
99
100 emake || die "make failed"
101 }
102
103 src_install() {
104 make DESTDIR="${D}" install || die "make install failed"
105
106 # initscript
107 newinitd "${FILESDIR}"/dbus.init-0.61 dbus
108
109 # dbus X session script (#77504)
110 # FIXME : turns out to only work for GDM, better solution needed
111 exeinto /etc/X11/xinit/xinitrc.d/
112 doexe "${FILESDIR}"/30-dbus
113
114 # needs to exist for the system socket
115 keepdir /var/run/dbus
116
117 keepdir /usr/lib/dbus-1.0/services
118 keepdir /usr/share/dbus-1/services
119
120 dodoc AUTHORS ChangeLog HACKING NEWS README doc/TODO
121 if use doc; then
122 dohtml doc/*html
123 fi
124 }
125
126 pkg_preinst() {
127 enewgroup messagebus || die "Problem adding messagebus group"
128 enewuser messagebus -1 "-1" -1 messagebus || die "Problem adding messagebus user"
129 }
130
131 pkg_postrm() {
132 python_mod_cleanup "${ROOT}"/usr/lib/python*/site-packages/dbus
133 }
134
135 pkg_postinst() {
136 python_mod_optimize "${ROOT}"/usr/lib/python*/site-packages/dbus
137
138 einfo "To start the DBUS system-wide messagebus by default"
139 einfo "you should add it to the default runlevel :"
140 einfo "\`rc-update add dbus default\`"
141 echo
142 einfo "Currently have it installed and running?"
143 einfo "Run etc-update and then run the following:"
144 einfo "\`/etc/init.d/dbus reload\`"
145 }

  ViewVC Help
Powered by ViewVC 1.1.20