openbsd-ports/multimedia/x264/patches/patch-configure
jakemsr 36eed127e1 update to x264-snapshot-20101023-2245
works with upcoming mplayer update as well as current ports
from Brad (MAINTAINER)
2010-11-06 23:05:48 +00:00

63 lines
1.7 KiB
Plaintext

$OpenBSD: patch-configure,v 1.7 2010/11/06 23:05:48 jakemsr Exp $
--- configure.orig Sun Oct 31 17:45:08 2010
+++ configure Sun Oct 31 17:51:47 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
@@ -670,26 +670,14 @@ if [ "$avs" = "auto" ] ; then
fi
fi
-if [ "$pic" = "yes" ] ; then
- CFLAGS="$CFLAGS -fPIC"
- ASFLAGS="$ASFLAGS -DPIC"
- # resolve textrels in the x86 asm
- cc_check stdio.h -Wl,-Bsymbolic && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
-fi
-
-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
- CFLAGS="$CFLAGS -s -fomit-frame-pointer"
- LDFLAGS="$LDFLAGS -s"
-fi
-
if [ "$debug" = "yes" ]; then
CFLAGS="-O1 -g $CFLAGS"
elif [ $ARCH = ARM ]; then
# arm-gcc-4.2 produces incorrect output with -ffast-math
# and it doesn't save any speed anyway on 4.4, so disable it
- CFLAGS="-O3 -fno-fast-math $CFLAGS"
+ CFLAGS="-fno-fast-math $CFLAGS"
else
- CFLAGS="-O3 -ffast-math $CFLAGS"
+ CFLAGS="-ffast-math $CFLAGS"
fi
if cc_check '' -fno-tree-vectorize ; then
@@ -749,7 +737,6 @@ GPL=$gpl
EOF
if [ "$shared" = "yes" ]; then
- API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
if [ "$SYS" = "MINGW" ]; then
echo "SONAME=libx264-$API.dll" >> config.mak
echo 'IMPLIBNAME=libx264.dll.a' >> config.mak
@@ -765,14 +752,13 @@ if [ "$shared" = "yes" ]; then
else
echo "SOSUFFIX=so" >> config.mak
echo "SONAME=libx264.so.$API" >> config.mak
- echo 'SOFLAGS=-Wl,-soname,$(SONAME)' >> config.mak
fi
echo 'default: $(SONAME)' >> config.mak
fi
./version.sh >> config.h
-pclibs="-L$libdir -lx264 $libpthread"
+pclibs="-L$libdir -lx264 -lm $libpthread"
cat > x264.pc << EOF
prefix=$prefix