freebsd-ports/multimedia/handbrake/files/patch-build_contrib_x264_x264_configure
Alexander Leidinger b2e7e72476 - update to 10.1
- new vpx support in 10.x is disabled (build problems)
- this is all but quick, and surely a dirty update (e.g. the CC hack in the port-Makefile)
- at least it doesn't segfault on startup like the 9.9 this replaces
- this port needs a maintainer which is able to handle more than 50 shades of grey
2015-03-29 20:13:07 +00:00

75 lines
2.8 KiB
Text

--- ./build/contrib/x264/x264/configure.orig 2012-01-19 07:48:34.000000000 +0800
+++ ./build/contrib/x264/x264/configure 2012-08-23 09:37:56.000000000 +0800
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
cat <<EOF
@@ -75,8 +75,8 @@
# Intel Compiler issues an incredibly large number of warnings on any warning level,
# suppress them by disabling all warnings rather than having to use #pragmas to disable most of them
for arg in $*; do
- [ $arg = -ffast-math ] && arg=
- [[ "$arg" = -falign-loops* ]] && arg=
+ [ "$arg" = -ffast-math ] && arg=
+ [ -z "${arg%%-falign-loops*}" ] && arg=
[ "$arg" = -fno-tree-vectorize ] && arg=
[ "$arg" = -Wshadow ] && arg=
if [ $compiler = ICL ]; then
@@ -96,7 +96,7 @@
icl_ldflags() {
for arg in $*; do
arg=${arg/LIBPATH/libpath}
- [ ${arg#-libpath:} == $arg -a ${arg#-l} != $arg ] && arg=${arg#-l}.lib
+ [ ${arg#-libpath:} = $arg -a ${arg#-l} != $arg ] && arg=${arg#-l}.lib
[ ${arg#-L} != $arg ] && arg=-libpath:${arg#-L}
[ $arg = -Wl,--large-address-aware ] && arg=-largeaddressaware
[ $arg = -s ] && arg=
@@ -496,11 +496,15 @@
AS="yasm"
ASFLAGS="$ASFLAGS -O2"
if [ $compiler = GNU ]; then
- if [[ "$asm" == auto && "$CFLAGS" != *-march* ]]; then
- CFLAGS="$CFLAGS -march=i686"
- fi
- if [[ "$asm" == auto && "$CFLAGS" != *-mfpmath* ]]; then
- CFLAGS="$CFLAGS -mfpmath=sse -msse"
+ if [ "$asm" = yes ]; then
+ case "$CFLAGS" in
+ *-march*) ;;
+ *) CFLAGS="$CFLAGS -march=i686" ;;
+ esac
+ case "$CFLAGS" in
+ *-mfpmath*) ;;
+ *) CFLAGS="$CFLAGS -mfpmath=sse -msse" ;;
+ esac
fi
else
# icc on linux has various degrees of mod16 stack support
@@ -526,7 +530,7 @@
ASFLAGS="$ASFLAGS -f elf"
fi
;;
- x86_64)
+ x86_64|amd64)
ARCH="X86_64"
AS="yasm"
if [ "$SYS" = MACOSX ]; then
@@ -990,7 +994,7 @@
# generate exported config file
config_chroma_format="X264_CSP_I$chroma_format"
-[ "$config_chroma_format" == "X264_CSP_Iall" ] && config_chroma_format="0"
+[ "$config_chroma_format" = "X264_CSP_Iall" ] && config_chroma_format="0"
cat > x264_config.h << EOF
#define X264_BIT_DEPTH $bit_depth
#define X264_GPL $x264_gpl
--- ./build/contrib/x264/x264/version.sh.orig 2012-01-19 07:48:34.000000000 +0800
+++ ./build/contrib/x264/x264/version.sh 2012-08-22 12:00:27.000000000 +0800
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
[ -n "$1" ] && cd $1
git rev-list HEAD | sort > config.git-hash
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`