summaryrefslogtreecommitdiff
path: root/audio/mkcue
diff options
context:
space:
mode:
Diffstat (limited to 'audio/mkcue')
-rw-r--r--audio/mkcue/README5
-rw-r--r--audio/mkcue/fix_msf_offset.diff46
-rw-r--r--audio/mkcue/mkcue.SlackBuild97
-rw-r--r--audio/mkcue/mkcue.info10
-rw-r--r--audio/mkcue/slack-desc19
5 files changed, 177 insertions, 0 deletions
diff --git a/audio/mkcue/README b/audio/mkcue/README
new file mode 100644
index 0000000000..5a3a118ccb
--- /dev/null
+++ b/audio/mkcue/README
@@ -0,0 +1,5 @@
+mkcue generates cue sheets from a CD TOC (Table Of Contents). Cue
+sheets describe how the tracks of a CD are laid out.
+
+abcde uses mkcue when ripping a multi-track audio CD to a single
+audio file and a cue sheet.
diff --git a/audio/mkcue/fix_msf_offset.diff b/audio/mkcue/fix_msf_offset.diff
new file mode 100644
index 0000000000..ccebb70b02
--- /dev/null
+++ b/audio/mkcue/fix_msf_offset.diff
@@ -0,0 +1,46 @@
+Description: Don't assume MSF offset is always 150 (#439790)
+Author: Martin Michlmayr <tbm@cyrius.com>
+Last-Update: 2007-10-21
+Index: mkcue-1/mkcue.cc
+===================================================================
+--- mkcue-1.orig/mkcue.cc 2004-10-27 07:20:30.000000000 +0100
++++ mkcue-1/mkcue.cc 2012-11-10 13:34:34.986131069 +0000
+@@ -12,6 +12,9 @@
+
+ #include "diskid.h"
+
++/* http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=439790 */
++#define MSF_OFFSET 150
++
+ void
+ DiskId::ReportError(char *err)
+ {
+@@ -54,16 +57,12 @@
+ }
+
+ puts("FILE \"dummy.wav\" WAVE");
+- puts(" TRACK 01 AUDIO");
+- puts(" INDEX 01 00:00:00");
+
+ #define min(x, y) ((x) < (y) ? (x) : (y))
+- for (track = cdinfo.FirstTrack + 1;
++ for (track = cdinfo.FirstTrack;
+ track <= min(trackcount, cdinfo.LastTrack);
+ track++) {
+- /* There is frequently (always?) an offset of 150 sectors, so
+- * subtract the first track's offset. */
+- cdinfo.FrameOffset[track] -= cdinfo.FrameOffset[1];
++ cdinfo.FrameOffset[track] -= MSF_OFFSET;
+
+ minutes = seconds = sectors = 0;
+ sectors = cdinfo.FrameOffset[track] % 75;
+@@ -76,6 +75,9 @@
+ }
+
+ printf(" TRACK %02d AUDIO\n", track);
++ if (track == 1 && cdinfo.FrameOffset[track] > 0) {
++ printf(" INDEX 00 00:00:00\n");
++ }
+ printf(" INDEX 01 %02d:%02d:%02d\n", minutes, seconds, sectors);
+ }
+
diff --git a/audio/mkcue/mkcue.SlackBuild b/audio/mkcue/mkcue.SlackBuild
new file mode 100644
index 0000000000..c8422c8756
--- /dev/null
+++ b/audio/mkcue/mkcue.SlackBuild
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# Slackware build script for mkcue
+
+# Copyright 2016 Andreas Voegele <andreas@andreasvoegele.com>
+#
+# Permission to use, copy, modify, and distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+PRGNAM=mkcue
+VERSION=${VERSION:-1.4}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+SRCNAM=$PRGNAM-1.orig
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $SRCNAM
+tar xvf $CWD/$( echo $SRCNAM | tr - _ ).tar.gz
+cd $SRCNAM
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+patch -p1 < $CWD/fix_msf_offset.diff
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
+
+make
+mkdir -p $PKG/usr/bin
+install -m 755 mkcue $PKG/usr/bin/mkcue
+
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
+ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a \
+ AUTHORS COPYING README \
+ $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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}
diff --git a/audio/mkcue/mkcue.info b/audio/mkcue/mkcue.info
new file mode 100644
index 0000000000..baeb1f5cda
--- /dev/null
+++ b/audio/mkcue/mkcue.info
@@ -0,0 +1,10 @@
+PRGNAM="mkcue"
+VERSION="1.4"
+HOMEPAGE="https://packages.debian.org/sid/mkcue"
+DOWNLOAD="http://httpredir.debian.org/debian/pool/main/m/mkcue/mkcue_1.orig.tar.gz"
+MD5SUM="de082e40baf042e23246d54d28cbcdcc"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="Andreas Voegele"
+EMAIL="andreas@andreasvoegele.com"
diff --git a/audio/mkcue/slack-desc b/audio/mkcue/slack-desc
new file mode 100644
index 0000000000..171e4d520f
--- /dev/null
+++ b/audio/mkcue/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+mkcue: mkcue (generates cue sheets from a CD TOC)
+mkcue:
+mkcue: mkcue generates cue sheets from a CD TOC (Table Of Contents). Cue
+mkcue: sheets describe how the tracks of a CD are laid out.
+mkcue:
+mkcue: abcde uses mkcue when ripping a multi-track audio CD to a single
+mkcue: audio file and a cue sheet.
+mkcue:
+mkcue:
+mkcue:
+mkcue: