summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authorJohn Vogel <jvogel4@stny.rr.com>2014-11-04 22:29:44 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-11-08 06:30:07 +0700
commit25c648458dbfdcef851d169f17110f5b0f26aff9 (patch)
tree5310b30e39798388071e8907747ee1d04bb9eba3 /multimedia
parentd258335d875ebc9a81c080df2df4290c67895286 (diff)
downloadslackbuilds-25c648458dbfdcef851d169f17110f5b0f26aff9.tar.gz
multimedia/mpv: Added (MPlayer fork).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/mpv/README38
-rw-r--r--multimedia/mpv/doinst.sh37
-rw-r--r--multimedia/mpv/mpv.SlackBuild126
-rw-r--r--multimedia/mpv/mpv.info12
-rw-r--r--multimedia/mpv/slack-desc19
5 files changed, 232 insertions, 0 deletions
diff --git a/multimedia/mpv/README b/multimedia/mpv/README
new file mode 100644
index 0000000000..36bfb45d7f
--- /dev/null
+++ b/multimedia/mpv/README
@@ -0,0 +1,38 @@
+mpv
+===
+
+mpv is a movie player based on MPlayer and mplayer2. It shares some features
+with the former projects while introducing many more. It supports a wide
+variety of video file formats, audio and video codecs, and subtitle types.
+
+mpv homepage: http://mpv.io/
+
+optional: lua, libquvi, lirc, libbluray, libdvdnav, enca, ladspa_sdk,
+ SDL2, jack-audio-connection-kit, pulseaudio, OpenAL, wayland, vdpau,
+ oss, libbs2b, portaudio
+
+Dependancies are autodetected. Some optional dependencies are disabled by
+default and may be enabled (see BUILD_OPTS). Optional dependancies that are
+enabled by default may be disabled (see BUILD_OPTS).
+
+NUMJOBS:
+The default number of jobs to be run during the build process is set to 1;
+To override, set NUMJOBS to your preference prior to or at build time. If
+you run into suspected bugs with mpv, I recommend first building and installing
+mpv with NUMJOBS set to the default of 1.
+
+BUILD_OPTS:
+To override the default for build options, set the shell variable BUILD_OPTS
+prior to or at build time. For example, to enable cdda and openal, which are
+disabled by default, you could use the following:
+
+~# BUILD_OPTS="--enable-cdda --enable-openal" ./mpv.SlackBuild
+
+or, if you use fakeroot to build packages:
+
+~$ fakeroot env BUILD_OPTS="--enable-cdda --enable-openal" ./mpv.SlackBuild
+
+The following list is meant as a note to myself of build options or optional
+dependencies currently unavailable via full Slackware installation and from SBo:
+
+libfdk-aac, vapoursynth, libguess, libiconv, rsound
diff --git a/multimedia/mpv/doinst.sh b/multimedia/mpv/doinst.sh
new file mode 100644
index 0000000000..893bd911b3
--- /dev/null
+++ b/multimedia/mpv/doinst.sh
@@ -0,0 +1,37 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+preserve_perms() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ if [ -e $OLD ]; then
+ cp -a $OLD ${NEW}.incoming
+ cat $NEW > ${NEW}.incoming
+ mv ${NEW}.incoming $NEW
+ fi
+ config $NEW
+}
+
+for f in etc/mpv/*.conf.new ; do
+ preserve_perms $f
+done
+
+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 usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/multimedia/mpv/mpv.SlackBuild b/multimedia/mpv/mpv.SlackBuild
new file mode 100644
index 0000000000..bfd4b15b02
--- /dev/null
+++ b/multimedia/mpv/mpv.SlackBuild
@@ -0,0 +1,126 @@
+#!/bin/sh
+
+# Slackware build script for mpv
+
+# Copyright 2014 John Vogel Corning, NY USA
+# 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.
+
+PRGNAM=mpv
+VERSION=${VERSION:-0.6.2}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+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}
+
+# 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" = "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 $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || tar xvf $CWD/v$VERSION.tar.gz
+cp $CWD/waf-1.7.16 $PRGNAM-$VERSION/waf
+chmod +x $PRGNAM-$VERSION/waf
+cd $PRGNAM-$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 {} \;
+
+DOCS="Copyright LICENSE README.md RELEASE_NOTES"
+MANUAL="DOCS/*.md DOCS/*.rst DOCS/*.txt DOCS/client_api_examples/"
+
+# By default, play it safe since it is so easy to override.
+NUMJOBS=${NUMJOBS:-1}
+
+# This leaves an opening for build options.
+BUILD_OPTS=${BUILD_OPTS:-""}
+BUILD_OPTS="$BUILD_OPTS --jobs=$NUMJOBS"
+
+# Setting CFLAGS and CXXFLAGS breaks configure.
+./waf configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --confdir=/etc/$PRGNAM \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ $BUILD_OPTS
+
+./waf --jobs=$NUMJOBS build
+./waf --destdir=$PKG install
+
+for f in $PKG/etc/mpv/*.conf ; do
+ mv $f{,.new}
+done
+
+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
+
+if [ -d $PKG/usr/man ]; then
+ find $PKG/usr/man -type f -exec gzip -9 {} \;
+ for i in $( find $PKG/usr/man -type l ) ; do
+ ln -s $( readlink $i ).gz $i.gz
+ rm $i
+ done
+fi
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/manual
+for f in $MANUAL; do
+ cp -a $f $PKG/usr/doc/$PRGNAM-$VERSION/manual/
+done
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+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:-tgz}
diff --git a/multimedia/mpv/mpv.info b/multimedia/mpv/mpv.info
new file mode 100644
index 0000000000..ded47cae34
--- /dev/null
+++ b/multimedia/mpv/mpv.info
@@ -0,0 +1,12 @@
+PRGNAM="mpv"
+VERSION="0.6.2"
+HOMEPAGE="http://mpv.io"
+DOWNLOAD="https://github.com/mpv-player/mpv/archive/v0.6.2.tar.gz
+ http://ftp.waf.io/pub/release/waf-1.7.16"
+MD5SUM="d0e25a26b6143b5e7d4ba354dd52f1b3
+ c6011db1d5df113a9cff2cb7068a5a16"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="ffmpeg libass docutils"
+MAINTAINER="John Vogel"
+EMAIL="jvogel4@stny.rr.com"
diff --git a/multimedia/mpv/slack-desc b/multimedia/mpv/slack-desc
new file mode 100644
index 0000000000..d790279bb3
--- /dev/null
+++ b/multimedia/mpv/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------------------------------------------------------|
+mpv: mpv (a movie player based on MPlayer and mplayer2)
+mpv:
+mpv: mpv is a fork of mplayer2 and MPlayer. It shares some features with
+mpv: the former projects while introducing many more. It supports a wide
+mpv: variety of video file formats, audio and video codecs, and subtitle
+mpv: types.
+mpv:
+mpv:
+mpv:
+mpv: mpv homepage: http://mpv.io/
+mpv: