[vlc-commits] extras/tools: prefer to download all packages from v.o
Felix Paul Kühne
git at videolan.org
Wed Jul 13 10:53:40 CEST 2016
vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jul 13 10:53:17 2016 +0200| [a09dbdefd4d25ee6524f1d1df9be7aaf4d267ae2] | committer: Felix Paul Kühne
extras/tools: prefer to download all packages from v.o
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a09dbdefd4d25ee6524f1d1df9be7aaf4d267ae2
---
extras/tools/packages.mak | 4 +---
extras/tools/tools.mak | 31 +++++++++++++++++--------------
2 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/extras/tools/packages.mak b/extras/tools/packages.mak
index d8421c3..239e0ef 100644
--- a/extras/tools/packages.mak
+++ b/extras/tools/packages.mak
@@ -4,7 +4,6 @@ SF= http://downloads.sourceforge.net/project
VIDEOLAN=http://downloads.videolan.org/pub/contrib
YASM_VERSION=1.2.0
-#YASM_URL=$(VIDEOLAN)/yasm-$(YASM_VERSION).tar.gz
YASM_URL=http://www.tortall.net/projects/yasm/releases/yasm-$(YASM_VERSION).tar.gz
CMAKE_VERSION=3.4.3
@@ -23,7 +22,6 @@ M4_VERSION=1.4.16
M4_URL=$(GNU)/m4/m4-$(M4_VERSION).tar.gz
PKGCFG_VERSION=0.28-1
-#PKGCFG_URL=http://downloads.videolan.org/pub/videolan/testing/contrib/pkg-config-$(PKGCFG_VERSION).tar.gz
PKGCFG_URL=$(SF)/pkgconfiglite/$(PKGCFG_VERSION)/pkg-config-lite-$(PKGCFG_VERSION).tar.gz
TAR_VERSION=1.26
@@ -42,7 +40,7 @@ SED_VERSION=4.2.2
SED_URL=$(GNU)/sed/sed-$(SED_VERSION).tar.bz2
ANT_VERSION=1.9.7
-ANT_URL=$(VIDEOLAN)/apache-ant-$(ANT_VERSION)-bin.tar.bz2
+ANT_URL=$(APACHE)/ant/binaries/apache-ant-$(ANT_VERSION)-bin.tar.bz2
PROTOBUF_VERSION := 2.6.1
PROTOBUF_URL := https://github.com/google/protobuf/releases/download/v$(PROTOBUF_VERSION)/protobuf-$(PROTOBUF_VERSION).tar.bz2
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 69fac38..e73a781 100644
--- a/extras/tools/tools.mak
+++ b/extras/tools/tools.mak
@@ -27,6 +27,9 @@ else
download = $(error Neither curl nor wget found!)
endif
+download_pkg = $(call download,$(VIDEOLAN)/$(2)/$(lastword $(subst /, ,$(@)))) || \
+ ( $(call download,$(1)) && echo "Please upload package $(lastword $(subst /, ,$(@))) to our FTP" )
+
UNPACK = $(RM) -R $@ \
$(foreach f,$(filter %.tar.gz %.tgz,$^), && tar xvzf $(f)) \
$(foreach f,$(filter %.tar.bz2,$^), && tar xvjf $(f)) \
@@ -44,7 +47,7 @@ MOVE = mv $(UNPACK_DIR) $@ && touch $@
# yasm
yasm-$(YASM_VERSION).tar.gz:
- $(call download,$(YASM_URL))
+ $(call download_pkg,$(YASM_URL),yasm)
yasm: yasm-$(YASM_VERSION).tar.gz
$(UNPACK)
@@ -61,7 +64,7 @@ DISTCLEAN_PKG += yasm-$(YASM_VERSION).tar.gz
# cmake
cmake-$(CMAKE_VERSION).tar.gz:
- $(call download,$(CMAKE_URL))
+ $(call download_pkg,$(CMAKE_URL),cmake)
cmake: cmake-$(CMAKE_VERSION).tar.gz
$(UNPACK)
@@ -78,7 +81,7 @@ DISTCLEAN_PKG += cmake-$(CMAKE_VERSION).tar.gz
# libtool
libtool-$(LIBTOOL_VERSION).tar.gz:
- $(call download,$(LIBTOOL_URL))
+ $(call download_pkg,$(LIBTOOL_URL),libtool)
libtool: libtool-$(LIBTOOL_VERSION).tar.gz
$(UNPACK)
@@ -98,7 +101,7 @@ CLEAN_FILE += .libtool
# GNU tar (with xz support)
tar-$(TAR_VERSION).tar.bz2:
- $(call download,$(TAR_URL))
+ $(call download_pkg,$(TAR_URL),tar)
tar: tar-$(TAR_VERSION).tar.bz2
$(UNPACK)
@@ -115,7 +118,7 @@ CLEAN_FILE += .tar
# xz
xz-$(XZ_VERSION).tar.bz2:
- $(call download,$(XZ_URL))
+ $(call download_pkg,$(XZ_URL),xz)
xz: xz-$(XZ_VERSION).tar.bz2
$(UNPACK)
@@ -132,7 +135,7 @@ CLEAN_FILE += .xz
# autoconf
autoconf-$(AUTOCONF_VERSION).tar.gz:
- $(call download,$(AUTOCONF_URL))
+ $(call download_pkg,$(AUTOCONF_URL),autoconf)
autoconf: autoconf-$(AUTOCONF_VERSION).tar.gz
$(UNPACK)
@@ -149,7 +152,7 @@ DISTCLEAN_PKG += autoconf-$(AUTOCONF_VERSION).tar.gz
# automake
automake-$(AUTOMAKE_VERSION).tar.gz:
- $(call download,$(AUTOMAKE_URL))
+ $(call download_pkg,$(AUTOMAKE_URL),automake)
automake: automake-$(AUTOMAKE_VERSION).tar.gz
$(UNPACK)
@@ -166,7 +169,7 @@ DISTCLEAN_PKG += automake-$(AUTOMAKE_VERSION).tar.gz
# m4
m4-$(M4_VERSION).tar.gz:
- $(call download,$(M4_URL))
+ $(call download_pkg,$(M4_URL),m4)
m4: m4-$(M4_VERSION).tar.gz
$(UNPACK)
@@ -183,7 +186,7 @@ DISTCLEAN_PKG += m4-$(M4_VERSION).tar.gz
# pkg-config
pkg-config-$(PKGCFG_VERSION).tar.gz:
- $(call download,$(PKGCFG_URL))
+ $(call download_pkg,$(PKGCFG_URL),pkgconfiglite)
pkgconfig: pkg-config-$(PKGCFG_VERSION).tar.gz
$(UNPACK)
@@ -200,7 +203,7 @@ DISTCLEAN_PKG += pkg-config-$(PKGCFG_VERSION).tar.gz
# gas-preprocessor
gas-preprocessor-$(GAS_VERSION).tar.gz:
- $(call download,$(GAS_URL))
+ $(call download_pkg,$(GAS_URL),gas-preprocessor)
gas: gas-preprocessor-$(GAS_VERSION).tar.gz
$(UNPACK)
@@ -217,7 +220,7 @@ DISTCLEAN_PKG += yuvi-gas-preprocessor-$(GAS_VERSION).tar.gz
# Ragel State Machine Compiler
ragel-$(RAGEL_VERSION).tar.gz:
- $(call download,$(RAGEL_URL))
+ $(call download_pkg,$(RAGEL_URL),ragel)
ragel: ragel-$(RAGEL_VERSION).tar.gz
$(UNPACK)
@@ -236,7 +239,7 @@ DISTCLEAN_PKG += ragel-$(RAGEL_VERSION).tar.gz
# GNU sed
sed-$(SED_VERSION).tar.bz2:
- $(call download,$(SED_URL))
+ $(call download_pkg,$(SED_URL),sed)
sed: sed-$(SED_VERSION).tar.bz2
$(UNPACK)
@@ -253,7 +256,7 @@ CLEAN_FILE += .sed
# Apache ANT
apache-ant-$(ANT_VERSION).tar.bz2:
- $(call download,$(ANT_URL))
+ $(call download_pkg,$(ANT_URL),ant)
ant: apache-ant-$(ANT_VERSION).tar.bz2
$(UNPACK)
@@ -272,7 +275,7 @@ CLEAN_FILE += .ant
# Protobuf Protoc
protobuf-$(PROTOBUF_VERSION).tar.bz2:
- $(call download,$(PROTOBUF_URL))
+ $(call download_pkg,$(PROTOBUF_URL),protobuf)
protobuf: protobuf-$(PROTOBUF_VERSION).tar.bz2
$(UNPACK)
More information about the vlc-commits
mailing list