[vlc-commits] contrib: add libvpx
Rémi Denis-Courmont
git at videolan.org
Mon Jul 4 18:43:43 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul 4 19:29:51 2011 +0300| [6bc0215f2d399d07fdc045b8b42780c81cb71082] | committer: Rémi Denis-Courmont
contrib: add libvpx
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6bc0215f2d399d07fdc045b8b42780c81cb71082
---
contrib/src/ffmpeg/rules.mak | 6 +--
contrib/src/vpx/SHA512SUMS | 1 +
contrib/src/vpx/libvpx-no-abi.patch | 14 ++++++
contrib/src/vpx/libvpx-no-cross.patch | 34 +++++++++++++
contrib/src/vpx/rules.mak | 84 +++++++++++++++++++++++++++++++++
5 files changed, 135 insertions(+), 4 deletions(-)
diff --git a/contrib/src/ffmpeg/rules.mak b/contrib/src/ffmpeg/rules.mak
index 208ff7f..cff6f3f 100644
--- a/contrib/src/ffmpeg/rules.mak
+++ b/contrib/src/ffmpeg/rules.mak
@@ -10,6 +10,7 @@ FFMPEGCONF = \
--disable-doc \
--disable-decoder=libvpx \
--enable-libgsm \
+ --enable-libvpx \
--disable-debug \
--enable-gpl \
--enable-postproc \
@@ -21,7 +22,7 @@ FFMPEGCONF = \
--disable-protocols \
--disable-avfilter \
--disable-network
-DEPS_ffmpeg = zlib gsm
+DEPS_ffmpeg = zlib gsm vpx $(DEPS_vpx)
# Optional dependencies
ifdef BUILD_ENCODERS
@@ -33,9 +34,6 @@ FFMPEGCONF += --disable-encoders --disable-muxers
# XXX: REVISIT --enable-small ?
endif
-#FFMPEGCONF += --enable-libvpx
-#DEPS_ffmpeg += vpx $(DEPS_vpx)
-
# XXX: REVISIT
#ifndef HAVE_FPU
#FFMPEGCONF += --disable-mpegaudio-hp
diff --git a/contrib/src/vpx/SHA512SUMS b/contrib/src/vpx/SHA512SUMS
new file mode 100644
index 0000000..ff0ac9d
--- /dev/null
+++ b/contrib/src/vpx/SHA512SUMS
@@ -0,0 +1 @@
+5608a095c96c40bdf9538901c52dd68a1b33767cbc52d9f7c5f9e0b74147f85c31f9a940be827d01f28eaf6bb495f55e920b93edc61cacbaa067ab7aed918aa3 libvpx-v0.9.6.tar.bz2
diff --git a/contrib/src/vpx/libvpx-no-abi.patch b/contrib/src/vpx/libvpx-no-abi.patch
new file mode 100644
index 0000000..f4337cf
--- /dev/null
+++ b/contrib/src/vpx/libvpx-no-abi.patch
@@ -0,0 +1,14 @@
+diff -Nru libvpx.orig/build/make/configure.sh libvpx/build/make/configure.sh
+--- libvpx.orig/build/make/configure.sh 2011-07-04 19:21:14.000000000 +0300
++++ libvpx/build/make/configure.sh 2011-07-04 19:22:10.000000000 +0300
+@@ -659,8 +659,8 @@
+ check_add_asflags -mcpu=${tgt_isa}
+ elif enabled armv7
+ then
+- check_add_cflags -march=armv7-a -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-ftree-vectorize
+- check_add_asflags -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-march=armv7-a
++ check_add_cflags -march=armv7-a -mcpu=cortex-a8 -mfpu=neon #-ftree-vectorize
++ check_add_asflags -mcpu=cortex-a8 -mfpu=neon #-march=armv7-a
+ else
+ check_add_cflags -march=${tgt_isa}
+ check_add_asflags -march=${tgt_isa}
diff --git a/contrib/src/vpx/libvpx-no-cross.patch b/contrib/src/vpx/libvpx-no-cross.patch
new file mode 100644
index 0000000..7644460
--- /dev/null
+++ b/contrib/src/vpx/libvpx-no-cross.patch
@@ -0,0 +1,34 @@
+diff -Nru libvpx.orig/build/make/configure.sh libvpx/build/make/configure.sh
+--- libvpx.orig/build/make/configure.sh 2011-07-04 19:18:07.000000000 +0300
++++ libvpx/build/make/configure.sh 2011-07-04 19:19:08.000000000 +0300
+@@ -648,14 +648,6 @@
+
+ case ${tgt_cc} in
+ gcc)
+- if enabled iwmmxt || enabled iwmmxt2
+- then
+- CROSS=${CROSS:-arm-iwmmxt-linux-gnueabi-}
+- elif enabled symbian; then
+- CROSS=${CROSS:-arm-none-symbianelf-}
+- else
+- CROSS=${CROSS:-arm-none-linux-gnueabi-}
+- fi
+ link_with_cc=gcc
+ setup_gnu_toolchain
+ arch_int=${tgt_isa##armv}
+@@ -806,7 +798,6 @@
+ esac
+ ;;
+ mips*)
+- CROSS=${CROSS:-mipsel-linux-uclibc-}
+ link_with_cc=gcc
+ setup_gnu_toolchain
+ tune_cflags="-mtune="
+@@ -855,7 +846,6 @@
+ solaris*)
+ CC=${CC:-${CROSS}gcc}
+ LD=${LD:-${CROSS}gcc}
+- CROSS=${CROSS:-g}
+ ;;
+ esac
+
diff --git a/contrib/src/vpx/rules.mak b/contrib/src/vpx/rules.mak
new file mode 100644
index 0000000..2a79fff
--- /dev/null
+++ b/contrib/src/vpx/rules.mak
@@ -0,0 +1,84 @@
+# libvpx
+
+VPX_VERSION := v0.9.6
+VPX_URL := http://webm.googlecode.com/files/libvpx-$(VPX_VERSION).tar.bz2
+
+$(TARBALLS)/libvpx-$(VPX_VERSION).tar.bz2:
+ $(call download,$(VPX_URL))
+
+.sum-vpx: libvpx-$(VPX_VERSION).tar.bz2
+
+libvpx: libvpx-$(VPX_VERSION).tar.bz2 .sum-vpx
+ $(UNPACK)
+ $(APPLY) $(SRC)/vpx/libvpx-no-cross.patch
+ $(APPLY) $(SRC)/vpx/libvpx-no-abi.patch
+ $(MOVE)
+
+DEPS_vpx =
+
+ifdef HAVE_CROSS_COMPILE
+VPX_CROSS := $(HOST)-
+else
+VPX_CROSS :=
+endif
+
+ifeq ($(ARCH),arm)
+VPX_ARCH := armv7$(warning ARM architecture version 7 assumed)
+else ifeq ($(ARCH),i386)
+VPX_ARCH := x86
+#DEPS_vpx += yasm $(DEPS_yasm)
+else ifeq ($(ARCH),mips)
+VPX_ARCH := mips32
+else ifeq ($(ARCH),ppc)
+VPX_ARCH := ppc32
+else ifeq ($(ARCH),ppc64)
+VPX_ARCH := ppc64
+else ifeq ($(ARCH),sparc)
+VPX_ARCH := sparch
+else ifeq ($(ARCH),x86_64)
+VPX_ARCH := x86_64
+#DEPS_vpx += yasm $(DEPS_yasm)
+endif
+
+ifdef HAVE_LINUX
+VPX_OS := linux
+else ifdef HAVE_MACOSX
+ifeq ($(ARCH),arm)
+VPX_OS := darwin
+else
+VPX_OS := darwin9
+endif
+else ifdef HAVE_SOLARIS
+VPX_OS := solaris
+else ifdef HAVE_WIN64 # must be before WIN32
+VPX_OS := win64
+else ifdef HAVE_WIN32
+VPX_OS := win32
+endif
+
+VPX_TARGET := generic-gnu
+ifdef VPX_ARCH
+ifdef VPX_OS
+VPX_TARGET := $(VPX_ARCH)-$(VPX_OS)-gcc
+endif
+endif
+
+.vpx: libvpx
+ env
+ cd $< && CROSS=$(VPX_CROSS) ./configure --target=$(VPX_TARGET) \
+ --disable-install-bins \
+ --disable-install-srcs \
+ --disable-install-libs \
+ --disable-install-docs \
+ --disable-examples \
+ --disable-vp8-decoder
+ cd $< && $(MAKE) install
+ rm -Rf -- "$(PREFIX)/include/vpx/"
+ mkdir -p -- "$(PREFIX)/include/vpx/"
+ # Of course! Why the hell would it be listed or in make install?
+ cp $</vpx/*.h $</vpx_ports/*.h "$(PREFIX)/include/vpx"
+ rm -f -- "$(PREFIX)/include/vpx/config.h"
+ $(RANLIB) $</libvpx.a
+ # Of course! Why the hell would it be listed or in make install?
+ install -D -- $</libvpx.a "$(PREFIX)/lib/libvpx.a"
+ touch $@
More information about the vlc-commits
mailing list