diff options
Diffstat (limited to 'source/l/libmad')
-rwxr-xr-x | source/l/libmad/libmad.SlackBuild | 32 | ||||
-rw-r--r-- | source/l/libmad/slack-desc | 12 |
2 files changed, 29 insertions, 15 deletions
diff --git a/source/l/libmad/libmad.SlackBuild b/source/l/libmad/libmad.SlackBuild index 0a78183d5..ba5e5acab 100755 --- a/source/l/libmad/libmad.SlackBuild +++ b/source/l/libmad/libmad.SlackBuild @@ -1,6 +1,6 @@ -#!/bin/sh +#!/bin/bash -# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2006, 2007, 2008, 2009i, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,25 +20,34 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +cd $(dirname $0) ; CWD=$(pwd) PKGNAM=libmad VERSION=${VERSION:-0.15.1b} -BUILD=${BUILD:-3} +BUILD=${BUILD:-4} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) export ARCH=i486 ;; + i?86) export ARCH=i586 ;; arm*) export ARCH=arm ;; # Unless $ARCH is already set, use uname -m for all other archs: *) export ARCH=$( uname -m ) ;; esac 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-$VERSION-$ARCH-$BUILD.txz" + exit 0 +fi + NUMJOBS=${NUMJOBS:-" -j7 "} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" @@ -51,7 +60,6 @@ else LIBDIRSUFFIX="" fi -CWD=$(pwd) TMP=${TMP:-/tmp} PKG=$TMP/package-${PKGNAM} rm -rf $PKG @@ -60,7 +68,7 @@ mkdir -p $TMP $PKG cd $TMP rm -rf ${PKGNAM}-${VERSION} tar xvf $CWD/${PKGNAM}-$VERSION.tar.gz || exit 1 -cd ${PKGNAM}-$VERSION +cd ${PKGNAM}-$VERSION || exit 1 # Make sure ownerships and permissions are sane: chown -R root:root . @@ -70,6 +78,9 @@ find . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Remove obsolete --force-mem optimization: +sed -i "s/-fforce-mem//g" configure + # Configure: CFLAGS="$SLKCFLAGS" \ ./configure \ @@ -81,12 +92,15 @@ CFLAGS="$SLKCFLAGS" \ --disable-debugging \ --program-prefix= \ --program-suffix= \ - --build=$ARCH-slackware-linux + --build=$ARCH-slackware-linux || exit 1 # Build and install: make $NUMJOBS || make || exit 1 make install DESTDIR=$PKG || exit 1 +# Don't ship .la files: +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + # This is what happens when every distro makes up its own standards mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig sed -e "s#/lib#/lib${LIBDIRSUFFIX}#" $CWD/mad.pc \ diff --git a/source/l/libmad/slack-desc b/source/l/libmad/slack-desc index ecb740d38..3052ad250 100644 --- a/source/l/libmad/slack-desc +++ b/source/l/libmad/slack-desc @@ -1,18 +1,18 @@ # HOW TO EDIT THIS FILE: -# The "handy ruler" below makes it easier to edit a package description. Line +# The "handy ruler" below makes it easier to edit a package description. Line # up the first '|' above the ':' following the base package name, and the '|' -# on the right side marks the last column you can put a character in. You must -# make exactly 11 lines for the formatting to be correct. It's also +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also # customary to leave one space after the ':'. |-----handy-ruler------------------------------------------------------| libmad: libmad (high-quality MPEG audio library) libmad: -libmad: MAD (libmad) is a high-quality MPEG audio decoder. It currently +libmad: MAD (libmad) is a high-quality MPEG audio decoder. It currently libmad: supports MPEG-1 and the MPEG-2 extension to Lower Sampling -libmad: Frequencies, as well as the so-called MPEG 2.5 format. All three +libmad: Frequencies, as well as the so-called MPEG 2.5 format. All three libmad: audio layers (Layer I, Layer II, and Layer III a.k.a. MP3) are -libmad: fully implemented. Because MAD provides full 24-bit PCM output, +libmad: fully implemented. Because MAD provides full 24-bit PCM output, libmad: applications using MAD are able to produce high quality audio. libmad: MAD is distributed under the terms of the GPL. libmad: |