summaryrefslogtreecommitdiffstats
path: root/audio
diff options
context:
space:
mode:
authormakc <makc@FreeBSD.org>2010-09-21 16:48:04 +0000
committermakc <makc@FreeBSD.org>2010-09-21 16:48:04 +0000
commit408697abdfb2cbaf74115c665f5df75389e45f3e (patch)
tree0a52e5b712ba3bc5dd4564e25845db82351dd1d3 /audio
parent66250384aac316bb7c7e78e17a9f60ee4eef0d73 (diff)
downloadFreeBSD-ports-408697abdfb2cbaf74115c665f5df75389e45f3e.zip
FreeBSD-ports-408697abdfb2cbaf74115c665f5df75389e45f3e.tar.gz
Switch to audio/musepack from deprecated audio/libmpcdec
PR: ports/150510 Submitted by: Ganael Laplanche <ganael.laplanche at martymac.org> Approved by: maintainer
Diffstat (limited to 'audio')
-rw-r--r--audio/aqualung/Makefile4
-rw-r--r--audio/cmus/Makefile4
-rw-r--r--audio/cmus/files/patch-configure11
-rw-r--r--audio/libtunepimp/Makefile4
-rw-r--r--audio/libtunepimp/files/patch-configure56
-rw-r--r--audio/libtunepimp/files/patch-plugins-mpc-mpcdecode.cpp165
6 files changed, 238 insertions, 6 deletions
diff --git a/audio/aqualung/Makefile b/audio/aqualung/Makefile
index 97fdee1..c429f80 100644
--- a/audio/aqualung/Makefile
+++ b/audio/aqualung/Makefile
@@ -7,7 +7,7 @@
PORTNAME= aqualung
DISTVERSION= 0.9beta11
-PORTREVISION= 8
+PORTREVISION= 9
CATEGORIES= audio
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${DISTVERSION} \
http://wickedmachine.net/mirror/
@@ -23,7 +23,7 @@ LIB_DEPENDS= samplerate.1:${PORTSDIR}/audio/libsamplerate \
speex.1:${PORTSDIR}/audio/speex \
mad.2:${PORTSDIR}/audio/libmad \
modplug.1:${PORTSDIR}/audio/libmodplug \
- mpcdec.5:${PORTSDIR}/audio/libmpcdec \
+ mpcdec.7:${PORTSDIR}/audio/musepack \
mac.2:${PORTSDIR}/audio/mac \
tag.1:${PORTSDIR}/audio/taglib \
lrdf.2:${PORTSDIR}/textproc/liblrdf \
diff --git a/audio/cmus/Makefile b/audio/cmus/Makefile
index 842fb75..636105e 100644
--- a/audio/cmus/Makefile
+++ b/audio/cmus/Makefile
@@ -7,7 +7,7 @@
PORTNAME= cmus
PORTVERSION= 2.3.3
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= audio
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
@@ -80,7 +80,7 @@ PLIST_SUB+= MIKMOD="@comment "
.endif
.if defined(WITH_MUSEPACK)
-LIB_DEPENDS+= mpcdec:${PORTSDIR}/audio/libmpcdec
+LIB_DEPENDS+= mpcdec:${PORTSDIR}/audio/musepack
CONFIGURE_ARGS+=CONFIG_MPC=y
PLIST_SUB+= MPC=""
.else
diff --git a/audio/cmus/files/patch-configure b/audio/cmus/files/patch-configure
new file mode 100644
index 0000000..96d8430
--- /dev/null
+++ b/audio/cmus/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig 2010-09-10 23:37:55.577146100 +0200
++++ configure 2010-09-10 23:38:07.609090631 +0200
+@@ -135,7 +135,7 @@
+ {
+ check_header mpc/mpcdec.h
+ MPC_SV7=$?
+- check_library MPC "" "-lmpcdec"
++ check_library MPC "" "-lmpcdec -lm"
+ return $?
+ }
+
diff --git a/audio/libtunepimp/Makefile b/audio/libtunepimp/Makefile
index e1a3599..71b302a 100644
--- a/audio/libtunepimp/Makefile
+++ b/audio/libtunepimp/Makefile
@@ -7,7 +7,7 @@
PORTNAME= libtunepimp
PORTVERSION= 0.5.3
-PORTREVISION= 8
+PORTREVISION= 9
PORTEPOCH= 1
CATEGORIES= audio
MASTER_SITES= http://ftp.musicbrainz.org/pub/musicbrainz/ \
@@ -25,7 +25,7 @@ LIB_DEPENDS= FLAC:${PORTSDIR}/audio/flac \
tag:${PORTSDIR}/audio/taglib \
vorbis:${PORTSDIR}/audio/libvorbis \
ofa:${PORTSDIR}/audio/libofa \
- mpcdec:${PORTSDIR}/audio/libmpcdec
+ mpcdec:${PORTSDIR}/audio/musepack
CONFLICTS= trm-0*
USE_GMAKE= yes
diff --git a/audio/libtunepimp/files/patch-configure b/audio/libtunepimp/files/patch-configure
new file mode 100644
index 0000000..0403270
--- /dev/null
+++ b/audio/libtunepimp/files/patch-configure
@@ -0,0 +1,56 @@
+--- configure.orig 2006-11-28 21:34:18.000000000 +0100
++++ configure 2010-09-11 11:46:56.333821556 +0200
+@@ -21669,9 +21669,9 @@
+ fi
+
+
+-{ echo "$as_me:$LINENO: checking for mpc_decoder_decode in -lmpcdec" >&5
+-echo $ECHO_N "checking for mpc_decoder_decode in -lmpcdec... $ECHO_C" >&6; }
+-if test "${ac_cv_lib_mpcdec_mpc_decoder_decode+set}" = set; then
++{ echo "$as_me:$LINENO: checking for mpc_demux_decode in -lmpcdec" >&5
++echo $ECHO_N "checking for mpc_demux_decode in -lmpcdec... $ECHO_C" >&6; }
++if test "${ac_cv_lib_mpcdec_mpc_demux_decode+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+ else
+ ac_check_lib_save_LIBS=$LIBS
+@@ -21689,11 +21689,11 @@
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+-char mpc_decoder_decode ();
++char mpc_demux_decode ();
+ int
+ main ()
+ {
+-return mpc_decoder_decode ();
++return mpc_demux_decode ();
+ ;
+ return 0;
+ }
+@@ -21732,21 +21732,21 @@
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+- ac_cv_lib_mpcdec_mpc_decoder_decode=yes
++ ac_cv_lib_mpcdec_mpc_demux_decode=yes
+ else
+ echo "$as_me: failed program was:" >&5
+ sed 's/^/| /' conftest.$ac_ext >&5
+
+- ac_cv_lib_mpcdec_mpc_decoder_decode=no
++ ac_cv_lib_mpcdec_mpc_demux_decode=no
+ fi
+
+ rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS=$ac_check_lib_save_LIBS
+ fi
+-{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpcdec_mpc_decoder_decode" >&5
+-echo "${ECHO_T}$ac_cv_lib_mpcdec_mpc_decoder_decode" >&6; }
+-if test $ac_cv_lib_mpcdec_mpc_decoder_decode = yes; then
++{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpcdec_mpc_demux_decode" >&5
++echo "${ECHO_T}$ac_cv_lib_mpcdec_mpc_demux_decode" >&6; }
++if test $ac_cv_lib_mpcdec_mpc_demux_decode = yes; then
+ have_mpcdec=yes
+ fi
+
diff --git a/audio/libtunepimp/files/patch-plugins-mpc-mpcdecode.cpp b/audio/libtunepimp/files/patch-plugins-mpc-mpcdecode.cpp
new file mode 100644
index 0000000..9a35eef
--- /dev/null
+++ b/audio/libtunepimp/files/patch-plugins-mpc-mpcdecode.cpp
@@ -0,0 +1,165 @@
+--- plugins/mpc/mpcdecode.cpp.orig 2006-11-18 11:51:08.000000000 +0100
++++ plugins/mpc/mpcdecode.cpp 2010-09-11 11:46:56.335821789 +0200
+@@ -29,8 +29,9 @@
+ #include <assert.h>
+ #include <time.h>
+ #include "fileio.h"
++#include "config.h"
+
+-#include <mpcdec/mpcdec.h>
++#include <mpc/mpcdec.h>
+
+ extern char *mpcErrorString;
+
+@@ -40,35 +41,35 @@
+ } reader_data;
+
+ static mpc_int32_t
+-read_impl(void *data, void *ptr, mpc_int32_t size)
++read_impl(mpc_reader *data, void *ptr, mpc_int32_t size)
+ {
+- reader_data *d = (reader_data *) data;
++ reader_data *d = (reader_data *) data->data;
+ return tread(ptr, 1, size, d->file);
+ }
+
+ static mpc_bool_t
+-seek_impl(void *data, mpc_int32_t offset)
++seek_impl(mpc_reader *data, mpc_int32_t offset)
+ {
+- reader_data *d = (reader_data *) data;
++ reader_data *d = (reader_data *) data->data;
+ return !tseek(d->file, offset, SEEK_SET);
+ }
+
+ static mpc_int32_t
+-tell_impl(void *data)
++tell_impl(mpc_reader *data)
+ {
+- reader_data *d = (reader_data *) data;
++ reader_data *d = (reader_data *) data->data;
+ return ttell(d->file);
+ }
+
+ static mpc_int32_t
+-get_size_impl(void *data)
++get_size_impl(mpc_reader *data)
+ {
+- reader_data *d = (reader_data *) data;
++ reader_data *d = (reader_data *) data->data;
+ return d->size;
+ }
+
+ static mpc_bool_t
+-canseek_impl(void *data)
++canseek_impl(mpc_reader *data)
+ {
+ return true;
+ }
+@@ -76,7 +77,7 @@
+ typedef struct mpc_decode_struct_t {
+ TFILE *file;
+ reader_data rdata;
+- mpc_decoder decoder;
++ mpc_demux *decoder;
+ mpc_reader reader;
+ mpc_streaminfo info;
+ MPC_SAMPLE_FORMAT buffer[MPC_DECODER_BUFFER_LENGTH];
+@@ -114,27 +115,21 @@
+ ds->reader.canseek = canseek_impl;
+ ds->reader.data = &ds->rdata;
+
+- /* read file's streaminfo data */
+- mpc_streaminfo_init(&ds->info);
+- if (mpc_streaminfo_read(&ds->info, &ds->reader) != ERROR_CODE_OK) {
+- mpcErrorString = "Not a valid Musepack file.";
+- goto error;
+- }
+-
+- /* instantiate a decoder with our file reader */
+- mpc_decoder_setup(&ds->decoder, &ds->reader);
+- if (!mpc_decoder_initialize(&ds->decoder, &ds->info)) {
+- mpcErrorString = "Error initializing decoder.";
+- goto error;
+- }
+-
++ ds->decoder = mpc_demux_init(&ds->reader);
++ if (!ds->decoder) {
++ mpcErrorString = "Error initializing decoder.";
++ goto error;
++ }
++
++ mpc_demux_get_info(ds->decoder, &ds->info);
++
+ return ds;
+
+ error:
+- if (ds)
+- delete ds;
+-
+- return NULL;
++ if (ds) {
++ mpc_demux_exit(ds->decoder);
++ delete ds;
++ }
+ }
+
+ extern "C" int
+@@ -144,7 +139,8 @@
+ return 0;
+
+ if (duration)
+- *duration = (ds->info.pcm_samples * 1000) / ds->info.sample_freq;
++ *duration = ((ds->info.samples - ds->info.beg_silence) * 1000)
++ / ds->info.sample_freq;
+ if (samplesPerSecond)
+ *samplesPerSecond = ds->info.sample_freq;
+ if (bitsPerSample)
+@@ -173,6 +169,8 @@
+ return -1;
+
+ unsigned status, maxSamples = maxBytes / 2 / ds->info.channels, samples, offset;
++ mpc_frame_info frame;
++ mpc_status err;
+
+ if (ds->samples > 0) {
+ samples = ds->samples;
+@@ -182,15 +180,18 @@
+ goto convert;
+ }
+
+- status = mpc_decoder_decode(&ds->decoder, ds->buffer, 0, 0);
+-
+- if (status == (unsigned)(-1)) { //decode error
+- mpcErrorString = "Error decoding file.";
+- return -1;
++ frame.buffer = ds->buffer;
++ err = mpc_demux_decode(ds->decoder, &frame);
++
++ if (err != MPC_STATUS_OK) { //decode error
++ mpcErrorString = "Error decoding file.";
++ return -1;
+ }
+- else if (status == 0) { //EOF
+- return 0;
++ else if (frame.bits == -1) { //EOF
++ return 0;
+ }
++
++ status = frame.samples;
+
+ if (status > maxSamples) {
+ ds->samples = status - maxSamples;
+@@ -230,8 +231,10 @@
+ extern "C" void
+ mpcDecodeEnd(mpc_decode_struct_t *ds)
+ {
+- if (ds)
+- delete ds;
++ if (ds) {
++ mpc_demux_exit(ds->decoder);
++ delete ds;
++ }
+ }
+
+
OpenPOWER on IntegriCloud