Commit e6f8219d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

contribs: improve UNPACK macro

parent bd3ef966
......@@ -11,7 +11,7 @@ $(TARBALLS)/a52dec-$(A52DEC_VERSION).tar.gz:
.sum-a52: a52dec-$(A52DEC_VERSION).tar.gz
a52dec: a52dec-$(A52DEC_VERSION).tar.gz .sum-a52
$(UNPACK_GZ)
$(UNPACK)
ifndef HAVE_FPU
(cd $@-$(A52DEC_VERSION) && patch -p0) < $(SRC)/a52/liba52-fixed.diff
endif
......
......@@ -10,7 +10,7 @@ $(TARBALLS)/libebml-$(EBML_VERSION).tar.bz2:
.sum-ebml: libebml-$(EBML_VERSION).tar.bz2
libebml: libebml-$(EBML_VERSION).tar.bz2 .sum-ebml
$(UNPACK_BZ2)
$(UNPACK)
mv $@-$(EBML_VERSION) $@
touch $@
......
......@@ -11,7 +11,7 @@ $(TARBALLS)/flac-$(FLAC_VERSION).tar.gz:
.sum-flac: flac-$(FLAC_VERSION).tar.gz
flac: flac-$(FLAC_VERSION).tar.gz .sum-flac
$(UNPACK_GZ)
$(UNPACK)
(cd $@-$(FLAC_VERSION) && patch -p1) < $(SRC)/flac/flac-win32.patch
(cd $@-$(FLAC_VERSION) && patch -p1) < $(SRC)/flac/libFLAC-pc.patch
ifdef HAVE_MACOSX
......
......@@ -10,7 +10,7 @@ $(TARBALLS)/live555-latest.tar.gz:
.sum-live555: live555-latest.tar.gz
live555: live555-latest.tar.gz .sum-live555
$(UNPACK_GZ)
$(UNPACK)
patch -p0 < $(SRC)/live555/live-uselocale.patch
patch -p0 < $(SRC)/live555/live-inet_ntop.patch
ifdef HAVE_WIN64
......
......@@ -27,7 +27,7 @@ $(TARBALLS)/lua-$(LUA_VERSION).tar.gz:
.sum-lua: lua-$(LUA_VERSION).tar.gz
lua: lua-$(LUA_VERSION).tar.gz .sum-lua
$(UNPACK_GZ)
$(UNPACK)
(cd $@-$(LUA_VERSION) && patch -p1) < $(SRC)/lua/lua-noreadline.patch
ifdef HAVE_MACOSX
(cd $@-$(LUA_VERSION) && \
......
......@@ -162,11 +162,11 @@ checksum = (cd $(TARBALLS) && $(1)sum -c -) < \
$(SRC)/$(patsubst .sum-%,%,$@)/$(2)SUMS
CHECK_SHA256 = $(call checksum,sha512,SHA512)
CHECK_SHA512 = $(call checksum,sha512,SHA512)
untar = $(RM) -R $@; tar xv$(1)f $<
UNPACK_GZ = $(call untar,z)
UNPACK_BZ2 = $(call untar,j)
UNPACK_XZ = $(call untar,J)
UNPACK_ZIP = $(RM) -R $@; unzip $<
UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f)) \
$(foreach f,$(filter %.tar.bz2,$^), && tar xvjf $(f)) \
$(foreach f,$(filter %.tar.xz,$^), && tar xvJf $(f)) \
$(foreach f,$(filter %.zip,$^), && unzip $(f))
#
# Per-package build rules
......
......@@ -12,7 +12,7 @@ $(TARBALLS)/libmatroska-$(MATROSKA_VERSION).tar.bz2:
.sum-matroska: libmatroska-$(MATROSKA_VERSION).tar.bz2
libmatroska: libmatroska-$(MATROSKA_VERSION).tar.bz2 .sum-matroska
$(UNPACK_BZ2)
$(UNPACK)
mv $@-$(MATROSKA_VERSION) $@
touch $@
......
......@@ -14,7 +14,7 @@ $(TARBALLS)/libogg-$(OGG_VERSION).tar.xz:
.sum-ogg: libogg-$(OGG_VERSION).tar.xz
libogg: libogg-$(OGG_VERSION).tar.xz .sum-ogg
$(UNPACK_XZ)
$(UNPACK)
(cd $@-$(OGG_VERSION) && patch -p1) < $(SRC)/ogg/libogg-1.1.patch
ifdef HAVE_WINCE
(cd $@-$(OGG_VERSION) && patch -p1) < $(SRC)/ogg/libogg-wince.patch
......
......@@ -11,7 +11,7 @@ $(TARBALLS)/speex-$(SPEEX_VERSION).tar.gz:
.sum-speex: speex-$(SPEEX_VERSION).tar.gz
speex: speex-$(SPEEX_VERSION).tar.gz .sum-speex
$(UNPACK_GZ)
$(UNPACK)
mv $@-$(SPEEX_VERSION) $@
touch $@
......
......@@ -12,7 +12,7 @@ $(TARBALLS)/libtheora-$(THEORA_VERSION).tar.xz:
.sum-theora: libtheora-$(THEORA_VERSION).tar.xz
libtheora: libtheora-$(THEORA_VERSION).tar.xz .sum-theora
$(UNPACK_XZ)
$(UNPACK)
(cd $@-$(THEORA_VERSION) && patch -p1) < $(SRC)/theora/libtheora-includes.patch
ifdef HAVE_WIN64
cd $@ && autoreconf -fi -I m4
......
......@@ -15,7 +15,7 @@ $(TARBALLS)/tremor-svn.tar.xz:
tremor: tremor-svn.tar.xz .sum-tremor
# Stuff that does not depend on libogg
$(UNPACK_XZ)
$(UNPACK)
(cd tremor-svn && patch -p0) < $(SRC)/tremor/tremor.patch
rm -f tremor-svn/ogg.h tremor-svn/os_types.h
echo '#include <ogg/ogg.h>' > tremor-svn/ogg.h
......
......@@ -17,7 +17,7 @@ $(TARBALLS)/libvorbis-$(VORBIS_VERSION).tar.xz:
.sum-vorbis: libvorbis-$(VORBIS_VERSION).tar.xz
libvorbis: libvorbis-$(VORBIS_VERSION).tar.xz .sum-vorbis
$(UNPACK_XZ)
$(UNPACK)
mv $@-$(VORBIS_VERSION) $@
touch $@
......
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