[vlc-commits] contribs: add x264 (and macro to download from git)

Rémi Denis-Courmont git at videolan.org
Wed Jun 29 18:14:03 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jun 29 13:55:19 2011 +0300| [7713b1b3c3adaabcc2357945a072663722f73664] | committer: Rémi Denis-Courmont

contribs: add x264 (and macro to download from git)

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

 contrib/src/main.mak       |    7 ++++++
 contrib/src/x264/rules.mak |   52 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 59 insertions(+), 0 deletions(-)

diff --git a/contrib/src/main.mak b/contrib/src/main.mak
index 2d378c5..52222d3 100644
--- a/contrib/src/main.mak
+++ b/contrib/src/main.mak
@@ -161,6 +161,13 @@ download = rm -f $@.tmp && \
 		$(WGET) -p -O $@.tmp $(1) && \
 		touch $@.tmp && \
 		mv $@.tmp $@
+download_git = \
+	rm -Rf $(@:.tar.xz=) && \
+	$(GIT) clone $(2:%=--branch %) $(1) $(@:.tar.xz=) && \
+	rm -Rf $(@:%.tar.xz=%)/.git && \
+	(cd $(dir $@) && \
+	 tar cvJ $(notdir $(@:.tar.xz=))) > $@ && \
+	rm -Rf $(@:.tar.xz=)
 checksum = (cd $(TARBALLS) && $(1)sum -c -) < \
 		$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS
 CHECK_SHA256 = $(call checksum,sha512,SHA512)
diff --git a/contrib/src/x264/rules.mak b/contrib/src/x264/rules.mak
new file mode 100644
index 0000000..78a0d30
--- /dev/null
+++ b/contrib/src/x264/rules.mak
@@ -0,0 +1,52 @@
+# x264
+
+X264_VERSION := 20050609
+X264_URL := $(CONTRIB_VIDEOLAN)/x264-$(X264_VERSION).tar.gz
+X264_GITURL := git://git.videolan.org/x264.git
+
+ifdef BUILD_ENCODERS
+PKGS += x264
+endif
+
+X264CONF = --prefix="$(PREFIX)" --host="$(HOST)" \
+	--enable-static \
+	--disable-avs \
+	--disable-lavf \
+	--disable-ffms
+ifndef HAVE_WIN32
+X264CONF += --enable-pic
+else
+X264CONF += --enable-win32thread
+endif
+
+ifdef HAVE_MACOSX
+ifneq ($(findstring $(ARCH),i386 x86_64),)
+PKGS += yasm
+.x264: .yasm
+endif
+endif
+
+$(TARBALLS)/x264-$(X264_VERSION).tar.gz:
+	$(call download,$(X264_URL))
+
+$(TARBALLS)/x264-git.tar.xz:
+	$(call download_git,$(X264_GITURL))
+
+X264_VERSION := git
+
+.sum-x264: x264-$(X264_VERSION).tar.xz
+	$(warning $@ not implemented)
+	touch $@
+
+x264: x264-$(X264_VERSION).tar.xz .sum-x264
+	$(UNPACK)
+ifdef HAVE_WIN64
+	(cd $@-$(X264_VERSION) && patch -p1) < $(SRC)/x264/x264-svn-win64.patch
+endif
+	mv $@-$(X264_VERSION) $@
+	touch $@
+
+.x264: x264
+	cd $< && $(HOSTVARS) ./configure $(X264CONF)
+	cd $< && $(MAKE) install
+	touch $@



More information about the vlc-commits mailing list