summaryrefslogtreecommitdiff
path: root/audio/musepack-tools
diff options
context:
space:
mode:
authorMatteo Bernardini <ponce@slackbuilds.org>2013-11-19 16:32:44 +0100
committerRobby Workman <rworkman@slackbuilds.org>2013-11-19 15:20:48 -0600
commit1eaf3d5f7a49de4796a24661793e8a196a8fe67a (patch)
tree62cff54ed4749d2bea123dfc7e14d5c000fd078a /audio/musepack-tools
parent01f85f918bd8ecb656fce9d3bc50e998e6ed2910 (diff)
downloadslackbuilds-1eaf3d5f7a49de4796a24661793e8a196a8fe67a.tar.gz
audio/musepack-tools: Added a patch to build libmpcdec with cmake.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'audio/musepack-tools')
-rw-r--r--audio/musepack-tools/musepack-tools-475.patch43
-rw-r--r--audio/musepack-tools/musepack-tools.SlackBuild7
2 files changed, 48 insertions, 2 deletions
diff --git a/audio/musepack-tools/musepack-tools-475.patch b/audio/musepack-tools/musepack-tools-475.patch
new file mode 100644
index 0000000000..4eacf543cd
--- /dev/null
+++ b/audio/musepack-tools/musepack-tools-475.patch
@@ -0,0 +1,43 @@
+diff -Naur musepack_src_r475.orig/CMakeLists.txt musepack_src_r475/CMakeLists.txt
+--- musepack_src_r475.orig/CMakeLists.txt 2010-07-13 13:15:24.000000000 +0200
++++ musepack_src_r475/CMakeLists.txt 2013-11-19 16:19:27.930544532 +0100
+@@ -15,10 +15,6 @@
+
+ add_definitions(-DFAST_MATH -DCVD_FASTLOG)
+
+-if(NOT MSVC)
+- set(CMAKE_C_FLAGS "-O3 -Wall -fomit-frame-pointer -pipe")
+-endif(NOT MSVC)
+-
+ add_subdirectory(libmpcdec)
+ add_subdirectory(libmpcpsy)
+ add_subdirectory(libmpcenc)
+diff -Naur musepack_src_r475.orig/libmpcdec/CMakeLists.txt musepack_src_r475/libmpcdec/CMakeLists.txt
+--- musepack_src_r475.orig/libmpcdec/CMakeLists.txt 2010-08-21 17:55:01.000000000 +0200
++++ musepack_src_r475/libmpcdec/CMakeLists.txt 2013-11-19 16:27:50.460506764 +0100
+@@ -1,7 +1,22 @@
+ include_directories(${libmpc_SOURCE_DIR}/include)
+ if(SHARED)
+- add_library(mpcdec SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
+-else(SHARED)
+- add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
++ add_library(mpcdec_shared SHARED huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
++ set_target_properties(mpcdec_shared PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1 VERSION 7.0.1 SOVERSION 7)
++ if(NOT MSVC)
++ target_link_libraries(mpcdec_shared m)
++ endif(NOT MSVC)
+ endif(SHARED)
++
++add_library(mpcdec_static STATIC huffman mpc_decoder mpc_reader streaminfo mpc_bits_reader mpc_demux requant synth_filter ${libmpc_SOURCE_DIR}/common/crc32)
+
++set_target_properties(mpcdec_static PROPERTIES OUTPUT_NAME mpcdec CLEAN_DIRECT_OUTPUT 1)
++
++if(NOT MSVC)
++ target_link_libraries(mpcdec_static m)
++endif(NOT MSVC)
++
++install(TARGETS mpcdec_static LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}")
++
++if(SHARED)
++ install(TARGETS mpcdec_shared LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}")
++endif(SHARED)
diff --git a/audio/musepack-tools/musepack-tools.SlackBuild b/audio/musepack-tools/musepack-tools.SlackBuild
index f95c8b801c..5d6acce494 100644
--- a/audio/musepack-tools/musepack-tools.SlackBuild
+++ b/audio/musepack-tools/musepack-tools.SlackBuild
@@ -6,7 +6,7 @@
PRGNAM=musepack-tools
SRCNAM=musepack_src
VERSION=${VERSION:-r475}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -51,12 +51,15 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+# sane defaults (hints from Gentoo)
+patch -p1 < $CWD/musepack-tools-475.patch
+
mkdir -p build
cd build
cmake \
-DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
-DCMAKE_INSTALL_PREFIX=/usr \
- -DCMAKE_SKIP_RPATH=ON \
+ -DLIB_SUFFIX=$LIBDIRSUFFIX \
-DCMAKE_BUILD_TYPE=Release ..
make
make install DESTDIR=$PKG