[vlc-devel] [PATCH] vpx: fix FreeBSD build
Rafaël Carré
funman at videolan.org
Fri Jan 27 15:54:44 CET 2012
Le 2012-01-27 09:21, Rémi Denis-Courmont a écrit :
> On Fri, 27 Jan 2012 09:13:23 -0500, Rafaël Carré <funman at videolan.org>
> wrote:
>> 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
>
> Eh? AFAIR, that enables some Linux-specific stuff such as /proc/cpuinfo.
Only for ARM though, and undef #ifdef __linux__.
Also FreeBSD (not sure about the others) has Linux-like /proc emulation:
linprocfs (needed for example by htop)
AFAICS configure autodetects 'linux' when run without an explicit target
and treats linux and bsd the same (see build/make/configure.sh)
>
>> endif
>>
>> VPX_TARGET := generic-gnu
>
More information about the vlc-devel
mailing list