summaryrefslogtreecommitdiffstats
path: root/x264
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2020-10-05 19:39:47 +0000
committer Eric Hameleers <alien@slackware.com>2020-10-05 19:39:47 +0000
commitc516dafa297fafa108aaa192e8664e652df21c7e (patch)
tree88b224aeff43217252e69520b1725ccb55906c54 /x264
parenta4490869b7df1d213809eaa106c8aab55197466e (diff)
downloadasb-c516dafa297fafa108aaa192e8664e652df21c7e.tar.gz
asb-c516dafa297fafa108aaa192e8664e652df21c7e.tar.xz
x264: updated
Diffstat (limited to 'x264')
-rwxr-xr-xx264/build/x264.SlackBuild63
1 files changed, 35 insertions, 28 deletions
diff --git a/x264/build/x264.SlackBuild b/x264/build/x264.SlackBuild
index fd03bddc..70cd7ee3 100755
--- a/x264/build/x264.SlackBuild
+++ b/x264/build/x264.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
# $Id$
-# Copyright 2009, 2010, 2011 Eric Hameleers, Eindhoven, NL
+# Copyright 2009, 2010, 2011, 2013, 2017, 2020 Eric Hameleers, Eindhoven, NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -41,19 +41,23 @@
# * Updated for Slackware 13.1.
# 20110510-1: 11/may/2011 by Eric Hameleers <alien@slackware.com>
# * Updated for Slackware 13.37.
+# 20130524-1: 25/may/2013 by Eric Hameleers <alien@slackware.com>
+# * Updated for Slackware 14.
+# 20170912-1: 13/sep/2017 by Eric Hameleers <alien@slackware.com>
+# * Updated for Slackware 14.2 and -current.
+# 20180324-1: 05/oct/2020 by Eric Hameleers <alien@slackware.com>
+# * Updated for Slackware -current.
#
# Run 'sh x264.SlackBuild' to build a Slackware package.
-# The package (.tgz) and .txt file as well as build logs are created in /tmp .
+# The package (.txz) and .txt file as well as build logs are created in /tmp .
# Install it using 'installpkg'.
#
# -----------------------------------------------------------------------------
-# Set initial variables:
-
PRGNAM=x264
-VERSION=${VERSION:-20110510}
+VERSION=${VERSION:-20180324}
BUILD=${BUILD:-1}
-NUMJOBS=${NUMJOBS:" -j4 "}
+NUMJOBS=${NUMJOBS:" -j$(nproc) "}
TAG=${TAG:-alien}
DOCS="AUTHORS COPYING doc/*.txt"
@@ -74,17 +78,19 @@ SRCURL="ftp://ftp.videolan.org/pub/videolan/${PRGNAM}/snapshots/${PRGNAM}-snapsh
##
# Automatically determine the architecture we're building on:
+MARCH=$( uname -m )
if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
+ case "$MARCH" in
+ i?86) export ARCH=i586 ;;
+ armv7hl) export ARCH=$MARCH ;;
+ arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ *) export ARCH=$MARCH ;;
esac
fi
case "$ARCH" in
- i486) SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ i?86) SLKCFLAGS="-O2 -march=${ARCH} -mtune=i686"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
ARCHOPTS=""
;;
@@ -92,12 +98,21 @@ case "$ARCH" in
SLKLDFLAGS="-L/usr/lib64"; LIBDIRSUFFIX="64"
ARCHOPTS="--enable-pic"
;;
- *) SLKCFLAGS="-O2"
+ armv7hl) SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
SLKLDFLAGS=""; LIBDIRSUFFIX=""
+ ARCHOPTS="--enable-pic"
+ ;;
+ *) SLKCFLAGS=${SLKCFLAGS:-"O2"}
+ SLKLDFLAGS=${SLKLDFLAGS:-""}; LIBDIRSUFFIX=${LIBDIRSUFFIX:-""}
ARCHOPTS=""
;;
esac
+case "$ARCH" in
+ arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
+ *) TARGET=$ARCH-slackware-linux ;;
+esac
+
# Exit the script on errors:
set -e
trap 'echo "$0 FAILED at line ${LINENO}" | tee $OUTPUT/error-${PRGNAM}.log' ERR
@@ -120,10 +135,11 @@ rm -rf $OUTPUT/{configure,make,install,error,makepkg}-$PRGNAM.log
# 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
if [ $? -ne 0 -o ! -s "${SOURCE}" ]; then
@@ -157,16 +173,6 @@ chmod -R u+w,go+r-w,a+X-s .
echo Building ...
-# Check for yasm, abort if not found:
-if ! which yasm >/dev/null 2>&1 ; then
- echo "##"
- echo "## The 'yasm' program does not seem to be installed."
- echo "## The X264 codec compilation needs yasm (nasm will not do)"
- echo "## Aborting the build"
- echo "##"
- exit 1
-fi
-
LDFLAGS="$SLKLDFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
CFLAGS="$SLKCFLAGS" \
@@ -175,8 +181,9 @@ CFLAGS="$SLKCFLAGS" \
--libdir=/usr/lib${LIBDIRSUFFIX} \
--enable-visualize \
--enable-shared \
+ --enable-static \
$ARCHOPTS \
- --host=$ARCH-slackware-linux \
+ --host=$TARGET \
2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log
@@ -206,9 +213,9 @@ cat $SRCDIR/slack-desc > $PKG/install/slack-desc
# Build the package:
cd $PKG
-makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
+makepkg --linkadd y --chown n $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz 2>&1 | tee $OUTPUT/makepkg-${PRGNAM}.log
cd $OUTPUT
-md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.tgz.md5
+md5sum ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz > ${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txz.md5
cd -
cat $PKG/install/slack-desc | grep "^${PRGNAM}" > $OUTPUT/${PRGNAM}-${VERSION}-${ARCH}-${BUILD}${TAG}.txt