summaryrefslogtreecommitdiffstats
path: root/multimedia/mpv
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/mpv')
-rw-r--r--multimedia/mpv/README16
-rw-r--r--multimedia/mpv/mpv.SlackBuild58
-rw-r--r--multimedia/mpv/mpv.info10
-rw-r--r--multimedia/mpv/use_older_meson.diff35
4 files changed, 84 insertions, 35 deletions
diff --git a/multimedia/mpv/README b/multimedia/mpv/README
index 155b71674c..56ded2b4c9 100644
--- a/multimedia/mpv/README
+++ b/multimedia/mpv/README
@@ -7,23 +7,33 @@ This SlackBuild provides support for most useful optional features.
Some other optional features may be enabled by having the relevant
packages installed; they will be autodetected at build time.
These include:
- jack, libuchardet, oss, rubberband, cudatoolkit, and nv-codec-headers
+ jack, libuchardet, oss, rubberband, cudatoolkit, nv-codec-headers
Please note that CUDA based hardware acceleration requires mpv to be
built with both the cudatoolkit and nv-codec-headers packages installed.
+Since Pipewire is not configured as the default in Slackware,
+its use is disabled in this SlackBuild. To enable Pipewire, run the
+SlackBuild with the USE_PIPEWIRE environment variable set e.g.
+ USE_PIPEWIRE=yes sh mpv.SlackBuild
+
Most dependencies are autodetected. Some optional dependencies are
disabled by default and may be enabled via the BUILD_OPTS environment
variable. Optional dependencies that are enabled by default may be
disabled in the same way.
-For example, to enable support for Samba and SDL2 (both disabled
+For example, to enable support for OpenAL and SDL2 (both disabled
by default) as well as to disable javascript support (normally
autodetected), you could run:
-BUILD_OPTS="--enable-libsmbclient --enable-sdl2 --disable-javascript" \
+BUILD_OPTS="-Dopenal=enabled -Dsdl2=enabled -Djavascript=disabled" \
sh mpv.SlackBuild
Runtime support for youtube videos requires installation of youtube-dl
(available from SBo) to be installed. Watch with something like:
mpv https://www.youtube.com/watch?v=mAFMJ1LnQu8
+
+To enable building with meson/ninja (recommended since waf build is
+to be deprecated), a patch is required to enable use of Slackware 15's
+older version of meson. Unfortunately this disables the ability to
+process configuration/building on Raspberry Pi.
diff --git a/multimedia/mpv/mpv.SlackBuild b/multimedia/mpv/mpv.SlackBuild
index 2244b1dca2..028f18343b 100644
--- a/multimedia/mpv/mpv.SlackBuild
+++ b/multimedia/mpv/mpv.SlackBuild
@@ -4,7 +4,7 @@
# Copyright 2015 John Vogel Corning, NY USA
# Copyright 2017,2018 (versions 0.25.0-0.29.1) Andreas Guldstrand
-# Copyright 2020-2022 Christoph Willing Brisbane Australia
+# Copyright 2020-2023 Christoph Willing Brisbane Australia
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -27,8 +27,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=mpv
-VERSION=${VERSION:-0.34.1}
-WAF_VERSION=${WAF_VERSION:-2.0.20}
+VERSION=${VERSION:-0.37.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -41,9 +40,6 @@ if [ -z "$ARCH" ]; then
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
@@ -53,8 +49,6 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-# The SLKFLAGS aren't currently used. They do no harm and can
-# be left as a placeholder in case they are ever needed.
if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
@@ -77,9 +71,13 @@ cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
-cp $CWD/waf-$WAF_VERSION ./waf
-sed -i -e 's/python$/python3/' waf
-chmod +x waf
+
+# Needed for 15.0's older meson but disables RPI
+if [ "$(meson --version)" = "0.59.4" ]; then
+ echo "Using meson-0.59.4 for 15.0"
+ patch -p0 < $CWD/use_older_meson.diff
+fi
+
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -90,28 +88,34 @@ find -L . \
DOCS="Copyright LICENSE.GPL LICENSE.LGPL README.md RELEASE_NOTES VERSION"
MANUAL="DOCS/*.md DOCS/*.rst DOCS/*.txt"
+pipewire="-Dpipewire=disabled" ; [ "${USE_PIPEWIRE:-no}" != "no" ] && pipewire="-Dpipewire=auto"
+
# This leaves an opening for additional build options.
+# See `meson configure` to see what's available.
BUILD_OPTS=${BUILD_OPTS:-""}
-PKG_CONFIG_PATH="/usr/lib${LIBDIRSUFFIX}/ffmpeg4/pkgconfig"
-export PKG_CONFIG_PATH
+PYVER=$(python3 -c 'import sys; print("%d.%d" % sys.version_info[:2])')
+export PYTHONPATH=/opt/python$PYVER/site-packages/
-# Setting CFLAGS and CXXFLAGS breaks configure.
-./waf configure \
+CFLAGS="$SLKCFLAGS -ldl" \
+CXXFLAGS="$SLKCFLAGS" \
+meson \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --confdir=/etc/$PRGNAM \
+ --sysconfdir=/etc \
--mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --enable-libmpv-shared \
- --enable-html-build \
- --enable-dvdnav \
- --enable-cdda \
- --enable-dvbin \
- $BUILD_OPTS
-
-./waf build
-./waf --destdir=$PKG install
+ -Dbuildtype=release \
+ -Dmanpage-build=enabled \
+ -Dlibmpv=true \
+ -Dhtml-build=enabled \
+ -Dcdda=enabled \
+ -Ddvdnav=enabled \
+ -Ddvbin=enabled \
+ $pipewire \
+ $BUILD_OPTS \
+ . build
+
+DESTDIR=$PKG ${NINJA:=ninja} -C build -v install
for f in $PKG/etc/mpv/*.conf ; do
mv $f{,.new}
@@ -134,6 +138,8 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/manual
for f in $MANUAL; do
cp -a $f $PKG/usr/doc/$PRGNAM-$VERSION/manual/
done
+cp -a $PKG/usr/share/doc/$PRGNAM/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share/doc
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
diff --git a/multimedia/mpv/mpv.info b/multimedia/mpv/mpv.info
index 9f7767568e..4536eda712 100644
--- a/multimedia/mpv/mpv.info
+++ b/multimedia/mpv/mpv.info
@@ -1,12 +1,10 @@
PRGNAM="mpv"
-VERSION="0.34.1"
+VERSION="0.37.0"
HOMEPAGE="https://mpv.io/"
-DOWNLOAD="https://github.com/mpv-player/mpv/archive/v0.34.1/mpv-0.34.1.tar.gz \
- https://waf.io/waf-2.0.20"
-MD5SUM="b5c76f9a7ce3a19a445869ffd9871d12 \
- eb0cd320fc8838971cfa735ad78f6de8"
+DOWNLOAD="https://github.com/mpv-player/mpv/archive/v0.37.0/mpv-0.37.0.tar.gz"
+MD5SUM="54bd6864cc831f1fee6dee693a0421eb"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
-REQUIRES="libass libplacebo lua mujs"
+REQUIRES="libass libplacebo luajit mujs"
MAINTAINER="Christoph Willing"
EMAIL="chris.willing@linux.com"
diff --git a/multimedia/mpv/use_older_meson.diff b/multimedia/mpv/use_older_meson.diff
new file mode 100644
index 0000000000..856b72ee55
--- /dev/null
+++ b/multimedia/mpv/use_older_meson.diff
@@ -0,0 +1,35 @@
+--- meson.build.orig 2023-07-24 03:10:36.000000000 +1000
++++ meson.build 2023-07-24 11:13:30.945000000 +1000
+@@ -2,7 +2,7 @@
+ 'c',
+ license: ['GPL2+', 'LGPL2.1+'],
+ version: files('./VERSION'),
+- meson_version: '>=0.62.0',
++ meson_version: '>=0.59.4',
+ default_options: [
+ 'buildtype=debugoptimized',
+ 'b_lundef=false',
+@@ -1222,8 +1222,9 @@
+ features += {'gl': true}
+ endif
+
+-rpi = dependency('/opt/vc/lib/pkgconfig/brcmegl.pc', 'brcmegl', required: get_option('rpi'))
+-features += {'rpi': gl_allowed and rpi.found()}
++#rpi = dependency('/opt/vc/lib/pkgconfig/brcmegl.pc', 'brcmegl', required: get_option('rpi'))
++#features += {'rpi': gl_allowed and rpi.found()}
++features += {'rpi': false}
+ if features['rpi']
+ dependencies += rpi
+ features += {'gl': true}
+@@ -1386,8 +1387,9 @@
+ features['rpi'],
+ error_message: 'rpi was not found!',
+ )
+-rpi_mmal = dependency('/opt/vc/lib/pkgconfig/mmal.pc', 'mmal', required: rpi_mmal_opt)
+-features += {'rpi-mmal': rpi_mmal.found()}
++#rpi_mmal = dependency('/opt/vc/lib/pkgconfig/mmal.pc', 'mmal', required: rpi_mmal_opt)
++#features += {'rpi-mmal': rpi_mmal.found()}
++features += {'rpi-mmal': false}
+ if features['rpi-mmal']
+ dependencies += rpi_mmal
+ sources += files('video/out/opengl/hwdec_rpi.c',