Use __progname for pa_get_binary_name().

Remove useless patches.
This commit is contained in:
ajacoutot 2012-11-27 19:29:54 +00:00
parent 0048ae6cbe
commit 85155ae3dd
4 changed files with 24 additions and 47 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.32 2012/11/12 12:27:00 eric Exp $
# $OpenBSD: Makefile,v 1.33 2012/11/27 19:29:54 ajacoutot Exp $
# XXX
# fix autospawn lock (patch-src_daemon_main_c)
@ -18,7 +18,7 @@ COMMENT= cross-platform networked sound server
VERSION= 2.1
DISTNAME= pulseaudio-${VERSION}
REVISION= 1
REVISION= 2
SHARED_LIBS += pulse 1.1 # .14.2
SHARED_LIBS += pulse-simple 0.0 # .0.3

View File

@ -1,19 +0,0 @@
$OpenBSD: patch-src_daemon_main_c,v 1.3 2012/11/10 14:52:54 ajacoutot Exp $
--- src/daemon/main.c.orig Thu Jul 19 13:29:38 2012
+++ src/daemon/main.c Sat Nov 10 15:20:40 2012
@@ -735,6 +735,7 @@ int main(int argc, char *argv[]) {
* first take the autospawn lock to make things
* synchronous. */
+#if 0 /* XXX broken on *BSD */
if ((autospawn_fd = pa_autospawn_lock_init()) < 0) {
pa_log("Failed to initialize autospawn lock");
goto finish;
@@ -746,6 +747,7 @@ int main(int argc, char *argv[]) {
}
autospawn_locked = TRUE;
+#endif
}
if (conf->daemonize) {

View File

@ -1,15 +0,0 @@
$OpenBSD: patch-src_pulse_context_c,v 1.3 2012/05/14 17:45:16 ajacoutot Exp $
- --start doesn't work correctly (yet), so prefer -D.
--- src/pulse/context.c.orig Wed Mar 28 12:53:41 2012
+++ src/pulse/context.c Mon May 14 16:18:28 2012
@@ -701,7 +701,7 @@ static int context_autospawn(pa_context *c) {
/* Setup argv */
argv[n++] = c->conf->daemon_binary;
- argv[n++] = "--start";
+ argv[n++] = "-D";
while (n < PA_ELEMENTSOF(argv)-1) {
char *a;

View File

@ -1,17 +1,28 @@
$OpenBSD: patch-src_pulse_util_c,v 1.3 2011/10/01 08:37:30 ajacoutot Exp $
--- src/pulse/util.c.orig Thu Sep 1 10:28:14 2011
+++ src/pulse/util.c Fri Sep 30 14:50:32 2011
@@ -206,6 +206,13 @@ char *pa_get_binary_name(char *s, size_t l) {
}
#endif
$OpenBSD: patch-src_pulse_util_c,v 1.4 2012/11/27 19:29:54 ajacoutot Exp $
--- src/pulse/util.c.orig Mon Sep 26 17:51:42 2011
+++ src/pulse/util.c Tue Nov 27 20:14:35 2012
@@ -33,6 +33,10 @@
#include <unistd.h>
#include <sys/types.h>
+#ifdef __OpenBSD__
+ {
+ s = "${TRUEPREFIX}/bin/pulseaudio";
+ return s;
+extern char *__progname;
+#endif
+
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif
@@ -203,6 +207,13 @@ char *pa_get_binary_name(char *s, size_t l) {
pa_xfree(rp);
return s;
}
+ }
+#endif
+
#if defined(HAVE_SYS_PRCTL_H) && defined(PR_GET_NAME)
{
+#ifdef __OpenBSD__
+ {
+ s = __progname;
+ return s;
}
#endif