aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2026-09-19 02:03:08 +0200
committerEugen Wissner <belka@caraus.de>2026-09-19 02:03:08 +0200
commit5c38e70dc7cb3343b899cd825bc2936521ce460d (patch)
tree516a06d81abd218d4ba8831a9980cc6c47b29fc8
parent5e1997e0d13fa14c3c0d552ba6fd64c9afb5522a (diff)
downloadslackbuilds-master.tar.gz
makemkv: Patched and addedHEADmaster
-rw-r--r--makemkv/README22
-rw-r--r--makemkv/doinst.sh9
-rw-r--r--makemkv/ffmpeg.patch149
-rw-r--r--makemkv/makemkv.SlackBuild154
-rw-r--r--makemkv/makemkv.info12
-rw-r--r--makemkv/slack-desc19
6 files changed, 365 insertions, 0 deletions
diff --git a/makemkv/README b/makemkv/README
new file mode 100644
index 0000000..098599e
--- /dev/null
+++ b/makemkv/README
@@ -0,0 +1,22 @@
+MakeMKV converts video that you own into a free and patents-
+unencumbered format that can be played everywhere. It converts the
+video clips from proprietary (and usually encrypted) discs into a set
+of MKV files, preserving most information but not changing it in any
+way. MakeMKV can also instantly stream decrypted video without
+intermediate conversion to a wide range of players, so you may watch
+Blu-ray and DVD discs with your favorite player on your favorite OS
+or on your favorite device.
+
+This package can optionally spoof libaacs and libbdplus, decrypting
+discs through MakeMKV instead. To enable this, pass FAKELIBS=yes
+to the script. Installing such a package will override existing
+libaacs and libbdplus libraries; if you choose to spoof them, the
+real libraries should not be installed.
+
+Note that recent versions of MakeMKV may require loading the 'sg' kernel
+module to properly detect your optical drive. You may wish to add the
+following line to /etc/rc.d/rc.modules.local:
+
+ /sbin/modprobe sg
+
+See README.issues for further discussion of MakeMKV.
diff --git a/makemkv/doinst.sh b/makemkv/doinst.sh
new file mode 100644
index 0000000..65c7e2e
--- /dev/null
+++ b/makemkv/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache -f usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/makemkv/ffmpeg.patch b/makemkv/ffmpeg.patch
new file mode 100644
index 0000000..3bc9f91
--- /dev/null
+++ b/makemkv/ffmpeg.patch
@@ -0,0 +1,149 @@
+--- a/libffabi/src/ffabi.c 2024-05-14 18:23:17.000000000 +0200
++++ b/libffabi/src/ffabi.c 2026-09-19 00:02:11.395239310 +0200
+@@ -33,6 +33,33 @@
+ static ffm_realloc_t proc_realloc = NULL;
+ static ffm_free_t proc_free = NULL;
+
++static const AVChannelLayout *ffabi_get_ch_layouts(const AVCodec *codec)
++{
++ const AVChannelLayout *ch_layouts = NULL;
++ int nb = 0;
++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_CHANNEL_LAYOUT, 0,
++ (const void **)&ch_layouts, &nb);
++ return ch_layouts;
++}
++
++static const int *ffabi_get_supported_samplerates(const AVCodec *codec)
++{
++ const int *rates = NULL;
++ int nb = 0;
++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_RATE, 0,
++ (const void **)&rates, &nb);
++ return rates;
++}
++
++static const enum AVSampleFormat *ffabi_get_sample_fmts(const AVCodec *codec)
++{
++ const enum AVSampleFormat *fmts = NULL;
++ int nb = 0;
++ avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0,
++ (const void **)&fmts, &nb);
++ return fmts;
++}
++
+ void *ffabi_memalign(size_t align, size_t size)
+ {
+ return (*proc_memalign)(align,size);
+@@ -211,8 +238,7 @@
+ av_packet_free(&ctx->pck);
+
+ if (ctx->avctx) {
+- avcodec_close(ctx->avctx);
+- av_free(ctx->avctx);
++ avcodec_free_context(&(ctx->avctx));
+ }
+
+ av_free(ctx);
+@@ -374,7 +400,7 @@
+ #endif
+
+ ctx->avctx->profile = (info->profile != FFM_PROFILE_UNKNOWN) ?
+- info->profile : FF_PROFILE_UNKNOWN;
++ info->profile : AV_PROFILE_UNKNOWN;
+
+ if ((CodecFlags&FFM_CODEC_FLAG_GLOBAL_HEADER)!=0)
+ ctx->avctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
+@@ -420,8 +446,7 @@
+ av_freep(&ctx->frame_extended_data);
+
+ if (ctx->avctx) {
+- avcodec_close(ctx->avctx);
+- av_free(ctx->avctx);
++ avcodec_free_context(&(ctx->avctx));
+ }
+
+ av_free(ctx);
+@@ -537,12 +562,13 @@
+ unsigned int count_ch_layouts_out = 0;
+ uint64_t* channel_layouts;
+ unsigned int i;
++ const AVChannelLayout* ch_layouts = ffabi_get_ch_layouts(codec);
+
+ len = strlen(codec->name);
+ if (len >= FFM_CODEC_INFO_NAME_MAX_LENGTH) return -1;
+
+- if (NULL != codec->ch_layouts) {
+- while (0 != codec->ch_layouts[count_ch_layouts_in].nb_channels)
++ if (NULL != ch_layouts) {
++ while (0 != ch_layouts[count_ch_layouts_in].nb_channels)
+ {
+ count_ch_layouts_in++;
+ }
+@@ -560,8 +586,8 @@
+
+ for (i = 0; i < count_ch_layouts_in; i++)
+ {
+- if (AV_CHANNEL_ORDER_NATIVE != codec->ch_layouts[i].order) continue;
+- channel_layouts[count_ch_layouts_out++] = codec->ch_layouts[i].u.mask;
++ if (AV_CHANNEL_ORDER_NATIVE != ch_layouts[i].order) continue;
++ channel_layouts[count_ch_layouts_out++] = ch_layouts[i].u.mask;
+ }
+ channel_layouts[count_ch_layouts_out] = 0;
+
+@@ -573,6 +599,8 @@
+ {
+ AVCodec* codec;
+ int i;
++ const AVChannelLayout* ch_layouts;
++ const enum AVSampleFormat* sample_fmts;
+
+ memset(info, 0, sizeof(*info));
+
+@@ -588,11 +616,11 @@
+
+ info->name = codec->name;
+ info->long_name = codec->long_name;
+- info->sample_rates = codec->supported_samplerates;
++ info->sample_rates = ffabi_get_supported_samplerates(codec);
+ #ifdef FFABI_HAVE_OLD_CHANNEL_LAYOUT
+ info->channel_layouts = codec->channel_layouts;
+ #else
+- if (NULL == codec->ch_layouts) {
++ if (NULL == ch_layouts) {
+ info->channel_layouts = NULL;
+ } else {
+ if (set_codec_info_extended(info, codec)) {
+@@ -604,18 +632,19 @@
+ info->capabilities = codec->capabilities;
+ if (codec->profiles) {
+ for (i=0;i<32;i++) {
+- if (codec->profiles[i].profile==FF_PROFILE_UNKNOWN)
++ if (codec->profiles[i].profile==AV_PROFILE_UNKNOWN)
+ break;
+ info->profiles_names[i]=codec->profiles[i].name;
+ info->profiles_values[i]=codec->profiles[i].profile;
+ info->profiles_count = i+1;
+ }
+ }
+- if (codec->sample_fmts) {
++ sample_fmts = ffabi_get_sample_fmts(codec);
++ if (sample_fmts) {
+ for (i=0;i<16;i++) {
+- if (codec->sample_fmts[i]==AV_SAMPLE_FMT_NONE)
++ if (sample_fmts[i]==AV_SAMPLE_FMT_NONE)
+ break;
+- info->sample_formats[i]=(uint8_t)back_translate_sample_fmt(codec->sample_fmts[i]);
++ info->sample_formats[i]=(uint8_t)back_translate_sample_fmt(sample_fmts[i]);
+ info->sample_formats_count = i+1;
+ }
+ }
+@@ -695,8 +724,7 @@
+ }
+
+ if (avctx) {
+- avcodec_close(avctx);
+- av_free(avctx);
++ avcodec_free_context(&avctx);
+ }
+ return err;
+ }
diff --git a/makemkv/makemkv.SlackBuild b/makemkv/makemkv.SlackBuild
new file mode 100644
index 0000000..e3d91d1
--- /dev/null
+++ b/makemkv/makemkv.SlackBuild
@@ -0,0 +1,154 @@
+#!/bin/bash
+
+# Slackware build script for MakeMKV
+
+# Copyright 2019 T3slider <t3slider@gmail.com>
+# Copyright 2023 Matt Dinslage <matthhewdinslage@gmail.com>
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+cd $(dirname $0) ; CWD=$(pwd)
+
+PRGNAM=makemkv
+VERSION=${VERSION:-1.17.7}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+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}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ ARCHDIR=i386
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ ARCHDIR=i386
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ # -fPIC was causing segfaults...
+ SLKCFLAGS="-O2"
+ ARCHDIR=amd64
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ ARCHDIR=i386
+ LIBDIRSUFFIX=""
+fi
+
+# Note: MakeMKV now includes a mips32 binary, but since there is no official
+# MIPS Slackware port I'm ignoring it unless someone complains. Still no ARM
+# version.
+
+# Spoof libaacs and libbdplus? (This will override real libaacs.so.0 and
+# libbdplus.so.0 upon package installation if they are present! If you want
+# to spoof this, you should ensure those packages are not installed!)
+FAKELIBS=${FAKELIBS:-no}
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+# Build the open source component first...
+rm -rf ${PRGNAM}-oss-${VERSION}
+tar xvf $CWD/${PRGNAM}-oss-${VERSION}.tar.gz
+cd ${PRGNAM}-oss-${VERSION}
+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 -i $CWD/ffmpeg.patch
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a License.txt $PKG/usr/doc/$PRGNAM-$VERSION
+
+# Now extract/copy the closed source component...
+cd $TMP
+rm -rf ${PRGNAM}-bin-${VERSION}
+tar xvf $CWD/${PRGNAM}-bin-${VERSION}.tar.gz
+cd ${PRGNAM}-bin-${VERSION}
+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 {} \;
+
+# The makefile now supports DESTDIR so it's easier to use it. This is just
+# removing the mandatory interactive EULA agreement which might confuse
+# SlackBuild users (check the README which tells you to read the EULA anyway...)
+sed -i "s/^\(install:\).*/\1/" Makefile
+
+# We will not leave CPU detection up to the makefile here just in case...
+make install ARCH=$ARCHDIR ARCH_OK=1 DESTDIR=$PKG
+
+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
+
+cp -a src/eula_en_linux.txt $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+if [ "$FAKELIBS" != "no" ]; then
+ cd $PKG/usr/lib${LIBDIRSUFFIX}
+ ln -s libmmbd.so.0 libaacs.so.0
+ ln -s libmmbd.so.0 libbdplus.so.0
+fi
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/makemkv/makemkv.info b/makemkv/makemkv.info
new file mode 100644
index 0000000..30526b8
--- /dev/null
+++ b/makemkv/makemkv.info
@@ -0,0 +1,12 @@
+PRGNAM="makemkv"
+VERSION="1.17.7"
+HOMEPAGE="http://www.makemkv.com/"
+DOWNLOAD="https://mirrors.caraus.tech/hosted-sources/makemkv/makemkv-oss-1.17.7.tar.gz \
+ https://mirrors.caraus.tech/hosted-sources/makemkv/makemkv-bin-1.17.7.tar.gz"
+MD5SUM="7c2d3135545604bc4f4bcdb5acf664ac \
+ e021bbe79198682754db4f20c251012e"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="M.Dinslage"
+EMAIL="matthewdinslage@gmail.com"
diff --git a/makemkv/slack-desc b/makemkv/slack-desc
new file mode 100644
index 0000000..06d3f7d
--- /dev/null
+++ b/makemkv/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------------------------------------------------------|
+makemkv: makemkv (a DVD/Blu-ray ripper and transcoder)
+makemkv:
+makemkv: MakeMKV converts video that you own into a free and patents-
+makemkv: unencumbered format that can be played everywhere. It converts the
+makemkv: video clips from proprietary (and usually encrypted) discs into a set
+makemkv: of MKV files, preserving most information but not changing it in any
+makemkv: way. MakeMKV can also instantly stream decrypted video without
+makemkv: intermediate conversion to a wide range of players, so you may watch
+makemkv: Blu-ray and DVD discs with your favorite player on your favorite OS
+makemkv: or on your favorite device.
+makemkv: http://makemkv.com/