Skip to content

Commit bcbbfc0

Browse files
authored
Merge pull request #997 from Homebrew/musepack-patches
musepack: upstream patches
2 parents b948766 + 743dc74 commit bcbbfc0

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed

musepack/r479.patch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Index: libmpcdec/requant.h
2+
===================================================================
3+
--- libmpcdec/requant.h (revision 478)
4+
+++ libmpcdec/requant.h (revision 479)
5+
@@ -47,9 +47,9 @@
6+
7+
8+
/* C O N S T A N T S */
9+
-const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
10+
-const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
11+
-const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
12+
+extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
13+
+extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
14+
+extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
15+
16+
#define Cc (__Cc + 1)
17+
#define Dc (__Dc + 1)

musepack/r482.patch

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Index: include/CMakeLists.txt
2+
===================================================================
3+
--- include/CMakeLists.txt (revision 481)
4+
+++ include/CMakeLists.txt (nonexistent)
5+
@@ -1 +0,0 @@
6+
-INSTALL(DIRECTORY mpc DESTINATION include)
7+
Index: libmpcdec/Makefile.am
8+
===================================================================
9+
--- libmpcdec/Makefile.am (revision 481)
10+
+++ libmpcdec/Makefile.am (revision 482)
11+
@@ -16,4 +16,5 @@
12+
mpc_bits_reader.h huffman.h decoder.h internal.h requant.h mpcdec_math.h \
13+
$(common_sources)
14+
15+
+# version info shoud match the one in CMakeLists.txt
16+
libmpcdec_la_LDFLAGS = -no-undefined -version-info 7:0:1
17+
Index: libmpcdec/CMakeLists.txt
18+
===================================================================
19+
--- libmpcdec/CMakeLists.txt (revision 481)
20+
+++ libmpcdec/CMakeLists.txt (revision 482)
21+
@@ -1,7 +1,23 @@
22+
+SET(mpcdec_VERSION_MAJOR 7)
23+
+SET(mpcdec_VERSION_MINOR 0)
24+
+SET(mpcdec_VERSION_PATCH 1)
25+
+
26+
+set(mpcdec_VERSION ${mpcdec_VERSION_MAJOR}.${mpcdec_VERSION_MINOR}.${mpcdec_VERSION_PATCH})
27+
+
28+
include_directories(${libmpc_SOURCE_DIR}/include)
29+
+install(FILES
30+
+ ${libmpc_SOURCE_DIR}/include/mpc/mpcdec.h
31+
+ ${libmpc_SOURCE_DIR}/include/mpc/reader.h
32+
+ ${libmpc_SOURCE_DIR}/include/mpc/streaminfo.h
33+
+ ${libmpc_SOURCE_DIR}/include/mpc/mpc_types.h
34+
+ DESTINATION include/mpc COMPONENT headers)
35+
+
36+
if(SHARED)
37+
add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
38+
+ set_target_properties(mpcdec PROPERTIES VERSION ${mpcdec_VERSION} SOVERSION ${mpcdec_VERSION_MAJOR})
39+
+ install(TARGETS mpcdec LIBRARY DESTINATION "lib" COMPONENT libraries)
40+
else(SHARED)
41+
add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
42+
+ install(TARGETS mpcdec_static ARCHIVE DESTINATION "lib/static" COMPONENT libraries)
43+
endif(SHARED)
44+
45+
Index: CMakeLists.txt
46+
===================================================================
47+
--- CMakeLists.txt (revision 481)
48+
+++ CMakeLists.txt (revision 482)
49+
@@ -30,4 +30,3 @@
50+
add_subdirectory(mpccut)
51+
add_subdirectory(mpcchap)
52+
add_subdirectory(wavcmp)
53+
-add_subdirectory(include)

musepack/r491.patch

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
Index: libmpcdec/CMakeLists.txt
2+
===================================================================
3+
--- libmpcdec/CMakeLists.txt (revision 490)
4+
+++ libmpcdec/CMakeLists.txt (revision 491)
5+
@@ -4,7 +4,6 @@
6+
7+
set(mpcdec_VERSION ${mpcdec_VERSION_MAJOR}.${mpcdec_VERSION_MINOR}.${mpcdec_VERSION_PATCH})
8+
9+
-include_directories(${libmpc_SOURCE_DIR}/include)
10+
install(FILES
11+
${libmpc_SOURCE_DIR}/include/mpc/mpcdec.h
12+
${libmpc_SOURCE_DIR}/include/mpc/reader.h
13+
@@ -12,12 +11,16 @@
14+
${libmpc_SOURCE_DIR}/include/mpc/mpc_types.h
15+
DESTINATION include/mpc COMPONENT headers)
16+
17+
+include_directories(${libmpc_SOURCE_DIR}/include)
18+
if(SHARED)
19+
- add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
20+
- set_target_properties(mpcdec PROPERTIES VERSION ${mpcdec_VERSION} SOVERSION ${mpcdec_VERSION_MAJOR})
21+
- install(TARGETS mpcdec LIBRARY DESTINATION "lib" COMPONENT libraries)
22+
+ add_library(mpcdec_shared SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
23+
+ set_target_properties(mpcdec_shared PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1 VERSION ${mpcdec_VERSION} SOVERSION ${mpcdec_VERSION_MAJOR})
24+
+ install(TARGETS mpcdec_shared LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}" COMPONENT libraries)
25+
+ target_link_libraries(mpcdec_shared m)
26+
else(SHARED)
27+
add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
28+
- install(TARGETS mpcdec_static ARCHIVE DESTINATION "lib/static" COMPONENT libraries)
29+
+ set_target_properties(mpcdec_static PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1)
30+
+ install(TARGETS mpcdec_static LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}" COMPONENT libraries)
31+
+ target_link_libraries(mpcdec_static m)
32+
endif(SHARED)
33+

0 commit comments

Comments
 (0)