multimedia/HandBrake: Fix segfault when encoding to x264.

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
klaatu 2014-05-28 17:46:24 +07:00 committed by Willy Sudiarto Raharjo
parent 91e621c0a6
commit 069de36ef4
2 changed files with 26 additions and 10 deletions

View file

@ -1,14 +1,15 @@
#!/bin/sh #!/bin/sh
# Slackware build script for HandBrakeCLI # Slackware build script for HandBrake
# This slackbuild maintained by Klaatu at klaatu@hackerpublicradio.org # This slackbuild maintained by Klaatu at klaatu@hackerpublicradio.org
# Modified by David Somero at SlackBuilds.org. # Modified by David Somero at SlackBuilds.org.
# Modified by Erik Hanson at SlackBuilds.org # Modified by Erik Hanson at SlackBuilds.org
# Patched to fix x264 segfault by John Vogel
PRGNAM=HandBrake PRGNAM=HandBrake
VERSION=${VERSION:-0.9.9} VERSION=${VERSION:-0.9.9}
BUILD=${BUILD:-1} BUILD=${BUILD:-2}
TAG=${TAG:-_SBo} TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then if [ -z "$ARCH" ]; then
@ -25,15 +26,25 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp} OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64" LIBDIRSUFFIX="64"
else else
SLKCFLAGS="-O2"
LIBDIRSUFFIX="" LIBDIRSUFFIX=""
fi fi
SLKCFLAGS="$SLKCFLAGS -fno-aggressive-loop-optimizations"
saved_CFLAGS="$CFLAGS"
saved_CXXFLAGS="$CFLAGS"
export CFLAGS="$SLKCFLAGS"
export CXXFLAGS="$SLKCFLAGS"
set -e set -e
rm -rf $PKG rm -rf $PKG
@ -49,8 +60,10 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \ -o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ \( -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 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \ ./configure \
--prefix=/usr \ --prefix=/usr \
--disable-gtk-update-checks \ --disable-gtk-update-checks \
@ -64,6 +77,9 @@ cd build
make install DESTDIR=$PKG make install DESTDIR=$PKG
cd $TMP/$PRGNAM-$VERSION cd $TMP/$PRGNAM-$VERSION
export CFLAGS="$saved_CFLAGS"
export CXXFLAGS="$saved_CXXFLAGS"
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a AUTHORS COPYING CREDITS NEWS THANKS TRANSLATIONS \ cp -a AUTHORS COPYING CREDITS NEWS THANKS TRANSLATIONS \
$PKG/usr/doc/$PRGNAM-$VERSION $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,17 +1,17 @@
PRGNAM="HandBrake" PRGNAM="HandBrake"
VERSION="0.9.9" VERSION="0.9.9"
HOMEPAGE="http://handbrake.fr/" HOMEPAGE="http://handbrake.fr/"
DOWNLOAD="http://downloads.sourceforge.net/handbrake/HandBrake-0.9.9.tar.bz2 \ DOWNLOAD="http://downloads.sourceforge.net/project/handbrake/0.9.9/HandBrake-0.9.9.tar.bz2 \
http://download.m0k.org/handbrake/contrib/a52dec-0.7.4.tar.gz \ http://download.m0k.org/handbrake/contrib/a52dec-0.7.4.tar.gz \
http://download.handbrake.fr/handbrake/contrib/bzip2-1.0.6.tar.gz \ http://download.handbrake.fr/handbrake/contrib/bzip2-1.0.6.tar.gz \
http://download.m0k.org/handbrake/contrib/faac-1.28.tar.gz \ http://download.m0k.org/handbrake/contrib/faac-1.28.tar.gz \
http://download.m0k.org/handbrake/contrib/faad2-2.7.tar.gz \ http://download.m0k.org/handbrake/contrib/faad2-2.7.tar.gz \
http://download.handbrake.fr/handbrake/contrib/libav-v9.6.tar.bz2 \ http://download.m0k.org/handbrake/contrib/libav-v9.6.tar.bz2 \
http://download.m0k.org/handbrake/contrib/fontconfig-2.8.0.tar.gz \ http://download.m0k.org/handbrake/contrib/fontconfig-2.8.0.tar.gz \
http://download.m0k.org/handbrake/contrib/freetype-2.4.7.tar.bz2 \ http://download.m0k.org/handbrake/contrib/freetype-2.4.7.tar.bz2 \
http://download.m0k.org/handbrake/contrib/lame-3.98.tar.gz \ http://download.m0k.org/handbrake/contrib/lame-3.98.tar.gz \
http://libass.googlecode.com/files/libass-0.10.2.tar.xz \ http://download.handbrake.fr/handbrake/contrib/libass-0.10.0-1.tar.gz \
ftp://ftp.videolan.org/pub/videolan/libbluray/0.2.3/libbluray-0.2.3.tar.bz2 \ http://download.m0k.org/handbrake/contrib/libbluray-0.2.3.tar.bz2 \
http://download.m0k.org/handbrake/contrib/libdca-r81-strapped.tar.gz \ http://download.m0k.org/handbrake/contrib/libdca-r81-strapped.tar.gz \
http://download.m0k.org/handbrake/contrib/libdvdnav-svn1168.tar.gz \ http://download.m0k.org/handbrake/contrib/libdvdnav-svn1168.tar.gz \
http://download.m0k.org/handbrake/contrib/libdvdread-svn1168.tar.gz \ http://download.m0k.org/handbrake/contrib/libdvdread-svn1168.tar.gz \
@ -27,7 +27,7 @@ DOWNLOAD="http://downloads.sourceforge.net/handbrake/HandBrake-0.9.9.tar.bz2 \
http://download.m0k.org/handbrake/contrib/pthreads-w32-cvs20100909.tar.bz2 \ http://download.m0k.org/handbrake/contrib/pthreads-w32-cvs20100909.tar.bz2 \
http://download.handbrake.fr/handbrake/contrib/x264-r2273-b3065e6.tar.gz \ http://download.handbrake.fr/handbrake/contrib/x264-r2273-b3065e6.tar.gz \
http://download.m0k.org/handbrake/contrib/zlib-1.2.3.tar.gz" http://download.m0k.org/handbrake/contrib/zlib-1.2.3.tar.gz"
MD5SUM="ee81337a46f8af76599d6038f193a2c1 \ MD5SUM="71637bab2719a976d62d5c1944227b59 \
ce5a978bb359f642dcbd24c6e14a45a7 \ ce5a978bb359f642dcbd24c6e14a45a7 \
6ec09fe81e3380184ed11e21ea06c215 \ 6ec09fe81e3380184ed11e21ea06c215 \
80763728d392c7d789cde25614c878f6 \ 80763728d392c7d789cde25614c878f6 \
@ -36,7 +36,7 @@ MD5SUM="ee81337a46f8af76599d6038f193a2c1 \
77e15a92006ddc2adbb06f840d591c0e \ 77e15a92006ddc2adbb06f840d591c0e \
dbadce8f0c5e70a0b7c51eadf2dd9394 \ dbadce8f0c5e70a0b7c51eadf2dd9394 \
7036b52e792538fd665595d56b9e49a0 \ 7036b52e792538fd665595d56b9e49a0 \
ce672ed5629c9708b3401b976f516744 \ ec2b87024fc93792e5d11fb0ecaa1bd8 \
684e420d2ebafa13786ae84364543cf9 \ 684e420d2ebafa13786ae84364543cf9 \
448bab6df6e4f738e4afaa6ebc085d65 \ 448bab6df6e4f738e4afaa6ebc085d65 \
327c0a3a4304d7c06d75199a75ad4f02 \ 327c0a3a4304d7c06d75199a75ad4f02 \
@ -56,5 +56,5 @@ MD5SUM="ee81337a46f8af76599d6038f193a2c1 \
DOWNLOAD_x86_64="" DOWNLOAD_x86_64=""
MD5SUM_x86_64="" MD5SUM_x86_64=""
REQUIRES="libass" REQUIRES="libass"
MAINTAINER="Klaatu" MAINTAINER="klaatu"
EMAIL="klaatu@hackerpublicradio.org" EMAIL="klaatu@hackerpublicradio.org"