Author: neurocyte-guest
Date: Fri Oct 6 00:49:02 2006
New Revision: 70
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/?sc=1&rev=70
Log:
Add support for .ifexists configuration directive.
Make default.pa use ifexists when loading optional modules.
Recommend instead of Depend on pulseaudio-module-hal. (Closes: #391232)
Recommend libasound2-plugins instead of -plugins-pulse. (Closes: #391254)
Added:
pulseaudio/trunk/debian/patches/01_use_ifexists_in_default_pa.dpatch
pulseaudio/trunk/debian/patches/02_ifexists_else_endif.dpatch
Removed:
pulseaudio/trunk/debian/patches/01_esound_optional.dpatch
Modified:
pulseaudio/trunk/debian/changelog
pulseaudio/trunk/debian/control
pulseaudio/trunk/debian/patches/00list
Modified: pulseaudio/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/changelog?rev=70&op=diff
==============================================================================
--- pulseaudio/trunk/debian/changelog (original)
+++ pulseaudio/trunk/debian/changelog Fri Oct 6 00:49:02 2006
@@ -1,3 +1,12 @@
+pulseaudio (0.9.5-3) unstable; urgency=low
+
+ * Add support for .ifexists configuration directive.
+ * Make default.pa use ifexists when loading optional modules.
+ * Recommend instead of Depend on pulseaudio-module-hal. (Closes: #391232)
+ * Recommend libasound2-plugins instead of -plugins-pulse. (Closes: #391254)
+
+ -- CJ van den Berg <[EMAIL PROTECTED]> Fri, 6 Oct 2006 01:12:05 +0200
+
pulseaudio (0.9.5-2) unstable; urgency=low
* Add myself to uploaders
Modified: pulseaudio/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/control?rev=70&op=diff
==============================================================================
--- pulseaudio/trunk/debian/control (original)
+++ pulseaudio/trunk/debian/control Fri Oct 6 00:49:02 2006
@@ -12,8 +12,8 @@
Package: pulseaudio
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, pulseaudio-module-hal, adduser
-Recommends: pulseaudio-module-x11, libasound2-plugins-pulse
+Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
+Recommends: pulseaudio-module-hal, pulseaudio-module-x11, libasound2-plugins
Suggests: pulseaudio-utils, paprefs, pavumeter, pavucontrol, padevchooser,
paman, libgstreamer-plugins-pulse0.10-0, libao-pulse,
pulseaudio-esound-compat
Modified: pulseaudio/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/00list?rev=70&op=diff
==============================================================================
--- pulseaudio/trunk/debian/patches/00list (original)
+++ pulseaudio/trunk/debian/patches/00list Fri Oct 6 00:49:02 2006
@@ -1,1 +1,2 @@
-01_esound_optional.dpatch
+01_use_ifexists_in_default_pa.dpatch
+02_ifexists_else_endif.dpatch
Added: pulseaudio/trunk/debian/patches/01_use_ifexists_in_default_pa.dpatch
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/01_use_ifexists_in_default_pa.dpatch?rev=70&op=file
==============================================================================
--- pulseaudio/trunk/debian/patches/01_use_ifexists_in_default_pa.dpatch (added)
+++ pulseaudio/trunk/debian/patches/01_use_ifexists_in_default_pa.dpatch Fri Oct 6 00:49:02 2006
@@ -1,0 +1,47 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_use_ifexists_in_default_pa.dpatch by CJ van den Berg <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: use .ifexists meta command to load optional modules only if available
+
[EMAIL PROTECTED]@
+
+diff -Nru pulseaudio-0.9.5-orig/src/daemon/default.pa.in pulseaudio-0.9.5/src/daemon/default.pa.in
+--- pulseaudio-0.9.5-orig/src/daemon/default.pa.in 2006-08-25 14:08:11.000000000 +0200
++++ pulseaudio-0.9.5/src/daemon/default.pa.in 2006-10-06 02:32:56.761435138 +0200
+@@ -26,12 +26,18 @@
+ #load-module module-null-sink
+ #load-module module-pipe-sink
+
++.ifexists /usr/lib/pulse-0.9/modules/module-hal-detect.so
++
+ ### Automatically load driver modules depending on the hardware available
+ load-module module-hal-detect
+
++.else
++
+ ### Alternatively use the static hardware detection module (for systems that
+ ### lack HAL support
+-#load-module module-detect
++load-module module-detect
++
++.endif
+
+ ### Load audio drivers automatically on access
+ #add-autoload-sink output module-oss device="/dev/dsp" sink_name=output source_name=input
+@@ -41,8 +47,14 @@
+ #add-autoload-sink output module-alsa-sink sink_name=output
+ #add-autoload-source input module-alsa-source source_name=input
+
+-### Load several protocols
++.ifexists /usr/lib/pulse-0.9/modules/module-esound-protocol-unix.so
++
++### Load esound protocol
+ load-module module-esound-protocol-unix
++
++.endif
++
++### Load native protocol
+ load-module module-native-protocol-unix
+
+ ### Network access (may be configured with paprefs, so leave this commented
Added: pulseaudio/trunk/debian/patches/02_ifexists_else_endif.dpatch
URL: http://svn.debian.org/wsvn/pkg-pulseaudio/pulseaudio/trunk/debian/patches/02_ifexists_else_endif.dpatch?rev=70&op=file
==============================================================================
--- pulseaudio/trunk/debian/patches/02_ifexists_else_endif.dpatch (added)
+++ pulseaudio/trunk/debian/patches/02_ifexists_else_endif.dpatch Fri Oct 6 00:49:02 2006
@@ -1,0 +1,124 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_ifexists_else_endif.dpatch by CJ van den Berg <[EMAIL PROTECTED]>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: add support for .ifexists, .else and .endif meta commands
+
[EMAIL PROTECTED]@
+
+diff -Nru pulseaudio-0.9.5-orig/src/pulsecore/cli-command.c pulseaudio-0.9.5/src/pulsecore/cli-command.c
+--- pulseaudio-0.9.5-orig/src/pulsecore/cli-command.c 2006-08-19 18:25:38.000000000 +0200
++++ pulseaudio-0.9.5/src/pulsecore/cli-command.c 2006-10-06 02:08:00.446876784 +0200
+@@ -28,6 +28,7 @@
+ #include <assert.h>
+ #include <stdlib.h>
+ #include <errno.h>
++#include <unistd.h>
+
+ #include <pulse/xmalloc.h>
+
+@@ -63,6 +64,13 @@
+ #define INCLUDE_META ".include"
+ #define FAIL_META ".fail"
+ #define NOFAIL_META ".nofail"
++#define IFEXISTS_META ".ifexists"
++#define ELSE_META ".else"
++#define ENDIF_META ".endif"
++
++#define IFSTATE_NONE 0
++#define IFSTATE_TRUE 1
++#define IFSTATE_FALSE 2
+
+ /* Prototypes for all available commands */
+ static int pa_cli_command_exit(pa_core *c, pa_tokenizer *t, pa_strbuf *buf, int *fail);
+@@ -953,7 +961,7 @@
+ return 0;
+ }
+
+-int pa_cli_command_execute_line(pa_core *c, const char *s, pa_strbuf *buf, int *fail) {
++int pa_cli_command_execute_line_stateful(pa_core *c, const char *s, pa_strbuf *buf, int *fail, int *ifstate) {
+ const char *cs;
+
+ cs = s+strspn(s, whitespace);
+@@ -961,6 +969,25 @@
+ if (*cs == '#' || !*cs)
+ return 0;
+ else if (*cs == '.') {
++ if (!strcmp(cs, ELSE_META)) {
++ if (!ifstate || *ifstate == IFSTATE_NONE) {
++ pa_strbuf_printf(buf, "Meta command %s is not valid in this context\n", cs);
++ return -1;
++ } else if (*ifstate == IFSTATE_TRUE)
++ *ifstate = IFSTATE_FALSE;
++ else
++ *ifstate = IFSTATE_TRUE;
++ return 0;
++ } else if (!strcmp(cs, ENDIF_META)) {
++ if (!ifstate || *ifstate == IFSTATE_NONE) {
++ pa_strbuf_printf(buf, "Meta command %s is not valid in this context\n", cs);
++ return -1;
++ } else
++ *ifstate = IFSTATE_NONE;
++ return 0;
++ }
++ if (ifstate && *ifstate == IFSTATE_FALSE)
++ return 0;
+ if (!strcmp(cs, FAIL_META))
+ *fail = 1;
+ else if (!strcmp(cs, NOFAIL_META))
+@@ -974,6 +1001,21 @@
+
+ if (pa_cli_command_execute_file(c, filename, buf, fail) < 0)
+ if (*fail) return -1;
++ } else if (l == sizeof(IFEXISTS_META)-1 && !strncmp(cs, IFEXISTS_META, l)) {
++ if (!ifstate) {
++ pa_strbuf_printf(buf, "Meta command %s is not valid in this context\n", cs);
++ return -1;
++ } else if (*ifstate != IFSTATE_NONE) {
++ pa_strbuf_printf(buf, "Nested %s commands not supported\n", cs);
++ return -1;
++ } else {
++ const char *filename = cs+l+strspn(cs+l, whitespace);
++
++ if (access(filename, F_OK) == 0)
++ *ifstate = IFSTATE_TRUE;
++ else
++ *ifstate = IFSTATE_FALSE;
++ }
+ } else {
+ pa_strbuf_printf(buf, "Invalid meta command: %s\n", cs);
+ if (*fail) return -1;
+@@ -984,6 +1026,9 @@
+ int unknown = 1;
+ size_t l;
+
++ if (ifstate && *ifstate == IFSTATE_FALSE)
++ return 0;
++
+ l = strcspn(cs, whitespace);
+
+ for (command = commands; command->name; command++)
+@@ -1011,9 +1056,14 @@
+ return 0;
+ }
+
++int pa_cli_command_execute_line(pa_core *c, const char *s, pa_strbuf *buf, int *fail) {
++ return pa_cli_command_execute_line_stateful(c, s, buf, fail, NULL);
++}
++
+ int pa_cli_command_execute_file(pa_core *c, const char *fn, pa_strbuf *buf, int *fail) {
+ char line[256];
+ FILE *f = NULL;
++ int ifstate = IFSTATE_NONE;
+ int ret = -1;
+ assert(c && fn && buf);
+
+@@ -1028,7 +1078,7 @@
+ char *e = line + strcspn(line, linebreak);
+ *e = 0;
+
+- if (pa_cli_command_execute_line(c, line, buf, fail) < 0 && *fail)
++ if (pa_cli_command_execute_line_stateful(c, line, buf, fail, &ifstate) < 0 && *fail)
+ goto fail;
+ }
+
_______________________________________________
Pkg-pulseaudio-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-pulseaudio-devel