From b0039bcda5b94a9646bdedb5b9f82995fcd0fdd3 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Mon, 29 Jun 2020 19:22:21 +0000 Subject: faad2: update to 2.9.2 --- faad2/build/faad2.SlackBuild | 103 ++++++++++++++++++++++++------------------- 1 file changed, 58 insertions(+), 45 deletions(-) diff --git a/faad2/build/faad2.SlackBuild b/faad2/build/faad2.SlackBuild index 75327945..c0274aae 100755 --- a/faad2/build/faad2.SlackBuild +++ b/faad2/build/faad2.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh # $Id$ -# Copyright (c) 2009, 2010, 2011 Eric Hameleers, Eindhoven, NL +# Copyright (c) 2009, 2010, 2011, 2020 Eric Hameleers, Eindhoven, NL # All rights reserved. # # Permission to use, copy, modify, and distribute this software for @@ -24,20 +24,23 @@ # # Slackware SlackBuild script # =========================== -# By: Eric Hameleers -# For: faad2 -# Descr: AAC audio decoder -# URL: http://www.audiocoding.com/ -# Needs: -# Changelog: -# 2.7-1: 19/May/2009 by Eric Hameleers -# * Initial build. -# 2.7-2: 30/Jan/2010 by Eric Hameleers -# * Rebuild. -# 2.7-3: 02/jun/2010 by Eric Hameleers -# * Rebuilt for Slackware 13.1. -# 2.7-4: 19/aug/2011 by Eric Hameleers -# * Make it compile the xmms m4a plugin. +# By: Eric Hameleers +# For: faad2 +# Descr: AAC audio decoder +# URL: http://www.audiocoding.com/ +# Build needs: +# Needs: libmp4v2 +# Changelog: +# 2.7-1: 19/May/2009 by Eric Hameleers +# * Initial build. +# 2.7-2: 30/Jan/2010 by Eric Hameleers +# * Rebuild. +# 2.7-3: 02/jun/2010 by Eric Hameleers +# * Rebuilt for Slackware 13.1. +# 2.7-4: 19/aug/2011 by Eric Hameleers +# * Make it compile the xmms m4a plugin. +# 2.9.2-1: 29/jun/2020 by Eric Hameleers +# * Update. # # Run 'sh faad2.SlackBuild' to build a Slackware package. # The package (.tgz) and .txt file as well as build logs are created in /tmp . @@ -48,12 +51,13 @@ # Set initial variables: PRGNAM=faad2 -VERSION=${VERSION:-2.7} -BUILD=${BUILD:-4} -NUMJOBS=${NUMJOBS:" -j4 "} +VERSION=${VERSION:-2.9.2} +SRCVER=$(echo $VERSION |tr . _) +BUILD=${BUILD:-1} +NUMJOBS=${NUMJOBS:-" -j$(nproc) "} TAG=${TAG:-alien} -DOCS="AUTHORS COPYING ChangeLog NEWS README* TODO" +DOCS="AUTHORS ChangeLog NEWS README* TODO" # Where do we look for sources? SRCDIR=$(cd $(dirname $0); pwd) @@ -63,8 +67,8 @@ TMP=${TMP:-/tmp/build} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.bz2" -SRCURL="http://downloads.sourceforge.net/faac/${PRGNAM}-${VERSION}.tar.bz2" +SOURCE="$SRCDIR/${PRGNAM}-${VERSION}.tar.gz" +SRCURL="https://github.com/knik0/faad2/archive/${SRCVER}.tar.gz" ## ## --- with a little luck, you won't have to edit below this point --- ## @@ -72,24 +76,33 @@ SRCURL="http://downloads.sourceforge.net/faac/${PRGNAM}-${VERSION}.tar.bz2" # 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 ;; + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) readelf /usr/bin/file -A | egrep -q "Tag_CPU.*[4,5]" && ARCH=arm || ARCH=armv7hl ;; # Unless $ARCH is already set, use uname -m for all other archs: - *) export ARCH=$( uname -m ) ;; + *) ARCH=$(uname -m) ;; esac + export ARCH fi - +# Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX: case "$ARCH" in - i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686" + i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; x86_64) SLKCFLAGS="-O2 -fPIC" SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64" ;; - *) SLKCFLAGS="-O2" + armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16" SLKLDFLAGS=""; LIBDIRSUFFIX="" ;; + *) SLKCFLAGS=${SLKCFLAGS:-"-O2"} + SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""} + ;; +esac + +case "$ARCH" in + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; esac # Exit the script on errors: @@ -109,17 +122,18 @@ mkdir -p $TMP/tmp-$PRGNAM # location to build the source mkdir -p $PKG # place for the package to be built rm -rf $PKG/* # always erase old package's contents rm -rf $TMP/tmp-$PRGNAM/* # remove the remnants of previous build -rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log +rm -rf $OUTPUT/{autoreconf,configure,make,install,error,makepkg,patch}-$PRGNAM.log # remove old log files # Source file availability: if ! [ -f ${SOURCE} ]; then + echo "Source '$(basename ${SOURCE})' not available yet..." + # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT + [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" + if [ -f ${SOURCE} ]; then echo "Ah, found it!"; continue; fi if ! [ "x${SRCURL}" == "x" ]; then - # Check if the $SRCDIR is writable at all - if not, download to $OUTPUT - [ -w "$SRCDIR" ] || SOURCE="$OUTPUT/$(basename $SOURCE)" - echo "Source '$(basename ${SOURCE})' not available yet..." echo "Will download file to $(dirname $SOURCE)" - wget -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true + wget --no-check-certificate -nv -T 20 -O "${SOURCE}" "${SRCURL}" || true if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then echo "Downloading '$(basename ${SOURCE})' failed... aborting the build." mv -f "${SOURCE}" "${SOURCE}".FAIL @@ -145,11 +159,13 @@ echo "++" cd $TMP/tmp-$PRGNAM echo "Extracting the source archive(s) for $PRGNAM..." tar -xvf ${SOURCE} -cd ${PRGNAM}-${VERSION} +cd ${PRGNAM}-${SRCVER} chown -R root:root . chmod -R u+w,go+r-w,a+X-s . echo Building ... +[ ! -x configure ] && autoreconf -vif \ + 2>&1 | tee $OUTPUT/autoreconf-${PRGNAM}.log LDFLAGS="$SLKLDFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ CFLAGS="$SLKCFLAGS" \ @@ -159,20 +175,18 @@ CFLAGS="$SLKCFLAGS" \ --mandir=/usr/man \ --localstatedir=/var \ --sysconfdir=/etc \ - --with-xmms \ --enable-static \ --enable-shared \ - --build=$ARCH-slackware-linux \ + --build=$TARGET \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log -make 2>&1 | tee $OUTPUT/make-${PRGNAM}.log +make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log # Install all the needed stuff to the package dir make DESTDIR=$PKG install 2>&1 |tee $OUTPUT/install-${PRGNAM}.log -# Additionally, install libmp4ff -install -m 755 common/mp4ff/libmp4ff.a $PKG/usr/lib${LIBDIRSUFFIX} -install -D common/mp4ff/mp4ff.h $PKG/usr/include/mp4ff.h - +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true @@ -180,10 +194,7 @@ cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; -# Fix man page name and compress: -mkdir -p $PKG/usr/man/man1 -mv $PKG/usr/man/manm/faad.man $PKG/usr/man/man1/faad.1 -rmdir $PKG/usr/man/manm +# Compress man page: 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 @@ -196,6 +207,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \ # Add a package description: mkdir -p $PKG/install cat $SRCDIR/slack-desc > $PKG/install/slack-desc +cat $SRCDIR/slack-required > $PKG/install/slack-required # Build the package: cd $PKG @@ -204,6 +216,7 @@ cd $OUTPUT md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5 cd - cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt +cat $PKG/install/slack-required > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.dep # Restore the original umask: umask ${_UMASK_} -- cgit v1.2.3-65-gdbad