Root/gjay/patches/0003-Provide-a-.-configure-disable-audclient-option.patch

Source at commit 1b3135c created 9 years 10 days ago.
By Xiangfu Liu, new package: SDL-widgets: a GUI toolkit on top of the SDL libraries
1From 4d3796be444f7b42041d111e2c91b7ce6faff786 Mon Sep 17 00:00:00 2001
2From: Joshua Judson Rosen <rozzin@geekspace.com>
3Date: Tue, 26 Apr 2011 22:35:23 -0400
4Subject: [PATCH 03/17] Provide a "./configure --disable-audclient" option
5 to build without support for Audacious.
6
7---
8 config.h.in | 3 +++
9 configure.ac | 10 +++++++++-
10 play_audacious.c | 4 ++--
11 play_common.c | 2 ++
12 prefs.c | 2 ++
13 5 files changed, 18 insertions(+), 3 deletions(-)
14
15diff --git a/config.h.in b/config.h.in
16index 9054b03..17decf1 100644
17--- a/config.h.in
18+++ b/config.h.in
19@@ -85,5 +85,8 @@
20 /* Version number of package */
21 #undef VERSION
22 
23+/* Enable Audacious music player */
24+#undef WITH_AUDCLIENT
25+
26 /* Enable mpd music player */
27 #undef WITH_MPDCLIENT
28diff --git a/configure.ac b/configure.ac
29index c5545e8..bfe7ca4 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -18,6 +18,15 @@ if test "$enable_mpdclient" = "yes"; then
33   PKG_CHECK_MODULES([MPDCLIENT], [libmpdclient])
34 fi
35 
36+AC_SUBST([WITH_AUDCLIENT])
37+AC_ARG_ENABLE([audclient],
38+ AS_HELP_STRING([--disable-audclient], [Disable Audacious client (enabled by default)]),
39+ [enable_audclient=$enableval],
40+ [enable_audclient="yes"])
41+if test "$enable_audclient" = "yes"; then
42+ AC_DEFINE([WITH_AUDCLIENT], [1], [Enable Audacious music player])
43+ PKG_CHECK_MODULES([AUDACIOUS], [audacious])
44+fi
45 
46 # Checks for programs.
47 AC_PROG_CC
48@@ -31,7 +40,6 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
49 # Checks for libraries.
50 AM_PATH_GTK_2_0
51 PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
52-PKG_CHECK_MODULES([AUDACIOUS], [audacious])
53 
54 AX_PATH_GSL
55 dnl AC_CHECK_LIB([audclient], [audacious_remote_playlist])
56diff --git a/play_audacious.c b/play_audacious.c
57index 4ca8cee..93e5f52 100644
58--- a/play_audacious.c
59+++ b/play_audacious.c
60@@ -22,6 +22,7 @@
61 #include "config.h"
62 #endif /* HAVE_CONFIG_H */
63 
64+#ifdef WITH_AUDCLIENT
65 
66 #include <stdio.h>
67 #include <sys/types.h>
68@@ -171,5 +172,4 @@ audacious_connect(void)
69 
70 }
71 
72-
73-
74+#endif /* WITH_AUDCLIENT */
75diff --git a/play_common.c b/play_common.c
76index f0968b5..9034dbc 100644
77--- a/play_common.c
78+++ b/play_common.c
79@@ -40,9 +40,11 @@ player_init(void)
80     case PLAYER_NONE:
81       /* break out, configured later */
82       break;
83+#ifdef WITH_AUDCLIENT
84     case PLAYER_AUDACIOUS:
85       player_configured = audacious_init();
86       break;
87+#endif /* WITH_AUDCLIENT */
88     /*case PLAYER_EXAILE:
89       exaile_init();
90       break;*/
91diff --git a/prefs.c b/prefs.c
92index 33a6016..3232d32 100644
93--- a/prefs.c
94+++ b/prefs.c
95@@ -122,7 +122,9 @@ char * pref_element_strs[PE_LAST] = {
96 const char *music_player_names[] =
97 {
98   "None",
99+#ifdef WITH_AUDCLIENT
100   "Audacious",
101+#endif
102 #ifdef WITH_MPDCLIENT
103   "MPD",
104 #endif
105--
1061.7.2.5
107
108

Archive Download this file



interactive