Import audio/musepack, ok ajacoutot@
This commit is contained in:
parent
dc0e02293f
commit
efad40af77
36
audio/musepack/Makefile
Normal file
36
audio/musepack/Makefile
Normal file
@ -0,0 +1,36 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
|
||||
COMMENT = decoder, encoder and replaygain for musepack (mpc) audio files
|
||||
|
||||
V = 475
|
||||
DISTNAME = musepack_src_r${V}
|
||||
PKGNAME = musepack-${V}
|
||||
CATEGORIES = audio
|
||||
|
||||
HOMEPAGE = http://www.musepack.net/
|
||||
|
||||
SHARED_LIBS += mpcdec 4.0 # .7.0
|
||||
|
||||
# BSD and LGPLv2.1
|
||||
PERMIT_DISTFILES_CDROM =Yes
|
||||
PERMIT_DISTFILES_FTP = Yes
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
PERMIT_PACKAGE_FTP = Yes
|
||||
|
||||
MASTER_SITES = http://files.musepack.net/source/
|
||||
DISTFILES = musepack_src_r${V}.tar.gz libreplaygain_r${V}.tar.gz
|
||||
|
||||
WANTLIB += c cue m
|
||||
|
||||
MODULES = devel/cmake
|
||||
|
||||
LIB_DEPENDS = audio/libcue
|
||||
|
||||
NO_REGRESS = Yes
|
||||
|
||||
post-extract:
|
||||
cp ${WRKDIR}/libreplaygain_r${V}/include/replaygain/gain_analysis.h ${WRKSRC}/mpcgain/
|
||||
cp ${WRKDIR}/libreplaygain_r${V}/src/gain_analysis.c ${WRKSRC}/mpcgain/
|
||||
rm -rf ${WRKSRC}/include/mpc/.svn
|
||||
|
||||
.include <bsd.port.mk>
|
10
audio/musepack/distinfo
Normal file
10
audio/musepack/distinfo
Normal file
@ -0,0 +1,10 @@
|
||||
MD5 (libreplaygain_r475.tar.gz) = 4ns7Ekm3+66S1lbZ49JmMw==
|
||||
MD5 (musepack_src_r475.tar.gz) = dU1nvmf3E+VLr3D8/bKBfg==
|
||||
RMD160 (libreplaygain_r475.tar.gz) = thsIfSt5XY+NzhutkX3Hj7AXBDA=
|
||||
RMD160 (musepack_src_r475.tar.gz) = Yi0E7rMJvqzStrtlAXjc3EJ3PbI=
|
||||
SHA1 (libreplaygain_r475.tar.gz) = dzm0uc9G4IRmY/cHqUmKTbA0Xq8=
|
||||
SHA1 (musepack_src_r475.tar.gz) = vdQEJ3PrXIhd9w16GZFPpuIwY5E=
|
||||
SHA256 (libreplaygain_r475.tar.gz) = gli/eFVHrCzaQ7sZXgdSLwo2gvVavpd1PJdGCewjJII=
|
||||
SHA256 (musepack_src_r475.tar.gz) = pLF0L5l/g+EFYULVVqjCCEW6dktwNl/5zPLj+BxCeys=
|
||||
SIZE (libreplaygain_r475.tar.gz) = 8693
|
||||
SIZE (musepack_src_r475.tar.gz) = 188737
|
14
audio/musepack/patches/patch-CMakeLists_txt
Normal file
14
audio/musepack/patches/patch-CMakeLists_txt
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- CMakeLists.txt.orig Wed Jul 28 13:24:28 2010
|
||||
+++ CMakeLists.txt Wed Jul 28 14:04:26 2010
|
||||
@@ -15,10 +15,6 @@ endif(WIN32)
|
||||
|
||||
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)
|
18
audio/musepack/patches/patch-libmpcdec_CMakeLists_txt
Normal file
18
audio/musepack/patches/patch-libmpcdec_CMakeLists_txt
Normal file
@ -0,0 +1,18 @@
|
||||
$OpenBSD: patch-libmpcdec_CMakeLists_txt,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- libmpcdec/CMakeLists.txt.orig Sat Aug 21 21:55:01 2010
|
||||
+++ libmpcdec/CMakeLists.txt Fri Dec 2 01:18:52 2011
|
||||
@@ -1,7 +1,9 @@
|
||||
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)
|
||||
-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)
|
||||
+
|
||||
+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)
|
||||
+
|
||||
+install(TARGETS mpcdec_static mpcdec_shared LIBRARY DESTINATION "lib${LIB_SUFFIX}" ARCHIVE DESTINATION "lib${LIB_SUFFIX}")
|
12
audio/musepack/patches/patch-mpc2sv8_CMakeLists_txt
Normal file
12
audio/musepack/patches/patch-mpc2sv8_CMakeLists_txt
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-mpc2sv8_CMakeLists_txt,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- mpc2sv8/CMakeLists.txt.orig Fri Jun 18 18:45:01 2010
|
||||
+++ mpc2sv8/CMakeLists.txt Fri Jun 18 18:45:10 2010
|
||||
@@ -28,8 +28,4 @@ if(NOT MSVC)
|
||||
target_link_libraries(mpc2sv8 m)
|
||||
endif(NOT MSVC)
|
||||
|
||||
-if(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
|
||||
-target_link_libraries(mpc2sv8 ossaudio)
|
||||
-endif(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
|
||||
-
|
||||
install(TARGETS mpc2sv8 RUNTIME DESTINATION bin)
|
14
audio/musepack/patches/patch-mpcchap_CMakeLists_txt
Normal file
14
audio/musepack/patches/patch-mpcchap_CMakeLists_txt
Normal file
@ -0,0 +1,14 @@
|
||||
$OpenBSD: patch-mpcchap_CMakeLists_txt,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- mpcchap/CMakeLists.txt.orig Sat Aug 21 21:55:01 2010
|
||||
+++ mpcchap/CMakeLists.txt Fri Dec 2 04:20:27 2011
|
||||
@@ -1,8 +1,8 @@
|
||||
-FIND_PATH(CUEFILE_INCLUDE_DIR cuetools/cuefile.h
|
||||
+FIND_PATH(CUEFILE_INCLUDE_DIR libcue/libcue.h
|
||||
${libmpc_SOURCE_DIR}/../libcuefile/include
|
||||
)
|
||||
|
||||
-FIND_LIBRARY(CUEFILE_LIBRARY NAMES cuefile PATHS
|
||||
+FIND_LIBRARY(CUEFILE_LIBRARY NAMES cue PATHS
|
||||
${CUEFILE_INCLUDE_DIR}/../src
|
||||
)
|
||||
|
34
audio/musepack/patches/patch-mpcchap_mpcchap_c
Normal file
34
audio/musepack/patches/patch-mpcchap_mpcchap_c
Normal file
@ -0,0 +1,34 @@
|
||||
$OpenBSD: patch-mpcchap_mpcchap_c,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- mpcchap/mpcchap.c.orig Fri Dec 2 04:21:33 2011
|
||||
+++ mpcchap/mpcchap.c Fri Dec 2 04:27:40 2011
|
||||
@@ -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,19 @@ mpc_status add_chaps_ini(char * mpc_file, char * chap_
|
||||
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;
|
||||
+ FILE * cue_file;
|
||||
int chap_pos, end_pos, chap_size, i;
|
||||
char * tmp_buff;
|
||||
|
||||
- if (0 == (cd = cf_parse(chap_file, &format))) {
|
||||
+ if ((cue_file = fopen(chap_file, "r")) == NULL) {
|
||||
+ fprintf(stderr, "%s: error opening file\n", chap_file);
|
||||
+ return !MPC_STATUS_OK;
|
||||
+ }
|
||||
+
|
||||
+ if (0 == (cd = cue_parse_file(cue_file))) {
|
||||
fprintf(stderr, "%s: input file error\n", chap_file);
|
||||
return !MPC_STATUS_OK;
|
||||
}
|
12
audio/musepack/patches/patch-mpcenc_CMakeLists_txt
Normal file
12
audio/musepack/patches/patch-mpcenc_CMakeLists_txt
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-mpcenc_CMakeLists_txt,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- mpcenc/CMakeLists.txt.orig Fri Jun 18 18:43:29 2010
|
||||
+++ mpcenc/CMakeLists.txt Fri Jun 18 18:43:37 2010
|
||||
@@ -22,8 +22,4 @@ if(NOT MSVC)
|
||||
target_link_libraries(mpcenc m)
|
||||
endif(NOT MSVC)
|
||||
|
||||
-if(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
|
||||
-target_link_libraries(mpcenc ossaudio)
|
||||
-endif(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
|
||||
-
|
||||
install(TARGETS mpcenc RUNTIME DESTINATION bin)
|
28
audio/musepack/patches/patch-mpcgain_CMakeLists_txt
Normal file
28
audio/musepack/patches/patch-mpcgain_CMakeLists_txt
Normal file
@ -0,0 +1,28 @@
|
||||
$OpenBSD: patch-mpcgain_CMakeLists_txt,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- mpcgain/CMakeLists.txt.orig Fri Dec 2 02:10:28 2011
|
||||
+++ mpcgain/CMakeLists.txt Fri Dec 2 02:11:07 2011
|
||||
@@ -1,23 +1,8 @@
|
||||
-FIND_PATH(REPLAY_GAIN_INCLUDE_DIR replaygain/gain_analysis.h
|
||||
- /usr/include
|
||||
- /usr/local/include
|
||||
- ${libmpc_SOURCE_DIR}/../libreplaygain/include
|
||||
-)
|
||||
-
|
||||
-FIND_LIBRARY(REPLAY_GAIN_LIBRARY NAMES replaygain replaygain_static PATHS
|
||||
- /usr/lib
|
||||
- /usr/local/lib
|
||||
- ${libmpc_SOURCE_DIR}/../libreplaygain/bin/src/release
|
||||
-)
|
||||
-
|
||||
include_directories(${libmpc_SOURCE_DIR}/include)
|
||||
-include_directories(${REPLAY_GAIN_INCLUDE_DIR})
|
||||
|
||||
link_directories(${libmpc_BINARY_DIR}/libmpcdec)
|
||||
|
||||
-add_executable(mpcgain mpcgain.c)
|
||||
-
|
||||
-target_link_libraries(mpcgain ${REPLAY_GAIN_LIBRARY})
|
||||
+add_executable(mpcgain mpcgain.c gain_analysis.c)
|
||||
|
||||
if(SHARED)
|
||||
target_link_libraries(mpcgain mpcdec)
|
12
audio/musepack/patches/patch-mpcgain_gain_analysis_c
Normal file
12
audio/musepack/patches/patch-mpcgain_gain_analysis_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-mpcgain_gain_analysis_c,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- mpcgain/gain_analysis.c.orig Fri Dec 2 02:14:34 2011
|
||||
+++ mpcgain/gain_analysis.c Fri Dec 2 02:14:52 2011
|
||||
@@ -50,7 +50,7 @@
|
||||
#include <string.h>
|
||||
#include <math.h>
|
||||
|
||||
-#include <replaygain/gain_analysis.h>
|
||||
+#include "gain_analysis.h"
|
||||
|
||||
typedef unsigned short Uint16_t;
|
||||
typedef signed short Int16_t;
|
12
audio/musepack/patches/patch-mpcgain_mpcgain_c
Normal file
12
audio/musepack/patches/patch-mpcgain_mpcgain_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-mpcgain_mpcgain_c,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
--- mpcgain/mpcgain.c.orig Fri Dec 2 02:09:52 2011
|
||||
+++ mpcgain/mpcgain.c Fri Dec 2 02:10:16 2011
|
||||
@@ -35,7 +35,7 @@
|
||||
#include <math.h>
|
||||
#include <mpc/mpcdec.h>
|
||||
#include <mpc/minimax.h>
|
||||
-#include <replaygain/gain_analysis.h>
|
||||
+#include "gain_analysis.h"
|
||||
|
||||
#include "../libmpcdec/internal.h"
|
||||
#include "../libmpcdec/huffman.h"
|
8
audio/musepack/pkg/DESCR
Normal file
8
audio/musepack/pkg/DESCR
Normal file
@ -0,0 +1,8 @@
|
||||
Musepack is an audio compression format with a strong emphasis on high
|
||||
quality. It's not lossless, but it is designed for transparency, so that
|
||||
you won't be able to hear differences between the original wave file and
|
||||
the much smaller MPC file.
|
||||
|
||||
It is based on the MPEG-1 Layer-2 / MP2 algorithms, but has rapidly
|
||||
developed and vastly improved and is now at an advanced stage in which
|
||||
it contains heavily optimized and patentless code.
|
2
audio/musepack/pkg/PFRAG.shared
Normal file
2
audio/musepack/pkg/PFRAG.shared
Normal file
@ -0,0 +1,2 @@
|
||||
@comment $OpenBSD: PFRAG.shared,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
@lib lib/libmpcdec.so.${LIBmpcdec_VERSION}
|
19
audio/musepack/pkg/PLIST
Normal file
19
audio/musepack/pkg/PLIST
Normal file
@ -0,0 +1,19 @@
|
||||
@comment $OpenBSD: PLIST,v 1.1.1.1 2012/05/24 18:25:56 shadchin Exp $
|
||||
@conflict libmpcdec-*
|
||||
%%SHARED%%
|
||||
@bin bin/mpc2sv8
|
||||
@bin bin/mpcchap
|
||||
@bin bin/mpccut
|
||||
@bin bin/mpcdec
|
||||
@bin bin/mpcenc
|
||||
@bin bin/mpcgain
|
||||
@bin bin/wavcmp
|
||||
include/mpc/
|
||||
include/mpc/datatypes.h
|
||||
include/mpc/minimax.h
|
||||
include/mpc/mpc_types.h
|
||||
include/mpc/mpcdec.h
|
||||
include/mpc/mpcmath.h
|
||||
include/mpc/reader.h
|
||||
include/mpc/streaminfo.h
|
||||
lib/libmpcdec.a
|
Loading…
Reference in New Issue
Block a user