]> git.pld-linux.org Git - packages/JADE.git/blame - jade-c++_fix.patch
- Name changed to JADE
[packages/JADE.git] / jade-c++_fix.patch
CommitLineData
b62e3711 1--- jade-1.2.1.orig/Makefile.lib.in
2+++ jade-1.2.1/Makefile.lib.in
3@@ -9,6 +9,8 @@
4
5 CLEANFILES=-r lib$(LIB).la $(OBJS) $(COBJS) $(LT_OBJS) core .libs Makefile.lt
6
7+LIB_THREADS=@LIB_THREADS@
8+
9 all: lib$(LIB).la
10 pure: all
11
12@@ -17,7 +19,7 @@
13
14 lib$(LIB).la: $(LT_OBJS)
15 $(LIBTOOL) --mode=link $(CC) -o lib$(LIB).la $(LT_OBJS) \
16- -rpath $(libdir) -version-info $(LTVERSION)
17+ -rpath $(libdir) -version-info $(LTVERSION) $(DEPLIBS)
18
19 install:
20 $(LIBTOOL) --mode=install $(INSTALL) lib$(LIB).la $(libdir)
21--- jade-1.2.1.orig/config/configure.in
22+++ jade-1.2.1/config/configure.in
23@@ -52,20 +52,6 @@
24 then
25 CXXFLAGS="$CXXFLAGS -fno-implicit-templates"
26 fi
27-AC_LANG_CPLUSPLUS
28-
29-CXsave="$CXXFLAGS"
30-CXXFLAGS=-ansi
31-AC_CACHE_CHECK(for -ansi support,
32- ac_cv_c_cmdline_ansi,
33- AC_TRY_LINK([],[],ac_cv_c_cmdline_ansi=yes,
34- ac_cv_c_cmdline_ansi=no))
35-if test "$ac_cv_c_cmdline_ansi" = "yes"
36- then
37- CXXFLAGS="$CXXFLAGS $CXsave"
38- else
39- CXXFLAGS="$CXsave"
40-fi
41
42 dnl
43 dnl Checks for header files.
44@@ -90,6 +76,12 @@
45 AC_CHECK_TYPE(sig_atomic_t,int)
46 fi
47
48+dnl
49+dnl the following tests require c++, not c; note that if you switch this
50+dnl earlier, AC_C_CONST will fail, at least
51+dnl
52+AC_LANG_CPLUSPLUS
53+
54 AC_CACHE_CHECK(support for bool,
55 ac_cv_typedef_bool,
56 AC_TRY_LINK(,bool x; x=(false | true);,
57@@ -110,6 +102,11 @@
58 AC_CHECK_FUNC(setlocale,AC_DEFINE(SP_HAVE_LOCALE))
59 AC_CHECK_LIB(intl,gettext,AC_DEFINE(SP_HAVE_GETTEXT) LIBS="$LIBS -lintl")
60
61+dnl
62+dnl Check for thread support.
63+AC_CHECK_LIB(threads,cthread_fork,LIB_THREADS="-lthreads",LIB_THREADS="")
64+AC_SUBST(LIB_THREADS)
65+
66 dnl
67 dnl ANSI templates
68 dnl
69@@ -151,10 +148,20 @@
70 dnl Framemaker support
71 dnl
72 AC_ARG_ENABLE(mif,
73-[ --enable-mif bind in support for FrameMaker MIF output],
74+[ --enable-mif include support for FrameMaker MIF output],
75 if test $enableval
76 then
77 AC_DEFINE(JADE_MIF)
78+ fi)
79+
80+dnl
81+dnl HTML backend support
82+dnl
83+AC_ARG_ENABLE(html,
84+[ --enable-html include support for HTML output],
85+ if test $enableval
86+ then
87+ AC_DEFINE(JADE_HTML)
88 fi)
89
90
91--- jade-1.2.1.orig/grove/Makefile.sub
92+++ jade-1.2.1/grove/Makefile.sub
93@@ -1,2 +1,3 @@
94 LIB=grove
95+DEPLIBS=-lm
96 OBJS=Node.o LocNode.o
97--- jade-1.2.1.orig/include/config.h
98+++ jade-1.2.1/include/config.h
99@@ -37,7 +37,7 @@
100 #define SP_STAT_BLKSIZE
101 #endif
102
103-#ifdef __MACH__
104+#if (defined __MACH__) && (! defined __GNU__)
105 #define SP_MUTEX_MACH
106 #endif
107
108--- jade-1.2.1.orig/jade/MifFOTBuilder_inst.cxx
109+++ jade-1.2.1/jade/MifFOTBuilder_inst.cxx
110@@ -371,6 +371,7 @@
111 #endif
112 #endif
113 #endif
114+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
115 #ifdef __DECCXX
116 #pragma define_template Vector<MifDoc::ElementSet::SgmlIdInfo*>
117 #else
118@@ -381,6 +382,7 @@
119 template class Vector<MifDoc::ElementSet::SgmlIdInfo*>;
120 #else
121 typedef Vector<MifDoc::ElementSet::SgmlIdInfo*> Dummy_27;
122+#endif
123 #endif
124 #endif
125 #endif
126--- jade-1.2.1.orig/jade/MifFOTBuilder_inst.m4
127+++ jade-1.2.1/jade/MifFOTBuilder_inst.m4
128@@ -39,7 +39,9 @@
129 __instantiate(Vector<MifDoc::Object*>)
130 __instantiate(Vector<MifDoc::T_XY>)
131 __instantiate(Vector<MifDoc::CrossRefInfo>)
132+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
133 __instantiate(Vector<MifDoc::ElementSet::SgmlIdInfo*>)
134+#endif
135 __instantiate(`PointerTable<MifDoc::Ruling*, String<char>, StringHash, MifDoc::Ruling>')
136 __instantiate(`PointerTableIter<MifDoc::Ruling*, String<char>, StringHash, MifDoc::Ruling>')
137 __instantiate(Vector<MifDoc::Ruling*>)
138--- jade-1.2.1.orig/lib/Makefile.sub
139+++ jade-1.2.1/lib/Makefile.sub
140@@ -1,5 +1,6 @@
141 LIB=sp
142 INCLUDE=-I$(srcdir)/../generic
143+DEPLIBS=-lm
144 MSGGENFLAGS=-l
145 COMMON_OBJS=Allocator.o Link.o IListBase.o TypeId.o assert.o
146 ENTMGR_OBJS=CharsetInfo.o EntityCatalog.o EntityDecl.o EntityManager.o \
147--- jade-1.2.1.orig/lib/entmgr_inst.cxx
148+++ jade-1.2.1/lib/entmgr_inst.cxx
149@@ -429,6 +429,7 @@
150 #endif
151 #endif
152 #endif
153+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
154 #ifdef __DECCXX
155 #pragma define_template Vector<String<EquivCode> >
156 #else
157@@ -442,6 +443,7 @@
158 #endif
159 #endif
160 #endif
161+#endif
162 #ifdef __DECCXX
163 #pragma define_template Owner<ExternalInfo>
164 #else
165@@ -559,6 +561,7 @@
166 #endif
167 #endif
168 #endif
169+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
170 #ifdef __DECCXX
171 #pragma define_template SharedXcharMap<unsigned char>
172 #else
173@@ -572,6 +575,7 @@
174 #endif
175 #endif
176 #endif
177+#endif
178 #ifdef __DECCXX
179 #pragma define_template SharedXcharMap<EquivCode>
180 #else
181@@ -585,6 +589,7 @@
182 #endif
183 #endif
184 #endif
185+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
186 #ifdef __DECCXX
187 #pragma define_template String<EquivCode>
188 #else
189@@ -598,6 +603,7 @@
190 #endif
191 #endif
192 #endif
193+#endif
194 #ifdef __DECCXX
195 #pragma define_template String<SyntaxChar>
196 #else
197@@ -624,6 +630,7 @@
198 #endif
199 #endif
200 #endif
201+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
202 #ifdef __DECCXX
203 #pragma define_template XcharMap<unsigned char>
204 #else
205@@ -637,6 +644,7 @@
206 #endif
207 #endif
208 #endif
209+#endif
210 #ifdef __DECCXX
211 #pragma define_template XcharMap<EquivCode>
212 #else
213@@ -663,6 +671,7 @@
214 #endif
215 #endif
216 #endif
217+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
218 #ifdef __DECCXX
219 #pragma define_template Vector<PackedBoolean>
220 #else
221@@ -686,6 +695,7 @@
222 template class SubstTable<Char>;
223 #else
224 typedef SubstTable<Char> Dummy_49;
225+#endif
226 #endif
227 #endif
228 #endif
229--- jade-1.2.1.orig/lib/entmgr_inst.m4
230+++ jade-1.2.1/lib/entmgr_inst.m4
231@@ -61,7 +61,9 @@
232 __instantiate(`RangeMap<WideChar,UnivChar>')
233 __instantiate(Vector<InputSourceOriginNamedCharRef>)
234 __instantiate(Vector<StringC>)
235+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
236 __instantiate(Vector<String<EquivCode> >)
237+#endif
238 __instantiate(Owner<ExternalInfo>)
239 __instantiate(ISet<Char>)
240 __instantiate(Vector<ISetRange<Char> >)
241@@ -71,16 +73,24 @@
242 __instantiate(Vector<ISetRange<WideChar> >)
243 __instantiate(SubstTable<Char>)
244 __instantiate(SharedXcharMap<PackedBoolean>)
245+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
246 __instantiate(SharedXcharMap<unsigned char>)
247+#endif
248 __instantiate(SharedXcharMap<EquivCode>)
249+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
250 __instantiate(String<EquivCode>)
251+#endif
252 __instantiate(String<SyntaxChar>)
253 __instantiate(XcharMap<PackedBoolean>)
254+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
255 __instantiate(XcharMap<unsigned char>)
256+#endif
257 __instantiate(XcharMap<EquivCode>)
258 __instantiate(Vector<char>)
259+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
260 __instantiate(Vector<PackedBoolean>)
261 __instantiate(SubstTable<Char>)
262+#endif
263 __instantiate(CharMap<Unsigned32>)
264 #ifdef SP_MULTI_BYTE
265 __instantiate(CharMapPage<Unsigned32>)
266--- jade-1.2.1.orig/lib/parser_inst.cxx
267+++ jade-1.2.1/lib/parser_inst.cxx
268@@ -1337,6 +1337,7 @@
269 #endif
270 #endif
271 #endif
272+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
273 #ifdef __DECCXX
274 #pragma define_template Vector<unsigned int>
275 #else
276@@ -1347,6 +1348,7 @@
277 template class Vector<unsigned int>;
278 #else
279 typedef Vector<unsigned int> Dummy_97;
280+#endif
281 #endif
282 #endif
283 #endif
284--- jade-1.2.1.orig/lib/parser_inst.m4
285+++ jade-1.2.1/lib/parser_inst.m4
286@@ -165,7 +165,9 @@
287 __instantiate(Vector<Transition>)
288 __instantiate(Vector<LeafContentToken*>)
289 __instantiate(Vector<size_t>)
290+#if defined(__GNUC__) && __GNUC__ < 3 && __GNUC_MINOR__ < 95
291 __instantiate(Vector<unsigned int>)
292+#endif
293
294 __instantiate(NamedTable<Id>)
295 __instantiate(NamedTableIter<Id>)
296--- jade-1.2.1.orig/spgrove/Makefile.sub
297+++ jade-1.2.1/spgrove/Makefile.sub
298@@ -1,5 +1,6 @@
299 LIB=spgrove
300 INCLUDE=-I$(srcdir)/../grove
301+DEPLIBS=-lm -L$(TOP)/grove/.libs -lgrove -L$(TOP)/lib/.libs -lsp $(LIB_THREADS)
302 OBJS=GroveApp.o GroveBuilder.o SdNode.o
303 GENSRCS=grove_inst.cxx
304
305--- jade-1.2.1.orig/spgrove/threads.h
306+++ jade-1.2.1/spgrove/threads.h
307@@ -141,7 +141,7 @@
308
309 #endif /* _MSC_VER && _MT */
310
311-#ifdef __MACH__
312+#if (defined __MACH__) || (defined __GNU__)
313
314 // For Mach, using C Threads. May or may not work as-is on your Mach-based OS.
315 // Written by Raf Schietekat <RfSchtkt@maze.ruca.ua.ac.be> on 1996-11-10.
316@@ -158,6 +158,13 @@
317 #undef catch
318 // don't want ASSERT to clash with ASSERT in SP's macros.h
319 #undef ASSERT
320+#elif defined __GNU__
321+// catch is a reserved word in C++, it's only used to declare a struct member
322+#define catch catch22
323+#include <cthreads.h>
324+#undef catch
325+// don't want ASSERT to clash with ASSERT in SP's macros.h
326+#undef ASSERT
327 #else
328 // Change to whatever works for you, and tell James Clark (or me).
329 // catch is a reserved word in C++, it's only used to declare a struct member
330@@ -295,7 +302,7 @@
331
332 #endif /* SP_NO_BLOCK */
333
334-#endif /* __MACH__ */
335+#endif /* __MACH__ || __GNU__ */
336
337 #ifdef SP_USE_PTHREADS
338
339--- jade-1.2.1.orig/style/Makefile.sub
340+++ jade-1.2.1/style/Makefile.sub
341@@ -1,4 +1,6 @@
342 LIB=style
343+DEPLIBS=-lm -L$(TOP)/grove/.libs -lgrove -L$(TOP)/lib/.libs -lsp \
344+ -L$(TOP)/spgrove/.libs -lspgrove
345 OBJS=Collector.o \
346 DssslApp.o \
347 DssslSpecEventHandler.o \
This page took 0.138912 seconds and 4 git commands to generate.