[vlc-commits] vpx: fix FreeBSD build

Rafaël Carré git at videolan.org
Sun Jan 29 19:07:26 CET 2012


vlc/vlc-2.0 | branch: master | Rafaël Carré <funman at videolan.org> | Fri Jan 27 09:12:21 2012 -0500| [4dc62d8e864f17185583c20b00c8991a42f994f5] | committer: Jean-Baptiste Kempf

vpx: fix FreeBSD build

Change bash location if it isn't in /bin
Use 'linux' OS

Patches inspired from FreeBSD port
(cherry picked from commit a2b6035db7c1398568b669b33f403fbf02cde724)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=4dc62d8e864f17185583c20b00c8991a42f994f5
---

 contrib/src/vpx/rules.mak |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
index c5d4eb3..3f2fb0a 100644
--- a/contrib/src/vpx/rules.mak
+++ b/contrib/src/vpx/rules.mak
@@ -8,12 +8,19 @@ $(TARBALLS)/libvpx-$(VPX_VERSION).tar.bz2:
 
 .sum-vpx: libvpx-$(VPX_VERSION).tar.bz2
 
+ifneq ($(which bash),/bin/bash)
+PATCH_BASH_LOCATION=sed -i.orig s,^\#!/bin/bash,\#!`which bash`,g `grep -Rl ^\#!/bin/bash libvpx-$(VPX_VERSION)`
+else
+PATCH_BASH_LOCATION=true #bash is in /bin
+endif
+
 libvpx: libvpx-$(VPX_VERSION).tar.bz2 .sum-vpx
 	$(UNPACK)
 	$(APPLY) $(SRC)/vpx/libvpx-no-cross.patch
 	$(APPLY) $(SRC)/vpx/libvpx-no-abi.patch
 	$(APPLY) $(SRC)/vpx/libvpx-win64.patch
 	$(APPLY) $(SRC)/vpx/libvpx-darwin10.patch
+	$(PATCH_BASH_LOCATION)
 	$(MOVE)
 
 DEPS_vpx =
@@ -58,6 +65,8 @@ else ifdef HAVE_WIN64 # must be before WIN32
 VPX_OS := win64
 else ifdef HAVE_WIN32
 VPX_OS := win32
+else ifdef HAVE_BSD
+VPX_OS := linux
 endif
 
 VPX_TARGET := generic-gnu



More information about the vlc-commits mailing list