summaryrefslogtreecommitdiffstats
path: root/audio/mac
diff options
context:
space:
mode:
Diffstat (limited to 'audio/mac')
-rw-r--r--audio/mac/README17
-rw-r--r--audio/mac/gcc6.patch181
-rw-r--r--audio/mac/mac.1169
-rw-r--r--audio/mac/mac.SlackBuild54
-rw-r--r--audio/mac/mac.info2
-rw-r--r--audio/mac/mac.rst145
-rw-r--r--audio/mac/slack-desc6
7 files changed, 558 insertions, 16 deletions
diff --git a/audio/mac/README b/audio/mac/README
index d013f5dbfc..87df899452 100644
--- a/audio/mac/README
+++ b/audio/mac/README
@@ -1,7 +1,14 @@
mac (Monkey's Audio Linux port)
-mac is a console frontend to Monkey's Audio, able to encode and
-decode APE audio files.
+Monkey's Audio (aka APE) is a lossless audio compression format,
+similar to FLAC. mac is a console frontend to Monkey's Audio, able to
+encode and decode APE audio files.
+
+Note: if you just want to listen to APE files, Slackware's mplayer
+and audacious can already play them. If you just want to convert them
+to some other format (wav, mp3, etc), Slackware's ffmpeg can already
+decode them. The only real reason to install this package is for
+converting files *to* APE format.
If you're building this for an old x86 CPU that doesn't support MMX,
set ASM=no in the script's environment.
@@ -10,3 +17,9 @@ The package is built using upstream's default optimization level,
which is -O3. If you suspect this is causing problems, rebuild with
FORCE_SLACK_CFLAGS=yes in the environment (this will force -O2). If this
actually fixes anything, please email the maintainer with the details.
+
+Note: if you get "invalid input file" trying to encode a wav file, it
+probably means the wav file uses floating point rather than 16-bit
+integer samples. You can convert with sox:
+
+ sox -G input.wav -b16 output.wav
diff --git a/audio/mac/gcc6.patch b/audio/mac/gcc6.patch
new file mode 100644
index 0000000000..e22d1c1f53
--- /dev/null
+++ b/audio/mac/gcc6.patch
@@ -0,0 +1,181 @@
+From: Peter Levine <plevine457@gmail.com>
+--- mac-3.99-u4-b5-s7/src/Shared/NoWindows.h.old 2016-09-18 21:37:56.049105791 -0400
++++ mac-3.99-u4-b5-s7/src/Shared/NoWindows.h 2016-09-18 21:55:29.666295506 -0400
+@@ -39,8 +39,8 @@
+ typedef const wchar_t * LPCWSTR;
+
+ #define ZeroMemory(POINTER, BYTES) memset(POINTER, 0, BYTES);
+-#define max(a,b) (((a) > (b)) ? (a) : (b))
+-#define min(a,b) (((a) < (b)) ? (a) : (b))
++#define max_macro(a,b) (((a) > (b)) ? (a) : (b))
++#define min_macro(a,b) (((a) < (b)) ? (a) : (b))
+
+ #define __stdcall
+ #define CALLBACK
+--- mac-3.99-u4-b5-s7/src/Shared/CircleBuffer.cpp.old 2016-09-18 21:43:44.270495095 -0400
++++ mac-3.99-u4-b5-s7/src/Shared/CircleBuffer.cpp 2016-09-18 21:44:47.960148731 -0400
+@@ -45,7 +45,7 @@
+
+ if (pBuffer != NULL && nBytes > 0)
+ {
+- int nHeadBytes = min(m_nEndCap - m_nHead, nBytes);
++ int nHeadBytes = min_macro(m_nEndCap - m_nHead, nBytes);
+ int nFrontBytes = nBytes - nHeadBytes;
+
+ memcpy(&pBuffer[0], &m_pBuffer[m_nHead], nHeadBytes);
+@@ -72,7 +72,7 @@
+
+ int CCircleBuffer::RemoveHead(int nBytes)
+ {
+- nBytes = min(MaxGet(), nBytes);
++ nBytes = min_macro(MaxGet(), nBytes);
+ m_nHead += nBytes;
+ if (m_nHead >= m_nEndCap)
+ m_nHead -= m_nEndCap;
+@@ -81,7 +81,7 @@
+
+ int CCircleBuffer::RemoveTail(int nBytes)
+ {
+- nBytes = min(MaxGet(), nBytes);
++ nBytes = min_macro(MaxGet(), nBytes);
+ m_nTail -= nBytes;
+ if (m_nTail < 0)
+ m_nTail += m_nEndCap;
+--- mac-3.99-u4-b5-s7/src/MACLib/APECompress.cpp.old 2016-09-18 21:48:40.916547811 -0400
++++ mac-3.99-u4-b5-s7/src/MACLib/APECompress.cpp 2016-09-18 21:51:43.670733601 -0400
+@@ -117,7 +117,7 @@
+ return ERROR_UNDEFINED;
+
+ // calculate how many bytes to copy and add that much to the buffer
+- int nBytesToProcess = min(nBytesAvailable, nBytes - nBytesDone);
++ int nBytesToProcess = min_macro(nBytesAvailable, nBytes - nBytesDone);
+ memcpy(pBuffer, &pData[nBytesDone], nBytesToProcess);
+
+ // unlock the buffer (fail if not successful)
+@@ -162,7 +162,7 @@
+
+ while ((m_nBufferTail - m_nBufferHead) >= nThreshold)
+ {
+- int nFrameBytes = min(m_spAPECompressCreate->GetFullFrameBytes(), m_nBufferTail - m_nBufferHead);
++ int nFrameBytes = min_macro(m_spAPECompressCreate->GetFullFrameBytes(), m_nBufferTail - m_nBufferHead);
+
+ if (nFrameBytes == 0)
+ break;
+--- mac-3.99-u4-b5-s7/src/MACLib/APEDecompress.cpp.old 2016-09-18 21:46:56.962072960 -0400
++++ mac-3.99-u4-b5-s7/src/MACLib/APEDecompress.cpp 2016-09-18 22:01:14.402044817 -0400
+@@ -35,8 +35,8 @@
+ m_bErrorDecodingCurrentFrame = FALSE;
+
+ // set the "real" start and finish blocks
+- m_nStartBlock = (nStartBlock < 0) ? 0 : min(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
+- m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
++ m_nStartBlock = (nStartBlock < 0) ? 0 : min_macro(nStartBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
++ m_nFinishBlock = (nFinishBlock < 0) ? GetInfo(APE_INFO_TOTAL_BLOCKS) : min_macro(nFinishBlock, GetInfo(APE_INFO_TOTAL_BLOCKS));
+ m_bIsRanged = (m_nStartBlock != 0) || (m_nFinishBlock != GetInfo(APE_INFO_TOTAL_BLOCKS));
+ }
+
+@@ -85,7 +85,7 @@
+
+ // cap
+ int nBlocksUntilFinish = m_nFinishBlock - m_nCurrentBlock;
+- const int nBlocksToRetrieve = min(nBlocks, nBlocksUntilFinish);
++ const int nBlocksToRetrieve = min_macro(nBlocks, nBlocksUntilFinish);
+
+ // get the data
+ unsigned char * pOutputBuffer = (unsigned char *) pBuffer;
+@@ -99,7 +99,7 @@
+
+ // analyze how much to remove from the buffer
+ const int nFrameBufferBlocks = m_nFrameBufferFinishedBlocks;
+- nBlocksThisPass = min(nBlocksLeft, nFrameBufferBlocks);
++ nBlocksThisPass = min_macro(nBlocksLeft, nFrameBufferBlocks);
+
+ // remove as much as possible
+ if (nBlocksThisPass > 0)
+@@ -182,7 +182,7 @@
+
+ int nFrameOffsetBlocks = m_nCurrentFrameBufferBlock % GetInfo(APE_INFO_BLOCKS_PER_FRAME);
+ int nFrameBlocksLeft = nFrameBlocks - nFrameOffsetBlocks;
+- int nBlocksThisPass = min(nFrameBlocksLeft, nBlocksLeft);
++ int nBlocksThisPass = min_macro(nFrameBlocksLeft, nBlocksLeft);
+
+ // start the frame if we need to
+ if (nFrameOffsetBlocks == 0)
+--- mac-3.99-u4-b5-s7/src/MACLib/APESimple.cpp.old 2016-09-18 21:47:16.972925909 -0400
++++ mac-3.99-u4-b5-s7/src/MACLib/APESimple.cpp 2016-09-18 21:52:39.022779503 -0400
+@@ -193,7 +193,7 @@
+ nBytesRead = 1;
+ while ((nBytesLeft > 0) && (nBytesRead > 0))
+ {
+- int nBytesToRead = min(16384, nBytesLeft);
++ int nBytesToRead = min_macro(16384, nBytesLeft);
+ if (pIO->Read(spBuffer, nBytesToRead, &nBytesRead) != ERROR_SUCCESS)
+ return ERROR_IO_READ;
+
+--- mac-3.99-u4-b5-s7/src/MACLib/APETag.cpp.old 2016-09-18 21:55:53.331533348 -0400
++++ mac-3.99-u4-b5-s7/src/MACLib/APETag.cpp 2016-09-18 21:58:21.508345586 -0400
+@@ -16,7 +16,7 @@
+ memcpy(m_spFieldNameUTF16, pFieldName, (wcslen(pFieldName) + 1) * sizeof(str_utf16));
+
+ // data (we'll always allocate two extra bytes and memset to 0 so we're safely NULL terminated)
+- m_nFieldValueBytes = max(nFieldBytes, 0);
++ m_nFieldValueBytes = max_macro(nFieldBytes, 0);
+ m_spFieldValue.Assign(new char [m_nFieldValueBytes + 2], TRUE);
+ memset(m_spFieldValue, 0, m_nFieldValueBytes + 2);
+ if (m_nFieldValueBytes > 0)
+--- mac-3.99-u4-b5-s7/src/MACLib/BitArray.cpp.old 2016-09-18 21:53:24.090030009 -0400
++++ mac-3.99-u4-b5-s7/src/MACLib/BitArray.cpp 2016-09-18 22:00:13.500083252 -0400
+@@ -113,7 +113,7 @@
+ m_nCurrentBitIndex = (m_nCurrentBitIndex & 31);
+
+ // zero the rest of the memory (may not need the +1 because of frame byte alignment)
+- memset(&m_pBitArray[1], 0, min(nBytesToWrite + 1, BIT_ARRAY_BYTES - 1));
++ memset(&m_pBitArray[1], 0, min_macro(nBytesToWrite + 1, BIT_ARRAY_BYTES - 1));
+ }
+
+ // return a success
+@@ -247,7 +247,7 @@
+ BitArrayState.k++;
+
+ // figure the pivot value
+- int nPivotValue = max(nOriginalKSum / 32, 1);
++ int nPivotValue = max_macro(nOriginalKSum / 32, 1);
+ int nOverflow = nEncode / nPivotValue;
+ int nBase = nEncode - (nOverflow * nPivotValue);
+
+--- mac-3.99-u4-b5-s7/src/MACLib/MACProgressHelper.cpp.old 2016-09-18 21:56:44.606337012 -0400
++++ mac-3.99-u4-b5-s7/src/MACLib/MACProgressHelper.cpp 2016-09-18 21:59:55.854310134 -0400
+@@ -35,7 +35,7 @@
+ m_nCurrentStep = nCurrentStep;
+
+ // figure the percentage done
+- float fPercentageDone = float(m_nCurrentStep) / float(max(m_nTotalSteps, 1));
++ float fPercentageDone = float(m_nCurrentStep) / float(max_macro(m_nTotalSteps, 1));
+ int nPercentageDone = (int) (fPercentageDone * 1000 * 100);
+ if (nPercentageDone > 100000) nPercentageDone = 100000;
+
+--- mac-3.99-u4-b5-s7/src/MACLib/Prepare.cpp.old 2016-09-18 21:56:29.974394222 -0400
++++ mac-3.99-u4-b5-s7/src/MACLib/Prepare.cpp 2016-09-18 21:59:28.214726465 -0400
+@@ -177,9 +177,9 @@
+
+ if (LPeak == 0) { *pSpecialCodes |= SPECIAL_FRAME_LEFT_SILENCE; }
+ if (RPeak == 0) { *pSpecialCodes |= SPECIAL_FRAME_RIGHT_SILENCE; }
+- if (max(LPeak, RPeak) > *pPeakLevel)
++ if (max_macro(LPeak, RPeak) > *pPeakLevel)
+ {
+- *pPeakLevel = max(LPeak, RPeak);
++ *pPeakLevel = max_macro(LPeak, RPeak);
+ }
+
+ // check for pseudo-stereo files
+--- mac-3.99-u4-b5-s7/src/MACLib/UnBitArray.cpp.old 2016-09-18 21:56:16.548445898 -0400
++++ mac-3.99-u4-b5-s7/src/MACLib/UnBitArray.cpp 2016-09-18 21:58:56.148161050 -0400
+@@ -110,7 +110,7 @@
+ if (m_nVersion >= 3990)
+ {
+ // figure the pivot value
+- int nPivotValue = max(BitArrayState.nKSum / 32, 1);
++ int nPivotValue = max_macro(BitArrayState.nKSum / 32, 1);
+
+ // get the overflow
+ int nOverflow = 0;
diff --git a/audio/mac/mac.1 b/audio/mac/mac.1
new file mode 100644
index 0000000000..baaf4b0c58
--- /dev/null
+++ b/audio/mac/mac.1
@@ -0,0 +1,169 @@
+.\" Man page generated from reStructuredText.
+.
+.
+.nr rst2man-indent-level 0
+.
+.de1 rstReportMargin
+\\$1 \\n[an-margin]
+level \\n[rst2man-indent-level]
+level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
+-
+\\n[rst2man-indent0]
+\\n[rst2man-indent1]
+\\n[rst2man-indent2]
+..
+.de1 INDENT
+.\" .rstReportMargin pre:
+. RS \\$1
+. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
+. nr rst2man-indent-level +1
+.\" .rstReportMargin post:
+..
+.de UNINDENT
+. RE
+.\" indent \\n[an-margin]
+.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.nr rst2man-indent-level -1
+.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
+.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
+..
+.TH "MAC" 1 "2021-11-25" "3.99_u4_b5_s7" "SlackBuilds.org"
+.SH NAME
+mac \- decode/encode Monkey's Audio codec files
+.\" RST source for mac(1) man page. Convert with:
+.
+.\" rst2man.py mac.rst > mac.1
+.
+.\" rst2man.py comes from the SBo development/docutils package.
+.
+.SH SYNOPSIS
+.sp
+\fBmac\fP [\fIinput\-file\fP] [\fIoutput\-file\fP] [ [\fB\-c\fP | \fB\-n\fP ] \fIlevel\fP ]
+.sp
+\fBmac\fP [\fIinput\-file\fP] [ \fB\-d\fP | \fB\-v\fP | \fB\-q\fP ]
+.SH DESCRIPTION
+.sp
+Monkey\(aqs Audio (aka APE) is a lossless audio compression format,
+similar to FLAC. mac is a console frontend to Monkey\(aqs Audio, able to
+encode and decode APE audio files.
+.sp
+If you encode a WAV file to APE, then decode it back to WAV, the
+audio in the decoded WAV file will be byte\-for\-byte identical to the
+original (although any extra data such as tags/comments in the RIFF
+header will not be preserved).
+.SH OPTIONS
+.sp
+Note: Only one of the options below can be given, and it must occur
+last on the command line (after the filename(s)). Spaces are not
+allowed between the \fB\-c\fP or \fB\-n\fP option and its \fIlevel\fP argument.
+.INDENT 0.0
+.TP
+.B \fB\-c[level]\fP
+Compress (encode). \fIinput\-file\fP must be a WAV file with 16\-bit samples.
+\fIoutput\-file\fP will be an APE audio file. Higher \fIlevel\fPs result
+in better compression, at the expense of longer encoding time. The
+supported levels are:
+.INDENT 7.0
+.INDENT 3.5
+.INDENT 0.0
+.TP
+.B 1000
+\fI(fast)\fP, usually around 45%\-50% compression ratio.
+.TP
+.B 2000
+\fI(normal)\fP, usually around 40%\-45% compression ratio.
+.TP
+.B 3000
+\fI(high)\fP, only slightly better than 2000 (usually by 1% or so).
+.TP
+.B 4000
+\fI(very high)\fP, probably the point of diminishing returns.
+.TP
+.B 5000
+\fI(insane)\fP, takes around 3x as long as 4000, may not compress any better.
+.UNINDENT
+.UNINDENT
+.UNINDENT
+.TP
+.B \fB\-n[level]\fP
+Convert (recompress). As \fB\-c\fP, but \fBinput\-file\fP must be an APE audio
+file.
+.TP
+.B \fB\-d\fP
+Decompress (decode). \fIinput\-file\fP must be an APE audio file.
+\fIoutput\-file\fP will be a WAV file.
+.TP
+.B \fB\-v\fP
+Verify. \fIinput\-file\fP must be an APE audio file. It will be decoded, and
+any errors will be displayed, but the decoded audio won\(aqt be saved.
+.TP
+.B \fB\-q\fP
+Quick verify. Just checks that \fIinput\-file\fP has a valid APE header.
+.TP
+.B \fB\-\-help\fP
+Show built\-in usage message (same as running \fBmac\fP with no arguments).
+.UNINDENT
+.SH EXAMPLES
+.INDENT 0.0
+.TP
+.B Compress
+mac "Metallica \- One.wav" "Metallica \- One.ape" \-c2000
+.TP
+.B Decompress
+mac "Metallica \- One.ape" "Metallica \- One.wav" \-d
+.TP
+.B Verify
+mac "Metallica \- One.ape" \-v
+.TP
+.B Quick verify
+mac "Metallica \- One.ape" \-q
+.UNINDENT
+.sp
+Note that filenames with spaces and punctuation should be put inside
+quote, as usual.
+.SH NOTES
+.sp
+\fBmac\fP can only handle WAV files with 8\- or 16\-bit samples, not
+e.g. 24\-bit or floating point. If needed, you can convert to 16\-bit
+with a command like:
+.INDENT 0.0
+.INDENT 3.5
+$ sox \-G input.wav \-b16 output.wav
+.UNINDENT
+.UNINDENT
+.sp
+WAV files must have 1 or 2 channels (mono or stereo;
+quad/surround/5.1/etc are not supported). Any sampling rate is
+supported.
+.sp
+\fBffmpeg\fP(1) can decode and convert APE files, though it cannot encode
+to APE.
+.sp
+\fBmplayer\fP(1) and \fBaudacious\fP(1) can play APE files.
+.sp
+\fBfile\fP(1) knows about APE files. Example:
+.INDENT 0.0
+.INDENT 3.5
+$ file test.ape
+.sp
+test.ape: Monkey\(aqs Audio compressed format version 3990 with normal compression, stereo, sample rate 48000
+.UNINDENT
+.UNINDENT
+.SH COPYRIGHT
+.sp
+See the file /usr/doc/mac\-3.99_u4_b5_s7/License.htm for license information.
+.SH AUTHORS
+.sp
+The original Monkey\(aqs Audio Codec was written by Matthew
+T. Ashland. It was ported to Linux by Frank Klemm and SuperMMX, then
+enhanced and bugfixed by Jason Jordan.
+.sp
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+.SH SEE ALSO
+.sp
+\fBffmpeg\fP(1), \fBmplayer\fP(1), \fBaudacious\fP(1), \fBflac\fP(1), \fBshorten\fP(1), \fBsox\fP(1)
+.sp
+The Monkey\(aqs Audio Codec homepage: \fI\%http://www.monkeysaudio.com/\fP
+.\" Generated by docutils manpage writer.
+.
diff --git a/audio/mac/mac.SlackBuild b/audio/mac/mac.SlackBuild
index eb2e3ada5b..9620fd559b 100644
--- a/audio/mac/mac.SlackBuild
+++ b/audio/mac/mac.SlackBuild
@@ -1,15 +1,22 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for mac
# Originally written by Luis Henrique <email removed>
-# Now maintained by B. Watson <yalhcru@gmail.com>
+# Now maintained by B. Watson <urchlay@slackware.uk>
# Original version of this script had no license. Modified version
# licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/
# for details.
+# 20211125 bkw: BUILD=2
+# - add -DSHNTOOL to CXXFLAGS, which enables human-readable
+# error messages (but not shn support).
+# - add README note about 'invalid input file' error.
+# - update README and slack-desc.
+# - add man page.
+
# 20190107 bkw:
# - download URL went away, use netbsd pkgsrc
# - add FORCE_SLACK_CFLAGS option (probably nobody needs it)
@@ -22,10 +29,13 @@
# - get rid of .la file
# - minor script simplification
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=mac
VERSION=${VERSION:-3.99_u4_b5_s7}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,7 +45,11 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
@@ -75,9 +89,24 @@ find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
if [ "${FORCE_SLACK_CFLAGS:-no}" = "yes" ]; then
- sed -i 's,-O3\>,,' configure
+ sed -i 's,-O3\>,,' configure
fi
+patch -p1 < $CWD/gcc6.patch
+
+# This option isn't well explained... it turns on human-readable error
+# messages (without it, you get "Error: 1002", no idea WTF it means),
+# and the -q (quick verify) option. It does *not* make mac able to
+# read/write .shn files... I would never have known any of this from
+# reading the docs, had to read the source.
+SLKCFLAGS+=" -DSHNTOOL"
+
+# Clean up the usage output a little.
+sed -i -e 's,\[EXE\],mac,' \
+ -e 's,mac\.exe,mac,' \
+ -e 's,int filenames,filenames w/spaces,' \
+ src/Console/Console.cpp
+
LDFLAGS="-Wl,-s" \
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -92,15 +121,20 @@ CXXFLAGS="$SLKCFLAGS" \
make all
make install DESTDIR=$PKG
-# pretty sure we don't need this:
+# We don't need this:
rm -f $PKG/usr/lib$LIBDIRSUFFIX/*.la
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a AUTHORS COPYING ChangeLog NEWS README TODO $PKG/usr/doc/$PRGNAM-$VERSION
-cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+# 20211125 bkw: man page by SlackBuild author. I got bored, sorry.
+mkdir -p $PKG/usr/man/man1
+gzip -9c < $CWD/$PRGNAM.1 > $PKG/usr/man/man1/$PRGNAM.1.gz
+
+PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKGDOC
+cp -a AUTHORS src/License.htm ChangeLog* NEWS README TODO $PKGDOC
+cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/audio/mac/mac.info b/audio/mac/mac.info
index e5f02974ed..e0596938c9 100644
--- a/audio/mac/mac.info
+++ b/audio/mac/mac.info
@@ -7,4 +7,4 @@ DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
MAINTAINER="B. Watson"
-EMAIL="yalhcru@gmail.com"
+EMAIL="urchlay@slackware.uk"
diff --git a/audio/mac/mac.rst b/audio/mac/mac.rst
new file mode 100644
index 0000000000..7b664cf477
--- /dev/null
+++ b/audio/mac/mac.rst
@@ -0,0 +1,145 @@
+.. RST source for mac(1) man page. Convert with:
+.. rst2man.py mac.rst > mac.1
+.. rst2man.py comes from the SBo development/docutils package.
+
+.. |version| replace:: 3.99_u4_b5_s7
+.. |date| date::
+
+===
+mac
+===
+
+----------------------------------------
+decode/encode Monkey's Audio codec files
+----------------------------------------
+
+:Manual section: 1
+:Manual group: SlackBuilds.org
+:Date: |date|
+:Version: |version|
+
+SYNOPSIS
+========
+
+**mac** [*input-file*] [*output-file*] [ [**-c** | **-n** ] *level* ]
+
+**mac** [*input-file*] [ **-d** | **-v** | **-q** ]
+
+DESCRIPTION
+===========
+
+Monkey's Audio (aka APE) is a lossless audio compression format,
+similar to FLAC. mac is a console frontend to Monkey's Audio, able to
+encode and decode APE audio files.
+
+If you encode a WAV file to APE, then decode it back to WAV, the
+audio in the decoded WAV file will be byte-for-byte identical to the
+original (although any extra data such as tags/comments in the RIFF
+header will not be preserved).
+
+OPTIONS
+=======
+
+Note: Only one of the options below can be given, and it must occur
+last on the command line (after the filename(s)). Spaces are not
+allowed between the **-c** or **-n** option and its *level* argument.
+
+**-c[level]**
+ Compress (encode). *input-file* must be a WAV file with 16-bit samples.
+ *output-file* will be an APE audio file. Higher *level*\s result
+ in better compression, at the expense of longer encoding time. The
+ supported levels are:
+
+ 1000
+ *(fast)*, usually around 45%-50% compression ratio.
+ 2000
+ *(normal)*, usually around 40%-45% compression ratio.
+ 3000
+ *(high)*, only slightly better than 2000 (usually by 1% or so).
+ 4000
+ *(very high)*, probably the point of diminishing returns.
+ 5000
+ *(insane)*, takes around 3x as long as 4000, may not compress any better.
+
+**-n[level]**
+ Convert (recompress). As **-c**, but **input-file** must be an APE audio
+ file.
+
+**-d**
+ Decompress (decode). *input-file* must be an APE audio file.
+ *output-file* will be a WAV file.
+
+**-v**
+ Verify. *input-file* must be an APE audio file. It will be decoded, and
+ any errors will be displayed, but the decoded audio won't be saved.
+
+**-q**
+ Quick verify. Just checks that *input-file* has a valid APE header.
+
+**--help**
+ Show built-in usage message (same as running **mac** with no arguments).
+
+EXAMPLES
+========
+
+Compress
+ mac "Metallica - One.wav" "Metallica - One.ape" -c2000
+
+Decompress
+ mac "Metallica - One.ape" "Metallica - One.wav" -d
+
+Verify
+ mac "Metallica - One.ape" -v
+
+Quick verify
+ mac "Metallica - One.ape" -q
+
+Note that filenames with spaces and punctuation should be put inside
+quote, as usual.
+
+NOTES
+=====
+
+**mac** can only handle WAV files with 8- or 16-bit samples, not
+e.g. 24-bit or floating point. If needed, you can convert to 16-bit
+with a command like:
+
+ $ sox -G input.wav -b16 output.wav
+
+WAV files must have 1 or 2 channels (mono or stereo;
+quad/surround/5.1/etc are not supported). Any sampling rate is
+supported.
+
+**ffmpeg**\(1) can decode and convert APE files, though it cannot encode
+to APE.
+
+**mplayer**\(1) and **audacious**\(1) can play APE files.
+
+**file**\(1) knows about APE files. Example:
+
+ $ file test.ape
+
+ test.ape: Monkey's Audio compressed format version 3990 with normal compression, stereo, sample rate 48000
+
+COPYRIGHT
+=========
+
+See the file /usr/doc/mac-|version|/License.htm for license information.
+
+AUTHORS
+=======
+
+The original Monkey's Audio Codec was written by Matthew
+T. Ashland. It was ported to Linux by Frank Klemm and SuperMMX, then
+enhanced and bugfixed by Jason Jordan.
+
+This man page written for the SlackBuilds.org project
+by B. Watson, and is licensed under the WTFPL.
+
+SEE ALSO
+========
+
+**ffmpeg**\(1), **mplayer**\(1), **audacious**\(1), **flac**\(1), **shorten**\(1), **sox**\(1)
+
+The Monkey's Audio Codec homepage: http://www.monkeysaudio.com/
+
diff --git a/audio/mac/slack-desc b/audio/mac/slack-desc
index af6506062f..cecbf1546d 100644
--- a/audio/mac/slack-desc
+++ b/audio/mac/slack-desc
@@ -8,9 +8,9 @@
|-----handy-ruler------------------------------------------------------|
mac: mac (Monkey's Audio Linux port)
mac:
-mac: mac is a console frontend to Monkey's Audio, able to encode and
-mac: decode ape audio files.
-mac:
+mac: Monkey's Audio (aka APE) is a lossless audio compression format,
+mac: similar to FLAC. mac is a console frontend to Monkey's Audio, able to
+mac: encode and decode APE audio files.
mac:
mac:
mac: