- Fix configure issues on i386 [1]

- Rework patches

PR:		ports/145959 [1]
Submitted by:	Mark Andrews <marka@isc.org> [1]
This commit is contained in:
Martin Matuska 2010-04-23 13:15:41 +00:00
parent 1067cd9826
commit 79dce998b1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=253094
3 changed files with 48 additions and 4 deletions

View file

@ -6,6 +6,7 @@
PORTNAME= x264
PORTVERSION= 0.0.20100222
PORTREVISION= 1
CATEGORIES= multimedia
MASTER_SITES= http://downloads.videolan.org/pub/videolan/x264/snapshots/ \
http://samples.mplayerhq.hu/yuv4mpeg2/:pgo
@ -99,11 +100,8 @@ post-extract:
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|; \
s|-lpthread|${PTHREAD_LIBS}|g; \
s|bash|sh|; \
s|gpac_static|gpac|g' \
s|-lpthread |${PTHREAD_LIBS} |g;' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e 's|bash|sh|' ${WRKSRC}/version.sh
@${REINPLACE_CMD} -e 's|$$(libdir)/pkgconfig|${PREFIX}/libdata/pkgconfig|; \
s|$${libdir}/pkgconfig|${PREFIX}/libdata/pkgconfig|' \
${WRKSRC}/Makefile

View file

@ -0,0 +1,38 @@
--- configure.orig 2010-02-22 22:45:05.000000000 +0100
+++ configure 2010-04-23 12:56:49.647782200 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
@@ -317,11 +317,15 @@
ARCH="X86"
AS="yasm"
ASFLAGS="$ASFLAGS -O2"
- if [[ "$asm" == yes && "$CFLAGS" != *-march* ]]; then
- CFLAGS="$CFLAGS -march=i686"
- fi
- if [[ "$asm" == yes && "$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
if [ "$SYS" = MACOSX ]; then
ASFLAGS="$ASFLAGS -f macho -DPREFIX"
@@ -578,7 +582,7 @@
[ -n "$LAVF_CFLAGS" ] && CFLAGS="$CFLAGS $LAVF_CFLAGS"
fi
-MP4_LDFLAGS="-lgpac_static"
+MP4_LDFLAGS="-lgpac"
if [ $SYS = MINGW ]; then
MP4_LDFLAGS="$MP4_LDFLAGS -lwinmm"
fi

View file

@ -0,0 +1,8 @@
--- version.sh.orig 2010-04-23 12:55:03.524324331 +0200
+++ version.sh 2010-04-23 12:54:56.084537002 +0200
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
git rev-list HEAD | sort > config.git-hash
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
if [ $LOCALVER \> 1 ] ; then