summaryrefslogtreecommitdiffstats
path: root/libraries/libmp4v2/libmp4v2.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/libmp4v2/libmp4v2.SlackBuild')
-rw-r--r--libraries/libmp4v2/libmp4v2.SlackBuild52
1 files changed, 34 insertions, 18 deletions
diff --git a/libraries/libmp4v2/libmp4v2.SlackBuild b/libraries/libmp4v2/libmp4v2.SlackBuild
index e1550512cf..f1606af79e 100644
--- a/libraries/libmp4v2/libmp4v2.SlackBuild
+++ b/libraries/libmp4v2/libmp4v2.SlackBuild
@@ -1,8 +1,9 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for libmp4v2
# Copyright (c) 2007 Alex Lysenka <me@alkos333.net>
+# Copyright (c) 2020 Matteo Bernardini <ponce@slackbuilds.org>, Pisa, Italy
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -33,27 +34,36 @@
# Modified by the SlackBuilds.org Project
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=libmp4v2
-SRCNAM=mp4v2
-VERSION=${VERSION:-2.0.0}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-20191108_9084868}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi
-CWD=$(pwd)
+# 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 "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -68,17 +78,23 @@ fi
set -e
-rm -rf $TMP/$SRCNAM-$VERSION $PKG
+rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
-cd $SRCNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.?z*
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+# Fix gcc 'narrowing errors":
+patch -p1 < "$CWD/libmp4v2_gcc_narrowing.patch" || exit 1
+
+autoreconf -vif
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -93,21 +109,21 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
-find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
+find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a \
- COPYING README \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING README $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc/$PRGNAM-$VERSION -type f -exec chmod 644 {} \;
find $PKG/usr/man -type f -exec gzip -9 {} \;
-rm -rf $PKG/usr/man/manm
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+rm -f $PKG/usr/lib*/*.la
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE