#!/bin/sh # $Id$ # Copyright (c) 2007,2008 Eric Hameleers # # Permission to use, copy, modify, and distribute this software for # any purpose with or without fee is hereby granted, provided that # the above copyright notice and this permission notice appear in all # copies. # # THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR # CONTRIBUTORS 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. # ----------------------------------------------------------------------------- # # Slackware SlackBuild script # =========================== # By: Eric Hameleers # For: vlc # Descr: multimedia player for various audio and video formats # URL: http://www.videolan.org/vlc/ # Needs: # Changelog: # 0.8.6a-1: 15/Mar/2007 by Eric Hameleers # * Initial build. # 0.8.6b-1: 25/apr/2007 by Eric Hameleers # * Update. # 0.8.6c-1: 04/sep/2007 by Eric Hameleers # * Update. Allow vlc to be built without patented code (lame/amr). # 0.8.6d-1: 12/dec/2007 by Eric Hameleers # * Update with a vulnerability bugfix. All external libraries # were updated to their most recent release. # This pkg adds support for firewire cameras, DV and DVB cards. # AMR audio codec is not supported in this build (I could not # create a vlc binary successfully). # Again, the resulting binary package requires no additional # non-Slackware packages, except for libdvdcss in case you want # to watch an encrypted DVD. # 0.8.6d-2: 29/jan/2008 by Eric Hameleers # * Disable building AMR. The 0.8.6d official release does # not have support for AMR audio codec re-added yet. # Also, add the AAC en/decoder to the PATENTED software. # Build with dll loader support only on 32bit platform. # # Run 'sh vlc.SlackBuild --cleanup' to build a Slackware package. # The package (.tgz) plus descriptive .txt file are created in /tmp . # Install using 'installpkg'. # # ----------------------------------------------------------------------------- # # NOTE: this SlackBuild is a monster - it tries to wrap all dependencies to # vlc into the resulting package by building these deps as static libraries # and then in the final stage linking vlc against all the static libraries. # The resulting package has all the vlc functionality and does not depend on # any software that is not present in a standard full install of Slackware. # This makes my package quite different from all the other vlc builds that are # floating around on the Internet. # /Eric Hameleers/ # # -- PATENT ALERT! -- # FFmpeg can be built with MP3 (lame) and AMR audio encoders # (needed for FLV videos) but these libraries are 'contaminated' with # patents from Fraunhofer and GGP. # Also, the AAC encoder/decoders have 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. # For the binaries based on this SlackBuild that I distribute, it is a # 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 libary and without the # AMR libraries. #USE_PATENTS="NO" USE_PATENTS=${USE_PATENTS:-"YES"} # Set initial variables: PRGNAM=vlc PRGNAM2=mozplugin VERSION=${VERSION:-"0.8.6d"} ARCH=${ARCH:-"i486"} BUILD=${BUILD:-"2"} DOCS="ABOUT-NLS AUTHORS COPYING ChangeLog HACKING INSTALL MAINTAINERS \ NEWS README THANKS" # The script needs the seamonkey SDK in order to build a mozilla plugin. # If no version of Seamonkey is found, no plugin will be compiled: SEAMONKEY=$( readlink /usr/lib/seamonkey ) [ -n "${SEAMONKEY}" ] && MOZBROWSER=$(basename ${SEAMONKEY}) || MOZBROWSER="" if [ -z "$MOZBROWSER" ]; then MOZPLUGIN="NO" DO_MOZPLUGIN="" else MOZPLUGIN="YES" DO_MOZPLUGIN="--enable-mozilla" fi # Dependent package versions A52=0.7.4 AMRNB=7.0.0.0 AMRWB=7.0.0.2 AVC1394=0.5.3 CDDB=1.3.0 CDIO=0.78.2 DAAP=0.4.0 DC1394=1.2.2 DCA=0.0.5 DIRAC=0.9.1 DV=1.0.0 DVBPSI=0.1.6 DVDNAV=0.1.10 DVDREAD=0.9.7 DVDCSS=1.2.9 EBML=0.7.7 FAAC=1.26 FAAD2=2.6.1 #FFMPEG=r10883 # (20071031) latest recommended version is r10461 (20070911) FFMPEG=20080128 GGI=2.2.2 GII=1.0.2 GOOM=2k4-0 LAME=3.97 LIVE=latest MATROSKA=0.8.1 MPCDEC=1.2.6 MPEG2DEC=0.4.1 RAW1394=1.3.0 SHOUT=2.2.2 SPEEX=1.2beta3 THEORA=1.0beta2 TWOLAME=0.3.12 VCD=0.7.21 #WXGTK=2.8.7 # <-- does not work WXGTK=2.6.4 X264=20080128-2245 # Determine what X we're running (the modular X returns the prefix # in the next command, while older versions stay silent): XPREF=`pkg-config --variable=prefix x11` || true [ "$XPREF" == "" ] && XPREF='/usr/X11R6' # Determine what gcc compiler we use: GCCVERSION=`gcc -v 2>&1 | grep 'gcc version' | sed 's/gcc version //' | cut -d. -f1` # Where do we look for sources? CWD=`pwd` SRCDIR=`dirname $0` [ "${SRCDIR:0:1}" == "." ] && SRCDIR=${CWD}/${SRCDIR} # Place to build (TMP) package (PKG) and output (OUTPUT) the program: TMP=${TMP:-"/tmp/build"} PKG=$TMP/package-$PRGNAM PKG2=$TMP/package-$PRGNAM-$PRGNAM2 OUTPUT=${OUTPUT:-"/tmp"} # --------------------------------------------------------------------------- # Source tarballs and source URLs. # Sources which are not patented should have SRCPAT[n]="NO" # Sources which are patented should have SRCPAT[n]="YES" which prevents then # from being downloaded and used if we build a patent-free package. # --------------------------------------------------------------------------- # VLC source SOURCE[0]="$SRCDIR/${PRGNAM}-${VERSION}.tar.bz2" SRCURL[0]="http://download.videolan.org/pub/videolan/${PRGNAM}/${VERSION}/${PRGNAM}-${VERSION}.tar.bz2" SRCURL[0]="" SRCPAT[0]="NO" # ffmpeg libraries SOURCE[1]="$SRCDIR/ffmpeg-${FFMPEG}.tar.bz2" #SRCURL[1]="http://ffmpeg.mplayerhq.hu/ffmpeg-export-snapshot.tar.bz2" SRCURL[1]="" SRCPAT[1]="NO" # AMR encoder libraries used in ffmpeg to encode 3GPP audio # amr narrowband wrapper: SOURCE[2]="$SRCDIR/amrnb-${AMRNB}.tar.bz2" SRCURL[2]="http://ftp.penguin.cz/pub/users/utx/amr/amrnb-${AMRNB}.tar.bz2" SRCPAT[2]="YES" # amr narrowband library: SOURCE[3]="$SRCDIR/26104-700.zip" SRCURL[3]="http://www.3gpp.org/ftp/Specs/archive/26_series/26.104/26104-700.zip" SRCPAT[3]="YES" # amr wideband wrapper: SOURCE[4]="$SRCDIR/amrwb-${AMRWB}.tar.bz2" SRCURL[4]="http://ftp.penguin.cz/pub/users/utx/amr/amrwb-${AMRWB}.tar.bz2" SRCPAT[4]="YES" # amr wideband library: SOURCE[5]="$SRCDIR/26204-700.zip" SRCURL[5]="http://www.3gpp.org/ftp/Specs/archive/26_series/26.204/26204-700.zip" SRCPAT[5]="YES" # Lame is used for the audio in FLV videos; will statically link with ffmpeg SOURCE[6]="$SRCDIR/lame-$LAME.tar.gz" SRCURL[6]="http://downloads.sourceforge.net/lame/lame-$LAME.tar.gz" SRCPAT[6]="YES" SOURCE[7]="$SRCDIR/libdv-${DV}.tar.gz" SRCURL[7]="http://downloads.sourceforge.net/libdv/libdv-${DV}.tar.gz" SRCPAT[7]="NO" # FAAC library, will be statically linked with ffmpeg SOURCE[8]="$SRCDIR/faac-$FAAC.tar.gz" SRCURL[8]="http://downloads.sourceforge.net/faac/faac-$FAAC.tar.gz" SRCPAT[8]="YES" # wxGTK is used for the GUI - VLC will link statically against it, in order to # prevent compilation errors with ffmpeg SOURCE[9]="$SRCDIR/wxGTK-$WXGTK.tar.bz2" SRCURL[9]="http://downloads.sourceforge.net/wxwindows/wxGTK-$WXGTK.tar.bz2" SRCPAT[9]="NO" # FAAD2 support: SOURCE[10]="$SRCDIR/faad2-$FAAD2.tar.gz" SRCURL[10]="http://downloads.sourceforge.net/faac/faad2-$FAAD2.tar.gz" SRCPAT[10]="YES" # Matroska support: SOURCE[11]="$SRCDIR/libebml-$EBML.tar.bz2" SRCURL[11]="http://dl.matroska.org/downloads/libebml/libebml-$EBML.tar.bz2" SRCPAT[11]="NO" SOURCE[12]="$SRCDIR/libmatroska-$MATROSKA.tar.bz2" SRCURL[12]="http://dl.matroska.org/downloads/libmatroska/libmatroska-$MATROSKA.tar.bz2" SRCPAT[12]="NO" # libmpeg2 SOURCE[13]="$SRCDIR/mpeg2dec-$MPEG2DEC.tar.gz" SRCURL[13]="http://libmpeg2.sourceforge.net/files/mpeg2dec-$MPEG2DEC.tar.gz" SRCPAT[13]="NO" # DVD support: SOURCE[14]="$SRCDIR/libdvdnav-$DVDNAV.tar.gz" SRCURL[14]="http://downloads.sourceforge.net/sourceforge/dvd/libdvdnav-$DVDNAV.tar.gz" SRCPAT[14]="NO" SOURCE[15]="$SRCDIR/libdvdread-${DVDREAD}.tar.gz" SRCURL[15]="http://www.dtek.chalmers.se/groups/dvd/dist/libdvdread-${DVDREAD}.tar.gz" SRCPAT[15]="NO" # CD media read/access support (including iso/cue/nrg formats): SOURCE[16]="$SRCDIR/libcdio-${CDIO}.tar.gz" SRCURL[16]="http://ftp.gnu.org/gnu/libcdio/libcdio-$CDIO.tar.gz" SRCPAT[16]="NO" # Since www.vcdimager.org is down, we use a GNU videolan mirror: SOURCE[17]="$SRCDIR/vcdimager-${VCD}.tar.gz" SRCURL[17]="http://ftp.gnu.org/gnu/vcdimager/vcdimager-$VCD.tar.gz" SRCPAT[17]="NO" # MP2 audio (de)coding support: SOURCE[18]="$SRCDIR/twolame-${TWOLAME}.tar.gz" SRCURL[18]="http://downloads.sourceforge.net/twolame/twolame-$TWOLAME.tar.gz" SRCPAT[18]="NO" # Musepack (MPC) audio demuxing support: SOURCE[19]="$SRCDIR/libmpcdec-${MPCDEC}.tar.bz2" SRCURL[19]="http://files.musepack.net/source/libmpcdec-${MPCDEC}.tar.bz2" SRCPAT[19]="NO" # DAAP support (iTunes) SOURCE[20]="$SRCDIR/libopendaap-${DAAP}.tar.bz2" # This one seems not the right daap lib...: #SRCURL[20]="http://downloads.sourceforge.net/daap/libopenndaap-${DAAP}.tar.bz2" SRCURL[20]="http://crazney.net/programs/itunes/files/libopendaap-${DAAP}.tar.bz2" SRCPAT[20]="NO" # Dirac video codec support: SOURCE[21]="$SRCDIR/dirac-${DIRAC}.tar.gz" SRCURL[21]="http://downloads.sourceforge.net/dirac/dirac-${DIRAC}.tar.gz" SRCPAT[21]="NO" # CDDB lookups: SOURCE[22]="$SRCDIR/libcddb-${CDDB}.tar.bz2" SRCURL[22]="http://downloads.sourceforge.net/libcddb/libcddb-${CDDB}.tar.bz2" SRCPAT[22]="NO" # Act as a source client to Icecast/Shoutcast: SOURCE[23]="$SRCDIR/libshout-${SHOUT}.tar.gz" SRCURL[23]="http://downloads.us.xiph.org/releases/libshout/libshout-${SHOUT}.tar.gz" SRCPAT[23]="NO" # SPEEX is used by libshout and vlc: SOURCE[24]="$SRCDIR/speex-${SPEEX}.tar.gz" SRCURL[24]="http://downloads.us.xiph.org/releases/speex/speex-${SPEEX}.tar.gz" SRCPAT[24]="NO" # Goom, a visualisation library for audio player SOURCE[25]="$SRCDIR/goom-${GOOM}-src.tar.gz" SRCURL[25]="http://downloads.sourceforge.net/goom/goom-${GOOM}-src.tar.gz" SRCPAT[25]="NO" # GGI, output plugin SOURCE[26]="$SRCDIR/ggi-${GGI}-bundle.src.tar.bz2" SRCURL[26]="http://www.ggi-project.org/ftp/ggi/v2.2/ggi-${GGI}-bundle.src.tar.bz2" SRCPAT[26]="NO" # X264 encoder - for H264/AVC video streams SOURCE[27]="$SRCDIR/x264-snapshot-${X264}.tar.bz2" SRCURL[27]="ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-${X264}.tar.bz2" SRCPAT[27]="NO" # The A52 decoder - aka AC3 SOURCE[28]="$SRCDIR/a52dec-$A52.tar.gz" SRCURL[28]="http://liba52.sourceforge.net/files/a52dec-$A52.tar.gz" SRCPAT[28]="NO" # Live555 support: SOURCE[29]="$SRCDIR/live555-${LIVE}.tar.gz" SRCURL[29]="http://www.live555.com/liveMedia/public/live555-${LIVE}.tar.gz" SRCPAT[29]="NO" # Library needed to control IEEE 1394 (firewire-) based cameras SOURCE[30]="$SRCDIR/libraw1394-${RAW1394}.tar.gz" SRCURL[30]="http://www.linux1394.org/dl/libraw1394-${RAW1394}.tar.gz" SRCPAT[30]="NO" SOURCE[31]="$SRCDIR/libdc1394-${DC1394}.tar.gz" SRCURL[31]="http://downloads.sourceforge.net/libdc1394/libdc1394-${DC1394}.tar.gz" SRCPAT[31]="NO" SOURCE[32]="$SRCDIR/libavc1394-${AVC1394}.tar.gz" SRCURL[32]="http://downloads.sourceforge.net/libavc1394/libavc1394-${AVC1394}.tar.gz" SRCPAT[32]="NO" # Library designed for decoding and generation of MPEG TS and DVB PSI tables. SOURCE[33]="$SRCDIR/libdvbpsi5-${DVBPSI}.tar.bz2" SRCURL[33]="http://download.videolan.org/pub/libdvbpsi/${DVBPSI}/libdvbpsi5-${DVBPSI}.tar.bz2" SRCPAT[33]="NO" # a free DTS Coherent Acoustics decoder SOURCE[34]="$SRCDIR/libdca-${DCA}.tar.bz2" SRCURL[34]="http://download.videolan.org/pub/videolan/libdca/${DCA}/libdca-${DCA}.tar.bz2" SRCPAT[34]="NO" # Theora encoder/decoder libraries SOURCE[35]="$SRCDIR/libtheora-${THEORA}.tar.gz" SRCURL[35]="http://downloads.xiph.org/releases/theora/libtheora-${THEORA}.tar.gz" SRCPAT[35]="NO" # CSS decoding- VLC can do without if you install an external libdvdcss package. #SOURCE[XX]="$SRCDIR/libdvdcss-${DVDCSS}.tar.bz2" #SRCURL[XX]="http://download.videolan.org/pub/libdvdcss/${DVDCSS}/libdvdcss-${DVDCSS}.tar.bz2" #SRCPAT[XX]="YES" # 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() { # Param #1 : index in the SOURCE[] array. # Param #2 : full path to where SOURCE[$1] tarball should be created. case ${1} in 0) # vlc-$VERSION if [ "$(echo ${VERSION}|cut -c1)" == 'r' ]; then # revision instead of date REV=$(echo ${VERSION} | cut -c2-) else REV="{${VERSION}}" fi mkdir vlc-${VERSION} \ && cd vlc-${VERSION} \ && svn checkout --revision $REV svn://svn.videolan.org/vlc/trunk . \ && chown -R root:root . \ && cd .. \ && tar -jcf ${2} vlc-${VERSION} \ && rm -rf vlc-${VERSION} ;; 1) # ffmpeg-$FFMPEG if [ "$(echo ${FFMPEG}|cut -c1)" == 'r' ]; then # revision instead of date REV=$(echo ${FFMPEG} | cut -c2-) else REV="{${FFMPEG}}" fi mkdir ffmpeg-${FFMPEG} \ && cd ffmpeg-${FFMPEG} \ && svn checkout --revision $REV svn://svn.mplayerhq.hu/ffmpeg/trunk . \ && chown -R root:root . \ && cd .. \ && tar -jcf ${2} ffmpeg-${FFMPEG} \ && rm -rf ffmpeg-${FFMPEG} ;; *) # Do nothing ;; esac } if [ "${USE_PATENTS}" == "YES" ]; then echo "" echo "**" echo "** This build uses patented code (MP3 / AMR / AAC encoders)" echo "** Run the command 'USE_PATENTS=NO $0 $*' to avoid patent issues." echo "**" echo "" sleep 1 fi ## ## --- with a little luck, you won't have to edit below this point --- ## ## # Exit the script on errors: set -e trap 'echo "$0 FAILED at line $LINENO!" | tee $OUTPUT/error-${PRGNAM}.log' ERR # Catch unitialized variables: set -u P1=${1:-1} # Slackware 11 and up need other option (gcc > 3.3.x) if [ `gcc -dumpversion | tr -d '.' |cut -c 1-2` -gt 33 ]; then MOPT=tune else MOPT=cpu fi case "$ARCH" in i386) SLKCFLAGS="-O2 -march=i386 -m${MOPT}=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; i486) SLKCFLAGS="-O2 -march=i486 -m${MOPT}=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; s390) SLKCFLAGS="-O2" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; powerpc) SLKCFLAGS="-O2" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ;; athlon-xp) SLKCFLAGS="-march=athlon-xp -O3 -pipe -fomit-frame-pointer" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; esac # Create working directories: mkdir -p $TMP/tmp-$PRGNAM # location to build the source mkdir -p $PKG # place for the package to be built rm -rf $PKG/* # We always erase old package's contents: mkdir -p $OUTPUT # place for the package to be saved if [ "$P1" != "--oldbuild" -a "$P1" != "--download" ]; then # If the "--oldbuild" parameter is present, we keep # the old build files and continue; # By default we remove the remnants of previous build and continue: echo -e "**\n** Cleaning up old build ...\n**" rm -rf $TMP/tmp-$PRGNAM/* rm -f $OUTPUT/*${PRGNAM}*.log # Delete old logfiles fi # Source file availability: for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do # Only download patented code if we are allowing it: if [ "${USE_PATENTS}" == "YES" -o "${SRCPAT[$i]}" != "YES" ]; then if ! [ -f ${SOURCE[$i]} ]; then echo "Source '`basename ${SOURCE[$i]}`' not available yet..." # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT [ -w "$SRCDIR" ] || SOURCE[$i]="$OUTPUT/`basename ${SOURCE[$i]}`" if ! [ "x${SRCURL[$i]}" == "x" ]; then echo "Will download file to `dirname $SOURCE[$i]`" if ! $(wget -nv -T 20 -O "${SOURCE[$i]}" "${SRCURL[$i]}"); then echo "Downloading '`basename ${SOURCE[$i]}`' failed.. aborting the build." mv -f "${SOURCE[$i]}" "${SOURCE[$i]}".FAIL exit 1 fi else # Try if we have a SVN/CVS download routine for ${SOURCE[$i]} echo "Will checkout sources to `dirname $SOURCE[$i]`" src_checkout $i "${SOURCE[$i]}" 2>&1 > $OUTPUT/checkout-$(basename ${SOURCE[$i]}).log fi if [ ! -f "${SOURCE[$i]}" -o ! -s "${SOURCE[$i]}" ]; then echo "File '`basename ${SOURCE[$i]}`' not available.. aborting the build." exit 1 fi fi fi done if [ "$P1" == "--download" ]; then echo "Download complete." exit 0 fi # Package building: echo "++" echo "|| $PRGNAM-$VERSION" echo "++" cd $TMP/tmp-$PRGNAM if [ "$P1" != "--oldbuild" ]; then echo "Extracting the source archive(s) for $PRGNAM..." for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do # Only extract and use patented code if we are allowing it: if [ "${USE_PATENTS}" == "YES" -o "${SRCPAT[$i]}" != "YES" ]; then if `file ${SOURCE[$i]} | grep -q ": bzip2"`; then tar -xjvf ${SOURCE[$i]} elif `file ${SOURCE[$i]} | grep -q ": gzip"`; then tar -xzvf ${SOURCE[$i]} elif `file ${SOURCE[$i]} | grep -iq ": zip"`; then unzip ${SOURCE[$i]} fi fi done chown -R root:root * chmod -R u+w,go+r-w,a-s * fi # Building the source code: echo Building ... # We will be installing static libs into the following directory: mkdir -p $TMP/tmp-$PRGNAM/vlcdeps/usr/{bin,include,lib,man} # ----------------------------------------------------------------------------- # Compile theora libraries # The ffmpeg will use these # ----------------------------------------------------------------------------- make_theora() { echo -e "**\n** theora ...\n**" cd $TMP/tmp-$PRGNAM/libtheora-${THEORA} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_theora.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_theora.log # Install theora into a temp location so ffmpeg can pickup the library make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_theora.log cd - } # ----------------------------------------------------------------------------- # Compile lame libraries # The ffmpeg will use these # ----------------------------------------------------------------------------- make_lame() { echo -e "**\n** lame ...\n**" cd $TMP/tmp-$PRGNAM/lame-${LAME} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_lame.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_lame.log # Install lame into a temp location so ffmpeg can pickup the library make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_lame.log cd - } # ----------------------------------------------------------------------------- # Compile faac library # The ffmpeg will use these # ----------------------------------------------------------------------------- make_faac() { echo -e "**\n** faac ...\n**" cd $TMP/tmp-$PRGNAM/faac sh bootstrap CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --with-mp4v2 \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_faac.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_faac.log # Install faac into a temp location so ffmpeg can pickup the library make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_faac.log cd - } # ----------------------------------------------------------------------------- # Compile amr narrowband library # The ffmpeg will use these # ----------------------------------------------------------------------------- make_amrnb() { echo -e "**\n** amrnb ...\n**" cd $TMP/tmp-$PRGNAM/amrnb-${AMRNB} # Copy the amrnb-float libraries to prevent the makefile downloading them: cp ${SOURCE[3]} . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_amrnb.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_amrnb.log # Install amrnb into a temp location so ffmpeg can pickup the library make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_amrnb.log cd - } # ----------------------------------------------------------------------------- # Compile amr wideband library # The ffmpeg will use these # ----------------------------------------------------------------------------- make_amrwb() { echo -e "**\n** amrwb ...\n**" cd $TMP/tmp-$PRGNAM/amrwb-${AMRWB} # Copy the amrwb-float libraries to prevent the makefile downloading them: cp ${SOURCE[5]} . CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_amrwb.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_amrwb.log # Install amrwb into a temp location so ffmpeg can pickup the library make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_amrwb.log cd - } # ----------------------------------------------------------------------------- # Compile ffmpeg with support for AMR, LAME, XVID, FAAC # Later, we will statically link VLC to the generated libavcodec libraries # ----------------------------------------------------------------------------- make_ffmpeg() { echo -e "**\n** ffmpeg ...\n**" OLDDIR=`pwd` cd $TMP/tmp-$PRGNAM # Take care of snaphot directory: if [ -d ffmpeg-export-* ]; then rm -rf ffmpeg-${FFMPEG} mv ffmpeg-export-* ffmpeg-${FFMPEG} fi # Only use patented code if we are allowing it: if [ "${USE_PATENTS}" == "YES" ]; then #USE_PATENTED="--enable-libmp3lame --enable-libamr-nb --enable-libamr-wb --enable-libfaac" USE_PATENTED="--enable-libmp3lame --enable-libfaac" else USE_PATENTED=" " fi cd $TMP/tmp-$PRGNAM/ffmpeg-${FFMPEG} CFLAGS="$SLKCFLAGS -fomit-frame-pointer" \ CXXFLAGS="$SLKCFLAGS -fomit-frame-pointer" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ ${USE_PATENTED} \ --enable-libvorbis \ --enable-libtheora \ --enable-gpl \ --enable-pp \ --enable-pthreads \ --disable-ffserver \ --disable-debug \ --disable-shared \ --enable-static \ --log=$OUTPUT/ffmpeg.conf.log \ --extra-cflags="-I`pwd`/../vlcdeps/usr/include" \ --extra-ldflags="-L`pwd`/../vlcdeps/usr/lib" \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_ffmpeg.log # --enable-libogg \ Newer ffmpeg no longer need this. # --enable-swscaler \ generates compile errors in vlc, like # undefined reference to `img_resample_close' . # --enable-libxvid \ generates vlc linker errors, so we use ffmpeg's # native xvid encoder implementation instead make 2>&1 | tee $OUTPUT/make-${PRGNAM}_ffmpeg.log [ $? -ne 0 ] && return 1 # Install ffmpeg into a temp location so vlc can pickup the libraries make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_ffmpeg.log cd $OLDDIR } # ----------------------------------------------------------------------------- # Next, compile wxGTK # We will link VLC statically to the generated libraries # ----------------------------------------------------------------------------- make_wxgtk() { echo -e "**\n** wxGTK ...\n**" cd $TMP/tmp-$PRGNAM/wxGTK-${WXGTK} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-unicode \ --enable-plugins \ --disable-shared \ --with-sdl \ --enable-unicode \ --enable-optimise \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_wxgtk.log # --with-x11 \ refuses to compile with error # "./include/wx/app.h:644:31: wx/univ/theme.h: No such file or directory" make 2>&1 | tee $OUTPUT/make-${PRGNAM}_wxgtk.log cd - } # ----------------------------------------------------------------------------- # ADDITIONAL CODECS AND INPUT LIBRARIES FOR VLC # ----------------------------------------------------------------------------- # ----------------------------------------------------------------------------- # Compile faad2 # ----------------------------------------------------------------------------- make_faad2() { echo -e "**\n** faad2 ...\n**" cd $TMP/tmp-$PRGNAM/faad2 autoreconf -vif CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --with-drm \ --with-mp4v2 \ --without-xmms \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_faad2.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_faad2.log cd - } # ----------------------------------------------------------------------------- # Compile a52 libraries # ----------------------------------------------------------------------------- make_a52() { echo -e "**\n** a52 ...\n**" cd $TMP/tmp-$PRGNAM/a52dec-${A52} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_a52.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_a52.log cd - } # ----------------------------------------------------------------------------- # Compile live555 # ----------------------------------------------------------------------------- make_live555() { echo -e "**\n** live555 ...\n**" cd $TMP/tmp-$PRGNAM/live # Force the use of our CFLAGS sed -i -e "s|-O2|${SLKCFLAGS}|g" config.linux ./genMakefiles linux 2>&1 | tee $OUTPUT/configure-${PRGNAM}_live.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_live.log cd - } # ----------------------------------------------------------------------------- # Compile matroska # ----------------------------------------------------------------------------- make_matroska() { echo -e "**\n** ebml and matroska ...\n**" cd $TMP/tmp-$PRGNAM/libebml-$EBML/make/linux CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ make staticlib prefix=/usr \ 2>&1 | tee $OUTPUT/make-${PRGNAM}_matroska.log cd - echo -e "**\n**\n**" >> $OUTPUT/make-${PRGNAM}_matroska.log cd $TMP/tmp-$PRGNAM/libmatroska-$MATROSKA/make/linux CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ make staticlib prefix=/usr \ LIBEBML_INCLUDE_DIR=`pwd`/../../../libebml-$EBML \ LIBEBML_LIB_DIR=`pwd`/../../../libebml-$EBML/make/linux \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_matroska.log # Install into a temp directory where vlc can pick it up: make install_staticlib install_headers \ prefix=`pwd`/../../../vlcdeps/usr \ includedir=`pwd`/../../../vlcdeps/usr/include/matroska \ libdir=`pwd`/../../../vlcdeps/usr/lib \ LIBEBML_INCLUDE_DIR=`pwd`/../../../libebml-$EBML \ LIBEBML_LIB_DIR=`pwd`/../../../libebml-$EBML/make/linux \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_matroska.log cd - } # ----------------------------------------------------------------------------- # Compile mpeg2dec # ----------------------------------------------------------------------------- make_mpeg2dec() { echo -e "**\n** mpeg2dec (libmpeg2) ...\n**" cd $TMP/tmp-$PRGNAM/mpeg2dec-$MPEG2DEC if [ ! -r configure ]; then sh bootstrap fi CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_mpeg2dec.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_mpeg2dec.log # Install mpeg2dec into a temp location so vlc can pickup the library make install DESTDIR=`pwd`/../vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_mpeg2dec.log cd - } # ----------------------------------------------------------------------------- # Compile libmpcdec # ----------------------------------------------------------------------------- make_mpcdec() { echo -e "**\n** libmpcdec ...\n**" cd $TMP/tmp-$PRGNAM/libmpcdec-$MPCDEC CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_mpcdec.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_mpcdec.log # Install mpcdec into a temp location so vlc can pickup the library make install DESTDIR=`pwd`/../vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_mpcdec.log cd - } # ----------------------------------------------------------------------------- # Compile libdvdnav # ----------------------------------------------------------------------------- make_dvdnav() { echo -e "**\n** libdvdnav ...\n**" cd $TMP/tmp-$PRGNAM/libdvdnav-$DVDNAV ./autogen.sh CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dvdnav.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dvdnav.log # Install libdvdnav into a temp location so vlc can pickup the library make install DESTDIR=`pwd`/../vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_dvdnav.log cd - } # ----------------------------------------------------------------------------- # Compile libdvdcss # ----------------------------------------------------------------------------- make_dvdcss() { echo -e "**\n** libdvdcss ...\n**" cd $TMP/tmp-$PRGNAM/libdvdcss-$DVDCSS CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dvdcss.log # Shared library needed so that libdvdread can query the library #--ensable-shared \ make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dvdcss.log # Install libdvdcss into a temp location so libdvdread can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_dvdcss.log cd - } # ----------------------------------------------------------------------------- # Compile libdvdread # ----------------------------------------------------------------------------- make_dvdread() { echo -e "**\n** libdvdread ...\n**" cd $TMP/tmp-$PRGNAM/libdvdread-$DVDREAD CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dvdread.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dvdread.log cd - } # ----------------------------------------------------------------------------- # Compile libcddb # ----------------------------------------------------------------------------- make_cddb() { echo -e "**\n** libcddb ...\n**" cd $TMP/tmp-$PRGNAM/libcddb-$CDDB CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ CXXFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ LDFLAGS="$SLKLDFLAGS -I`pwd`/../vlcdeps/usr/lib" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_cddb.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_cddb.log # Install libcddb into a temp location so cdio and vlc can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_cddb.log cd - } # ----------------------------------------------------------------------------- # Compile libcdio # ----------------------------------------------------------------------------- make_cdio() { echo -e "**\n** libcdio ...\n**" DO_VCD=${1:-" "} cd $TMP/tmp-$PRGNAM/libcdio-$CDIO # Seems I need this ugly prefix or else I have to dig into the problem of libvcd # incorrectly interpreting libcdio.la contents... CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ CXXFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ LDFLAGS="$SLKLDFLAGS -I`pwd`/../vlcdeps/usr/lib" \ PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \ ./configure --prefix=$TMP/tmp-$PRGNAM/vlcdeps/usr \ --enable-static \ --disable-shared \ --enable-joliet \ --enable-rock \ --disable-cddb \ $DO_VCD \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_cdio.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_cdio.log # Install libcdio into a temp location so vlc can pickup the library echo -e "\n**\n**\n" #make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ make install \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_cdio.log cd - } # ----------------------------------------------------------------------------- # Compile libvcd # ----------------------------------------------------------------------------- make_vcd() { echo -e "**\n** libvcd ...\n**" cd $TMP/tmp-$PRGNAM/vcdimager-$VCD CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ CXXFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ LDFLAGS="$SLKLDFLAGS -L`pwd`/../vlcdeps/usr/lib" \ PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_vcd.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_vcd.log # Install libvcd into a temp location so vlc can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_vcd.log cd - } # ----------------------------------------------------------------------------- # Compile twolame # ----------------------------------------------------------------------------- make_twolame() { echo -e "**\n** twolame ...\n**" cd $TMP/tmp-$PRGNAM/twolame-$TWOLAME CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_twolame.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_twolame.log # Install twolame into a temp location so vlc can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_twolame.log cd - } # ----------------------------------------------------------------------------- # Compile libdaap # ----------------------------------------------------------------------------- make_daap() { echo -e "**\n** libdaap ...\n**" cd $TMP/tmp-$PRGNAM/libopendaap-$DAAP CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_daap.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_daap.log # Install libdaap into a temp location so vlc can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_daap.log cd - } # ----------------------------------------------------------------------------- # Compile dirac # ----------------------------------------------------------------------------- make_dirac() { echo -e "**\n** dirac ...\n**" cd $TMP/tmp-$PRGNAM/dirac-$DIRAC CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dirac.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dirac.log # Install dirac into a temp location so vlc can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_dirac.log # Or else the vlc build wil fail: mv $TMP/tmp-$PRGNAM/vlcdeps/usr/include/dirac/libdirac* \ $TMP/tmp-$PRGNAM/vlcdeps/usr/include/ cd - } # ----------------------------------------------------------------------------- # Compile speex codec # ----------------------------------------------------------------------------- make_speex() { echo -e "**\n** speex ...\n**" cd $TMP/tmp-$PRGNAM/speex-$SPEEX CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_speex.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_speex.log # Install speex into a temp location so libshout and vlc can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_speex.log cd - } # ----------------------------------------------------------------------------- # Compile libshout # ----------------------------------------------------------------------------- make_shout() { echo -e "**\n** libshout ...\n**" cd $TMP/tmp-$PRGNAM/libshout-$SHOUT CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ CPPFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ LDFLAGS="$SLKLDFLAGS -L`pwd`/../vlcdeps/usr/lib" \ PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \ ./configure --prefix=/usr \ --enable-speex \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_shout.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_shout.log # Install libshout into a temp location so vlc can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_shout.log cd - } # ----------------------------------------------------------------------------- # Compile goom # ----------------------------------------------------------------------------- make_goom() { echo -e "**\n** goom ...\n**" # First, fix a blatant bug in the archive: find $TMP/tmp-$PRGNAM/goom${GOOM} -type d -exec chmod 755 {} \; cd $TMP/tmp-$PRGNAM/goom${GOOM} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_goom.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_goom.log # No need to install, vlc wants the source tree cd - } # ----------------------------------------------------------------------------- # Compile ggi # ----------------------------------------------------------------------------- make_ggi() { echo -e "**\n** ggi ...\n**" INDIR=`pwd` # First libgii which is a dependency cd $TMP/tmp-$PRGNAM/ggi-${GGI}-bundle/libgii-$GII # Do not add '-fPIC' or "undefined reference to `ggGetSwarType'" will occur # when building cpuinfo: CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=$TMP/tmp-$PRGNAM/vlcdeps/usr \ --sysconfdir=$TMP/tmp-$PRGNAM/vlcdeps/etc \ --enable-static \ --disable-shared \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_ggi.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_ggi.log # Install gii into a temp location so libggi can pickup the library echo -e "\n**\n**\n" make install \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_ggi.log # Next, libggi cd $TMP/tmp-$PRGNAM/ggi-${GGI}-bundle/libggi-$GGI CFLAGS="$SLKCFLAGS" \ CPPFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --sysconfdir=/etc \ --enable-static \ --disable-shared \ --disable-debug \ --with-gii=`pwd`/../../vlcdeps/usr \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee -a $OUTPUT/configure-${PRGNAM}_ggi.log make 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_ggi.log # Install ggi into a temp location so vlc can pickup the library echo -e "\n**\n**\n" make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_ggi.log cd $INDIR } # ----------------------------------------------------------------------------- # Compile x264 # ----------------------------------------------------------------------------- make_x264() { echo -e "**\n** x264 ...\n**" cd $TMP/tmp-$PRGNAM/x264-snapshot-${X264} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_x264.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_x264.log # No need to install, vlc wants the source tree cd - } # ----------------------------------------------------------------------------- # Compile dv # ----------------------------------------------------------------------------- make_dv() { echo -e "**\n** dv ...\n**" cd $TMP/tmp-$PRGNAM/libdv-${DV} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --disable-gtk \ --disable-xv \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dv.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dv.log # Install dv into a temp location so vlc can pickup the library make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee $OUTPUT/make-${PRGNAM}_dv.log cd - } # ----------------------------------------------------------------------------- # Compile libdvbpsi library # ----------------------------------------------------------------------------- make_dvbpsi() { echo -e "**\n** dvbpsi ...\n**" cd $TMP/tmp-$PRGNAM/libdvbpsi5-${DVBPSI} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --disable-debug \ --enable-release \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dvbpsi.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dvbpsi.log # Install dvbpsi into a temp location so vlc can pickup the library make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_dvbpsi.log cd - } # ----------------------------------------------------------------------------- # Compile libdca library # ----------------------------------------------------------------------------- make_dca() { echo -e "**\n** dca ...\n**" cd $TMP/tmp-$PRGNAM/libdca-${DCA} CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=/usr \ --enable-static \ --disable-shared \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dca.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dca.log # Install dca into a temp location so vlc can pickup the library make install DESTDIR=$TMP/tmp-$PRGNAM/vlcdeps \ 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_dca.log cd - } # ----------------------------------------------------------------------------- # Compile avc1394 raw1394 and dc1394 libraries # VLC will use these # ----------------------------------------------------------------------------- make_1394() { echo -e "**\n** 1394 ...\n**" OLDDIR=`pwd` cd $TMP/tmp-$PRGNAM/libraw1394-${RAW1394} # Or else vlc compilation fails with "error: redefinition of typedef 'byte_t'" patch -p0 < $SRCDIR/libraw1394_typedef.patch \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}_raw1394.log # Seems I need this ugly prefix or else I have to dig into the problem of vlc # incorrectly interpreting libcdio.la contents... CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ LDFLAGS="$SLKLDFLAGS" \ ./configure --prefix=$TMP/tmp-$PRGNAM/vlcdeps/usr \ --mandir=/usr/man \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_raw1394.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_raw1394.log # Install libraw1394 into a temp location so vlc can pickup the library make install 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_raw1394.log echo -e "**\n**" cd $TMP/tmp-$PRGNAM/libavc1394-${AVC1394} CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ CPPFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ LDFLAGS="$SLKLDFLAGS -L`pwd`/../vlcdeps/usr/lib" \ PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \ LIBRAW1394_CFLAGS="-I`pwd`/../vlcdeps/usr/include" \ LIBRAW1394_LIBS="-L`pwd`/../vlcdeps/usr/lib -lraw1394" \ ./configure --prefix=$TMP/tmp-$PRGNAM/vlcdeps/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_avc1394.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_avc1394.log # Install libavc1394 into a temp location so vlc can pickup the library make install 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_avc1394.log echo -e "**\n**" cd $TMP/tmp-$PRGNAM/libdc1394-${DC1394} # Make sure that the static libraw1394 is found in the vlcdeps: CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ CPPFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ LDFLAGS="$SLKLDFLAGS -L`pwd`/../vlcdeps/usr/lib" \ PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \ ./configure --prefix=$TMP/tmp-$PRGNAM/vlcdeps/usr \ --enable-static \ --disable-shared \ --program-prefix="" \ --program-suffix="" \ --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}_dc1394.log make 2>&1 | tee $OUTPUT/make-${PRGNAM}_dc1394.log # Install libdc1394 into a temp location so vlc can pickup the library make install 2>&1 | tee -a $OUTPUT/make-${PRGNAM}_dc1394.log cd $OLDDIR } # ----------------------------------------------------------------------------- # VLC # ----------------------------------------------------------------------------- make_vlc() { echo -e "**\n** VLC ...\n**" cd $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION} echo "" >$OUTPUT/patch-${PRGNAM}.log # Configure a default Slackware TTF font: cat $SRCDIR/vlc_deffont.patch | sed "s#@@XPREFIX@@#$XPREF#" | patch -p1 \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Fix support for 0.8.x versions of the dirac codec: # (see http://livna.org/pipermail/subversion/2007-October/007104.html) cat $SRCDIR/vlc_dirac-0.8.0-api.patch | patch -p1 \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Fix support for 0.9.x versions of the dirac codec (apply after the previous): # (see http://trac.videolan.org/vlc/changeset/24672) cat $SRCDIR/vlc_dirac-0.9.0-api.patch | patch -p1 \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log ## Add support for AMR if compiled into static ffmpeg #cat $SRCDIR/vlc_amr.patch | patch -p0 \ # 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Fix the errors caused by incorrect osd paths: cat $SRCDIR/vlc-0.8.6a_osdmenu_paths.patch | patch -p1 \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Fix PLUGIN_PATH path for lib64 sed -i -e 's|/lib/vlc|/usr/lib${LIBDIRSUFFIX}/vlc|g' vlc-config.in.in configure* \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Fix compilation errors for recent (end 2007) versions of ffmpeg: cat $SRCDIR/vlc_ffmpeg_mux.patch | patch -p1 \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Fix compilation errors for cdio version > 0.78.2 cat $SRCDIR/vlc_libcdio-0.78.2.patch | patch -p1 \ 2>&1 | tee -a $OUTPUT/patch-${PRGNAM}.log # Preparations for building a separate vlc mozilla plugin : if [ "$MOZPLUGIN" == "YES" ]; then echo "+++ Building mozilla plugin using $MOZBROWSER sdk +++" # Fix perms issues chmod 644 mozilla/control/* chmod 644 src/control/log.c sed -i 's/\r//' mozilla/control/* # Fix Seamonkey includes for mozilla vlc plugin. find mozilla/* -type f -name "*.cpp" -exec sed -i \ "s||<${MOZBROWSER}/mozilla-config.h>|" \{} \; find mozilla/* -type f -name "*.h" -exec sed -i \ "s||<${MOZBROWSER}/plugin/npapi.h>|" \{} \; # Fix mozilla plugin: export XPIDL="/usr/lib/${MOZBROWSER}/xpidl" export XPIDL_INCL="-I/usr/include/${MOZBROWSER} \ -I/usr/share/idl/$MOZBROWSER}" else echo "+++ NOT building mozilla plugin - this needs the Seamonkey package! +++" fi # Only enable DLL loader on ELF ix86 platforms: if [ "$ARCH" == "i386" -o "$ARCH" == "i486" ]; then DO_LOADER="--enable-loader" else DO_LOADER="" fi # Only use patented code if we are allowing it: if [ "${USE_PATENTS}" == "YES" ]; then DO_FFMPEG_PATENTED="--with-ffmpeg-mp3lame \ --enable-faad \ --with-faad-tree=$TMP/tmp-$PRGNAM/faad2 \ --with-ffmpeg-faac" # --with-ffmpeg-amrnb --with-fmpeg-amrwb #DO_FFMPEG_LIBS_PAT="-lamrnb -lamrwb -lfaac -lmp3lame" DO_FFMPEG_LIBS_PAT="-lfaac -lmp3lame" else DO_FFMPEG_PATENTED=" " DO_FFMPEG_LIBS_PAT="" fi sh bootstrap CFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ CPPFLAGS="$SLKCFLAGS -I`pwd`/../vlcdeps/usr/include" \ LDFLAGS="$SLKLDFLAGS -L`pwd`/../vlcdeps/usr/lib" \ PKG_CONFIG_PATH="`pwd`/../vlcdeps/usr/lib/pkgconfig" \ ./configure --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --sysconfdir=/etc \ --localstatedir=/var \ --without-contrib \ --disable-debug \ --enable-static \ --disable-shared \ --disable-qt \ --disable-kde \ --disable-arts \ --disable-gnomevfs \ --enable-dv \ --enable-dvbpsi \ --with-dvbpsi-tree=$TMP/tmp-$PRGNAM/libdvbpsi5-${DVBPSI} \ --enable-pvr \ --enable-dc1394 \ --with-dv-raw1394=$TMP/tmp-$PRGNAM/libraw1394-${RAW1394} \ --with-dv-avc1394=$TMP/tmp-$PRGNAM/libavc1394-${AVC1394} \ --enable-dvdread \ --with-dvdread-tree=$TMP/tmp-$PRGNAM/libdvdread-$DVDREAD \ --enable-dvdnav \ --with-dvdnav-config-path=$TMP/tmp-$PRGNAM/vlcdeps/usr/bin \ --enable-libcdio \ --enable-cddax \ --enable-vcdx \ --enable-libcddb \ --enable-svg \ --enable-sdl \ --enable-ggi \ --enable-telx \ --disable-zvbi \ --enable-svgalib \ --enable-xvideo \ --enable-ncurses \ --enable-release \ --enable-optimize-memory \ ${DO_LOADER} \ --disable-testsuite \ --enable-snapshot \ --enable-v4l \ --enable-caca \ --enable-aa \ --enable-galaktos \ --enable-goom \ --with-goom-tree=$TMP/tmp-$PRGNAM/goom$GOOM \ --enable-esd \ --enable-mad \ --enable-flac \ --enable-taglib \ --enable-musicbrainz \ --enable-freetype \ --enable-skins2 \ --enable-dca \ --enable-mkv \ --enable-mpeg2 \ --enable-mpc \ --enable-twolame \ --enable-daap \ --enable-speex \ --with-speex-tree=$TMP/tmp-$PRGNAM/speex-$SPEEX \ --enable-shout \ --enable-dirac \ --enable-x264 \ --with-x264-tree=$TMP/tmp-$PRGNAM/x264-snapshot-$X264 \ --enable-a52 \ --with-a52-tree=$TMP/tmp-$PRGNAM/a52dec-$A52 \ --enable-live555 \ --with-live555-tree=$TMP/tmp-$PRGNAM/live \ --enable-real \ --enable-realrtsp \ --enable-ogg \ --enable-vorbis \ --enable-theora \ --enable-ffmpeg \ ${DO_FFMPEG_PATENTED} \ --with-ffmpeg-theora \ --with-ffmpeg-vorbis \ --with-ffmpeg-ogg \ --with-ffmpeg-zlib \ --with-ffmpeg-tree=$TMP/tmp-$PRGNAM/ffmpeg-${FFMPEG} \ --with-wx-config-path=$TMP/tmp-$PRGNAM/wxGTK-${WXGTK} \ ${DO_MOZPLUGIN} \ --program-prefix="" \ --program-suffix="" \ --build=i486-slackware-linux \ FFMPEG_LIBS="-lavformat -lavcodec -lz ${DO_FFMPEG_LIBS_PAT} -ldl -ltheora -lvorbisenc -lavutil -lvorbis -lm -logg -lpostproc" \ FFMPEG_CFLAGS="" \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log # Try without this... --disable-gtk \ # It did not pick up wxGTK with --enable-wxwidgets \ make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log cd - } # ----------------------------------------------------------------------------- # These routines do all the work of setting up the package contents # and creating the actual Slackware packages in $OUTPUT # ----------------------------------------------------------------------------- build_mozplugin() { echo -e "**\n** mozplugin ...\n**" cd $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION} # Get the plugin file from the vlc build directory: mkdir -p $PKG2/usr/lib/mozilla/plugins/ if [ -f ./mozilla/libvlcplugin.so ]; then VLCPLUGINSO=./mozilla/libvlcplugin.so else VLCPLUGINSO=./mozilla/.libs/libvlcplugin.so fi cp -a ${VLCPLUGINSO} $PKG2/usr/lib/mozilla/plugins/ strip --strip-unneeded $PKG2/usr/lib/mozilla/plugins/libvlcplugin.so mkdir -p $PKG2/install cat $SRCDIR/slack-desc.$PRGNAM2 > $PKG2/install/slack-desc if [ -f $SRCDIR/slack-required.$PRGNAM2 ]; then cat $SRCDIR/slack-required.$PRGNAM2 > $PKG2/install/slack-required fi cd $PKG2 makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM2}.log cd $OUTPUT md5sum ${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.tgz.md5 cd - cat $PKG2/install/slack-desc | grep "^${PRGNAM}-${PRGNAM2}" > $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.txt if [ -f $PKG2/install/slack-required ]; then cat $PKG2/install/slack-required > $OUTPUT/${PRGNAM}-${PRGNAM2}-${VERSION}-${ARCH}-${BUILD}.dep fi } build_slackpkg() { echo -e "**\n** building the package ...\n**" # # Install all the needed stuff to the package dir # cd $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION} # 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 # We don't want the mozilla plugin here: [ -d $PKG/usr/lib/mozilla ] && rm -rf $PKG/usr/lib/mozilla # Add a menu icon mkdir -p $PKG/usr/share/pixmaps cp -a $PKG/usr/share/vlc/vlc48x48.png $PKG/usr/share/pixmaps/vlc.png # Fix the .desktop file sed -i -e "s#^Icon=${PRGNAM}#Icon=/usr/share/pixmaps/${PRGNAM}.png#" \ $PKG/usr/share/applications/${PRGNAM}.desktop \ || true # --- DOCUMENTATION --- mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mv $PKG/usr/share/doc/vlc/* $PKG/usr/doc/$PRGNAM-$VERSION || true rm -rf $PKG/usr/share/doc cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true chmod -R a-w $PKG/usr/doc/$PRGNAM-$VERSION/* # Compress the man page(s) if [ -d $PKG/usr/man ]; then find $PKG/usr/man -type f -name "*.?" -exec gzip -9f {} \; for i in `find $PKG/usr/man -type l -name "*.?"` ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done fi # Strip binaries cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true cd - # --- OWNERSHIP, RIGHTS --- chown -R root:root $PKG chmod -R o-w $PKG # --- PACKAGE DESCRIPTION --- mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc if [ -f $SRCDIR/doinst.sh ]; then cat $SRCDIR/doinst.sh >> $PKG/install/doinst.sh fi if [ -f $SRCDIR/slack-required ]; then cat $SRCDIR/slack-required > $PKG/install/slack-required fi # --- BUILDING --- # Build the package: cd $PKG makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log cd $OUTPUT md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.tgz.md5 cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.txt if [ -f $PKG/install/slack-required ]; then cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}.dep fi # Clean up the extra stuff: if [ "$P1" = "--cleanup" ]; then rm -rf $TMP/tmp-$PRGNAM rm -rf $PKG rm -rf $PKG2 fi } # ----------------------------------------------------------------------------- # OK - we wrapped the separate components into convenience functions # - now call them one by one: # ----------------------------------------------------------------------------- #if ( "xy" == "x" ); then # CD/VCD image support: # Circular dependencies need these loops: make_cdio --disable-vcd-info make_vcd make_cdio # vlc wants this, but cdio chokes with "cannot find -lcddb" so build it after # cdio (which only used cddb for the cd-info binary which we don't use): make_cddb # DVD support: make_dvdnav # Do not build libdvdcss since I can't get it to link statically to dvdread # Instead, let dvdread automatically use an external libdvdcss if available. ##make_dvdcss make_dvdread # Needed before ffmpeg: make_theora # Only use patented code if we are allowing it: if [ "${USE_PATENTS}" == "YES" ]; then make_lame #make_amrnb #make_amrwb make_faac fi # ffmpeg uses the above static libraries: make_ffmpeg || exit 1 # wxgtk is used for the vlc gui: make_wxgtk # Additional libraries that vlc will use: # Only use patented code if we are allowing it: if [ "${USE_PATENTS}" == "YES" ]; then make_faad2 fi make_a52 make_live555 make_matroska make_mpeg2dec make_mpcdec make_twolame make_daap make_dirac make_x264 make_goom make_ggi make_dvbpsi make_dv make_dca make_1394 # Speex before shout and vlc: make_speex make_shout #fi # End ( "xy" == "x" ) # And finally, let vlc collect all of the above into one app: make_vlc # Should we also build a package for the mozilla plugin? if [ "$MOZPLUGIN" == "YES" ]; then build_mozplugin fi # Pack all this stuff into a Slackware package (this routine also will execute # the '--cleanup' functionality if requested): build_slackpkg "$*"