/[gentoo-x86]/media-sound/pulseaudio/pulseaudio-1.1-r1.ebuild
Gentoo

Contents of /media-sound/pulseaudio/pulseaudio-1.1-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.17 - (show annotations) (download)
Wed May 1 03:18:47 2013 UTC (15 months, 2 weeks ago) by ford_prefect
Branch: MAIN
CVS Tags: HEAD
Changes since 1.16: +1 -1 lines
FILE REMOVED
Drop old version

(Portage version: 2.2.0_alpha173/cvs/Linux x86_64, signed Manifest commit with key 29C3E2EC)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-1.1-r1.ebuild,v 1.16 2013/04/10 20:43:51 vincent Exp $
4
5 EAPI=5
6
7 inherit autotools eutils flag-o-matic user versionator
8
9 DESCRIPTION="A networked sound server with an advanced plugin system"
10 HOMEPAGE="http://www.pulseaudio.org/"
11
12 SRC_URI="http://freedesktop.org/software/pulseaudio/releases/${P}.tar.xz"
13
14 # libpulse-simple and libpulse link to libpulse-core; this is daemon's
15 # library and can link to gdbm and other GPL-only libraries. In this
16 # cases, we have a fully GPL-2 package. Leaving the rest of the
17 # GPL-forcing USE flags for those who use them.
18 LICENSE="!gdbm? ( LGPL-2.1 ) gdbm? ( GPL-2 )"
19 SLOT="0"
20 KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86 ~amd64-linux ~x86-linux"
21 IUSE="+alsa avahi +caps equalizer jack lirc oss tcpd +X dbus libsamplerate gnome bluetooth +asyncns +glib test doc +udev ipv6 system-wide realtime +orc ssl +gdbm"
22
23 RDEPEND="app-admin/eselect-esd
24 X? (
25 >=x11-libs/libX11-1.4.0
26 >=x11-libs/libxcb-1.6
27 >=x11-libs/xcb-util-0.3.1
28 x11-libs/libSM
29 x11-libs/libICE
30 x11-libs/libXtst
31 )
32 caps? ( sys-libs/libcap )
33 libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 )
34 alsa? ( >=media-libs/alsa-lib-1.0.19 )
35 glib? ( >=dev-libs/glib-2.4.0 )
36 avahi? ( >=net-dns/avahi-0.6.12[dbus] )
37 jack? ( >=media-sound/jack-audio-connection-kit-0.117 )
38 tcpd? ( sys-apps/tcp-wrappers )
39 lirc? ( app-misc/lirc )
40 dbus? ( >=sys-apps/dbus-1.0.0 )
41 gnome? ( >=gnome-base/gconf-2.4.0 )
42 bluetooth? (
43 >=net-wireless/bluez-4
44 >=sys-apps/dbus-1.0.0
45 )
46 asyncns? ( net-libs/libasyncns )
47 udev? ( >=virtual/udev-143[hwdb] )
48 realtime? ( sys-auth/rtkit )
49 equalizer? ( sci-libs/fftw:3.0 )
50 orc? ( >=dev-lang/orc-0.4.9 )
51 ssl? ( dev-libs/openssl )
52 >=media-libs/speex-1.2_rc1
53 >=media-libs/libsndfile-1.0.20
54 gdbm? ( sys-libs/gdbm )
55 dev-libs/json-c
56 >=sys-devel/libtool-2.2.4" # it's a valid RDEPEND, libltdl.so is used
57
58 DEPEND="${RDEPEND}
59 doc? ( app-doc/doxygen )
60 X? (
61 x11-proto/xproto
62 >=x11-libs/libXtst-1.0.99.2
63 )
64 dev-libs/libatomic_ops
65 virtual/pkgconfig
66 system-wide? ( || ( dev-util/unifdef sys-freebsd/freebsd-ubin ) )
67 dev-util/intltool"
68
69 # alsa-utils dep is for the alsasound init.d script (see bug #155707)
70 # bluez dep is for the bluetooth init.d script
71 RDEPEND="${RDEPEND}
72 X? ( gnome-extra/gnome-audio )
73 system-wide? (
74 sys-apps/openrc
75 alsa? ( media-sound/alsa-utils )
76 bluetooth? ( >=net-wireless/bluez-4 )
77 )"
78
79 # See "*** BLUEZ support not found (requires D-Bus)" in configure.ac
80 REQUIRED_USE="bluetooth? ( dbus )"
81
82 pkg_setup() {
83 enewgroup audio 18 # Just make sure it exists
84 enewgroup pulse-access
85 enewgroup pulse
86 enewuser pulse -1 -1 /var/run/pulse pulse,audio
87 }
88
89 src_prepare() {
90 epatch "${FILESDIR}/${P}-python3-fix.patch"
91 # bgo 390287
92 epatch "${FILESDIR}/${P}-machine-id-fix.patch"
93 eautoreconf
94 }
95
96 src_configure() {
97 # It's a binutils bug, once I can find time to fix that I'll add a
98 # proper dependency and fix this up. — flameeyes
99 append-ldflags $(no-as-needed)
100
101 if use gdbm; then
102 myconf+=" --with-database=gdbm"
103 #elif use tdb; then
104 # myconf+=" --with-database=tdb"
105 else
106 myconf+=" --with-database=simple"
107 fi
108
109 econf \
110 --enable-largefile \
111 $(use_enable glib glib2) \
112 --disable-solaris \
113 $(use_enable asyncns) \
114 $(use_enable oss oss-output) \
115 $(use_enable alsa) \
116 $(use_enable lirc) \
117 $(use_enable tcpd tcpwrap) \
118 $(use_enable jack) \
119 $(use_enable lirc) \
120 $(use_enable avahi) \
121 --disable-hal \
122 $(use_enable dbus) \
123 $(use_enable gnome gconf) \
124 $(use_enable libsamplerate samplerate) \
125 $(use_enable bluetooth bluez) \
126 $(use_enable X x11) \
127 $(use_enable test default-build-tests) \
128 $(use_enable udev) \
129 $(use_enable ipv6) \
130 $(use_enable ssl openssl) \
131 $(use_with caps) \
132 $(use_with equalizer fftw) \
133 --localstatedir="${EPREFIX}"/var \
134 --with-udev-rules-dir="${EPREFIX}/lib/udev/rules.d" \
135 ${myconf}
136
137 if use doc; then
138 pushd doxygen
139 doxygen doxygen.conf
140 popd
141 fi
142 }
143
144 src_test() {
145 # We avoid running the toplevel check target because that will run
146 # po/'s tests too, and they are broken. Officially, it should work
147 # with intltool 0.41, but that doesn't look like a stable release.
148 emake -C src check
149 }
150
151 src_install() {
152 emake -j1 DESTDIR="${D}" install
153
154 # Drop the script entirely if X is disabled
155 use X || rm "${ED}"/usr/bin/start-pulseaudio-x11
156
157 if use system-wide; then
158 newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio
159
160 use_define() {
161 local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')}
162
163 use "$1" && echo "-D$define" || echo "-U$define"
164 }
165
166 unifdef $(use_define avahi) \
167 $(use_define alsa) \
168 $(use_define bluetooth) \
169 $(use_define udev) \
170 "${FILESDIR}/pulseaudio.init.d-5" \
171 > "${T}/pulseaudio"
172
173 doinitd "${T}/pulseaudio"
174 fi
175
176 use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${ED}/etc/pulse/default.pa"
177
178 dodoc README todo
179
180 if use doc; then
181 pushd doxygen/html
182 dohtml *
183 popd
184 fi
185
186 # Create the state directory
187 use prefix || diropts -o pulse -g pulse -m0755
188 keepdir /var/run/pulse
189
190 find "${D}" -name '*.la' -delete
191 }
192
193 pkg_postinst() {
194 if use system-wide; then
195 elog "PulseAudio in Gentoo can use a system-wide pulseaudio daemon."
196 elog "This support is enabled by starting the pulseaudio init.d ."
197 elog "To be able to access that you need to be in the group pulse-access."
198 elog "If you choose to use this feature, please make sure that you"
199 elog "really want to run PulseAudio this way:"
200 elog " http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode"
201 elog "For more information about system-wide support, please refer to:"
202 elog " http://pulseaudio.org/wiki/SystemWideInstance"
203 if use gnome ; then
204 elog
205 elog "By enabling gnome USE flag, you enabled gconf support. Please note"
206 elog "that you might need to remove the gnome USE flag or disable the"
207 elog "gconf module on /etc/pulse/system.pa to be able to use PulseAudio"
208 elog "with a system-wide instance."
209 fi
210 fi
211 if use bluetooth; then
212 elog
213 elog "The Bluetooth proximity module is not enabled in the default"
214 elog "configuration file. If you do enable it, you'll have to have"
215 elog "your Bluetooth controller enabled and inserted at bootup or"
216 elog "PulseAudio will refuse to start."
217 fi
218 if use alsa; then
219 local pkg="media-plugins/alsa-plugins"
220 if has_version ${pkg} && ! has_version "${pkg}[pulseaudio]"; then
221 elog
222 elog "You have alsa support enabled so you probably want to install"
223 elog "${pkg} with pulseaudio support to have"
224 elog "alsa using applications route their sound through pulseaudio"
225 fi
226 fi
227
228 eselect esd update --if-unset
229 }

  ViewVC Help
Powered by ViewVC 1.1.20