archrelease: copy trunk to extra-x86_64
[arch-packages.git] / musepack / trunk / 03_mpcchap.patch
blobb1f04b0ac42ecdd36debda93b7ac8c13f5474662
1 Index: libmpc/configure.in
2 ===================================================================
3 --- libmpc.orig/configure.in
4 +++ libmpc/configure.in
5 @@ -28,6 +28,12 @@ esac
6 AC_SUBST([EXTRALIBS])
8 AC_ARG_ENABLE([mpcchap], [AS_HELP_STRING([--enable-mpcchap], [enable building mpcchap])])
9 +if test "x$enable_mpcchap" = xyes; then
10 + PKG_CHECK_MODULES(LIBCUE, libcue)
11 + AC_SUBST(LIBCUE_CFLAGS)
12 + AC_SUBST(LIBCUE_LIBS)
13 +fi
15 AM_CONDITIONAL([MPC_CHAP], [test "x$enable_mpcchap" = xyes])
18 Index: libmpc/mpcchap/Makefile.am
19 ===================================================================
20 --- libmpc.orig/mpcchap/Makefile.am
21 +++ libmpc/mpcchap/Makefile.am
22 @@ -4,7 +4,8 @@ bin_PROGRAMS = mpcchap
24 common_sources = ../common/tags.c ../common/crc32.c
26 -AM_CPPFLAGS = -I$(top_srcdir)/include
27 +AM_CPPFLAGS = -I$(top_srcdir)/include \
28 + $(LIBCUE_CFLAGS)
30 if HAVE_VISIBILITY
31 AM_CFLAGS = -fvisibility=hidden
32 @@ -16,4 +17,4 @@ dictionary.h iniparser.h
34 mpcchap_LDADD = $(top_builddir)/libmpcdec/libmpcdec.la \
35 $(top_builddir)/libmpcenc/libmpcenc.a \
36 - -lm -lcuefile
37 + -lm $(LIBCUE_LIBS)
38 Index: libmpc/mpcchap/mpcchap.c
39 ===================================================================
40 --- libmpc.orig/mpcchap/mpcchap.c
41 +++ libmpc/mpcchap/mpcchap.c
42 @@ -24,7 +24,7 @@
44 #include <sys/stat.h>
46 -#include <cuetools/cuefile.h>
47 +#include <libcue/libcue.h>
49 // tags.c
50 void Init_Tags ( void );
51 @@ -153,13 +153,13 @@ mpc_status add_chaps_ini(char * mpc_file
52 mpc_status add_chaps_cue(char * mpc_file, char * chap_file, mpc_demux * demux, mpc_streaminfo * si)
54 Cd *cd = 0;
55 - int nchap, format = UNKNOWN;
56 + int nchap;
57 struct stat stbuf;
58 FILE * in_file;
59 int chap_pos, end_pos, chap_size, i;
60 char * tmp_buff;
62 - if (0 == (cd = cf_parse(chap_file, &format))) {
63 + if (0 == (cd = cue_parse_file(chap_file))) {
64 fprintf(stderr, "%s: input file error\n", chap_file);
65 return !MPC_STATUS_OK;