[vlc-devel] [PATCH] vpx: fix FreeBSD build

Rafaël Carré funman at videolan.org
Fri Jan 27 15:13:23 CET 2012


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

Patches inspired from FreeBSD port
---
 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
-- 
1.7.8.3



More information about the vlc-devel mailing list