summaryrefslogtreecommitdiffstats
path: root/audio/libcanberra
diff options
context:
space:
mode:
authormarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-08-21 04:51:27 +0800
committermarcus <marcus@df743ca5-7f9a-e211-a948-0013205c9059>2008-08-21 04:51:27 +0800
commitfd3995d835885c7d6bad24f31581a9382bcf1a22 (patch)
tree8270cdcaf197198fde36f1ca59c86346d2e920d2 /audio/libcanberra
parent5a03166a68612846b250bd285d6dfb4f0df5c17e (diff)
downloadmarcuscom-ports-fd3995d835885c7d6bad24f31581a9382bcf1a22.tar
marcuscom-ports-fd3995d835885c7d6bad24f31581a9382bcf1a22.tar.gz
marcuscom-ports-fd3995d835885c7d6bad24f31581a9382bcf1a22.tar.bz2
marcuscom-ports-fd3995d835885c7d6bad24f31581a9382bcf1a22.tar.lz
marcuscom-ports-fd3995d835885c7d6bad24f31581a9382bcf1a22.tar.xz
marcuscom-ports-fd3995d835885c7d6bad24f31581a9382bcf1a22.tar.zst
marcuscom-ports-fd3995d835885c7d6bad24f31581a9382bcf1a22.zip
Another round of patch cleanups.
git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@11357 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'audio/libcanberra')
-rw-r--r--audio/libcanberra/Makefile2
-rw-r--r--audio/libcanberra/files/patch-configure8
-rw-r--r--audio/libcanberra/files/patch-configure.ac8
-rw-r--r--audio/libcanberra/files/patch-src_oss.c31
4 files changed, 22 insertions, 27 deletions
diff --git a/audio/libcanberra/Makefile b/audio/libcanberra/Makefile
index 2fd0e46ab..ec905a13d 100644
--- a/audio/libcanberra/Makefile
+++ b/audio/libcanberra/Makefile
@@ -7,7 +7,7 @@
PORTNAME= libcanberra
PORTVERSION= 0.7
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio devel
MASTER_SITES= http://0pointer.de/lennart/projects/libcanberra/
diff --git a/audio/libcanberra/files/patch-configure b/audio/libcanberra/files/patch-configure
index 19e07bfe2..bbfcd39cf 100644
--- a/audio/libcanberra/files/patch-configure
+++ b/audio/libcanberra/files/patch-configure
@@ -1,5 +1,5 @@
---- configure.orig 2008-08-20 13:45:00.000000000 -0400
-+++ configure 2008-08-20 13:45:26.000000000 -0400
+--- configure.orig 2008-08-20 16:48:07.000000000 -0400
++++ configure 2008-08-20 16:48:23.000000000 -0400
@@ -791,7 +791,6 @@ ac_includes_default="\
# include <unistd.h>
#endif"
@@ -413,8 +413,8 @@
+if test "${enable_oss+set}" = set; then
+ enableval=$enable_oss;
+ case "${enableval}" in
-+ yes) alsa=yes ;;
-+ no) alsa=no ;;
++ yes) oss=yes ;;
++ no) oss=no ;;
+ *) { { $as_echo "$as_me:$LINENO: error: bad value ${enableval} for --disable-oss" >&5
+$as_echo "$as_me: error: bad value ${enableval} for --disable-oss" >&2;}
+ { (exit 1); exit 1; }; } ;;
diff --git a/audio/libcanberra/files/patch-configure.ac b/audio/libcanberra/files/patch-configure.ac
index c51667542..1d5621607 100644
--- a/audio/libcanberra/files/patch-configure.ac
+++ b/audio/libcanberra/files/patch-configure.ac
@@ -1,5 +1,5 @@
---- configure.ac.orig 2008-08-20 13:18:28.404065000 -0400
-+++ configure.ac 2008-08-20 13:24:02.000000000 -0400
+--- configure.ac.orig 2008-08-20 16:42:09.421924000 -0400
++++ configure.ac 2008-08-20 16:42:27.000000000 -0400
@@ -139,6 +139,9 @@ AC_CHECK_FUNCS([strerror_r])
# BSD
AC_CHECK_FUNCS([lstat])
@@ -19,8 +19,8 @@
+ AC_HELP_STRING([--disable-oss], [Disable optional OSS support]),
+ [
+ case "${enableval}" in
-+ yes) alsa=yes ;;
-+ no) alsa=no ;;
++ yes) oss=yes ;;
++ no) oss=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --disable-oss) ;;
+ esac
+ ],
diff --git a/audio/libcanberra/files/patch-src_oss.c b/audio/libcanberra/files/patch-src_oss.c
index 1df5406fd..c8eef31b9 100644
--- a/audio/libcanberra/files/patch-src_oss.c
+++ b/audio/libcanberra/files/patch-src_oss.c
@@ -1,6 +1,6 @@
---- src/oss.c.orig 2008-08-20 13:45:45.835585000 -0400
-+++ src/oss.c 2008-08-20 13:48:16.000000000 -0400
-@@ -0,0 +1,495 @@
+--- src/oss.c.orig 2008-08-20 16:49:01.916312000 -0400
++++ src/oss.c 2008-08-20 16:49:58.000000000 -0400
+@@ -0,0 +1,490 @@
+/***
+ This file is part of libcanberra.
+
@@ -244,9 +244,13 @@
+ if ((out->pcm = open(c->device ? c->device : "/dev/dsp", O_WRONLY | O_NONBLOCK, 0)) < 0)
+ goto finish;
+
-+ mode = fcntl(out->pcm, F_GETFL);
++ if ((mode = fcntl(out->pcm, F_GETFL)) < 0) {
++ goto finish;
++ }
+ mode &= ~O_NONBLOCK;
-+ fcntl(out->pcm, F_SETFL, mode);
++ if (fcntl(out->pcm, F_SETFL, mode) < 0) {
++ goto finish;
++ }
+
+ switch (ca_sound_file_get_sample_type(out->file)) {
+ case CA_SAMPLE_U8:
@@ -264,13 +268,11 @@
+ break;
+ }
+
++ test = val;
+ if (ioctl(out->pcm, SNDCTL_DSP_SETFMT, &val) < 0)
+ goto finish;
+
-+ if (ioctl(out->pcm, SNDCTL_DSP_GETFMTS, &test) < 0)
-+ goto finish;
-+
-+ if ((val & test) == 0) {
++ if (val != test) {
+ errno = EINVAL;
+ goto finish;
+ }
@@ -310,8 +312,8 @@
+ ssize_t bytes_written;
+ size_t fs, data_size;
+ size_t nbytes = 0;
-+ struct pollfd *pfd = NULL;
-+ nfds_t n_pfd;
++ struct pollfd pfd[2];
++ nfds_t n_pfd = 2;
+ struct private *p;
+
+ p = PRIVATE(out->context);
@@ -326,12 +328,6 @@
+ goto finish;
+ }
+
-+ n_pfd = 2;
-+ if (!(pfd = ca_new(struct pollfd, n_pfd))) {
-+ ret = CA_ERROR_OOM;
-+ goto finish;
-+ }
-+
+ pfd[0].fd = out->pipe_fd[0];
+ pfd[0].events = POLLIN;
+ pfd[0].revents = 0;
@@ -380,7 +376,6 @@
+finish:
+
+ ca_free(data);
-+ ca_free(pfd);
+
+ if (!out->dead)
+ if (out->callback)