]> git.sesse.net Git - vlc/blobdiff - contrib/src/theora/rules.mak
Use a subfolder for the contribs prebuilt...
[vlc] / contrib / src / theora / rules.mak
index 4888e7dcb2d6e7139217c7a273463278a96c3aa5..c3b6c1e89922f23bad5fee2bc69b1ca9274392a5 100644 (file)
@@ -5,22 +5,20 @@ THEORA_URL := http://downloads.xiph.org/releases/theora/libtheora-$(THEORA_VERSI
 #THEORA_URL := $(CONTRIB_VIDEOLAN)/libtheora-$(THEORA_VERSION).tar.xz
 
 PKGS += theora
+ifeq ($(call need_pkg,"theora >= 1.0"),)
+PKGS_FOUND += theora
+endif
 
 $(TARBALLS)/libtheora-$(THEORA_VERSION).tar.xz:
-       $(DOWNLOAD) $(THEORA_URL)
+       $(call download,$(THEORA_URL))
 
 .sum-theora: libtheora-$(THEORA_VERSION).tar.xz
-       $(CHECK_SHA512)
-       touch $@
 
 libtheora: libtheora-$(THEORA_VERSION).tar.xz .sum-theora
-       $(UNPACK_XZ)
-       (cd $@-$(THEORA_VERSION) && patch -p1) < $(SRC)/theora/libtheora-includes.patch
-ifdef HAVE_WIN64
-       cd $@ && autoreconf -fi -I m4
-endif
-       mv $@-$(THEORA_VERSION) $@
-       touch $@
+       $(UNPACK)
+       $(APPLY) $(SRC)/theora/libtheora-includes.patch
+       echo 'ACLOCAL_AMFLAGS = -I m4' >> $(UNPACK_DIR)/Makefile.am
+       $(MOVE)
 
 THEORACONF := $(HOSTCONF) \
        --disable-spec \
@@ -42,11 +40,12 @@ ifdef HAVE_WIN64
 THEORACONF += --disable-asm
 endif
 
-.theora: libtheora .ogg
+DEPS_theora = ogg $(DEPS_ogg)
+
+.theora: libtheora
 ifdef HAVE_WIN32
-       cd $<; $(HOSTVARS) ./autogen.sh $(THEORACONF)
+       $(RECONF)
 endif
-       test -f $</config.status || \
-       (cd $<  && $(HOSTVARGS) ./configure $(THEORACONF))
+       cd $< && $(HOSTVARS) ./configure $(THEORACONF)
        cd $< && $(MAKE) install
        touch $@