aboutsummaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2016-04-15 05:35:33 +0800
committerjbeich <jbeich@FreeBSD.org>2016-04-15 05:35:33 +0800
commitdd09653f51998cd9d358538f27961e355655f86d (patch)
treeeb31b9d25651a73d91f72329ea341a561b651446 /audio
parentafb26a986ccb75bea7ae04b6138ae0ec2196d9a8 (diff)
downloadfreebsd-ports-gnome-dd09653f51998cd9d358538f27961e355655f86d.tar.gz
freebsd-ports-gnome-dd09653f51998cd9d358538f27961e355655f86d.tar.zst
freebsd-ports-gnome-dd09653f51998cd9d358538f27961e355655f86d.zip
audio/praat: unbreak sound support
Portaudio doesn't work with alsa-plugins-oss, so switch to native OSS. ALSA lib confmisc.c:768:(parse_card) cannot find card '0' ALSA lib conf.c:4292:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory [...] PR: 208728 Reported by: kaltheat@gmail.com Approved by: Jason Bacon <bacon4000@gmail.com> (maintainer) MFH: 2016Q2
Diffstat (limited to 'audio')
-rw-r--r--audio/praat/Makefile4
-rw-r--r--audio/praat/files/makefile.defs.freebsd.alsa7
-rw-r--r--audio/praat/files/patch-external_portaudio_Makefile13
-rw-r--r--audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c11
4 files changed, 29 insertions, 6 deletions
diff --git a/audio/praat/Makefile b/audio/praat/Makefile
index dae36e6a3b5a..9b340b20e334 100644
--- a/audio/praat/Makefile
+++ b/audio/praat/Makefile
@@ -4,7 +4,7 @@
PORTNAME= praat
PORTVERSION= 5.4.08
DISTVERSIONPREFIX= v
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio science
MAINTAINER= bacon4000@gmail.com
@@ -19,8 +19,6 @@ USE_GNOME= gtk20
MAKEFILE= makefile
PLIST_FILES= bin/praat man/man1/praat.1.gz
-LIB_DEPENDS+= libasound.so:audio/alsa-lib
-
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 1000000
diff --git a/audio/praat/files/makefile.defs.freebsd.alsa b/audio/praat/files/makefile.defs.freebsd.alsa
index f7ad69901ba0..cbbdf2701dd2 100644
--- a/audio/praat/files/makefile.defs.freebsd.alsa
+++ b/audio/praat/files/makefile.defs.freebsd.alsa
@@ -8,17 +8,18 @@ CC ?= gcc
CXX ?= g++
-CFLAGS = -std=gnu99 -DUNIX -Dlinux -DALSA `pkg-config --cflags gtk+-2.0` -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1
+CFLAGS = -std=gnu99 -DUNIX -Dlinux -DHAVE_SYS_SOUNDCARD_H `pkg-config --cflags gtk+-2.0` -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1
-CXXFLAGS = -std=gnu++11 -Wshadow -DUNIX -Dlinux -DALSA `pkg-config --cflags gtk+-2.0` -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -I%%WRKSRC%%/sys -I%%WRKSRC%%/dwsys -I%%WRKSRC%%/num -I%%WRKSRC%%/stat -I%%WRKSRC%%/kar -I%%WRKSRC%%/dwtools -I%%WRKSRC%%/fon -I%%WRKSRC%%/LPC -I%%WRKSRC%%/EEG -I%%WRKSRC%%/external/espeak -I%%WRKSRC%%/external/flac -I%%WRKSRC%%/external/mp3 -I%%WRKSRC%%/external/gsl -I%%LOCALBASE%%/include -I%%LOCALBASE%%/include/unicode
+CXXFLAGS = -std=gnu++11 -Wshadow -DUNIX -Dlinux -DHAVE_SYS_SOUNDCARD_H `pkg-config --cflags gtk+-2.0` -Werror=implicit -Wreturn-type -Wunused -Wunused-parameter -Wuninitialized -O1 -g1 -I%%WRKSRC%%/sys -I%%WRKSRC%%/dwsys -I%%WRKSRC%%/num -I%%WRKSRC%%/stat -I%%WRKSRC%%/kar -I%%WRKSRC%%/dwtools -I%%WRKSRC%%/fon -I%%WRKSRC%%/LPC -I%%WRKSRC%%/EEG -I%%WRKSRC%%/external/espeak -I%%WRKSRC%%/external/flac -I%%WRKSRC%%/external/mp3 -I%%WRKSRC%%/external/gsl -I%%LOCALBASE%%/include -I%%LOCALBASE%%/include/unicode
LINK ?= $(CXX)
EXECUTABLE = praat
-LIBS = `pkg-config --libs gtk+-2.0` -L%%LOCALBASE%%/lib -lm -lasound -lpthread -ltinfow
+LIBS = `pkg-config --libs gtk+-2.0` -L%%LOCALBASE%%/lib -lm -lpthread -ltinfow
AR = ar
RANLIB = ls
ICON =
MAIN_ICON =
+PA_BACKEND = pa_unix_oss.o
diff --git a/audio/praat/files/patch-external_portaudio_Makefile b/audio/praat/files/patch-external_portaudio_Makefile
new file mode 100644
index 000000000000..a773129cb39c
--- /dev/null
+++ b/audio/praat/files/patch-external_portaudio_Makefile
@@ -0,0 +1,13 @@
+--- external/portaudio/Makefile.orig 2015-05-20 01:47:31 UTC
++++ external/portaudio/Makefile
+@@ -3,8 +3,9 @@
+
+ include ../../makefile.defs
+
++PA_BACKEND ?= pa_linux_alsa.o
+ OBJECTS = \
+- pa_unix_hostapis.o pa_unix_util.o pa_linux_alsa.o \
++ pa_unix_hostapis.o pa_unix_util.o $(PA_BACKEND) \
+ pa_win_hostapis.o pa_win_util.o pa_win_wmme.o pa_win_waveformat.o \
+ pa_front.o pa_debugprint.o pa_cpuload.o \
+ pa_allocation.o pa_process.o pa_converters.o pa_dither.o \
diff --git a/audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c b/audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c
new file mode 100644
index 000000000000..4527980036ce
--- /dev/null
+++ b/audio/praat/files/patch-external_portaudio_pa__unix__hostapis.c
@@ -0,0 +1,11 @@
+--- external/portaudio/pa_unix_hostapis.c.orig 2015-05-20 01:47:31 UTC
++++ external/portaudio/pa_unix_hostapis.c
+@@ -60,6 +60,8 @@ PaUtilHostApiInitializer *paHostApiIniti
+ {
+ #if defined (linux) && defined (ALSA)
+ PaAlsa_Initialize, // ppgb
++ #else
++ PaOSS_Initialize,
+ #endif
+ 0 /* NULL terminated array */
+ };