aboutsummaryrefslogtreecommitdiffstats
path: root/www
diff options
context:
space:
mode:
authorrene <rene@FreeBSD.org>2016-06-09 03:06:05 +0800
committerrene <rene@FreeBSD.org>2016-06-09 03:06:05 +0800
commit32e686e24b1361753ef8fa647cc2a69b73985228 (patch)
tree224980a96597ab11f18f4f32d2aaf5d246de99d6 /www
parent6708740df51273267b8dad10739377f725aaa2b0 (diff)
downloadfreebsd-ports-gnome-32e686e24b1361753ef8fa647cc2a69b73985228.tar.gz
freebsd-ports-gnome-32e686e24b1361753ef8fa647cc2a69b73985228.tar.zst
freebsd-ports-gnome-32e686e24b1361753ef8fa647cc2a69b73985228.zip
www/chromium: restore WebRTC audio via ALSA which got lost in last commit.
PR: 206480 Submitted by: betso.net@gmail.com MFH: 2016Q2
Diffstat (limited to 'www')
-rw-r--r--www/chromium/Makefile2
-rw-r--r--www/chromium/files/patch-media__audio__alsa__audio_manager_alsa.cc54
2 files changed, 56 insertions, 0 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index b689e1cdde01..8182d1e38780 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -3,6 +3,7 @@
PORTNAME= chromium
PORTVERSION= 51.0.2704.84
+PORTREVISION= 1
CATEGORIES= www
MASTER_SITES= http://commondatastorage.googleapis.com/chromium-browser-official/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} # default, but needed to get distinfo correct if TEST is on
@@ -54,6 +55,7 @@ LIB_DEPENDS= libasound.so:audio/alsa-lib \
libxml2.so:textproc/libxml2
RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins \
+ alsa-lib>=1.1.1_1:audio/alsa-lib \
droid-fonts-ttf>0:x11-fonts/droid-fonts-ttf \
xdg-open:devel/xdg-utils
diff --git a/www/chromium/files/patch-media__audio__alsa__audio_manager_alsa.cc b/www/chromium/files/patch-media__audio__alsa__audio_manager_alsa.cc
new file mode 100644
index 000000000000..f88654f232b4
--- /dev/null
+++ b/www/chromium/files/patch-media__audio__alsa__audio_manager_alsa.cc
@@ -0,0 +1,54 @@
+--- media/audio/alsa/audio_manager_alsa.cc.orig 2016-04-07 19:01:10 UTC
++++ media/audio/alsa/audio_manager_alsa.cc
+@@ -128,7 +128,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+ int card = -1;
+
+ // Loop through the sound cards to get ALSA device hints.
++#ifdef OS_LINUX
+ while (!wrapper_->CardNext(&card) && card >= 0) {
++#endif
+ void** hints = NULL;
+ int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
+ if (!error) {
+@@ -140,7 +142,9 @@ void AudioManagerAlsa::GetAlsaAudioDevic
+ DLOG(WARNING) << "GetAlsaAudioDevices: unable to get device hints: "
+ << wrapper_->StrError(error);
+ }
++#ifdef OS_LINUX
+ }
++#endif
+ }
+
+ void AudioManagerAlsa::GetAlsaDevicesInfo(
+@@ -226,7 +230,11 @@ bool AudioManagerAlsa::IsAlsaDeviceAvail
+ // goes through software conversion if needed (e.g. incompatible
+ // sample rate).
+ // TODO(joi): Should we prefer "hw" instead?
++#ifdef OS_LINUX
+ static const char kDeviceTypeDesired[] = "plughw";
++#else
++ static const char kDeviceTypeDesired[] = "plug";
++#endif
+ return strncmp(kDeviceTypeDesired,
+ device_name,
+ arraysize(kDeviceTypeDesired) - 1) == 0;
+@@ -250,7 +258,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+ // Loop through the sound cards.
+ // Don't use snd_device_name_hint(-1,..) since there is a access violation
+ // inside this ALSA API with libasound.so.2.0.0.
++#ifdef OS_LINUX
+ while (!wrapper_->CardNext(&card) && (card >= 0) && !has_device) {
++#endif
+ int error = wrapper_->DeviceNameHint(card, kPcmInterfaceName, &hints);
+ if (!error) {
+ for (void** hint_iter = hints; *hint_iter != NULL; hint_iter++) {
+@@ -274,7 +284,9 @@ bool AudioManagerAlsa::HasAnyAlsaAudioDe
+ DLOG(WARNING) << "HasAnyAudioDevice: unable to get device hints: "
+ << wrapper_->StrError(error);
+ }
++#ifdef OS_LINUX
+ }
++#endif
+
+ return has_device;
+ }