diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-05-28 19:12:29 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:39:35 +0200 |
commit | 646a5c1cbfd95873950a87b5f75d52073a967023 (patch) | |
tree | b8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/xap/MPlayer/MPlayer.SlackBuild | |
parent | d31c50870d0bee042ce660e445c9294a59a3a65b (diff) | |
download | current-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz |
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt.
installpkg: default line length for --terselength is the number of columns.
removepkg: added --terse mode.
upgradepkg: default line length for --terselength is the number of columns.
upgradepkg: accept -option in addition to --option.
ap/vim-8.1.0026-x86_64-1.txz: Upgraded.
d/bison-3.0.5-x86_64-1.txz: Upgraded.
e/emacs-26.1-x86_64-1.txz: Upgraded.
kde/kopete-4.14.3-x86_64-8.txz: Rebuilt.
Recompiled against libidn-1.35.
n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded.
n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded.
n/libnftnl-1.1.0-x86_64-1.txz: Upgraded.
n/links-2.16-x86_64-2.txz: Rebuilt.
Rebuilt to enable X driver for -g mode.
n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded.
n/nftables-0.8.5-x86_64-1.txz: Upgraded.
n/p11-kit-0.23.11-x86_64-1.txz: Upgraded.
n/ulogd-2.0.7-x86_64-1.txz: Upgraded.
n/whois-5.3.1-x86_64-1.txz: Upgraded.
xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded.
xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/xap/MPlayer/MPlayer.SlackBuild')
-rwxr-xr-x | source/xap/MPlayer/MPlayer.SlackBuild | 215 |
1 files changed, 63 insertions, 152 deletions
diff --git a/source/xap/MPlayer/MPlayer.SlackBuild b/source/xap/MPlayer/MPlayer.SlackBuild index 7a9cfbe1..c317b40c 100755 --- a/source/xap/MPlayer/MPlayer.SlackBuild +++ b/source/xap/MPlayer/MPlayer.SlackBuild @@ -1,7 +1,7 @@ -#!/bin/sh +#!/bin/bash # $Id: MPlayer.SlackBuild,v 1.27 2012/07/01 13:07:08 root Exp root $ # Copyright 2006, 2007, 2008, 2010, 2011, 2012 Eric Hameleers, Eindhoven, NL -# Copyright 2013 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2013, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -21,88 +21,14 @@ # 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. -# ----------------------------------------------------------------------------- -# -# Slackware SlackBuild script -# =========================== -# By: Eric Hameleers <alien@slackware.com> -# For: MPlayer -# Descr: a movie player for LINUX -# URL: http://www.mplayerhq.hu/ -# Needs: -# Changelog: -# 1.0rc1-1: 05/Nov/2006 by Eric Hameleers <alien@slackware.com> -# * Initial build. -# 1.0rc1-2: 07/Nov/2006 by Eric Hameleers <alien@slackware.com> -# * Removed MPlayer's internal libdvdcss code from the build, so -# that MPlayer no longer plays encrypted DVD's by default (and the -# package is now safe to upload to public repositories). -# If it is allowed in your country, you can either install -# libdvdcss (which is picked up automatically by MPlayer), or -# rebuild MPlayer yourself using this SlackBuild - and set the -# variable REMOVECSS="no" first (see further down). -# Use this commandline if you can't or won't modify the script: -# REMOVECSS="no" ./MPlayer.SlackBuild -# 1.0rc1-3: 08/Nov/2006 by Eric Hameleers <alien@slackware.com> -# * Install the mplayer.conf into correct location '/etc/mplayer/' -# 1.0rc1-4: 15/mar/2007 by Eric Hameleers <alien@slackware.com> -# * Differentiate between versions of X11 (modular X has another -# install-prefix); update default skin; enable mplayer menu; -# add security fix -# 1.0rc1-5: 07/jun/2007 by Eric Hameleers <alien@slackware.com> -# * Add security fix. -# 1.0rc2-1: 09/oct/2007 by Eric Hameleers <alien@slackware.com> -# * New version. -# 1.0rc2-2: 01/feb/2008 by Eric Hameleers <alien@slackware.com> -# * Apply 4 security fixes. -# 1.0rc2-3: 10/mar/2008 by Eric Hameleers <alien@slackware.com> -# * Apply a patch that allows compilation against the ivtv driver -# in the 2.6.24.x kernels. -# r28148-1: 14/dec/2008 by Eric Hameleers <alien@slackware.com> -# * Build SVN snapshot - remove support for *all* patented or -# questionable software if "USE_PATENTS" is set to "NO" - think -# of DECSS dvd decryption code, and mp3/aac/amr audio encoders. -# r28929-1: 10/mar/2009 by Eric Hameleers <alien@slackware.com> -# * Update. -# r29301-1: 12/may/2009 by Eric Hameleers <alien@slackware.com> -# * Update. -# r29301-1: 12/may/2009 by Eric Hameleers <alien@slackware.com> -# * Update. -# 20100926-1: 26/sep/2010 by Eric Hameleers <alien@slackware.com> -# * 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. -# 20120514-1: 14/may/2012 by volkerdi@slackware.com -# * Update. -# 1.1_20120701-1: 28/jun/2012 by alien@slackware.com -# * Update to the 1.1 branch (essentially this is MPlayer-1.1 but -# I like to check it out of SVN). -# 1.1_20130819-1: 19/aug/2013 by volkerdi@slackware.com -# * Update to the latest 1.1 branch, and the same ffmpeg that was -# shipped with the 1.1.1 tarball. The official 1.1.1 release -# did not start a new repo branch, so this is the latest. -# 20150308-1: 09/mar/2015 by pprkut@slackware.com -# * Update to latest version from trunk, together with ffmpeg 2.6, -# which was released roughly around that date as well. -# 20140403-1: 03/apr/2015 by volkerdi@slackware.com -# * Update to latest version from trunk and ffmpeg-2.6.1. -# -# Run 'sh MPlayer.SlackBuild' to build a Slackware package. -# The package (.txz) plus descriptive .txt file are created in /tmp . -# Install using 'installpkg'. -# -# ----------------------------------------------------------------------------- # Set initial variables: -PRGNAM=MPlayer -VERSION=${VERSION:-20160125} -BRANCH=${BRANCH:-1.2} # leave empty if you want to build MPlayer trunk -FFMPEG=${FFMPEG:-2.8.6} +PKGNAM=MPlayer +VERSION=${VERSION:-20180208} +# Need to build trunk until there's a stable branch compatible with the +# latest ffmpeg stable release: +#BRANCH=${BRANCH:-1.3} # leave empty if you want to build MPlayer trunk BUILD=${BUILD:-3} TAG=${TAG:-} NUMJOBS=${NUMJOBS:-" -j7 "} @@ -120,10 +46,8 @@ else MPBRANCH="trunk" fi -FFURI=git://git.videolan.org/ffmpeg.git - DEFSKIN=${DEFSKIN:-"Blue"} # Download more skins at the following url: -SKINVER=${SKINVER:-"1.11"} # http://www.mplayerhq.hu/design7/dload.html +SKINVER=${SKINVER:-"1.13"} # http://www.mplayerhq.hu/design7/dload.html # Available languages: all cs de en es fr hu it pl ru zh_CN LANGUAGES="en,de,es,fr" @@ -148,20 +72,36 @@ elif [ "$ARCH" = "i486" -o \ "$ARCH" = "i586" -o \ "$ARCH" = "i686" ]; then LIBDIRSUFFIX="" - EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection" + # --enable-runtime-cpudetection is failing on 32-bit, so we'll set -march=i586 + # manually after ./configure. + #EXTRACONFIGUREOPTIONS="--enable-runtime-cpudetection" + EXTRACONFIGUREOPTIONS="" else LIBDIRSUFFIX="" EXTRACONFIGUREOPTIONS="" fi +# If this package is being built for ALSA (no PulseAudio), use the _alsa $TAG: +if [ ! -r /usr/lib${LIBDIRSUFFIX}/pkgconfig/libpulse.pc ]; then + TAG="_alsa" +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 "${PKGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz" + exit 0 +fi + # Where the WIN32 codecs are expectedfor instance CODECSDIR=/usr/lib${LIBDIRSUFFIX}/codecs # --------------------------------------------------------------------------- # -- PATENT ALERT! -- -# MPLayer can be built with MP3 (lame) and AMR audio encoders +# MPLayer can be built with AMR audio encoders # (needed for FLV and .3GP videos) but these libraries are 'contaminated' -# with patents from Fraunhofer and GGP. +# with patents from 3GPP. # Also, the AAC encoder has patent issues. # You can build these patended algorithms into ffmpeg, and if you are an # ordinary end user, no one will bother you for using them. @@ -169,7 +109,7 @@ CODECSDIR=/usr/lib${LIBDIRSUFFIX}/codecs # different story. I am not allowed to distribute binary packages that # incorporate patented code. So here you go. My Slackware package was # built with "USE_PATENTS=NO" i.e. without using -# the lame mp3, faac, AMR and dvdcss libraries. +# the faac, AMR and dvdcss libraries. # --------------------------------------------------------------------------- USE_PATENTS=${USE_PATENTS:-"NO"} @@ -186,19 +126,15 @@ OSDFONTS="LiberationSans-Regular.ttf \ DejaVuSans.ttf Vera.ttf" # Where do we look for sources? -SRCDIR=$(cd $(dirname $0); pwd) +cd $(dirname $0) ; SRCDIR=$(pwd) -SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.xz" +SOURCE[0]="$SRCDIR/${PKGNAM}-${VERSION}.tar.xz" SRCURL[0]="" # The default skin to use (we need to add at least one) 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-${FFMPEG}.tar.xz" -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() { @@ -229,19 +165,6 @@ src_checkout() { && tar --exclude-vcs -${TARCOMP}cf ${2} MPlayer-${VERSION} rm -rf MPlayer-${VERSION} ;; - 2) # ffmpeg-${FFMPEG} - mkdir ffmpeg_temp_checkout_$$ \ - && cd ffmpeg_temp_checkout_$$ - echo "Checking out tag n$FFMPEG from '$FFURI':" - git clone ${FFURI} ffmpeg \ - && cd ffmpeg \ - && git checkout n$FFMPEG \ - && cd .. - chown -R root:root . \ - && tar --exclude-vcs -${TARCOMP}cf ${2} ffmpeg - cd .. - rm -rf ffmpeg_temp_checkout_$$ - ;; *) # Do nothing ;; esac @@ -249,7 +172,7 @@ src_checkout() { # Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-/tmp/build} -PKG=$TMP/package-$PRGNAM +PKG=$TMP/package-$PKGNAM OUTPUT=${OUTPUT:-/tmp} ## @@ -258,14 +181,14 @@ OUTPUT=${OUTPUT:-/tmp} # Exit the script on errors: set -e -trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR +trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PKGNAM}.log' ERR # Catch unitialized variables: set -u P1=${1:-1} # Create working directories: -mkdir -p $TMP/tmp-$PRGNAM # location to build the source -rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build +mkdir -p $TMP/tmp-$PKGNAM # location to build the source +rm -rf $TMP/tmp-$PKGNAM/* # remove the remnants of previous build mkdir -p $PKG # place for the package to be built rm -rf $PKG/* # erase old package's contents mkdir -p $OUTPUT # place for the package to be saved @@ -304,30 +227,16 @@ fi # --- PACKAGE BUILDING --- echo "++" -echo "|| $PRGNAM-$VERSION" +echo "|| $PKGNAM-$VERSION" echo "++" -cd $TMP/tmp-$PRGNAM -echo "Extracting the source archive(s) for $PRGNAM..." +cd $TMP/tmp-$PKGNAM +echo "Extracting the source archive(s) for $PKGNAM..." tar -xvf ${SOURCE[0]} -cd ${PRGNAM}-${VERSION} - # remove MPlayer's copy of libswscale - rm -rf ffmpeg - - # Extract the ffmpeg source inside the MPlayer directory: - tar -xvf ${SOURCE[2]} - - # in case we build with an official tarball - if [ -e "ffmpeg-$FFMPEG" ]; then - mv "ffmpeg-$FFMPEG" ffmpeg - fi - -cd .. - chown -R root:root * chmod -R u+w,go+r-w,a+X-s * -cd ${PRGNAM}-${VERSION} +cd ${PKGNAM}-${VERSION} # Determine what X we're running (the modular X returns the prefix # in the next command, while older versions stay silent): @@ -336,8 +245,7 @@ XPREF=$(pkg-config --variable=prefix x11) || true # Remove support for patent encumbered and possibly illegal code: if [ "$USE_PATENTS" != "YES" ]; then - DO_PATENTED="--disable-mp3lame --disable-mp3lame-lavc \ - --disable-libopencore_amrnb \ + DO_PATENTED="--disable-libopencore_amrnb \ --disable-libopencore_amrwb" else DO_PATENTED="" @@ -346,12 +254,6 @@ fi # fix building against samba 4 zcat $SRCDIR/include-samba-4.0.patch.gz | patch -p1 --verbose || exit 1 -# fix building against openjpeg 2 -sed -i "s|lopenjpeg|lopenmj2|" ./configure - -# fix flac playback with embedded album art: -zcat $SRCDIR/MPlayer.demux_lavf.flac.diff.gz | patch -p1 --verbose || exit 1 - echo Building ... # MPlayer wants to automatically determine compiler flags, # so we don't provide CFLAGS. @@ -365,18 +267,27 @@ echo Building ... --disable-arts \ --disable-ossaudio \ --disable-bitmap-font \ + --disable-ffmpeg_a \ --codecsdir=${CODECSDIR} \ --language="${LANGUAGES}" \ - --extra-cflags="-I/usr/include/openmj2-2.1/" \ ${EXTRACONFIGUREOPTIONS} \ ${DO_PATENTED} \ - 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log + 2>&1 | tee $OUTPUT/configure-${PKGNAM}.log + # So that MPlayer does not report "UNKNOWN" as it's version: if [ ! -f VERSION ]; then echo $VERSION > VERSION fi -make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log -make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log + +# Set -march/-mtune manually since runtime cpu detection causes a compile error +# on 32-bit x86: +if [ "$ARCH" = "i586" ]; then + sed -i "s/march=native/march=i586/g" config.mak + sed -i "s/mtune=native/mtune=generic/g" config.mak +fi + +make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PKGNAM}.log +make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PKGNAM}.log # Build the html documentation (not all languages are available): if [ "$LANGUAGES" = "all" ]; then @@ -457,19 +368,19 @@ fi EOINS # Add documentation: -mkdir -p $PKG/usr/doc/$PRGNAM-$PKGVERSION -cp -a $DOCS $PKG/usr/doc/$PRGNAM-$PKGVERSION || true -cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PRGNAM-$PKGVERSION/$PRGNAM.SlackBuild -mv $PKG/usr/doc/$PRGNAM-$PKGVERSION/HTML $PKG/usr/doc/$PRGNAM-$PKGVERSION/html +mkdir -p $PKG/usr/doc/$PKGNAM-$PKGVERSION +cp -a $DOCS $PKG/usr/doc/$PKGNAM-$PKGVERSION || true +cp -a $SRCDIR/$(basename $0) $PKG/usr/doc/$PKGNAM-$PKGVERSION/$PKGNAM.SlackBuild +mv $PKG/usr/doc/$PKGNAM-$PKGVERSION/HTML $PKG/usr/doc/$PKGNAM-$PKGVERSION/html # Save a sample of all configuration files: for i in etc/*.conf ; do - cp $i $PKG/usr/doc/$PRGNAM-$PKGVERSION/$(basename $i)-sample + cp $i $PKG/usr/doc/$PKGNAM-$PKGVERSION/$(basename $i)-sample done # Save a transcript of all configured options for this specific build: -if [ -n $OUTPUT/configure-${PRGNAM}.log ]; then - cat $OUTPUT/configure-${PRGNAM}.log \ +if [ -n $OUTPUT/configure-${PKGNAM}.log ]; then + cat $OUTPUT/configure-${PKGNAM}.log \ | sed -n "/^Config files successfully generated/,/^'config.h' and 'config.mak' contain your configuration options./p" \ - > $PKG/usr/doc/$PRGNAM-$PKGVERSION/${PRGNAM}.configuration + > $PKG/usr/doc/$PKGNAM-$PKGVERSION/${PKGNAM}.configuration fi find $PKG/usr/doc -type f -exec chmod 644 {} \; @@ -492,9 +403,9 @@ fi # Build the package: cd $PKG -makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log +makepkg --linkadd y --chown n $OUTPUT/${PKGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PKGNAM}.log cd $OUTPUT -md5sum ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz.md5 +md5sum ${PKGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PKGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txz.md5 cd - -cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txt +cat $PKG/install/slack-desc | grep "^${PKGNAM}" > $OUTPUT/${PKGNAM}-${PKGVERSION}-${ARCH}-${BUILD}${TAG}.txt |