Commit 20d7b9b1 authored by Edric Milaret's avatar Edric Milaret Committed by gerrit2

ios: add contrib rules for ffmpeg, x264 and vpx

- bump vpx only for ios as libav
doesn't support new vpx version

Change-Id: I980680bf2d57b52b13e483dbdb1cf9da61ff4970
Tuleap: #313
parent 4944e0c7
......@@ -19,7 +19,6 @@ FFMPEGCONF += \
--disable-programs \
--disable-sdl
#enable muxers/demuxers
FFMPEGCONF += \
--enable-demuxers \
......@@ -83,13 +82,24 @@ FFMPEGCONF += \
--enable-encoder=tiff \
--enable-decoder=tiff
ifdef HAVE_WIN32
FFMPEGCONF += \
--enable-indev=dshow \
--enable-indev=gdigrab \
--enable-dxva2
endif
DEPS_ffmpeg = iconv zlib x264 vpx opus speex $(DEPS_vpx)
ifdef HAVE_IOS
FFMPEGCONF += \
--target-os=darwin \
--enable-cross-compile \
--arch=$(ARCH) \
--enable-pic \
--enable-indev=avfoundation
endif
# Linux
ifdef HAVE_LINUX
FFMPEGCONF += --target-os=linux --enable-pic
......@@ -102,9 +112,11 @@ FFMPEGCONF += --disable-asm
endif
endif
ifndef HAVE_IOS
ifdef HAVE_CROSS_COMPILE
FFMPEGCONF += --cross-prefix=$(HOST)-
endif
endif
# x86 stuff
ifeq ($(ARCH),i386)
......@@ -160,6 +172,7 @@ ffmpeg: ffmpeg-$(FFMPEG_HASH).tar.xz .sum-ffmpeg
.ffmpeg: ffmpeg
cd $< && $(HOSTVARS) ./configure \
--extra-cflags="$(CFLAGS)" \
--extra-ldflags="$(LDFLAGS)" $(FFMPEGCONF) \
--prefix="$(PREFIX)" --enable-static --disable-shared
cd $< && $(MAKE) install-libs install-headers
......
# libvpx
#Libav doesnt support new vpx version
ifdef HAVE_IOS
VPX_HASH := cbecf57f3e0d85a7b7f97f3ab7c507f6fe640a93
else
VPX_HASH := c74bf6d889992c3cabe017ec353ca85c323107cd
endif
VPX_URL := https://github.com/webmproject/libvpx/archive/$(VPX_HASH).tar.gz
#VPX_GITURL := https://code.google.com/p/webm.libvpx
......@@ -20,13 +25,18 @@ libvpx: libvpx-$(VPX_HASH).tar.gz .sum-vpx
DEPS_vpx =
ifdef HAVE_CROSS_COMPILE
ifndef HAVE_IOS
VPX_CROSS := $(CROSS_COMPILE)
endif
else
VPX_CROSS :=
endif
ifeq ($(ARCH),arm)
VPX_ARCH := armv7
else ifeq ($(ARCH),arm64)
VPX_ARCH := arm64
else ifeq ($(ARCH),i386)
VPX_ARCH := x86
else ifeq ($(ARCH),mips)
......@@ -46,7 +56,11 @@ VPX_OS := android
else ifdef HAVE_LINUX
VPX_OS := linux
else ifdef HAVE_DARWIN_OS
ifeq ($(ARCH),arm)
ifeq ($(IOS_TARGET_PLATFORM),iPhoneSimulator)
VPX_OS := iphonesimulator
else ifeq ($(ARCH),armv7)
VPX_OS := darwin
else ifeq ($(ARCH),arm64)
VPX_OS := darwin
else
ifeq ($(OSX_VERSION),10.5)
......@@ -95,7 +109,7 @@ ifdef HAVE_MACOSX
VPX_CONF += --sdk-path=$(MACOSX_SDK)
endif
ifdef HAVE_IOS
VPX_CONF += --sdk-path=$(SDKROOT)
VPX_CONF += --sdk-path=$(IOS_SDK)
endif
LOCAL_HOSTVARS=
ifdef HAVE_ANDROID
......
......@@ -22,9 +22,11 @@ X264CONF += --enable-pic
else
X264CONF += --enable-win32thread
endif
ifndef HAVE_IOS
ifdef HAVE_CROSS_COMPILE
X264CONF += --cross-prefix="$(CROSS_COMPILE)"
endif
endif
$(TARBALLS)/x264-$(X264_HASH).tar.xz:
$(call download_git,$(X264_GITURL),master,$(X264_HASH))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment