Switch to unified view

a b/rpm/json-not-in-jsoncpp.patch
1
diff -u -r upmpdcli-1.2.2/configure upmpdcli-1.2.2-fedora/configure
2
--- upmpdcli-1.2.2/configure  2016-09-10 19:43:19.000000000 +0200
3
 upmpdcli-1.2.2-fedora/configure   2016-09-11 14:02:15.333898706 +0200
4
@@ -628,6 +628,7 @@
5
 LIBOBJS
6
 SCCTL_LIBS
7
 UPMPDCLI_LIBS
8
CXXCPP
9
 EGREP
10
 GREP
11
 CPP
12
@@ -736,7 +737,8 @@
13
 CCC
14
 CC
15
 CFLAGS
16
-CPP'
17
CPP
18
CXXCPP'
19
 
20
 
21
 # Initialize some variables set by options.
22
@@ -1369,6 +1371,7 @@
23
   CC          C compiler command
24
   CFLAGS      C compiler flags
25
   CPP         C preprocessor
26
  CXXCPP      C++ preprocessor
27
 
28
 Use these variables to override the choices made by `configure' or to help
29
 it to find libraries and programs with nonstandard names/locations.
30
@@ -1737,6 +1740,134 @@
31
 
32
 } # ac_fn_c_try_link
33
 
34
# ac_fn_cxx_try_cpp LINENO
35
# ------------------------
36
# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
37
ac_fn_cxx_try_cpp ()
38
{
39
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
40
  if { { ac_try="$ac_cpp conftest.$ac_ext"
41
case "(($ac_try" in
42
  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
43
  *) ac_try_echo=$ac_try;;
44
esac
45
eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
46
$as_echo "$ac_try_echo"; } >&5
47
  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
48
  ac_status=$?
49
  if test -s conftest.err; then
50
    grep -v '^ *+' conftest.err >conftest.er1
51
    cat conftest.er1 >&5
52
    mv -f conftest.er1 conftest.err
53
  fi
54
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
55
  test $ac_status = 0; } > conftest.i && {
56
  test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
57
  test ! -s conftest.err
58
       }; then :
59
  ac_retval=0
60
else
61
  $as_echo "$as_me: failed program was:" >&5
62
sed 's/^/| /' conftest.$ac_ext >&5
63
64
    ac_retval=1
65
fi
66
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
67
  as_fn_set_status $ac_retval
68
69
} # ac_fn_cxx_try_cpp
70
71
# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
72
# ---------------------------------------------------------
73
# Tests whether HEADER exists, giving a warning if it cannot be compiled using
74
# the include files in INCLUDES and setting the cache variable VAR
75
# accordingly.
76
ac_fn_cxx_check_header_mongrel ()
77
{
78
  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
79
  if eval \${$3+:} false; then :
80
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
81
$as_echo_n "checking for $2... " >&6; }
82
if eval \${$3+:} false; then :
83
  $as_echo_n "(cached) " >&6
84
fi
85
eval ac_res=\$$3
86
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
87
$as_echo "$ac_res" >&6; }
88
else
89
  # Is the header compilable?
90
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
91
$as_echo_n "checking $2 usability... " >&6; }
92
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
93
/* end confdefs.h.  */
94
$4
95
#include <$2>
96
_ACEOF
97
if ac_fn_cxx_try_compile "$LINENO"; then :
98
  ac_header_compiler=yes
99
else
100
  ac_header_compiler=no
101
fi
102
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
103
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
104
$as_echo "$ac_header_compiler" >&6; }
105
106
# Is the header present?
107
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
108
$as_echo_n "checking $2 presence... " >&6; }
109
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
110
/* end confdefs.h.  */
111
#include <$2>
112
_ACEOF
113
if ac_fn_cxx_try_cpp "$LINENO"; then :
114
  ac_header_preproc=yes
115
else
116
  ac_header_preproc=no
117
fi
118
rm -f conftest.err conftest.i conftest.$ac_ext
119
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
120
$as_echo "$ac_header_preproc" >&6; }
121
122
# So?  What about this header?
123
case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
124
  yes:no: )
125
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
126
$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
127
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
128
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
129
    ;;
130
  no:yes:* )
131
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
132
$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
133
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
134
$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
135
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
136
$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
137
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
138
$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
139
    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
140
$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
141
( $as_echo "## ------------------------------------- ##
142
## Report this to jfd@lesbonscomptes.com ##
143
## ------------------------------------- ##"
144
     ) | sed "s/^/$as_me: WARNING:     /" >&2
145
    ;;
146
esac
147
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
148
$as_echo_n "checking for $2... " >&6; }
149
if eval \${$3+:} false; then :
150
  $as_echo_n "(cached) " >&6
151
else
152
  eval "$3=\$ac_header_compiler"
153
fi
154
eval ac_res=\$$3
155
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
156
$as_echo "$ac_res" >&6; }
157
fi
158
  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
159
160
} # ac_fn_cxx_check_header_mongrel
161
162
 # ac_fn_cxx_try_link LINENO
163
 # -------------------------
164
 # Try to link conftest.$ac_ext, and return whether this succeeded.
165
@@ -4798,11 +4929,163 @@
166
 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
167
 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
168
 
169
-LIBS="$LIBS -ljsoncpp"
170
 
171
172
ac_ext=cpp
173
ac_cpp='$CXXCPP $CPPFLAGS'
174
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
175
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
176
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
177
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
178
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
179
if test -z "$CXXCPP"; then
180
  if ${ac_cv_prog_CXXCPP+:} false; then :
181
  $as_echo_n "(cached) " >&6
182
else
183
      # Double quotes because CXXCPP needs to be expanded
184
    for CXXCPP in "$CXX -E" "/lib/cpp"
185
    do
186
      ac_preproc_ok=false
187
for ac_cxx_preproc_warn_flag in '' yes
188
do
189
  # Use a header file that comes with gcc, so configuring glibc
190
  # with a fresh cross-compiler works.
191
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
192
  # <limits.h> exists even on freestanding compilers.
193
  # On the NeXT, cc -E runs the code through the compiler's parser,
194
  # not just through cpp. "Syntax error" is here to catch this case.
195
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
196
/* end confdefs.h.  */
197
#ifdef __STDC__
198
# include <limits.h>
199
#else
200
# include <assert.h>
201
#endif
202
          Syntax error
203
_ACEOF
204
if ac_fn_cxx_try_cpp "$LINENO"; then :
205
206
else
207
  # Broken: fails on valid input.
208
continue
209
fi
210
rm -f conftest.err conftest.i conftest.$ac_ext
211
212
  # OK, works on sane cases.  Now check whether nonexistent headers
213
  # can be detected and how.
214
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
215
/* end confdefs.h.  */
216
#include <ac_nonexistent.h>
217
_ACEOF
218
if ac_fn_cxx_try_cpp "$LINENO"; then :
219
  # Broken: success on invalid input.
220
continue
221
else
222
  # Passes both tests.
223
ac_preproc_ok=:
224
break
225
fi
226
rm -f conftest.err conftest.i conftest.$ac_ext
227
228
done
229
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
230
rm -f conftest.i conftest.err conftest.$ac_ext
231
if $ac_preproc_ok; then :
232
  break
233
fi
234
235
    done
236
    ac_cv_prog_CXXCPP=$CXXCPP
237
238
fi
239
  CXXCPP=$ac_cv_prog_CXXCPP
240
else
241
  ac_cv_prog_CXXCPP=$CXXCPP
242
fi
243
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
244
$as_echo "$CXXCPP" >&6; }
245
ac_preproc_ok=false
246
for ac_cxx_preproc_warn_flag in '' yes
247
do
248
  # Use a header file that comes with gcc, so configuring glibc
249
  # with a fresh cross-compiler works.
250
  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
251
  # <limits.h> exists even on freestanding compilers.
252
  # On the NeXT, cc -E runs the code through the compiler's parser,
253
  # not just through cpp. "Syntax error" is here to catch this case.
254
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
255
/* end confdefs.h.  */
256
#ifdef __STDC__
257
# include <limits.h>
258
#else
259
# include <assert.h>
260
#endif
261
          Syntax error
262
_ACEOF
263
if ac_fn_cxx_try_cpp "$LINENO"; then :
264
265
else
266
  # Broken: fails on valid input.
267
continue
268
fi
269
rm -f conftest.err conftest.i conftest.$ac_ext
270
271
  # OK, works on sane cases.  Now check whether nonexistent headers
272
  # can be detected and how.
273
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
274
/* end confdefs.h.  */
275
#include <ac_nonexistent.h>
276
_ACEOF
277
if ac_fn_cxx_try_cpp "$LINENO"; then :
278
  # Broken: success on invalid input.
279
continue
280
else
281
  # Passes both tests.
282
ac_preproc_ok=:
283
break
284
fi
285
rm -f conftest.err conftest.i conftest.$ac_ext
286
287
done
288
# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
289
rm -f conftest.i conftest.err conftest.$ac_ext
290
if $ac_preproc_ok; then :
291
292
else
293
  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
294
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
295
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
296
See \`config.log' for more details" "$LINENO" 5; }
297
fi
298
299
ac_ext=cpp
300
ac_cpp='$CXXCPP $CPPFLAGS'
301
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
302
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
303
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
304
305
306
for ac_header in json/json.h jsoncpp/json/json.h
307
do :
308
  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
309
ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
310
if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
311
  cat >>confdefs.h <<_ACEOF
312
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
313
_ACEOF
314
315
fi
316
317
done
318
319
LIBS="$LIBS -ljsoncpp"
320
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
321
 /* end confdefs.h.  */
322
-#include <jsoncpp/json/json.h>
323
#ifdef HAVE_JSONCPP_JSON_JSON_H
324
    #include <jsoncpp/json/json.h>
325
    #else
326
    #include <json/json.h>
327
    #endif
328
 int
329
 main ()
330
 {
331
diff -u -r upmpdcli-1.2.2/src/config.h.in upmpdcli-1.2.2-fedora/src/config.h.in
332
--- upmpdcli-1.2.2/src/config.h.in    2016-09-10 19:43:58.000000000 +0200
333
 upmpdcli-1.2.2-fedora/src/config.h.in 2016-09-11 12:45:53.000000000 +0200
334
@@ -3,6 +3,12 @@
335
 /* Define to 1 if you have the <inttypes.h> header file. */
336
 #undef HAVE_INTTYPES_H
337
 
338
/* Define to 1 if you have the <jsoncpp/json/json.h> header file. */
339
#undef HAVE_JSONCPP_JSON_JSON_H
340
341
/* Define to 1 if you have the <json/json.h> header file. */
342
#undef HAVE_JSON_JSON_H
343
344
 /* Define to 1 if you have the `microhttpd' library (-lmicrohttpd). */
345
 #undef HAVE_LIBMICROHTTPD
346
 
347
diff -u -r upmpdcli-1.2.2/src/mediaserver/cdplugins/plgwithslave.cxx upmpdcli-1.2.2-fedora/src/mediaserver/cdplugins/plgwithslave.cxx
348
--- upmpdcli-1.2.2/src/mediaserver/cdplugins/plgwithslave.cxx 2016-09-10 18:03:33.000000000 +0200
349
 upmpdcli-1.2.2-fedora/src/mediaserver/cdplugins/plgwithslave.cxx  2016-09-11 12:47:04.000000000 +0200
350
@@ -14,6 +14,7 @@
351
  *   Free Software Foundation, Inc.,
352
  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
353
  */
354
#include "config.h"
355
 
356
 #include "plgwithslave.hxx"
357
 
358
@@ -25,7 +26,11 @@
359
 #include <string.h>
360
 #include <upnp/upnp.h>
361
 #include <microhttpd.h>
362
#ifdef HAVE_JSONCPP_JSON_JSON_H
363
 #include <jsoncpp/json/json.h>
364
#else
365
#include <json/json.h>
366
#endif
367
 
368
 #include "cmdtalk.h"
369
 #include "pathut.h"