aboutsummaryrefslogtreecommitdiff
path: root/audio/mac
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2004-08-11 07:52:12 +0000
committerPav Lucistnik <pav@FreeBSD.org>2004-08-11 07:52:12 +0000
commit950514d8777570ee7f01dc54f192df5020eeacd6 (patch)
treebe8215d66d10d000cf0dbaa2c9551309a690f357 /audio/mac
parentec780a65a5dcbe0e48c5d74791595aa0f7089a9e (diff)
downloadports-950514d8777570ee7f01dc54f192df5020eeacd6.tar.gz
ports-950514d8777570ee7f01dc54f192df5020eeacd6.zip
Add mac, Monkey's Audio Codec which was recently released in source code.
It contain a library and an executable compressor/decompressor of .ape files. Does not build under 4.x, we hit the wall with missing wcstol(). Working patches would be welcomed. PR: ports/70153 Submitted by: Martin Dieringer <Martin.Dieringer@t-online.de>
Notes
Notes: svn path=/head/; revision=115895
Diffstat (limited to 'audio/mac')
-rw-r--r--audio/mac/Makefile38
-rw-r--r--audio/mac/distinfo2
-rw-r--r--audio/mac/files/patch-src-MACLib-APEInfo.cpp11
-rw-r--r--audio/mac/files/patch-src-MACLib-APETag.cpp20
-rw-r--r--audio/mac/files/patch-src-MACLib-Assembly-Assembly.h11
-rw-r--r--audio/mac/files/patch-src-MACLib-MACLib.cpp20
-rw-r--r--audio/mac/files/patch-src-MACLib-WAVInputSource.cpp11
-rw-r--r--audio/mac/files/patch-src-Shared-NoWindows.h11
-rw-r--r--audio/mac/pkg-descr9
-rw-r--r--audio/mac/pkg-plist24
10 files changed, 157 insertions, 0 deletions
diff --git a/audio/mac/Makefile b/audio/mac/Makefile
new file mode 100644
index 000000000000..ae915bb1758c
--- /dev/null
+++ b/audio/mac/Makefile
@@ -0,0 +1,38 @@
+# New ports collection makefile for: mac
+# Date created: 8 Aug 2004
+# Whom: dieringe
+#
+# $FreeBSD$
+#
+
+PORTNAME= mac
+PORTVERSION= 3.99.4
+CATEGORIES= audio
+MASTER_SITES= ftp://ftp.altlinux.ru/pub/distributions/ALTLinux/Sisyphus/SRPMS.classic/
+DISTFILES= mac-3.99.u4-alt2.src.rpm
+
+MAINTAINER= dieringe@zedat.fu-berlin.de
+COMMENT= Monkey's Audio lossless audio (de)compressor
+
+EXTRACT_DEPENDS= rpm2cpio:${PORTSDIR}/archivers/rpm
+BUILD_DEPENDS= nasm:${PORTSDIR}/devel/nasm
+
+EXTRACT_CMD= rpm2cpio
+EXTRACT_BEFORE_ARGS= #
+EXTRACT_AFTER_ARGS= | ${CPIO} -id --quiet && ${TAR} -xyf mac-3.99-u4-linux.tar.bz2
+
+USE_GMAKE= yes
+USE_LIBTOOL_VER= 15
+CONFIGURE_ARGS+= --enable-backward
+
+WRKSRC= ${WRKDIR}/mac-3.99-u4
+
+INSTALLS_SHLIB= yes
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+IGNORE= does not compile on 4.x due to missing multibyte string functions in libc
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/audio/mac/distinfo b/audio/mac/distinfo
new file mode 100644
index 000000000000..12058010fc0d
--- /dev/null
+++ b/audio/mac/distinfo
@@ -0,0 +1,2 @@
+MD5 (mac-3.99.u4-alt2.src.rpm) = 86a38688a2395573637a2b6a033621df
+SIZE (mac-3.99.u4-alt2.src.rpm) = 307694
diff --git a/audio/mac/files/patch-src-MACLib-APEInfo.cpp b/audio/mac/files/patch-src-MACLib-APEInfo.cpp
new file mode 100644
index 000000000000..76151234632e
--- /dev/null
+++ b/audio/mac/files/patch-src-MACLib-APEInfo.cpp
@@ -0,0 +1,11 @@
+--- src/MACLib/APEInfo.cpp.orig Wed May 12 08:07:13 2004
++++ src/MACLib/APEInfo.cpp Mon Aug 9 20:25:20 2004
+@@ -40,7 +40,7 @@
+ // we don't want to analyze right away for non-local files
+ // since a single I/O object is shared, we can't tag and read at the same time (i.e. in multiple threads)
+ BOOL bAnalyzeNow = TRUE;
+- if ((wcsnicmp(pFilename, L"http://", 7) == 0) || (wcsnicmp(pFilename, L"m01p://", 7) == 0))
++ if ((wcsncmp(pFilename, L"http://", 7) == 0) || (wcsncmp(pFilename, L"m01p://", 7) == 0))
+ bAnalyzeNow = FALSE;
+
+ m_spAPETag.Assign(new CAPETag(m_spIO, bAnalyzeNow));
diff --git a/audio/mac/files/patch-src-MACLib-APETag.cpp b/audio/mac/files/patch-src-MACLib-APETag.cpp
new file mode 100644
index 000000000000..d9d911b6c48b
--- /dev/null
+++ b/audio/mac/files/patch-src-MACLib-APETag.cpp
@@ -0,0 +1,20 @@
+--- src/MACLib/APETag.cpp.orig Wed May 12 08:10:49 2004
++++ src/MACLib/APETag.cpp Mon Aug 9 20:26:04 2004
+@@ -310,7 +310,7 @@
+
+ for (int z = 0; z < m_nFields; z++)
+ {
+- if (wcsicmp(m_aryFields[z]->GetFieldName(), pFieldName) == 0)
++ if (wcscmp(m_aryFields[z]->GetFieldName(), pFieldName) == 0)
+ return z;
+ }
+
+@@ -478,7 +478,7 @@
+ BOOL bFound = FALSE;
+ while ((nGenreIndex < GENRE_COUNT) && (bFound == FALSE))
+ {
+- if (_wcsicmp(cBuffer, g_ID3Genre[nGenreIndex]) == 0)
++ if (wcscmp(cBuffer, g_ID3Genre[nGenreIndex]) == 0)
+ {
+ pID3Tag->Genre = nGenreIndex;
+ bFound = TRUE;
diff --git a/audio/mac/files/patch-src-MACLib-Assembly-Assembly.h b/audio/mac/files/patch-src-MACLib-Assembly-Assembly.h
new file mode 100644
index 000000000000..c9123d059239
--- /dev/null
+++ b/audio/mac/files/patch-src-MACLib-Assembly-Assembly.h
@@ -0,0 +1,11 @@
+--- src/MACLib/Assembly/Assembly.h.orig Wed May 12 06:35:56 2004
++++ src/MACLib/Assembly/Assembly.h Mon Aug 9 20:26:40 2004
+@@ -6,7 +6,7 @@
+ void Adapt(short * pM, const short * pAdapt, int nDirection, int nOrder);
+ int CalculateDotProduct(const short * pA, const short * pB, int nOrder);
+ BOOL GetMMXAvailable();
+-};
++}
+
+ #endif // #ifndef APE_ASSEMBLY_H
+
diff --git a/audio/mac/files/patch-src-MACLib-MACLib.cpp b/audio/mac/files/patch-src-MACLib-MACLib.cpp
new file mode 100644
index 000000000000..386142cb0e5e
--- /dev/null
+++ b/audio/mac/files/patch-src-MACLib-MACLib.cpp
@@ -0,0 +1,20 @@
+--- src/MACLib/MACLib.cpp.orig Wed May 12 08:56:22 2004
++++ src/MACLib/MACLib.cpp Mon Aug 9 20:27:19 2004
+@@ -62,7 +62,7 @@
+ pExtension--;
+
+ // take the appropriate action (based on the extension)
+- if (wcsicmp(pExtension, L".apl") == 0)
++ if (wcscmp(pExtension, L".apl") == 0)
+ {
+ // "link" file (.apl linked large APE file)
+ CAPELink APELink(pFilename);
+@@ -72,7 +72,7 @@
+ nStartBlock = APELink.GetStartBlock(); nFinishBlock = APELink.GetFinishBlock();
+ }
+ }
+- else if ((wcsicmp(pExtension, L".mac") == 0) || (wcsicmp(pExtension, L".ape") == 0))
++ else if ((wcscmp(pExtension, L".mac") == 0) || (wcscmp(pExtension, L".ape") == 0))
+ {
+ // plain .ape file
+ pAPEInfo = new CAPEInfo(&nErrorCode, pFilename);
diff --git a/audio/mac/files/patch-src-MACLib-WAVInputSource.cpp b/audio/mac/files/patch-src-MACLib-WAVInputSource.cpp
new file mode 100644
index 000000000000..8ce3aae98649
--- /dev/null
+++ b/audio/mac/files/patch-src-MACLib-WAVInputSource.cpp
@@ -0,0 +1,11 @@
+--- src/MACLib/WAVInputSource.cpp.orig Wed May 12 06:35:57 2004
++++ src/MACLib/WAVInputSource.cpp Mon Aug 9 20:27:58 2004
+@@ -47,7 +47,7 @@
+ pExtension--;
+
+ // create the proper input source
+- if (wcsicmp(pExtension, L".wav") == 0)
++ if (wcscmp(pExtension, L".wav") == 0)
+ {
+ if (pErrorCode) *pErrorCode = ERROR_SUCCESS;
+ return new CWAVInputSource(pSourceName, pwfeSource, pTotalBlocks, pHeaderBytes, pTerminatingBytes, pErrorCode);
diff --git a/audio/mac/files/patch-src-Shared-NoWindows.h b/audio/mac/files/patch-src-Shared-NoWindows.h
new file mode 100644
index 000000000000..ca15ca2be98b
--- /dev/null
+++ b/audio/mac/files/patch-src-Shared-NoWindows.h
@@ -0,0 +1,11 @@
+--- src/Shared/NoWindows.h.orig Wed May 12 09:00:17 2004
++++ src/Shared/NoWindows.h Mon Aug 9 20:28:34 2004
+@@ -50,7 +50,7 @@
+
+ #include <locale.h>
+
+-#define _FPOSOFF(fp) ((long)(fp).__pos)
++#define _FPOSOFF(fp) ((long)(fp))
+ #define MAX_PATH 260
+
+ #ifndef _WAVEFORMATEX_
diff --git a/audio/mac/pkg-descr b/audio/mac/pkg-descr
new file mode 100644
index 000000000000..f801e93bd982
--- /dev/null
+++ b/audio/mac/pkg-descr
@@ -0,0 +1,9 @@
+Monkey's Audio Codec is a lossless audio codec w/ good correspondence of
+compression (and decompresssion) ratio and time. Monkey's Audio Codec can be
+used for personal, educational and non-commercial purposes. Commercial usage
+requires prior written permission from Monkey's Audio author.
+
+WWW: http://www.monkeysaudio.com/
+
+- dieringe
+dieringe@zedat.fu-berlin.de
diff --git a/audio/mac/pkg-plist b/audio/mac/pkg-plist
new file mode 100644
index 000000000000..7b1c8a5bb243
--- /dev/null
+++ b/audio/mac/pkg-plist
@@ -0,0 +1,24 @@
+bin/mac
+include/mac/config.h
+include/mac/All.h
+include/mac/GlobalFunctions.h
+include/mac/ID3Genres.h
+include/mac/IO.h
+include/mac/SmartPtr.h
+include/mac/StdLibFileIO.h
+include/mac/NoWindows.h
+include/mac/CharacterHelper.h
+include/mac/APECompress.h
+include/mac/APECompressCore.h
+include/mac/APECompressCreate.h
+include/mac/APEDecompress.h
+include/mac/APEHeader.h
+include/mac/APEInfo.h
+include/mac/APELink.h
+include/mac/APETag.h
+include/mac/MACLib.h
+include/mac/MACProgressHelper.h
+@dirrm include/mac
+lib/libmac.so.2
+lib/libmac.so
+lib/libmac.a