[vlc-commits] extras/tools: prefer to download all packages from v.o

Felix Paul Kühne git at videolan.org
Thu Jul 14 14:36:52 CEST 2016


vlc/vlc-2.2 | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Wed Jul 13 10:53:17 2016 +0200| [628b1860d2f6bbb5a1dbb2f5b14a6c520a4ccba3] | committer: Felix Paul Kühne

extras/tools: prefer to download all packages from v.o

(cherry picked from commit a09dbdefd4d25ee6524f1d1df9be7aaf4d267ae2)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.2.git/?a=commit;h=628b1860d2f6bbb5a1dbb2f5b14a6c520a4ccba3
---

 extras/tools/packages.mak |    4 +---
 extras/tools/tools.mak    |   29 ++++++++++++++++-------------
 2 files changed, 17 insertions(+), 16 deletions(-)

diff --git a/extras/tools/packages.mak b/extras/tools/packages.mak
index 9528868..e76156b 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=2.8.12.2
@@ -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,4 +40,4 @@ 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
diff --git a/extras/tools/tools.mak b/extras/tools/tools.mak
index 7aa9c92..533a8ee 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)
@@ -97,7 +100,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)
@@ -114,7 +117,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)
@@ -131,7 +134,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)
@@ -148,7 +151,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)
@@ -165,7 +168,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)
@@ -182,7 +185,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)
@@ -199,7 +202,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)
@@ -215,7 +218,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)
@@ -234,7 +237,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)
@@ -251,7 +254,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)



More information about the vlc-commits mailing list