summaryrefslogtreecommitdiffstats
path: root/xvidcore
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2010-01-30 14:21:18 +0000
committer Eric Hameleers <alien@slackware.com>2010-01-30 14:21:18 +0000
commit5ca94a9d3291102522cbc6e47e26c603dfecc73f (patch)
tree50f8e0e960cf8ba0b1312a8658fd5c9d450711be /xvidcore
parentc51f12817b022b90a95fda5ce1e0d666d8807022 (diff)
downloadasb-5ca94a9d3291102522cbc6e47e26c603dfecc73f.tar.gz
asb-5ca94a9d3291102522cbc6e47e26c603dfecc73f.tar.xz
Strip the .a static library so avidemux will not falter over the textrels when building on x86_64
Diffstat (limited to 'xvidcore')
-rwxr-xr-xxvidcore/build/xvidcore.SlackBuild42
1 files changed, 26 insertions, 16 deletions
diff --git a/xvidcore/build/xvidcore.SlackBuild b/xvidcore/build/xvidcore.SlackBuild
index 47ba0cee..97b453de 100755
--- a/xvidcore/build/xvidcore.SlackBuild
+++ b/xvidcore/build/xvidcore.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright (c) 2009 Eric Hameleers, Eindhoven, NL
+# Copyright (c) 2009, 2010 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -34,6 +34,8 @@
# * Initial build.
# 1.2.2-1: 26/sep/2009 by Eric Hameleers <alien@slackware.com>
# * Update.
+# 1.2.2-2: 26/sep/2009 by Eric Hameleers <alien@slackware.com>
+# * Rebuild to fix linking with avidemux on x86_64.
#
# Run 'sh xvidcore.SlackBuild' to build a Slackware package.
# The package (.tgz) and .txt file as well as build logs are created in /tmp .
@@ -45,8 +47,7 @@
PRGNAM=xvidcore
VERSION=${VERSION:-1.2.2}
-ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:" -j4 "}
TAG=${TAG:-alien}
@@ -67,28 +68,35 @@ SRCURL="http://downloads.xvid.org/downloads/${PRGNAM}-${VERSION}.tar.gz"
## --- 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}
+# 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 ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
case "$ARCH" in
i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- s390) SLKCFLAGS="-O2"
- SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ x86_64) SLKCFLAGS="-O2 -fPIC -DPIC"
+ SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
;;
- powerpc) SLKCFLAGS="-O2"
+ *) SLKCFLAGS="-O2"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
;;
- x86_64) SLKCFLAGS="-O2 -fPIC"
- SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
- ;;
esac
+# 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}
+
# Create working directories:
mkdir -p $OUTPUT # place for the package to be saved
mkdir -p $TMP/tmp-$PRGNAM # location to build the source
@@ -179,7 +187,9 @@ fi
# Strip binaries:
find $PKG | xargs file | grep -e "executable" -e "shared object" \
- | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+find $PKG | xargs file | grep -e "current ar archive" \
+ | cut -f 1 -d : | xargs strip 2> /dev/null || true
# Add a package description:
mkdir -p $PKG/install