2012-11-21 15:36:34 -06:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
|
|
|
|
|
|
|
fetch_LOGFILE := $(TARFILE_LOCATION)/fetch.log
|
|
|
|
|
|
|
|
ifneq (,$(WGET))
|
|
|
|
define fetch_Download__wget_command
|
2012-11-28 15:47:58 -06:00
|
|
|
&& $(WGET) --progress=dot:mega -Q 0 -P "." -l 0 -nd -nH -N $1/$2 2>&1 | tee -a $(fetch_LOGFILE) && [ $$PIPESTATUS -eq 0 ]
|
2012-11-21 15:36:34 -06:00
|
|
|
endef
|
|
|
|
|
|
|
|
else
|
|
|
|
define fetch_Download__wget_command
|
2012-11-28 15:47:58 -06:00
|
|
|
&& echo fetching $2 && $(CURL) -O $1/$2 2>&1 | tee -a $(fetch_LOGFILE) && [ $$PIPESTATUS -eq 0 ]
|
2012-11-21 15:36:34 -06:00
|
|
|
endef
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifneq (,$(MD5SUM))
|
|
|
|
define fetch_Download__checksum_command
|
|
|
|
&& SUM=`$(MD5SUM) $1 | sed "s/ .*//"` \
|
|
|
|
&& if test "$$SUM" != "$2"; then \
|
|
|
|
echo ERROR: expected checksum for $1 is $2 2>&1 | tee -a $(fetch_LOGFILE); \
|
|
|
|
false; \
|
|
|
|
fi
|
|
|
|
endef
|
|
|
|
|
|
|
|
else
|
|
|
|
fetch_Download__checksum_command :=
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
2012-11-23 05:54:15 -06:00
|
|
|
# fetch__Download_item url tarball-name md5sum
|
|
|
|
define fetch__Download_item
|
2012-11-21 15:36:34 -06:00
|
|
|
$(if $(wildcard $(TARFILE_LOCATION)/$2),, \
|
|
|
|
cd $(TARFILE_LOCATION)/tmp \
|
|
|
|
$(call fetch_Download__wget_command,$1,$2) \
|
2012-11-23 05:54:15 -06:00
|
|
|
$(if $3,$(call fetch_Download__checksum_command,$2,$3)) \
|
2012-11-21 15:36:34 -06:00
|
|
|
&& mv $2 ../ \
|
|
|
|
)
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2012-11-23 05:54:15 -06:00
|
|
|
# fetch_Download_item url tarball-name no-sum?
|
|
|
|
define fetch_Download_item
|
|
|
|
$(call fetch__Download_item,$1,$2,$(if $3,,$(firstword $(subst -, ,$2))))
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
# fetch_Download_item_special url variable-name
|
|
|
|
define fetch_Download_item_special
|
|
|
|
$(if $($(subst _TARBALL,_MD5SUM,$(2))),,$(error "fetch_Download_item_special: $2_MD5SUM can't be empty"))
|
|
|
|
$(call fetch__Download_item,$1,$($2),$($(subst _TARBALL,_MD5SUM,$(2))))
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
2012-11-22 12:15:18 -06:00
|
|
|
fetch_BUILD_TYPE := $(sort $(BUILD_TYPE))
|
|
|
|
ifeq ($(CROSS_COMPILING),YES)
|
|
|
|
fetch_BUILD_TYPE := $(sort $(fetch_BUILD_TYPE) $(shell . $(SRCDIR)/bin/get_config_variables --build BUILD_TYPE && echo $$BUILD_TYPE))
|
|
|
|
endif
|
|
|
|
|
2012-11-22 04:21:58 -06:00
|
|
|
define fetch_Optional
|
2012-11-22 12:15:18 -06:00
|
|
|
$(if $(filter ALL,$(DO_FETCH_TARBALLS))$(filter $1,$(fetch_BUILD_TYPE)),$2)
|
2012-11-22 04:21:58 -06:00
|
|
|
endef
|
|
|
|
|
2012-11-29 03:04:31 -06:00
|
|
|
download: $(WORKDIR)/download
|
2012-11-26 07:17:18 -06:00
|
|
|
|
2012-12-11 08:39:49 -06:00
|
|
|
$(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)/Makefile.fetch
|
2013-07-24 12:44:52 -05:00
|
|
|
-@mkdir -p $(TARFILE_LOCATION)/tmp
|
2012-11-26 07:17:18 -06:00
|
|
|
@date >> $(fetch_LOGFILE)
|
2013-05-10 13:21:30 -05:00
|
|
|
$(foreach item, \
|
2013-06-14 08:55:22 -05:00
|
|
|
$(call fetch_Optional,LIBATOMIC_OPS,LIBATOMIC_OPS_TARBALL) \
|
2012-11-23 05:54:15 -06:00
|
|
|
$(call fetch_Optional,CDR,CDR_TARBALL) \
|
2013-06-14 08:55:22 -05:00
|
|
|
$(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
|
2013-08-17 07:47:55 -05:00
|
|
|
$(call fetch_Optional,HARFBUZZ,HARFBUZZ_TARBALL) \
|
2012-11-23 05:54:15 -06:00
|
|
|
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
|
2013-03-11 06:38:12 -05:00
|
|
|
$(call fetch_Optional,MWAW,MWAW_TARBALL) \
|
2012-11-23 05:54:15 -06:00
|
|
|
$(call fetch_Optional,VISIO,VISIO_TARBALL) \
|
|
|
|
,$(call fetch_Download_item_special,http://dev-www.libreoffice.org/src,$(item)))
|
2012-11-21 15:36:34 -06:00
|
|
|
$(foreach item, \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,AFMS,$(AFMS_TARBALL)) \
|
|
|
|
$(call fetch_Optional,APACHE_COMMONS,$(APACHE_COMMONS_CODEC_TARBALL)) \
|
|
|
|
$(call fetch_Optional,APACHE_COMMONS,$(APACHE_COMMONS_HTTPCLIENT_TARBALL)) \
|
|
|
|
$(call fetch_Optional,APACHE_COMMONS,$(APACHE_COMMONS_LANG_TARBALL)) \
|
|
|
|
$(call fetch_Optional,APACHE_COMMONS,$(APACHE_COMMONS_LOGGING_TARBALL)) \
|
|
|
|
$(call fetch_Optional,BOOST,$(BOOST_TARBALL)) \
|
|
|
|
$(call fetch_Optional,BSH,$(BSH_TARBALL)) \
|
|
|
|
$(call fetch_Optional,CAIRO,$(CAIRO_TARBALL)) \
|
|
|
|
$(call fetch_Optional,CLUCENE,$(CLUCENE_TARBALL)) \
|
|
|
|
$(call fetch_Optional,CMIS,$(CMIS_TARBALL)) \
|
|
|
|
$(call fetch_Optional,CPPUNIT,$(CPPUNIT_TARBALL)) \
|
|
|
|
$(call fetch_Optional,CT2N,$(CT2N_TARBALL)) \
|
|
|
|
$(call fetch_Optional,CURL,$(CURL_TARBALL)) \
|
|
|
|
$(call fetch_Optional,EPM,$(EPM_TARBALL)) \
|
|
|
|
$(call fetch_Optional,EXPAT,$(EXPAT_TARBALL)) \
|
2013-03-06 09:33:07 -06:00
|
|
|
$(call fetch_Optional,MARIADB,$(MARIADB_TARBALL)) \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_DEJAVU_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_GENTIUM_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_LIBERATION_NARROW_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_LIBERATION_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_LINLIBERTINEG_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_PTSERIF_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_OPENSANS_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_SOURCESANS_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MORE_FONTS,$(FONT_SOURCECODE_TARBALL)) \
|
|
|
|
$(call fetch_Optional,FONTCONFIG,$(FONTCONFIG_TARBALL)) \
|
|
|
|
$(call fetch_Optional,FREETYPE,$(FREETYPE_TARBALL)) \
|
2012-11-21 15:36:34 -06:00
|
|
|
$(GOOGLE_DOCS_EXTENSION_PACK) \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,GRAPHITE,$(GRAPHITE_TARBALL)) \
|
2012-12-17 16:48:00 -06:00
|
|
|
$(call fetch_Optional,GLIBC,$(GLIBC_TARBALL)) \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,HSQLDB,$(HSQLDB_TARBALL)) \
|
|
|
|
$(call fetch_Optional,HUNSPELL,$(HUNSPELL_TARBALL)) \
|
|
|
|
$(call fetch_Optional,HYPHEN,$(HYPHEN_TARBALL)) \
|
|
|
|
$(call fetch_Optional,ICU,$(ICU_TARBALL)) \
|
2013-05-06 09:56:28 -05:00
|
|
|
$(call fetch_Optional,ICU,$(ICU_51_LAYOUT_FIX_TARBALL)) \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_FLOW_ENGINE_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_FLUTE_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBBASE_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBFONTS_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBFORMULA_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBLAYOUT_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBLOADER_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBREPOSITORY_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBSERIALIZER_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBXML_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_SAC_TARBALL)) \
|
|
|
|
$(call fetch_Optional,JPEG,$(JPEG_TARBALL)) \
|
|
|
|
$(call fetch_Optional,LANGUAGETOOL,$(LANGUAGETOOL_TARBALL)) \
|
|
|
|
$(call fetch_Optional,LCMS2,$(LCMS2_TARBALL)) \
|
|
|
|
$(call fetch_Optional,LIBEXTTEXTCAT,$(LIBEXTTEXTCAT_TARBALL)) \
|
|
|
|
$(call fetch_Optional,LIBLANGTAG,$(LIBLANGTAG_TARBALL)) \
|
|
|
|
$(call fetch_Optional,LIBXML2,$(LIBXML_TARBALL)) \
|
2012-11-21 15:36:34 -06:00
|
|
|
$(LIBXMLSEC_TARBALL) \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,LIBXSLT,$(LIBXSLT_TARBALL)) \
|
|
|
|
$(call fetch_Optional,LPSOLVE,$(LPSOLVE_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MDDS,$(MDDS_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MYSQLCPPCONN,$(MYSQLCPPCONN_TARBALL)) \
|
|
|
|
$(call fetch_Optional,MYTHES,$(MYTHES_TARBALL)) \
|
|
|
|
$(call fetch_Optional,NEON,$(NEON_TARBALL)) \
|
|
|
|
$(call fetch_Optional,NSS,$(NSS_TARBALL)) \
|
2012-12-06 15:07:53 -06:00
|
|
|
$(NUMBERTEXT_EXTENSION_PACK) \
|
2013-05-02 13:25:51 -05:00
|
|
|
$(call fetch_Optional,ODFGEN,$(ODFGEN_TARBALL)) \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,OPENLDAP,$(OPENLDAP_TARBALL)) \
|
|
|
|
$(call fetch_Optional,OPENSSL,$(OPENSSL_TARBALL)) \
|
|
|
|
$(call fetch_Optional,ORCUS,$(ORCUS_TARBALL)) \
|
|
|
|
$(call fetch_Optional,CAIRO,$(PIXMAN_TARBALL)) \
|
|
|
|
$(call fetch_Optional,LIBPNG,$(PNG_TARBALL)) \
|
2013-07-08 07:01:17 -05:00
|
|
|
$(call fetch_Optional,POPPLER,$(POPPLER_TARBALL)) \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,POSTGRESQL,$(POSTGRESQL_TARBALL)) \
|
|
|
|
$(call fetch_Optional,PYTHON,$(PYTHON_TARBALL)) \
|
|
|
|
$(call fetch_Optional,REDLAND,$(RAPTOR_TARBALL)) \
|
|
|
|
$(call fetch_Optional,REDLAND,$(RASQAL_TARBALL)) \
|
|
|
|
$(call fetch_Optional,REDLAND,$(REDLAND_TARBALL)) \
|
|
|
|
$(call fetch_Optional,RHINO,$(RHINO_TARBALL)) \
|
|
|
|
$(call fetch_Optional,RHINO,$(SWING_TARBALL)) \
|
|
|
|
$(call fetch_Optional,TOMCAT,$(TOMCAT_TARBALL)) \
|
|
|
|
$(call fetch_Optional,UCPP,$(UCPP_TARBALL)) \
|
|
|
|
$(call fetch_Optional,VIGRA,$(VIGRA_TARBALL)) \
|
|
|
|
$(call fetch_Optional,WPD,$(WPD_TARBALL)) \
|
|
|
|
$(call fetch_Optional,WPG,$(WPG_TARBALL)) \
|
|
|
|
$(call fetch_Optional,WPS,$(WPS_TARBALL)) \
|
|
|
|
$(call fetch_Optional,XSLTML,$(XSLTML_TARBALL)) \
|
|
|
|
$(call fetch_Optional,ZLIB,$(ZLIB_TARBALL)) \
|
2012-11-21 15:36:34 -06:00
|
|
|
,$(call fetch_Download_item,http://dev-www.libreoffice.org/src,$(item)))
|
|
|
|
$(foreach item, \
|
2012-12-25 03:56:41 -06:00
|
|
|
$(call fetch_Optional,DBGHELP,$(DBGHELP_DLL)) \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,ODK,$(UNOWINREG_DLL)) \
|
2012-11-21 15:36:34 -06:00
|
|
|
,$(call fetch_Download_item,http://dev-www.libreoffice.org/extern,$(item)))
|
|
|
|
$(foreach item, \
|
|
|
|
$(BARCODE_EXTENSION_PACK) \
|
|
|
|
$(DIAGRAM_EXTENSION_PACK) \
|
|
|
|
$(HUNART_EXTENSION_PACK) \
|
|
|
|
$(OOOP_FONTS_PACK) \
|
|
|
|
$(OOOP_GALLERY_PACK) \
|
|
|
|
$(OOOP_SAMPLES_PACK) \
|
|
|
|
$(OOOP_TEMPLATES_PACK) \
|
|
|
|
$(SUNTEMPLATES_DE_PACK) \
|
|
|
|
$(SUNTEMPLATES_EN_US_PACK) \
|
|
|
|
$(SUNTEMPLATES_ES_PACK) \
|
|
|
|
$(SUNTEMPLATES_FR_PACK) \
|
|
|
|
$(SUNTEMPLATES_HU_PACK) \
|
|
|
|
$(SUNTEMPLATES_IT_PACK) \
|
|
|
|
$(TYPO_EXTENSION_PACK) \
|
|
|
|
$(VALIDATOR_EXTENSION_PACK) \
|
|
|
|
$(WATCH_WINDOW_EXTENSION_PACK) \
|
|
|
|
,$(call fetch_Download_item,http://ooo.itc.hu/oxygenoffice/download/libreoffice,$(item)))
|
|
|
|
$(foreach item, \
|
2012-11-22 04:21:58 -06:00
|
|
|
$(call fetch_Optional,MOZ,$(MOZ_ZIP_INC)) \
|
|
|
|
$(call fetch_Optional,MOZ,$(MOZ_ZIP_LIB)) \
|
|
|
|
$(call fetch_Optional,MOZ,$(MOZ_ZIP_RUNTIME)) \
|
2012-11-23 05:54:15 -06:00
|
|
|
,$(call fetch_Download_item,http://dev-www.libreoffice.org/mozilla,$(item),no-sum))
|
2012-11-29 03:04:31 -06:00
|
|
|
@mkdir -p $(dir $@) && touch $@
|
2012-11-21 15:36:34 -06:00
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|