aboutsummaryrefslogtreecommitdiff
path: root/audio/musepack
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2010-05-22 04:39:31 +0000
committerMartin Wilke <miwi@FreeBSD.org>2010-05-22 04:39:31 +0000
commit43cc26ad977af5d5c13e9d98b35f3c92f88213ed (patch)
tree47fd1b7c57bf4c0417a50ff9647cc03e9d9622f3 /audio/musepack
parent7401a4e0afdf6b263c3e81aafb661ff11ccacd1e (diff)
downloadports-43cc26ad977af5d5c13e9d98b35f3c92f88213ed.tar.gz
ports-43cc26ad977af5d5c13e9d98b35f3c92f88213ed.zip
Notes
Diffstat (limited to 'audio/musepack')
-rw-r--r--audio/musepack/Makefile40
-rw-r--r--audio/musepack/distinfo6
-rw-r--r--audio/musepack/files/patch-Makefile.am7
-rw-r--r--audio/musepack/files/patch-encode_sv7.c25
-rw-r--r--audio/musepack/files/patch-huffman-bcl.c27
-rw-r--r--audio/musepack/pkg-plist17
6 files changed, 86 insertions, 36 deletions
diff --git a/audio/musepack/Makefile b/audio/musepack/Makefile
index b171e88272cf..089da6e27e9c 100644
--- a/audio/musepack/Makefile
+++ b/audio/musepack/Makefile
@@ -6,43 +6,17 @@
#
PORTNAME= musepack
-PORTVERSION= 1.15v
+PORTVERSION= 2009.03.01
CATEGORIES= audio
MASTER_SITES= http://files.musepack.net/source/
-DISTNAME= mpcsv7-src-${PORTVERSION}
+DISTNAME= ${PORTNAME}_src_r435
MAINTAINER= shoesoft@gmx.net
COMMENT= Decoder, encoder and replaygain for musepack (mpc)
-LIB_DEPENDS= esd.2:${PORTSDIR}/audio/esound
+USE_LDCONFIG= yes
+USE_AUTOTOOLS= aclocal:110 autoheader:262 libtoolize automake:110 autoconf:262 libtool:22
+ACLOCAL_ARGS= -I. -I ${LOCALBASE}/share/aclocal
+AUTOMAKE_ARGS= --add-missing
-PLIST_FILES= bin/mppdec bin/mppenc bin/replaygain
-BINS= mppdec mppenc replaygain
-ALL_TARGET= ${BINS}
-USE_BZIP2= yes
-USE_GMAKE= yes
-WRKSRC= ${WRKDIR}/sv7
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == alpha
-BROKEN= Does not compile on alpha
-.endif
-
-.if ${ARCH} == i386
-BUILD_DEPENDS+= nasm:${PORTSDIR}/devel/nasm
-.endif
-
-post-patch:
-.if ${ARCH} != i386
- ${REINPLACE_CMD} -e "s|#define USE_ASM|//#define USE_ASM|" ${WRKSRC}/mpp.h
-.endif
- ${REINPLACE_CMD} -e "s|#define USE_IRIX_AUDIO|//#define USE_IRIX_AUDIO|" ${WRKSRC}/mpp.h
- ${REINPLACE_CMD} -e "s|<machine/soundcard.h>|<sys/soundcard.h>|" ${WRKSRC}/mppdec.h
-
-do-install:
-.for _BIN in ${BINS}
- ${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${_BIN} ${LOCALBASE}/bin
-.endfor
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
diff --git a/audio/musepack/distinfo b/audio/musepack/distinfo
index fc0a2dfb00e2..9d13e42ecad5 100644
--- a/audio/musepack/distinfo
+++ b/audio/musepack/distinfo
@@ -1,3 +1,3 @@
-MD5 (mpcsv7-src-1.15v.tar.bz2) = eb3e6b64b1f7d68aaeb04e39936d87fb
-SHA256 (mpcsv7-src-1.15v.tar.bz2) = ca602ea9d41038bdf7c04371d6f12d0eca5b71c29433633732d607e1b410a4bd
-SIZE (mpcsv7-src-1.15v.tar.bz2) = 416868
+MD5 (musepack_src_r435.tar.gz) = 0e858972978fe480fd1400b7331061de
+SHA256 (musepack_src_r435.tar.gz) = 9fc1f4d0a88560590f377a3194a4b9b597966c9df91283aa7136fd3b120e43b2
+SIZE (musepack_src_r435.tar.gz) = 194149
diff --git a/audio/musepack/files/patch-Makefile.am b/audio/musepack/files/patch-Makefile.am
new file mode 100644
index 000000000000..e9601941eadb
--- /dev/null
+++ b/audio/musepack/files/patch-Makefile.am
@@ -0,0 +1,7 @@
+--- Makefile.am.orig 2008-03-25 15:31:41.000000000 +0100
++++ Makefile.am 2010-05-16 18:04:14.000000000 +0200
+@@ -1,3 +1,3 @@
+ AUTOMAKE_OPTIONS = foreign
+ SUBDIRS = include libmpcdec libmpcenc libmpcpsy libwavformat mpcenc mpc2sv8 \
+- mpcchap mpccut mpcdec mpcgain wavcmp
++ mpccut mpcdec wavcmp
diff --git a/audio/musepack/files/patch-encode_sv7.c b/audio/musepack/files/patch-encode_sv7.c
new file mode 100644
index 000000000000..847e726fe003
--- /dev/null
+++ b/audio/musepack/files/patch-encode_sv7.c
@@ -0,0 +1,25 @@
+--- ./libmpcenc/encode_sv7.c.orig 2009-02-23 19:15:46.000000000 +0100
++++ ./libmpcenc/encode_sv7.c 2010-05-16 17:59:52.000000000 +0200
+@@ -24,6 +24,8 @@
+ #include "libmpcenc.h"
+ #include <mpc/minimax.h>
+
++#define log2(x) ( log (x) * (1./M_LN2) )
++
+ void Klemm ( void );
+ void Init_Skalenfaktoren ( void );
+
+@@ -437,11 +439,11 @@
+ total_cnt += sym[j][i].Count;
+ total_size += sym[j][i].Count * sym[j][i].Bits;
+ if (sym[j][i].Count != 0)
+- optim_size += sym[j][i].Count * __builtin_log2(sym[j][i].Count);
++ optim_size += sym[j][i].Count * log2(sym[j][i].Count);
+ }
+ full_count += total_cnt;
+ full_size += total_size;
+- optim_size = total_cnt * __builtin_log2(total_cnt) - optim_size;
++ optim_size = total_cnt * log2(total_cnt) - optim_size;
+ full_optim += optim_size;
+ size[j] = total_size;
+ cnt[j] = total_cnt;
diff --git a/audio/musepack/files/patch-huffman-bcl.c b/audio/musepack/files/patch-huffman-bcl.c
new file mode 100644
index 000000000000..087150b3298a
--- /dev/null
+++ b/audio/musepack/files/patch-huffman-bcl.c
@@ -0,0 +1,27 @@
+--- ./common/huffman-bcl.c.orig 2007-03-17 00:25:28.000000000 +0100
++++ ./common/huffman-bcl.c 2010-05-16 18:01:56.000000000 +0200
+@@ -30,9 +30,12 @@
+ * marcus.geelnard at home.se
+ *************************************************************************/
+
++#include <math.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+
++#define log2(x) ( log (x) * (1./M_LN2) )
++
+ typedef struct {
+ int Symbol;
+ unsigned int Count;
+@@ -265,9 +268,9 @@
+ total_cnt += sym[i].Count;
+ total_size += sym[i].Count * sym[i].Bits;
+ if (sym[i].Count != 0)
+- optim_size += sym[i].Count * __builtin_log2(sym[i].Count);
++ optim_size += sym[i].Count * log2(sym[i].Count);
+ }
+- optim_size = total_cnt * __builtin_log2(total_cnt) - optim_size;
++ optim_size = total_cnt * log2(total_cnt) - optim_size;
+ printf("\ncount : %u huff : %f bps ", total_cnt, (float)total_size / total_cnt);
+ printf("opt : %f bps ", (float)optim_size / total_cnt);
+ printf("loss : %f bps (%f %%)\n", (float)(total_size - optim_size) / total_cnt, (float)(total_size - optim_size) * 100 / optim_size);
diff --git a/audio/musepack/pkg-plist b/audio/musepack/pkg-plist
new file mode 100644
index 000000000000..40b283c3a4b9
--- /dev/null
+++ b/audio/musepack/pkg-plist
@@ -0,0 +1,17 @@
+bin/mpc2sv8
+bin/mpccut
+bin/mpcdec
+bin/mpcenc
+bin/wavcmp
+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
+lib/libmpcdec.la
+lib/libmpcdec.so
+lib/libmpcdec.so.7
+@dirrm include/mpc