Skip to content

Commit

Permalink
libmp4v2: rebuilt
Browse files Browse the repository at this point in the history
  • Loading branch information
conraid committed Apr 29, 2016
1 parent 0eded40 commit fc17694
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 92 deletions.
4 changes: 1 addition & 3 deletions libmp4v2/README
@@ -1,5 +1,5 @@

Slackware Current Repository by Conraid
Slackware Current Repository by Conraid

======================================================================

Expand All @@ -10,8 +10,6 @@ files. This is a standalone version of mp4v2 library. It is
derived from the mpeg4ip source tree, but for licensing reasons
it has been adapted to this form.



HOME: http://code.google.com/p/mp4v2

======================================================================
147 changes: 59 additions & 88 deletions libmp4v2/libmp4v2.SlackBuild
Expand Up @@ -2,133 +2,104 @@
#
# Slackware build script for libmp4v2 (http://resare.com/libmp4v2/)
#
# Copyright 2008-2012 Corrado Franco (http://conraid.net)
# Copyright 2008-2016 Corrado Franco (http://conraid.net)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS 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 AUTHOR 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.

# Exit on most errors
set -e

# Set variables:
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version, with the following exception:
# the text of the GPL license may be omitted.

# This program is distributed in the hope that it will be useful, but
# without any warranty; without even the implied warranty of
# merchantability or fitness for a particular purpose. Compiling,
# interpreting, executing or merely reading the text of the program
# may result in lapses of consciousness and/or very being, up to and
# including the end of all existence and the Universe as we know it.
# See the GNU General Public License for more details.

# You may have received a copy of the GNU General Public License along
# with this program (most likely, a file named COPYING). If not, see
# <http://www.gnu.org/licenses/>.

set -eu

CWD=$(pwd)

PRGNAME=mp4v2
PKGNAME=libmp4v2
PRGNAM=mp4v2
PKGNAM=libmp4v2
VERSION=2.0.0
PKGVERSION=2.0.0
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-cf}
TMP=${TMP:-/tmp/pkg}
PKG=$TMP/package-$PKGNAME
DOCS="$PKG/usr/doc/$PKGNAME-$VERSION"
PKG=$TMP/package-$PKGNAM
OUTPUT=${OUTPUT:-/tmp}

# Insert document files in this variable
DOCFILES="COPYING INSTALL README"

# Automatically determine the architecture we are building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i686 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) ARCH=$( uname -m ) ;;
esac
if [ -z ${ARCH:=""} ]; then
case "$( uname -m )" in
i?86) ARCH=i686 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
fi

if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC -pipe -fomit-frame-pointer"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
fi

# Set compiling FLAGS
case "$ARCH" in
i486)
SLKCFLAGS="-O2 -march=i486 -mtune=i686"; CHOST="i486"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
i686)
SLKCFLAGS="-O2 -march=i686 -pipe -fomit-frame-pointer"; CHOST="i486"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
x86_64)
SLKCFLAGS="-O2 -pipe -fomit-frame-pointer"; CHOST="x86_64"
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
*)
SLKCFLAGS="-O2"; CHOST=$ARCH
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
esac

# Extract source and prepare:
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf $PRGNAME-$VERSION
tar xjvf $CWD/$PRGNAME-$VERSION.tar.bz2
cd $PRGNAME-$VERSION
rm -rf $PRGNAM-$VERSION
tar xjvf $CWD/$PRGNAM-$VERSION.tar.bz2
cd $PRGNAM-$VERSION

# Make sure ownerships and permissions are sane:
chown -R root:root .
chmod -R u+w,go+r-w,a-s .

# Configure
LDFLAGS="$SLKLDFLAGS" \
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
CFLAGS="$SLKCFLAGS" \
XXFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
--infodir=/usr/info \
--docdir=/usr/doc/${PKGNAME}-${PKGVERSION} \
--docdir=/usr/doc/$PKGNAM-$VERSION \
--disable-static \
--host=$CHOST-slackware-linux \
--build=$CHOST-slackware-linux
--host=$ARCH-slackware-linux \
--build=$ARCH-slackware-linux

# Build and install:
make
make DESTDIR=$PKG install-strip

# Compress and link manpages, if any:
if [ -d $PKG/usr/man ]; then
find $PKG/usr/man -type f -exec gzip -9 {} \;
rm -rf $PKG/usr/man/manm
fi

# Add a documentation directory:
mkdir -p ${DOCS}
for i in ${DOCFILES}; do
if [ -e ${i} ]; then
if ! [ -L ${i} ]; then
cp -a ${i} ${DOCS}
else
cp -LRp ${i} ${DOCS}
fi
fi;
done

# Add a slackbuild script:
cat $CWD/$PKGNAME.SlackBuild > $DOCS/$PKGNAME.SlackBuild

# Add slack-desc
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
cp -a $DOCFILES $PKG/usr/doc/$PKGNAM-$VERSION || true
cat $CWD/$PKGNAM.SlackBuild > $PKG/usr/doc/$PKGNAM-$VERSION/$PKGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

# Create package:
cd $PKG
/sbin/makepkg -l y -c n $CWD/$PKGNAME-$PKGVERSION-$ARCH-${BUILD}${TAG}.txz
/sbin/makepkg -l y -c n $OUTPUT/$PKGNAM-$VERSION-$ARCH-$BUILD${TAG}.txz

2 changes: 1 addition & 1 deletion libmp4v2/slack-desc
Expand Up @@ -13,7 +13,7 @@ libmp4v2: files. This is a standalone version of mp4v2 library. It is
libmp4v2: derived from the mpeg4ip source tree, but for licensing reasons
libmp4v2: it has been adapted to this form.
libmp4v2:
libmp4v2: Home: http://code.google.com/p/mp4v2/
libmp4v2:
libmp4v2:
libmp4v2:
libmp4v2:

0 comments on commit fc17694

Please sign in to comment.