From a9390b0e8c3ef80e51daafa04f2759a9421187dc Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 25 Sep 2010 23:38:43 +0000 Subject: Update MPlayer to a new 20100926 snapshot --- MPlayer/build/MPlayer.SlackBuild | 76 +++++++++++++++++++++++++--------------- 1 file changed, 47 insertions(+), 29 deletions(-) diff --git a/MPlayer/build/MPlayer.SlackBuild b/MPlayer/build/MPlayer.SlackBuild index 0d2b9ac5..3390f811 100755 --- a/MPlayer/build/MPlayer.SlackBuild +++ b/MPlayer/build/MPlayer.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2006,2007,2008 Eric Hameleers +# Copyright 2006,2007,2008,2010 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -65,6 +65,12 @@ # * Update. # r29301-1: 12/may/2009 by Eric Hameleers # * Update. +# r29301-1: 12/may/2009 by Eric Hameleers +# * Update. +# 20100926-1: 26/sep/2010 by Eric Hameleers +# * 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. # # Run 'sh MPlayer.SlackBuild' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . @@ -75,15 +81,12 @@ # Set initial variables: PRGNAM=MPlayer -VERSION=${VERSION:-r29301} -ARCH=${ARCH:-i486} +VERSION=${VERSION:-20100926} BUILD=${BUILD:-1} TAG=${TAG:-alien} DOCS="AUTHORS Changelog Copyright LICENSE README DOCS/HTML-single DOCS/tech" -CODECSDIR=/usr/lib/codecs # Where the WIN32 codecs are expected for instance - DEFSKIN=${DEFSKIN:-"Blue"} # Download more skins at the following url: SKINVER=${SKINVER:-"1.7"} # http://www.mplayerhq.hu/design7/dload.html @@ -91,12 +94,33 @@ SKINVER=${SKINVER:-"1.7"} # http://www.mplayerhq.hu/design7/dload.html # ko mk nb nl pl ro ru sk sv tr uk pt_BR zh_CN zh_TW LANGUAGES="en nl fr de es" # The default is to just add "en" documentation +# Automatically determine the architecture we're building on: +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) export ARCH=i486 ;; + arm*) export ARCH=arm ;; + # Unless $ARCH is already set, use uname -m for all other archs: + *) export ARCH=$( uname -m ) ;; + esac +fi + if [ "$ARCH" = "x86_64" ]; then LIBDIRSUFFIX="64" + # --enable-runtime-cpudetection is supported only for x86, x86_64, and PPC + EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection" +elif [ "$ARCH" = "i486" -o \ + "$ARCH" = "i586" -o \ + "$ARCH" = "i686" ]; then + LIBDIRSUFFIX="" + EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection" else LIBDIRSUFFIX="" + EXTRACONFIGUREOPTIONS="" fi +# Where the WIN32 codecs are expectedfor instance +CODECSDIR=/usr/lib${LIBDIRSUFFIX}/codecs + # --------------------------------------------------------------------------- # -- PATENT ALERT! -- # MPlayer source contains an internal copy of 'libdvdcss' for reading DVD's. @@ -141,7 +165,6 @@ OSDFONTS="LiberationSans-Regular.ttf \ SRCDIR=$(cd $(dirname $0); pwd) SOURCE[0]="$SRCDIR/${PRGNAM}${EXTRA}-${VERSION}.tar.bz2" -#SRCURL[0]="http://www4.mplayerhq.hu/${PRGNAM}/releases/${PRGNAM}-${VERSION}.tar.bz2" SRCURL[0]="" # The default skin to use (we need to add at least one) @@ -154,13 +177,14 @@ src_checkout() { # Param #1 : index in the SOURCE[] array. # Param #2 : full path to where SOURCE[$1] tarball should be created. # Determine the tarball extension: - PEXT=$(echo "${2}" | sed -r -e 's/.*[^.].(tar.gz|tar.bz2|tgz).*/\1/') - if [ "$PEXT" == "${2}" ]; then # we did not find a allowed extension - echo "Archive can only have extension '.tar.gz' '.tar.bz2' or '.tgz'" - exit 1 - else - [ "$PEXT" = "tar.bz2" ] && TARCOMP="j" || TARCOMP="z" - fi + PEXT=$(echo "${2}" | sed -r -e 's/.*[^.].(tar.xz|tar.gz|tar.bz2|tgz).*/\1/') + case "$PEXT" in + "tar.xz") TARCOMP="J" ;; + "tar.gz") TARCOMP="z" ;; + "tgz") TARCOMP="z" ;; + "tar.bz2") TARCOMP="j" ;; + *) echo "Archive can only have extension 'tar.xz', '.tar.gz' '.tar.bz2' or '.tgz'" ; exit 1 ;; + esac case ${1} in 0) # mplayer if [ "$(echo ${VERSION}|cut -c1)" == 'r' ]; then # revision instead of date @@ -171,8 +195,9 @@ src_checkout() { mkdir MPlayer-${VERSION} \ && cd MPlayer-${VERSION} \ && svn checkout --revision $REV svn://svn.mplayerhq.hu/mplayer/trunk . \ + && svn propget svn:externals | sed -e 's/[[:space:]].*$//g' | xargs svn up --revision $REV \ && find . -type d -name '.svn' -depth | xargs rm -rf \ - && ([ "$USE_PATENTS" != "YES" ] && rm -rf libdvdcss) \ + && ([ "$USE_PATENTS" != "YES" ] && rm -rf libdvdcss || true) \ && chown -R root:root . \ && cd .. \ && tar -${TARCOMP}cf ${2} MPlayer-${VERSION} @@ -265,7 +290,7 @@ echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE[0]} [ "$USE_PATENTS" != "YES" ] && rm -rf libdvdcss chown -R root:root * -chmod -R u+w,go+r-w,a-s * +chmod -R u+w,go+r-w,a+X-s * cd ${PRGNAM}-${VERSION} # Determine what X we're running (the modular X returns the prefix @@ -277,8 +302,8 @@ XPREF=$(pkg-config --variable=prefix x11) || true if [ "$USE_PATENTS" != "YES" ]; then DO_PATENTED="--disable-libdvdcss-internal \ --disable-mp3lame --disable-mp3lame-lavc \ - --disable-faac --disable-faac-lavc \ - --disable-libamr_nb --disable-libamr_nb" + --disable-libopencore_amrnb \ + --disable-libopencore_amrwb" else DO_PATENTED="" fi @@ -289,7 +314,6 @@ echo Building ... ./configure --prefix=/usr \ --mandir=/usr/man \ --confdir=/etc/mplayer \ - --enable-runtime-cpudetection \ --enable-gui \ --enable-menu \ --enable-largefiles \ @@ -298,20 +322,13 @@ echo Building ... --win32codecsdir=${CODECSDIR} \ --realcodecsdir=${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 - -# Install all the needed stuff to the package dir -# Use installwatch if available, to produce a logfile of the installation -# process that is more easily readable: -if $(which installwatch > /dev/null 2>&1); then - installwatch -o $OUTPUT/install-${PRGNAM}.log make DESTDIR=$PKG install -else - make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log -fi +make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log # Build the html documentation (not all languages are available): ( cd DOCS/xml @@ -328,11 +345,12 @@ cp etc/example.conf $PKG/etc/mplayer/mplayer.conf.new cd $PKG/usr/share/mplayer/skins tar -xvf ${SOURCE[1]} chown -R root:root * +chmod -R u+w,go+r-w,a+X-s * ln -s ${DEFSKIN} default cd - # Add this to the doinst.sh: -! [ -d $PKG/install ] && mkdir -p $PKG/install +mkdir -p $PKG/install cat <> $PKG/install/doinst.sh # Handle the incoming configuration files: config() { @@ -394,7 +412,6 @@ if [ -n $OUTPUT/configure-${PRGNAM}.log ]; then | sed -n "/^Config files successfully generated/,/^'config.h' and 'config.mak' contain your configuration options./p" \ > $PKG/usr/doc/$PRGNAM-$VERSION/${PRGNAM}.configuration fi -# Finally; find $PKG/usr/doc -type f -exec chmod 644 {} \; # Compress the man page(s): @@ -437,5 +454,6 @@ if [ "$USE_PATENTS" != "YES" ]; then ** USE_PATENTS="YES" ** EOT + fi -- cgit v1.2.3-65-gdbad