summaryrefslogtreecommitdiff
path: root/media-sound/orpheus/files/orpheus-1.6-fix-buildsystem.patch
blob: 35f229ed3cfe2e0db0176893804d1b8f6605a897 (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
--- a/configure.in
+++ b/configure.in
@@ -1,5 +1,5 @@
-AC_INIT(aclocal.m4)
-AM_INIT_AUTOMAKE(orpheus, 1.6)
+AC_INIT([orpheus],[1.6])
+AM_INIT_AUTOMAKE
 
 AC_CANONICAL_HOST
 
@@ -8,7 +8,8 @@
 AC_PROG_CPP
 AC_PROG_RANLIB
 
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS([config.h])
+AM_PROG_AR
 
 ###     use option --enable-locales-fix to fix problems with double-byte
 ###     encodings on systems with broken locale, iscntrl()
@@ -20,30 +21,21 @@
 
 AC_CHECK_HEADERS(sys/soundcard.h soundcard.h machine/soundcard.h, break)
 
-AM_PATH_XML2(2.0.0, [
-    CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
-    LIBS="$LIBS $XML_LIBS"
-    AC_DEFINE(HAVE_LIBXML2, 1, [use libxml2])
-], [
-    AC_MSG_WARN(libxml2 not found, internet radio presets fetching disabled)
+PKG_CHECK_MODULES([DEPENDENCIES], [ncurses vorbis vorbisfile ogg libxml-2.0],
+[
+AC_DEFINE([HAVE_LIBXML2], [1], [Defined if libxml is present])
+AC_DEFINE([HAVE_LIBNCURSES], [1], [Defined if ncurses is present])
+AC_DEFINE([HAVE_LIBVORBIS], [1], [Defined if libvorbis is present])
+AC_DEFINE([HAVE_LIBVORBISFILE], [1], [Defined if libvorbisfile is present])
 ])
 
-AC_CHECK_LIB(ncurses, main,, AC_CHECK_LIB(curses, main,, AC_MSG_ERROR(The ncurses terminal library is required in order to build the program)))
-
-AC_CHECK_LIB(ghttp, ghttp_request_new,,
-    [AC_MSG_WARN(libghttp not found - the support for CDDB is be disabled)])
-
-AC_CHECK_LIB(vorbis, vorbis_synthesis_headerin,,
-    AC_MSG_WARN(libvorbisfile not found - the support for OGG tags edit is disabled))
-    
-AC_CHECK_LIB(vorbisfile, ov_open,,
-    AC_MSG_WARN(libvorbis not found - the support for OGG files is disabled))
-
 AM_ICONV_LINK
 
-LIBS="$LIBS $LIBICONV"
+CPPFLAGS="$CPPFLAGS $DEPENDENCIES_CFLAGS"
+LIBS="$LIBS $LIBICONV $DEPENDENCIES_LIBS"
 
 ALL_LINGUAS="ru ca"
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
 AC_CONFIG_SUBDIRS(kkstrtext-0.1 kkconsui-0.1)
-AC_OUTPUT(Makefile src/Makefile src/abstract/Makefile po/Makefile.in intl/Makefile)
+AC_CONFIG_FILES([Makefile src/Makefile src/abstract/Makefile po/Makefile.in intl/Makefile])
+AC_OUTPUT
--- a/kkconsui-0.1/configure.in
+++ b/kkconsui-0.1/configure.in
@@ -6,7 +6,7 @@
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_RANLIB
-
+AM_PROG_AR
 
 ###	use option --enable-locales-fix to fix problems with double-byte
 ###	encodings on systems with broken locale, iscntrl()
--- a/kkstrtext-0.1/configure.in
+++ b/kkstrtext-0.1/configure.in
@@ -6,6 +6,7 @@
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_RANLIB
+AM_PROG_AR
 
 AC_CHECK_HEADERS(_G_config.h)
 AC_LANG_CPLUSPLUS
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = kkstrtext-0.1 kkconsui-0.1 intl po src
+SUBDIRS = kkstrtext-0.1 kkconsui-0.1 po src
 dist-hook:
 	cd $(top_distdir); subs=`egrep "^[:space:]*SUBDIRS" Makefile.am | sed 's/SUBDIRS[ =]\+//g'`; \
 	echo "SUBDIRS = kkstrtext-0.1 kkconsui-0.1 $$subs" >>.makefile.am; \
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -29,7 +29,7 @@
 
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
-MKINSTALLDIRS = @MKINSTALLDIRS@
+MKINSTALLDIRS = $(top_srcdir)/mkinstalldirs
 mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
 
 GMSGFMT = @GMSGFMT@
--- a/src/cdtrack.cc
+++ b/src/cdtrack.cc
@@ -22,6 +22,8 @@
 *
 */
 
+#include "../config.h"
+
 #include "cdtrack.h"
 #include "playlist.h"
 
--- a/src/main.cc
+++ b/src/main.cc
@@ -21,6 +21,9 @@
 * USA
 *
 */
+
+#include "../config.h"
+
 #include "uitext.h"
 #include "cdtrack.h"
 #include "mp3track.h"
--- a/src/mp3track.cc
+++ b/src/mp3track.cc
@@ -22,6 +22,8 @@
 *
 */
 
+#include "../config.h"
+
 #include "mp3track.h"
 #include "orpheusconf.h"
 
--- a/src/oggtrack.cc
+++ b/src/oggtrack.cc
@@ -22,6 +22,8 @@
 *
 */
 
+#include "../config.h"
+
 #include "oggtrack.h"
 #include "orpheusconf.h"
 
--- a/src/orpheusconf.cc
+++ b/src/orpheusconf.cc
@@ -22,6 +22,8 @@
 *
 */
 
+#include "../config.h"
+
 #include "orpheusconf.h"
 
 #include <sys/stat.h>
--- a/src/playlist.cc
+++ b/src/playlist.cc
@@ -22,6 +22,8 @@
 *
 */
 
+#include "../config.h"
+
 #include "playlist.h"
 #include "mp3track.h"
 #include "oggtrack.h"
--- a/src/streamtrack.cc
+++ b/src/streamtrack.cc
@@ -22,6 +22,8 @@
 *
 */
 
+#include "../config.h"
+
 #include "streamtrack.h"
 #include "playlist.h"
 
--- a/src/uitext.cc
+++ b/src/uitext.cc
@@ -22,6 +22,8 @@
 *
 */
 
+#include "../config.h"
+
 #include "uitext.h"
 #include "playlist.h"
 #include "cdtrack.h"