diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2007-12-29 16:06:27 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2007-12-29 16:06:27 +0000 |
commit | 88750255e7a66eed732205066fcef8e5c6fc1037 (patch) | |
tree | 15c9512f733df47afb17c0449c50a64a76039094 /media-sound/pulseaudio | |
parent | Add 0.9.8-r5 to PulseAudio mask. (diff) | |
download | historical-88750255e7a66eed732205066fcef8e5c6fc1037.tar.gz historical-88750255e7a66eed732205066fcef8e5c6fc1037.tar.bz2 historical-88750255e7a66eed732205066fcef8e5c6fc1037.zip |
Apply patch from upstream SVN revision 2078. Thanks to Petteri Räty for reporting.
Package-Manager: portage-2.1.4_rc11
Diffstat (limited to 'media-sound/pulseaudio')
-rw-r--r-- | media-sound/pulseaudio/ChangeLog | 11 | ||||
-rw-r--r-- | media-sound/pulseaudio/Manifest | 36 | ||||
-rw-r--r-- | media-sound/pulseaudio/files/digest-pulseaudio-0.9.8-r4 | 3 | ||||
-rw-r--r-- | media-sound/pulseaudio/files/digest-pulseaudio-0.9.8-r5 | 3 | ||||
-rw-r--r-- | media-sound/pulseaudio/files/pulseaudio-0.9.8-create-directory.patch | 21 | ||||
-rw-r--r-- | media-sound/pulseaudio/pulseaudio-0.9.8-r4.ebuild | 173 | ||||
-rw-r--r-- | media-sound/pulseaudio/pulseaudio-0.9.8-r5.ebuild | 181 |
7 files changed, 423 insertions, 5 deletions
diff --git a/media-sound/pulseaudio/ChangeLog b/media-sound/pulseaudio/ChangeLog index e39115bcf293..57c7c4fa6187 100644 --- a/media-sound/pulseaudio/ChangeLog +++ b/media-sound/pulseaudio/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for media-sound/pulseaudio # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/ChangeLog,v 1.83 2007/12/22 18:05:09 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/ChangeLog,v 1.84 2007/12/29 16:06:26 flameeyes Exp $ + +*pulseaudio-0.9.8-r5 (29 Dec 2007) +*pulseaudio-0.9.8-r4 (29 Dec 2007) + + 29 Dec 2007; Diego Pettenò <flameeyes@gentoo.org> + +files/pulseaudio-0.9.8-create-directory.patch, + +pulseaudio-0.9.8-r4.ebuild, +pulseaudio-0.9.8-r5.ebuild: + Apply patch from upstream SVN revision 2078. Thanks to Petteri Räty for + reporting. 22 Dec 2007; Tobias Scherbaum <dertobi123@gentoo.org> pulseaudio-0.9.7.ebuild: diff --git a/media-sound/pulseaudio/Manifest b/media-sound/pulseaudio/Manifest index 3c77c1802072..1c3c51a1baa4 100644 --- a/media-sound/pulseaudio/Manifest +++ b/media-sound/pulseaudio/Manifest @@ -1,3 +1,6 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX pulseaudio-0.9.5-CVE-2007-1804.patch 3563 RMD160 1f8995393dca08cf183b55879ded304c13f94e80 SHA1 e209af3445f9e56b5234d2a65b9d57b3ae1ed867 SHA256 ecf96b8aa4ee3f18dc4bba71c22aafcaa650469089ed6e78704095e500e44872 MD5 adb958f348db1d8623cb5a9ae157d469 files/pulseaudio-0.9.5-CVE-2007-1804.patch 3563 RMD160 1f8995393dca08cf183b55879ded304c13f94e80 files/pulseaudio-0.9.5-CVE-2007-1804.patch 3563 @@ -26,6 +29,10 @@ AUX pulseaudio-0.9.8-bt-nohal.patch 1153 RMD160 5ad7a7173795c022fca73ccf694207e1 MD5 2770bc498e4ffe3d03ebae7916166a59 files/pulseaudio-0.9.8-bt-nohal.patch 1153 RMD160 5ad7a7173795c022fca73ccf694207e18d6925a7 files/pulseaudio-0.9.8-bt-nohal.patch 1153 SHA256 1bdc458d55529777a3a760205a09d0381433402a3002518ba5a700b3518c727d files/pulseaudio-0.9.8-bt-nohal.patch 1153 +AUX pulseaudio-0.9.8-create-directory.patch 685 RMD160 87c287d3ff6047c9bee892271ea3b3ac6d06fa1a SHA1 2083a575f6272135909efce292d43a2f947f285f SHA256 5fd77f5d0a897d3f70cb3e20e24b97e7f0f46d9266b8758c56a7cb84f763e571 +MD5 5b0aa5da94271562ce9550c27145fede files/pulseaudio-0.9.8-create-directory.patch 685 +RMD160 87c287d3ff6047c9bee892271ea3b3ac6d06fa1a files/pulseaudio-0.9.8-create-directory.patch 685 +SHA256 5fd77f5d0a897d3f70cb3e20e24b97e7f0f46d9266b8758c56a7cb84f763e571 files/pulseaudio-0.9.8-create-directory.patch 685 AUX pulseaudio-0.9.8-esoundpath.patch 1798 RMD160 c009c0d1cfdf0bb9db6ef476df29bca56b68ab58 SHA1 5901b164c5b4bd3fa485dbc1a5a950f2ba5794a9 SHA256 4ae132c68a19f07ecf1fef9c55cebc7615e38b157dc196961f666c3914a4641b MD5 390d56bb9582b45e9138c7329c0a2a67 files/pulseaudio-0.9.8-esoundpath.patch 1798 RMD160 c009c0d1cfdf0bb9db6ef476df29bca56b68ab58 files/pulseaudio-0.9.8-esoundpath.patch 1798 @@ -74,10 +81,18 @@ EBUILD pulseaudio-0.9.8-r3.ebuild 5673 RMD160 d713d3bc531615052d437ef993640c1d1c MD5 82666c0378c30ed95e521f8b3bd543bb pulseaudio-0.9.8-r3.ebuild 5673 RMD160 d713d3bc531615052d437ef993640c1d1c1b26e5 pulseaudio-0.9.8-r3.ebuild 5673 SHA256 54aaebda844b5f2aca7382be3b33ffeb484dc84b157b29982cc7d5c33121fd35 pulseaudio-0.9.8-r3.ebuild 5673 -MISC ChangeLog 14857 RMD160 993ba4c07636401c1b46a09a17d266517264e416 SHA1 66f1615d8d6490e4f01ad42c787dcea11f1b9873 SHA256 524feecb906cdea514313c7cbe6ddb09a340e2e626ec02eb927c22b13101e7e5 -MD5 c5bc7c2c00947046fd96058f0815fc4c ChangeLog 14857 -RMD160 993ba4c07636401c1b46a09a17d266517264e416 ChangeLog 14857 -SHA256 524feecb906cdea514313c7cbe6ddb09a340e2e626ec02eb927c22b13101e7e5 ChangeLog 14857 +EBUILD pulseaudio-0.9.8-r4.ebuild 5761 RMD160 6515a9d8a616f08cd92764401e5d625454435fe5 SHA1 97069f608fec2396038611850c6d0526eb1b0c6a SHA256 24fdc6749b3c934da469801e027b70d272bb273151899cb55d2c7861346ddfe9 +MD5 744fae7f6067e1435abd55cc6779b414 pulseaudio-0.9.8-r4.ebuild 5761 +RMD160 6515a9d8a616f08cd92764401e5d625454435fe5 pulseaudio-0.9.8-r4.ebuild 5761 +SHA256 24fdc6749b3c934da469801e027b70d272bb273151899cb55d2c7861346ddfe9 pulseaudio-0.9.8-r4.ebuild 5761 +EBUILD pulseaudio-0.9.8-r5.ebuild 5729 RMD160 bc46eec42e0dfebf15e4ca3d716879a1fa853957 SHA1 ca6ac50b18ecf410fbb33b4e2d286cdad362ab98 SHA256 87182dab3e4f1ed8009d5310ccc55813f078325718179644a3ba81634a53c4f9 +MD5 c5e100c90024edfad9369048215fea1c pulseaudio-0.9.8-r5.ebuild 5729 +RMD160 bc46eec42e0dfebf15e4ca3d716879a1fa853957 pulseaudio-0.9.8-r5.ebuild 5729 +SHA256 87182dab3e4f1ed8009d5310ccc55813f078325718179644a3ba81634a53c4f9 pulseaudio-0.9.8-r5.ebuild 5729 +MISC ChangeLog 15179 RMD160 579d8e6f9183145522b9409129499686832fd34c SHA1 b57a989f508d873956101fe90b351001683e6acc SHA256 2b54810c2954c8baa88572ce17deedbb26108013123a34c5a149d3fc9cfa9eef +MD5 dbcb26fbeb7e064e3ee18ebd4d4d0c79 ChangeLog 15179 +RMD160 579d8e6f9183145522b9409129499686832fd34c ChangeLog 15179 +SHA256 2b54810c2954c8baa88572ce17deedbb26108013123a34c5a149d3fc9cfa9eef ChangeLog 15179 MISC metadata.xml 927 RMD160 f356067c159b3c1f767acc9d4cae0a7d08594f92 SHA1 d33063c255d3623824ed1738e645030499100320 SHA256 fc48d35d1b5412086fdb1a110855d46da5227f9948e6d833555404557c10c9a6 MD5 411dece56551d80e6fdf2cf1f42e7de5 metadata.xml 927 RMD160 f356067c159b3c1f767acc9d4cae0a7d08594f92 metadata.xml 927 @@ -97,3 +112,16 @@ SHA256 163458e04049a24ab1dcfcc110dd4eea8a1e0fa2e8c26811e9502842e97928cd files/di MD5 4d91e7eeb785ff03ad20f30e1bc59118 files/digest-pulseaudio-0.9.8-r3 253 RMD160 fe718f55780ba439e718786e40496ac23a1d989f files/digest-pulseaudio-0.9.8-r3 253 SHA256 163458e04049a24ab1dcfcc110dd4eea8a1e0fa2e8c26811e9502842e97928cd files/digest-pulseaudio-0.9.8-r3 253 +MD5 4d91e7eeb785ff03ad20f30e1bc59118 files/digest-pulseaudio-0.9.8-r4 253 +RMD160 fe718f55780ba439e718786e40496ac23a1d989f files/digest-pulseaudio-0.9.8-r4 253 +SHA256 163458e04049a24ab1dcfcc110dd4eea8a1e0fa2e8c26811e9502842e97928cd files/digest-pulseaudio-0.9.8-r4 253 +MD5 4d91e7eeb785ff03ad20f30e1bc59118 files/digest-pulseaudio-0.9.8-r5 253 +RMD160 fe718f55780ba439e718786e40496ac23a1d989f files/digest-pulseaudio-0.9.8-r5 253 +SHA256 163458e04049a24ab1dcfcc110dd4eea8a1e0fa2e8c26811e9502842e97928cd files/digest-pulseaudio-0.9.8-r5 253 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.8 (GNU/Linux) + +iEYEARECAAYFAkd2bvwACgkQAiZjviIA2Xg/dwCgrBnRz4oj64Xij2LvD4KCQQHn +zDIAoIjkPg8YuWYf0fKG7pxauQfO9i67 +=J6ZN +-----END PGP SIGNATURE----- diff --git a/media-sound/pulseaudio/files/digest-pulseaudio-0.9.8-r4 b/media-sound/pulseaudio/files/digest-pulseaudio-0.9.8-r4 new file mode 100644 index 000000000000..9f89ccdd6357 --- /dev/null +++ b/media-sound/pulseaudio/files/digest-pulseaudio-0.9.8-r4 @@ -0,0 +1,3 @@ +MD5 184a41d5947e583d395f0a2541525fc2 pulseaudio-0.9.8.tar.gz 1089681 +RMD160 ed4c1a5f4cf53ef166fe2aad66f1cae880463a8f pulseaudio-0.9.8.tar.gz 1089681 +SHA256 359891878e19d33b15f6a97eaec9b2f7d85dab7c1e1d6723537b80d36aa36858 pulseaudio-0.9.8.tar.gz 1089681 diff --git a/media-sound/pulseaudio/files/digest-pulseaudio-0.9.8-r5 b/media-sound/pulseaudio/files/digest-pulseaudio-0.9.8-r5 new file mode 100644 index 000000000000..9f89ccdd6357 --- /dev/null +++ b/media-sound/pulseaudio/files/digest-pulseaudio-0.9.8-r5 @@ -0,0 +1,3 @@ +MD5 184a41d5947e583d395f0a2541525fc2 pulseaudio-0.9.8.tar.gz 1089681 +RMD160 ed4c1a5f4cf53ef166fe2aad66f1cae880463a8f pulseaudio-0.9.8.tar.gz 1089681 +SHA256 359891878e19d33b15f6a97eaec9b2f7d85dab7c1e1d6723537b80d36aa36858 pulseaudio-0.9.8.tar.gz 1089681 diff --git a/media-sound/pulseaudio/files/pulseaudio-0.9.8-create-directory.patch b/media-sound/pulseaudio/files/pulseaudio-0.9.8-create-directory.patch new file mode 100644 index 000000000000..92bb2ebf41dd --- /dev/null +++ b/media-sound/pulseaudio/files/pulseaudio-0.9.8-create-directory.patch @@ -0,0 +1,21 @@ +Index: src/pulsecore/core-util.c +=================================================================== +--- src/pulsecore/core-util.c (revision 2077) ++++ src/pulsecore/core-util.c (revision 2078) +@@ -1129,8 +1129,15 @@ + + if ((e = getenv("PULSE_CONFIG_PATH"))) + fn = lfn = pa_sprintf_malloc("%s/%s", e, local); +- else if (pa_get_home_dir(h, sizeof(h))) ++ else if (pa_get_home_dir(h, sizeof(h))) { ++ char *d; ++ ++ d = pa_sprintf_malloc("%s/.pulse", h); ++ mkdir(d, 0755); ++ pa_xfree(d); ++ + fn = lfn = pa_sprintf_malloc("%s/.pulse/%s", h, local); ++ } + + if (lfn) { + FILE *f; diff --git a/media-sound/pulseaudio/pulseaudio-0.9.8-r4.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.8-r4.ebuild new file mode 100644 index 000000000000..ea48d30ae11f --- /dev/null +++ b/media-sound/pulseaudio/pulseaudio-0.9.8-r4.ebuild @@ -0,0 +1,173 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.8-r4.ebuild,v 1.1 2007/12/29 16:06:26 flameeyes Exp $ + +inherit eutils libtool autotools + +DESCRIPTION="A networked sound server with an advanced plugin system" +HOMEPAGE="http://0pointer.de/lennart/projects/pulseaudio/" +SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2 GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~x86-fbsd" +IUSE="alsa avahi caps jack lirc oss tcpd X hal dbus libsamplerate gnome bluetooth policykit" + +RDEPEND="X? ( x11-libs/libX11 ) + caps? ( sys-libs/libcap ) + >=media-libs/audiofile-0.2.6-r1 + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 ) + >=media-libs/libsndfile-1.0.10 + >=dev-libs/liboil-0.3.6 + alsa? ( >=media-libs/alsa-lib-1.0.10 ) + >=dev-libs/glib-2.4.0 + avahi? ( >=net-dns/avahi-0.6.12 ) + >=dev-libs/liboil-0.3.0 + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + tcpd? ( sys-apps/tcp-wrappers ) + lirc? ( app-misc/lirc ) + dbus? ( >=sys-apps/dbus-1.0.0 ) + gnome? ( >=gnome-base/gconf-2.4.0 ) + hal? ( + >=sys-apps/hal-0.5.7 + >=sys-apps/dbus-1.0.0 + ) + app-admin/eselect-esd + bluetooth? ( + >=net-wireless/bluez-libs-3 + >=sys-apps/dbus-1.0.0 + ) + policykit? ( sys-auth/policykit ) + >=sys-devel/libtool-1.5.24" # it's a valid RDEPEND, libltdl.so is used +DEPEND="${RDEPEND} + dev-libs/libatomic_ops + dev-util/pkgconfig" + +# alsa-utils dep is for the alsasound init.d script (see bug #155707) +# bluez-utils dep is for the bluetooth init.d script +RDEPEND="${RDEPEND} + gnome-extra/gnome-audio + alsa? ( media-sound/alsa-utils ) + bluetooth? ( >=net-wireless/bluez-utils-3 )" + +pkg_setup() { + if use avahi && ! built_with_use net-dns/avahi dbus ; then + echo + eerror "In order to compile pulseaudio with avahi support, you need to have" + eerror "net-dns/avahi emerged with 'dbus' in your USE flag. Please add that" + eerror "flag, re-emerge avahi, and then emerge pulseaudio again." + die "net-dns/avahi is missing the D-Bus bindings." + fi + + enewgroup audio 18 # Just make sure it exists + enewgroup realtime + enewgroup pulse-access + enewgroup pulse + enewuser pulse -1 -1 /var/run/pulse pulse,audio +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-svn2074.patch" + epatch "${FILESDIR}/${P}-polkit.patch" + epatch "${FILESDIR}/${P}-bt-nohal.patch" + epatch "${FILESDIR}/${P}-esoundpath.patch" + epatch "${FILESDIR}/${P}-create-directory.patch" + + eautoreconf + elibtoolize +} + +src_compile() { + econf \ + --enable-largefile \ + --enable-glib2 \ + --disable-solaris \ + --disable-asyncns \ + $(use_enable oss) \ + $(use_enable alsa) \ + $(use_enable lirc) \ + $(use_enable tcpd tcpwrap) \ + $(use_enable jack) \ + $(use_enable lirc) \ + $(use_enable avahi) \ + $(use_enable hal) \ + $(use_enable dbus) \ + $(use_enable gnome gconf) \ + $(use_enable libsamplerate samplerate) \ + $(use_enable bluetooth bluez) \ + $(use_enable policykit polkit) \ + $(use_with caps) \ + $(use_with X x) \ + --disable-ltdl-install \ + --localstatedir=/var \ + --with-realtime-group=realtime \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake -j1 DESTDIR="${D}" install || die "make install failed" + + newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio + + local neededservices + use alsa && neededservices="$neededservices alsasound" + use avahi && neededservices="$neededservices avahi-daemon" + use hal && neededservices="$neededservices hald" + use bluetooth && neededservices="$neededservices bluetooth" + [[ -n ${neededservices} ]] && sed -e "s/@neededservices@/need $neededservices/" "${FILESDIR}/pulseaudio.init.d-2" > "${T}/pulseaudio" + doinitd "${T}/pulseaudio" + + if ! use hal; then + sed -i -e '/module-hal-detect/s:^:#: ; /module-detect/s:^#::' "${D}/etc/pulse/default.pa" + fi + use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${D}/etc/pulse/default.pa" + + dohtml -r doc + dodoc README + + # Create the state directory + diropts -o pulse -g pulse -m0755 + keepdir /var/run/pulse +} + +pkg_postinst() { + elog "PulseAudio in Gentoo can use a system-wide pulseaudio daemon." + elog "This support is enabled by starting the pulseaudio init.d ." + elog "To be able to access that you need to be in the group pulse-access." + elog "For more information about system-wide support, please refer to" + elog " http://pulseaudio.org/wiki/SystemWideInstance" + if use gnome; then + elog + elog "By enabling gnome USE flag, you enabled gconf support. Pleaes note" + elog "that you might need to remove the gnome USE flag or disable the" + elog "gconf module on /etc/pulse/default.pa to be able to use PulseAudio" + elog "with a system-wide instance." + fi + elog + elog "To use the ESounD wrapper while using a system-wide daemon, you also" + elog "need to enable auth-anonymous for the esound-unix module, or to copy" + elog "/var/run/pulse/.esd_auth into each home directory." + elog + elog "If you want to make use of realtime capabilities of PulseAudio" + elog "you should follow the realtime guide to create and set up a realtime" + elog "user group: http://www.gentoo.org/proj/en/desktop/sound/realtime.xml" + elog "Make sure you also have baselayout installed with pam USE flag" + elog "enabled, if you're using the rlimit method." + if use bluetooth; then + elog + elog "The BlueTooth proximity module is not enabled in the default" + elog "configuration file. If you do enable it, you'll have to have" + elog "your BlueTooth controller enabled and inserted at bootup or" + elog "PulseAudio will refuse to start." + elog + elog "Please note that the BlueTooth proximity module seems itself" + elog "still experimental, so please report to upstream if you have" + elog "problems with it." + fi + + eselect esd update --if-unset +} diff --git a/media-sound/pulseaudio/pulseaudio-0.9.8-r5.ebuild b/media-sound/pulseaudio/pulseaudio-0.9.8-r5.ebuild new file mode 100644 index 000000000000..80693c8707e4 --- /dev/null +++ b/media-sound/pulseaudio/pulseaudio-0.9.8-r5.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/pulseaudio/pulseaudio-0.9.8-r5.ebuild,v 1.1 2007/12/29 16:06:26 flameeyes Exp $ + +inherit eutils libtool autotools + +DESCRIPTION="A networked sound server with an advanced plugin system" +HOMEPAGE="http://0pointer.de/lennart/projects/pulseaudio/" +SRC_URI="http://0pointer.de/lennart/projects/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2 GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~hppa ~x86 ~x86-fbsd" +IUSE="alsa avahi caps jack lirc oss tcpd X hal dbus libsamplerate gnome bluetooth policykit" + +RDEPEND="X? ( x11-libs/libX11 ) + caps? ( sys-libs/libcap ) + >=media-libs/audiofile-0.2.6-r1 + libsamplerate? ( >=media-libs/libsamplerate-0.1.1-r1 ) + >=media-libs/libsndfile-1.0.10 + >=dev-libs/liboil-0.3.6 + alsa? ( >=media-libs/alsa-lib-1.0.10 ) + >=dev-libs/glib-2.4.0 + avahi? ( >=net-dns/avahi-0.6.12 ) + >=dev-libs/liboil-0.3.0 + jack? ( >=media-sound/jack-audio-connection-kit-0.100 ) + tcpd? ( sys-apps/tcp-wrappers ) + lirc? ( app-misc/lirc ) + dbus? ( >=sys-apps/dbus-1.0.0 ) + gnome? ( >=gnome-base/gconf-2.4.0 ) + hal? ( + >=sys-apps/hal-0.5.7 + >=sys-apps/dbus-1.0.0 + ) + app-admin/eselect-esd + bluetooth? ( + >=net-wireless/bluez-libs-3 + >=sys-apps/dbus-1.0.0 + ) + policykit? ( sys-auth/policykit ) + >=sys-apps/baselayout-2.0_rc5 + >=sys-devel/libtool-1.5.24" # it's a valid RDEPEND, libltdl.so is used +DEPEND="${RDEPEND} + dev-libs/libatomic_ops + dev-util/pkgconfig + dev-util/unifdef" + +# alsa-utils dep is for the alsasound init.d script (see bug #155707) +# bluez-utils dep is for the bluetooth init.d script +RDEPEND="${RDEPEND} + gnome-extra/gnome-audio + alsa? ( media-sound/alsa-utils ) + bluetooth? ( >=net-wireless/bluez-utils-3 )" + +pkg_setup() { + if use avahi && ! built_with_use net-dns/avahi dbus ; then + echo + eerror "In order to compile pulseaudio with avahi support, you need to have" + eerror "net-dns/avahi emerged with 'dbus' in your USE flag. Please add that" + eerror "flag, re-emerge avahi, and then emerge pulseaudio again." + die "net-dns/avahi is missing the D-Bus bindings." + fi + + enewgroup audio 18 # Just make sure it exists + enewgroup realtime + enewgroup pulse-access + enewgroup pulse + enewuser pulse -1 -1 /var/run/pulse pulse,audio +} + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${P}-svn2074.patch" + epatch "${FILESDIR}/${P}-polkit.patch" + epatch "${FILESDIR}/${P}-bt-nohal.patch" + epatch "${FILESDIR}/${P}-esoundpath.patch" + epatch "${FILESDIR}/${P}-create-directory.patch" + + eautoreconf + elibtoolize +} + +src_compile() { + econf \ + --enable-largefile \ + --enable-glib2 \ + --disable-solaris \ + --disable-asyncns \ + $(use_enable oss) \ + $(use_enable alsa) \ + $(use_enable lirc) \ + $(use_enable tcpd tcpwrap) \ + $(use_enable jack) \ + $(use_enable lirc) \ + $(use_enable avahi) \ + $(use_enable hal) \ + $(use_enable dbus) \ + $(use_enable gnome gconf) \ + $(use_enable libsamplerate samplerate) \ + $(use_enable bluetooth bluez) \ + $(use_enable policykit polkit) \ + $(use_with caps) \ + $(use_with X x) \ + --disable-ltdl-install \ + --localstatedir=/var \ + --with-realtime-group=realtime \ + || die "econf failed" + emake || die "emake failed" +} + +src_install() { + emake -j1 DESTDIR="${D}" install || die "make install failed" + + newconfd "${FILESDIR}/pulseaudio.conf.d" pulseaudio + + use_define() { + local define=${2:-$(echo $1 | tr '[:lower:]' '[:upper:]')} + + use "$1" && echo "-D$define" || echo "-U$define" + } + + unifdef "${FILESDIR}/pulseaudio.init.d-3" \ + $(use_define hal) \ + $(use_define avahi) \ + $(use_define alsa) \ + $(use_define bluetooth) \ + > "${T}/pulseaudio" + doinitd "${T}/pulseaudio" + + if ! use hal; then + sed -i -e '/module-hal-detect/s:^:#: ; /module-detect/s:^#::' "${D}/etc/pulse/default.pa" + fi + use avahi && sed -i -e '/module-zeroconf-publish/s:^#::' "${D}/etc/pulse/default.pa" + + dohtml -r doc + dodoc README + + # Create the state directory + diropts -o pulse -g pulse -m0755 + keepdir /var/run/pulse +} + +pkg_postinst() { + elog "PulseAudio in Gentoo can use a system-wide pulseaudio daemon." + elog "This support is enabled by starting the pulseaudio init.d ." + elog "To be able to access that you need to be in the group pulse-access." + elog "For more information about system-wide support, please refer to" + elog " http://pulseaudio.org/wiki/SystemWideInstance" + if use gnome; then + elog + elog "By enabling gnome USE flag, you enabled gconf support. Pleaes note" + elog "that you might need to remove the gnome USE flag or disable the" + elog "gconf module on /etc/pulse/default.pa to be able to use PulseAudio" + elog "with a system-wide instance." + fi + elog + elog "To use the ESounD wrapper while using a system-wide daemon, you also" + elog "need to enable auth-anonymous for the esound-unix module, or to copy" + elog "/var/run/pulse/.esd_auth into each home directory." + elog + elog "If you want to make use of realtime capabilities of PulseAudio" + elog "you should follow the realtime guide to create and set up a realtime" + elog "user group: http://www.gentoo.org/proj/en/desktop/sound/realtime.xml" + elog "Make sure you also have baselayout installed with pam USE flag" + elog "enabled, if you're using the rlimit method." + if use bluetooth; then + elog + elog "The BlueTooth proximity module is not enabled in the default" + elog "configuration file. If you do enable it, you'll have to have" + elog "your BlueTooth controller enabled and inserted at bootup or" + elog "PulseAudio will refuse to start." + elog + elog "Please note that the BlueTooth proximity module seems itself" + elog "still experimental, so please report to upstream if you have" + elog "problems with it." + fi + + eselect esd update --if-unset +} |