musepack, libmpcdec SV8, removed SV7.

This commit is contained in:
4fury-c3440d8
2020-09-13 21:34:00 +03:00
parent 1dad567af5
commit 844343d4a4
12 changed files with 325 additions and 92 deletions
@@ -0,0 +1,44 @@
---
mpc2sv8/Makefile.am | 5 +++--
mpcdec/Makefile.am | 5 +++--
mpcenc/Makefile.am | 5 +++--
3 files changed, 9 insertions(+), 6 deletions(-)
--- a/mpc2sv8/Makefile.am
+++ b/mpc2sv8/Makefile.am
@@ -11,6 +11,7 @@ common_sources = ../common/crc32.c
METASOURCES = AUTO
bin_PROGRAMS = mpc2sv8
mpc2sv8_SOURCES = mpc2sv8.c $(common_sources)
-mpc2sv8_LDADD = -lm \
+mpc2sv8_LDADD = \
$(top_builddir)/libmpcdec/libmpcdec.la \
- $(top_builddir)/libmpcenc/libmpcenc.a
+ $(top_builddir)/libmpcenc/libmpcenc.a \
+ -lm
--- a/mpcdec/Makefile.am
+++ b/mpcdec/Makefile.am
@@ -9,6 +9,7 @@ endif
METASOURCES = AUTO
bin_PROGRAMS = mpcdec
mpcdec_SOURCES = mpcdec.c
-mpcdec_LDADD = -lm \
+mpcdec_LDADD = \
$(top_builddir)/libmpcdec/libmpcdec.la \
- $(top_builddir)/libwavformat/libwavformat.a
+ $(top_builddir)/libwavformat/libwavformat.a \
+ -lm
--- a/mpcenc/Makefile.am
+++ b/mpcenc/Makefile.am
@@ -22,8 +22,9 @@ mpcenc_SOURCES = keyboard.c mpcenc.c pip
$(common_sources) \
mpcenc.h predict.h config.h
-mpcenc_LDADD = -lm \
+mpcenc_LDADD = \
$(EXTRALIBS) \
$(top_builddir)/libmpcpsy/libmpcpsy.a \
- $(top_builddir)/libmpcenc/libmpcenc.a
+ $(top_builddir)/libmpcenc/libmpcenc.a \
+ -lm
@@ -0,0 +1,21 @@
--- a/configure.in 2020-09-13 18:27:24.186893066 +0300
+++ b/configure.in 2020-09-13 18:28:54.905398925 +0300
@@ -3,7 +3,8 @@
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([libmpcdec/mpc_reader.c])
AM_CONFIG_HEADER([include/config.h])
-AM_INIT_AUTOMAKE
+AM_INIT_AUTOMAKE(subdir-objects)
+AM_MAINTAINER_MODE
AC_LANG_C
AC_PROG_CC
@@ -30,7 +31,7 @@
AM_CONDITIONAL([MPC_CHAP], [test "x$enable_mpcchap" = xyes])
-CHECK_VISIBILITY
+AM_CONDITIONAL([HAVE_VISIBILITY], [true])
AC_CONFIG_FILES([
Makefile
@@ -0,0 +1,66 @@
Index: libmpc/configure.in
===================================================================
--- a/configure.in
+++ b/configure.in
@@ -28,6 +28,12 @@ esac
AC_SUBST([EXTRALIBS])
AC_ARG_ENABLE([mpcchap], [AS_HELP_STRING([--enable-mpcchap], [enable building mpcchap])])
+if test "x$enable_mpcchap" = xyes; then
+ PKG_CHECK_MODULES(LIBCUE, libcue)
+ AC_SUBST(LIBCUE_CFLAGS)
+ AC_SUBST(LIBCUE_LIBS)
+fi
+
AM_CONDITIONAL([MPC_CHAP], [test "x$enable_mpcchap" = xyes])
Index: libmpc/mpcchap/Makefile.am
===================================================================
--- a/mpcchap/Makefile.am
+++ b/mpcchap/Makefile.am
@@ -4,7 +4,8 @@ bin_PROGRAMS = mpcchap
common_sources = ../common/tags.c ../common/crc32.c
-AM_CPPFLAGS = -I$(top_srcdir)/include
+AM_CPPFLAGS = -I$(top_srcdir)/include \
+ $(LIBCUE_CFLAGS)
if HAVE_VISIBILITY
AM_CFLAGS = -fvisibility=hidden
@@ -16,4 +17,4 @@ dictionary.h iniparser.h
mpcchap_LDADD = $(top_builddir)/libmpcdec/libmpcdec.la \
$(top_builddir)/libmpcenc/libmpcenc.a \
- -lm -lcuefile
+ -lm $(LIBCUE_LIBS)
Index: libmpc/mpcchap/mpcchap.c
===================================================================
--- a/mpcchap/mpcchap.c
+++ b/mpcchap/mpcchap.c
@@ -24,7 +24,7 @@
#include <sys/stat.h>
-#include <cuetools/cuefile.h>
+#include <libcue/libcue.h>
// tags.c
void Init_Tags ( void );
@@ -153,13 +153,13 @@ mpc_status add_chaps_ini(char * mpc_file
mpc_status add_chaps_cue(char * mpc_file, char * chap_file, mpc_demux * demux, mpc_streaminfo * si)
{
Cd *cd = 0;
- int nchap, format = UNKNOWN;
+ int nchap;
struct stat stbuf;
FILE * in_file;
int chap_pos, end_pos, chap_size, i;
char * tmp_buff;
- if (0 == (cd = cf_parse(chap_file, &format))) {
+ if (0 == (cd = cue_parse_file(chap_file))) {
fprintf(stderr, "%s: input file error\n", chap_file);
return !MPC_STATUS_OK;
}
@@ -0,0 +1,22 @@
Subject: Add extern keyword to global variable declaration.
Origin: upstream, commit:r479
Bug-Debian: http://bugs.debian.org/665974
---
libmpcdec/requant.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/libmpcdec/requant.h
+++ b/libmpcdec/requant.h
@@ -47,9 +47,9 @@ extern "C" {
/* C O N S T A N T S */
-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
+extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
+extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
+extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
#define Cc (__Cc + 1)
#define Dc (__Dc + 1)
@@ -0,0 +1,7 @@
--- a/libmpcdec/Makefile.am 2009-10-20 20:11:41.000000000 +0200
+++ b/libmpcdec/Makefile.am 2009-10-20 20:12:02.000000000 +0200
@@ -17,3 +17,4 @@
$(common_sources)
libmpcdec_la_LDFLAGS = -no-undefined -version-info 7:0:1
+libmpcdec_la_LIBADD = -lm