[vlc-commits] contrib: add libvpx

Rémi Denis-Courmont git at videolan.org
Mon Jul 4 18:43:11 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Mon Jul  4 19:29:51 2011 +0300| [348441e8479b38a4a2ebb2a3bc29e3580cdc840c] | committer: Rémi Denis-Courmont

contrib: add libvpx

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=348441e8479b38a4a2ebb2a3bc29e3580cdc840c
---

 contrib/src/ffmpeg/rules.mak |    6 +--
 contrib/src/vpx/SHA512SUMS   |    1 +
 contrib/src/vpx/rules.mak    |   84 ++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 87 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/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