summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2011-06-24 10:45:11 +0000
committer Eric Hameleers <alien@slackware.com>2011-06-24 10:45:11 +0000
commit92bf351af162c041bc3fe023ecc7bf4c5eccd610 (patch)
treeead633167a3fbc01acf821efd250a80747643783
parent155749f0fdb7d7fb9844bc074cf2a5cb657f05f5 (diff)
downloadasb-92bf351af162c041bc3fe023ecc7bf4c5eccd610.tar.gz
asb-92bf351af162c041bc3fe023ecc7bf4c5eccd610.tar.xz
Try to build an up to date MPlayer snapshot
-rwxr-xr-xMPlayer/build/MPlayer.SlackBuild94
1 files changed, 70 insertions, 24 deletions
diff --git a/MPlayer/build/MPlayer.SlackBuild b/MPlayer/build/MPlayer.SlackBuild
index f0096e70..f4c25ae9 100755
--- a/MPlayer/build/MPlayer.SlackBuild
+++ b/MPlayer/build/MPlayer.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2006,2007,2008,2010 Eric Hameleers, Eindhoven, NL
+# Copyright 2006, 2007, 2008, 2010, 2011 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -71,6 +71,10 @@
# * Slackware has MPlayer now of course, but it does not hurt
# to have a full-featured binary package available. The 1.0rc3
# was released recently but I prefer to build a snapshot.
+# 20110624-1: 24/jun/2011 by Eric Hameleers <alien@slackware.com>
+# * Provide an up-to-date snapshot to be used in conjunction
+# with UMPlayer (a MPlayer GUI). New MPlayer source requires
+# a separate ffmpeg download.
#
# Run 'sh MPlayer.SlackBuild' to build a Slackware package.
# The package (.tgz) plus descriptive .txt file are created in /tmp .
@@ -81,7 +85,7 @@
# Set initial variables:
PRGNAM=MPlayer
-VERSION=${VERSION:-20100926}
+VERSION=${VERSION:-20110624}
BUILD=${BUILD:-1}
TAG=${TAG:-alien}
@@ -171,6 +175,10 @@ SRCURL[0]=""
SOURCE[1]="$SRCDIR/${DEFSKIN}-${SKINVER}.tar.bz2"
SRCURL[1]="http://www.mplayerhq.hu/MPlayer/skins/${DEFSKIN}-${SKINVER}.tar.bz2"
+# Ffmpeg needs to be checked out separately now:
+SOURCE[2]="$SRCDIR/ffmpeg-${VERSION}.tar.bz2"
+SRCURL[2]=""
+
# Use the src_checkout() function if no downloadable tarball exists.
# This function checks out sources from SVN/CVS and creates a tarball of them.
src_checkout() {
@@ -188,7 +196,7 @@ src_checkout() {
case ${1} in
0) # mplayer
if [ "$(echo ${VERSION}|cut -c1)" == 'r' ]; then # revision instead of date
- REV=$(echo ${VERSION} | cut -c2-)
+ echo "Only supported VERSION is a date - yyyymmdd - or 'HEAD'"
else
REV="{${VERSION}}"
fi
@@ -203,6 +211,29 @@ src_checkout() {
&& tar -${TARCOMP}cf ${2} MPlayer-${VERSION}
rm -rf MPlayer-${VERSION}
;;
+ 2) # ffmpeg-${VERSION}
+ GITURI=git://git.videolan.org/ffmpeg.git
+ mkdir ffmpeg_temp_checkout_$$ \
+ && cd ffmpeg_temp_checkout_$$
+ if [ "$VERSION" = "HEAD" ]; then
+ # Checkout without downloading version history (fast!):
+ echo "Checking out HEAD from '$GITURI':"
+ git clone --depth=1 ${GITURI} ffmpeg
+ else
+ # Checkout code from a certain branch and/or date; this will take a
+ # long time because we have to clone the complete git-repository first:
+ echo "Checking out $BRANCH at date $VERSION from '$GITURI':"
+ git clone ${GITURI} ffmpeg \
+ && cd ffmpeg \
+ && git checkout $BRANCH \
+ && git checkout $(git rev-list -n 1 --before="`date -d $VERSION`" $BRANCH) \
+ && cd ..
+ fi
+ chown -R root:root . \
+ && tar --exclude .git -${TARCOMP}cf ${2} ffmpeg
+ cd ..
+ rm -rf ffmpeg_temp_checkout_$$
+ ;;
*) # Do nothing
;;
esac
@@ -288,7 +319,9 @@ fi
cd $TMP/tmp-$PRGNAM
echo "Extracting the source archive(s) for $PRGNAM..."
tar -xvf ${SOURCE[0]}
-[ "$USE_PATENTS" != "YES" ] && rm -rf libdvdcss
+# Extract the ffmpeg source inside the MPlayer directory:
+( cd ${PRGNAM}-${VERSION} && tar -xvf ${SOURCE[2]} )
+
chown -R root:root *
chmod -R u+w,go+r-w,a+X-s *
cd ${PRGNAM}-${VERSION}
@@ -311,18 +344,20 @@ fi
echo Building ...
# MPlayer wants to automatically determine compiler flags,
# so we don't provide CFLAGS:
-./configure --prefix=/usr \
- --mandir=/usr/man \
- --confdir=/etc/mplayer \
- --enable-gui \
- --enable-menu \
- --enable-largefiles \
- --disable-arts \
- --codecsdir=${CODECSDIR} \
- --language="${LANGUAGES}" \
- ${EXTRACONFIGUREOPTIONS} \
- ${DO_PATENTED} \
- 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --confdir=/etc/mplayer \
+ --enable-hardcoded-tables \
+ --enable-gui \
+ --enable-menu \
+ --disable-arts \
+ --disable-bitmap-font \
+ --codecsdir=${CODECSDIR} \
+ --language="${LANGUAGES}" \
+ ${EXTRACONFIGUREOPTIONS} \
+ ${DO_PATENTED} \
+ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
# So that MPlayer does not report "UNKNOWN" as it's version:
echo $VERSION > VERSION
make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
@@ -330,9 +365,13 @@ make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log
# Build the html documentation (not all languages are available):
( cd DOCS/xml
- for i in $(echo $LANGUAGES | tr , ' ') ; do
- [ -d $i ] && make html-single-$i ;
- done
+ if [ "$LANGUAGES" = "all" ]; then
+ make html-chunked
+ else
+ for i in $(echo $LANGUAGES | tr , ' ') ; do
+ [ -d $i ] && make html-single-$i ;
+ done
+ fi
)
# Prepare the configfile:
@@ -383,16 +422,23 @@ fi
# Prepare the new configuration file
config etc/mplayer/mplayer.conf.new
-if [ -x /usr/bin/update-desktop-database ]; then
- chroot . /usr/bin/update-desktop-database -q usr/share/applications
+# Update the desktop database:
+if [ -x usr/bin/update-desktop-database ]; then
+ chroot . /usr/bin/update-desktop-database usr/share/applications 1> /dev/null 2> /dev/null
fi
-if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
- if [ -x usr/bin/gtk-update-icon-cache ]; then
- chroot . /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+# Update hicolor theme cache:
+if [ -d usr/share/icons/hicolor ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ chroot . /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null
fi
fi
+# Update the mime database:
+if [ -x usr/bin/update-mime-database ]; then
+ chroot . /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1
+fi
+
EOINS
# Add documentation: