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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (hide annotations) (download)
Fri Jun 1 03:01:18 2012 UTC (2 years, 10 months ago) by zmedico
Branch: MAIN
Changes since 1.4: +2 -2 lines
inherit user for enewgroup and enewuser, multilib for get_libdir, and remove unused libtool inherits

(Portage version: 2.2.0_alpha108_p10/cvs/Linux i686)

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

  ViewVC Help
Powered by ViewVC 1.1.20