Package: sdl-mixer1.2 / 1.2.12-15

05_fallback_to_freepats.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: If timidity.cfg is not present, please try to load freepats.cfg
 Introduced in 1.2.8-6 (Fri, 22 May 2009 10:33:13 -0400).
Author: Fabian Greffrath <greffrath@leat.rub.de>
Last-Update: 2012-01-20
Bug-Debian: http://bugs.debian.org/453308
--- a/timidity/config.h
+++ b/timidity/config.h
@@ -162,6 +162,7 @@
    then specify the library directory in the configuration file. */
 #define CONFIG_FILE	"timidity.cfg"
 #define CONFIG_FILE_ETC "/etc/timidity.cfg"
+#define CONFIG_FILE_ETC_TIMIDITY_FREEPATS "/etc/timidity/freepats.cfg"
 
 #if defined(__WIN32__) || defined(__OS2__)
 #define DEFAULT_PATH	"C:\\TIMIDITY"
--- a/timidity/timidity.c
+++ b/timidity/timidity.c
@@ -286,7 +286,9 @@
   if (!env || read_config_file(env)<0) {
     if (read_config_file(CONFIG_FILE)<0) {
       if (read_config_file(CONFIG_FILE_ETC)<0) {
-        return(-1);
+        if (read_config_file(CONFIG_FILE_ETC_TIMIDITY_FREEPATS)<0) {
+          return(-1);
+        }
       }
     }
   }