GPU-Calc: remove Alloc_Host_Ptr for clmem of NAN vector
[LibreOffice.git] / Makefile.fetch
blobae76cf73701c3bed58af4b32751f2353961ce22b
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 fetch_LOGFILE := $(TARFILE_LOCATION)/fetch.log
12 ifneq (,$(WGET))
13 define fetch_Download__wget_command
14 && $(WGET) --progress=dot:mega -Q 0 -P "." -l 0 -nd -nH -N $1/$2 2>&1 | tee -a $(fetch_LOGFILE) && [ $$PIPESTATUS -eq 0 ]
15 endef
17 else
18 define fetch_Download__wget_command
19 && echo fetching $2 && $(CURL) -O $1/$2 2>&1 | tee -a $(fetch_LOGFILE) && [ $$PIPESTATUS -eq 0 ]
20 endef
22 endif
24 ifneq (,$(MD5SUM))
25 define fetch_Download__checksum_command
26 && SUM=`$(MD5SUM) $1 | sed "s/ .*//"` \
27 && if test "$$SUM" != "$2"; then \
28         echo ERROR: expected checksum for $1 is $2 2>&1 | tee -a $(fetch_LOGFILE); \
29         false; \
31 endef
33 else
34 fetch_Download__checksum_command :=
36 endif
38 # fetch__Download_item url tarball-name md5sum
39 define fetch__Download_item
40 $(if $(wildcard $(TARFILE_LOCATION)/$2),, \
41 cd $(TARFILE_LOCATION)/tmp \
42 $(call fetch_Download__wget_command,$1,$2) \
43 $(if $3,$(call fetch_Download__checksum_command,$2,$3)) \
44 && mv $2 ../ \
47 endef
49 # fetch_Download_item url tarball-name no-sum?
50 define fetch_Download_item
51 $(call fetch__Download_item,$1,$2,$(if $3,,$(firstword $(subst -, ,$2))))
53 endef
55 # fetch_Download_item_special url variable-name
56 define fetch_Download_item_special
57 $(if $($(subst _TARBALL,_MD5SUM,$(2))),,$(error "fetch_Download_item_special: $2_MD5SUM can't be empty"))
58 $(call fetch__Download_item,$1,$($2),$($(subst _TARBALL,_MD5SUM,$(2))))
60 endef
62 fetch_BUILD_TYPE := $(sort $(BUILD_TYPE))
63 ifeq ($(CROSS_COMPILING),YES)
64 fetch_BUILD_TYPE := $(sort $(fetch_BUILD_TYPE) $(shell . $(SRCDIR)/bin/get_config_variables --build BUILD_TYPE && echo $$BUILD_TYPE))
65 endif
67 define fetch_Optional
68 $(if $(filter ALL,$(DO_FETCH_TARBALLS))$(filter $1,$(fetch_BUILD_TYPE)),$2)
69 endef
71 download: $(WORKDIR)/download
73 $(WORKDIR)/download: $(BUILDDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)/Makefile.fetch
74         -@mkdir -p $(TARFILE_LOCATION)/tmp
75         @date >> $(fetch_LOGFILE)
76         $(foreach item, \
77                 $(call fetch_Optional,LIBATOMIC_OPS,LIBATOMIC_OPS_TARBALL) \
78                 $(call fetch_Optional,CDR,CDR_TARBALL) \
79                 $(call fetch_Optional,EBOOK,EBOOK_TARBALL) \
80                 $(call fetch_Optional,FREEHAND,FREEHAND_TARBALL) \
81                 $(call fetch_Optional,ETONYEK,ETONYEK_TARBALL) \
82                 $(call fetch_Optional,FIREBIRD,FIREBIRD_TARBALL) \
83                 $(call fetch_Optional,HARFBUZZ,HARFBUZZ_TARBALL) \
84                 $(call fetch_Optional,LIBEOT,LIBEOT_TARBALL) \
85                 $(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
86                 $(call fetch_Optional,MWAW,MWAW_TARBALL) \
87                 $(call fetch_Optional,ODFGEN,ODFGEN_TARBALL) \
88                 $(call fetch_Optional,VISIO,VISIO_TARBALL) \
89         ,$(call fetch_Download_item_special,http://dev-www.libreoffice.org/src,$(item)))
90         $(foreach item, \
91                 $(call fetch_Optional,AFMS,$(AFMS_TARBALL)) \
92                 $(call fetch_Optional,APACHE_COMMONS,$(APACHE_COMMONS_CODEC_TARBALL)) \
93                 $(call fetch_Optional,APACHE_COMMONS,$(APACHE_COMMONS_HTTPCLIENT_TARBALL)) \
94                 $(call fetch_Optional,APACHE_COMMONS,$(APACHE_COMMONS_LANG_TARBALL)) \
95                 $(call fetch_Optional,APACHE_COMMONS,$(APACHE_COMMONS_LOGGING_TARBALL)) \
96                 $(call fetch_Optional,BOOST,$(BOOST_TARBALL)) \
97                 $(call fetch_Optional,BSH,$(BSH_TARBALL)) \
98                 $(call fetch_Optional,CAIRO,$(CAIRO_TARBALL)) \
99                 $(call fetch_Optional,CLUCENE,$(CLUCENE_TARBALL)) \
100                 $(call fetch_Optional,CMIS,$(CMIS_TARBALL)) \
101                 $(call fetch_Optional,CPPUNIT,$(CPPUNIT_TARBALL)) \
102                 $(call fetch_Optional,CT2N,$(CT2N_TARBALL)) \
103                 $(call fetch_Optional,CURL,$(CURL_TARBALL)) \
104                 $(call fetch_Optional,EPM,$(EPM_TARBALL)) \
105                 $(call fetch_Optional,EXPAT,$(EXPAT_TARBALL)) \
106                 $(call fetch_Optional,MARIADB,$(MARIADB_TARBALL)) \
107                 $(call fetch_Optional,MORE_FONTS,$(FONT_CALADEA_TARBALL)) \
108                 $(call fetch_Optional,MORE_FONTS,$(FONT_CARLITO_TARBALL)) \
109                 $(call fetch_Optional,MORE_FONTS,$(FONT_DEJAVU_TARBALL)) \
110                 $(call fetch_Optional,MORE_FONTS,$(FONT_GENTIUM_TARBALL)) \
111                 $(call fetch_Optional,MORE_FONTS,$(FONT_LIBERATION_NARROW_TARBALL)) \
112                 $(call fetch_Optional,MORE_FONTS,$(FONT_LIBERATION_TARBALL)) \
113                 $(call fetch_Optional,MORE_FONTS,$(FONT_LINLIBERTINEG_TARBALL)) \
114                 $(call fetch_Optional,MORE_FONTS,$(FONT_PTSERIF_TARBALL)) \
115                 $(call fetch_Optional,MORE_FONTS,$(FONT_OPENSANS_TARBALL)) \
116                 $(call fetch_Optional,MORE_FONTS,$(FONT_SOURCESANS_TARBALL)) \
117                 $(call fetch_Optional,MORE_FONTS,$(FONT_SOURCECODE_TARBALL)) \
118                 $(call fetch_Optional,FONTCONFIG,$(FONTCONFIG_TARBALL)) \
119                 $(call fetch_Optional,FREETYPE,$(FREETYPE_TARBALL)) \
120                 $(GOOGLE_DOCS_EXTENSION_PACK) \
121                 $(call fetch_Optional,GRAPHITE,$(GRAPHITE_TARBALL)) \
122                 $(call fetch_Optional,HSQLDB,$(HSQLDB_TARBALL)) \
123                 $(call fetch_Optional,HUNSPELL,$(HUNSPELL_TARBALL)) \
124                 $(call fetch_Optional,HYPHEN,$(HYPHEN_TARBALL)) \
125                 $(call fetch_Optional,ICU,$(ICU_TARBALL)) \
126                 $(call fetch_Optional,ICU,$(ICU_51_LAYOUT_FIX_TARBALL)) \
127                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_FLOW_ENGINE_TARBALL)) \
128                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_FLUTE_TARBALL)) \
129                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBBASE_TARBALL)) \
130                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBFONTS_TARBALL)) \
131                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBFORMULA_TARBALL)) \
132                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBLAYOUT_TARBALL)) \
133                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBLOADER_TARBALL)) \
134                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBREPOSITORY_TARBALL)) \
135                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBSERIALIZER_TARBALL)) \
136                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_LIBXML_TARBALL)) \
137                 $(call fetch_Optional,JFREEREPORT,$(JFREEREPORT_SAC_TARBALL)) \
138                 $(call fetch_Optional,JPEG,$(JPEG_TARBALL)) \
139                 $(call fetch_Optional,LANGUAGETOOL,$(LANGUAGETOOL_TARBALL)) \
140                 $(call fetch_Optional,LCMS2,$(LCMS2_TARBALL)) \
141                 $(call fetch_Optional,LIBEXTTEXTCAT,$(LIBEXTTEXTCAT_TARBALL)) \
142                 $(call fetch_Optional,LIBLANGTAG,$(LIBLANGTAG_TARBALL)) \
143                 $(call fetch_Optional,LIBXML2,$(LIBXML_TARBALL)) \
144                 $(LIBXMLSEC_TARBALL) \
145                 $(call fetch_Optional,LIBXSLT,$(LIBXSLT_TARBALL)) \
146                 $(call fetch_Optional,LPSOLVE,$(LPSOLVE_TARBALL)) \
147                 $(call fetch_Optional,MDDS,$(MDDS_TARBALL)) \
148                 $(call fetch_Optional,MYSQLCPPCONN,$(MYSQLCPPCONN_TARBALL)) \
149                 $(call fetch_Optional,MYTHES,$(MYTHES_TARBALL)) \
150                 $(call fetch_Optional,NEON,$(NEON_TARBALL)) \
151                 $(call fetch_Optional,NSS,$(NSS_TARBALL)) \
152                 $(NUMBERTEXT_EXTENSION_PACK) \
153                 $(call fetch_Optional,OPENLDAP,$(OPENLDAP_TARBALL)) \
154                 $(call fetch_Optional,OPENSSL,$(OPENSSL_TARBALL)) \
155                 $(call fetch_Optional,ORCUS,$(ORCUS_TARBALL)) \
156                 $(call fetch_Optional,CAIRO,$(PIXMAN_TARBALL)) \
157                 $(call fetch_Optional,LIBPNG,$(PNG_TARBALL)) \
158                 $(call fetch_Optional,POPPLER,$(POPPLER_TARBALL)) \
159                 $(call fetch_Optional,POSTGRESQL,$(POSTGRESQL_TARBALL)) \
160                 $(call fetch_Optional,PYTHON,$(PYTHON_TARBALL)) \
161                 $(call fetch_Optional,REDLAND,$(RAPTOR_TARBALL)) \
162                 $(call fetch_Optional,REDLAND,$(RASQAL_TARBALL)) \
163                 $(call fetch_Optional,REDLAND,$(REDLAND_TARBALL)) \
164                 $(call fetch_Optional,RHINO,$(RHINO_TARBALL)) \
165                 $(call fetch_Optional,RHINO,$(SWING_TARBALL)) \
166                 $(call fetch_Optional,TOMCAT,$(TOMCAT_TARBALL)) \
167                 $(call fetch_Optional,UCPP,$(UCPP_TARBALL)) \
168                 $(call fetch_Optional,VIGRA,$(VIGRA_TARBALL)) \
169                 $(call fetch_Optional,WPD,$(WPD_TARBALL)) \
170                 $(call fetch_Optional,WPG,$(WPG_TARBALL)) \
171                 $(call fetch_Optional,WPS,$(WPS_TARBALL)) \
172                 $(call fetch_Optional,XSLTML,$(XSLTML_TARBALL)) \
173                 $(call fetch_Optional,ZLIB,$(ZLIB_TARBALL)) \
174         ,$(call fetch_Download_item,http://dev-www.libreoffice.org/src,$(item)))
175         $(foreach item, \
176                 $(call fetch_Optional,DBGHELP,$(DBGHELP_DLL)) \
177                 $(call fetch_Optional,ODK,$(UNOWINREG_DLL)) \
178         ,$(call fetch_Download_item,http://dev-www.libreoffice.org/extern,$(item)))
179         $(foreach item, \
180                 $(BARCODE_EXTENSION_PACK) \
181                 $(DIAGRAM_EXTENSION_PACK) \
182                 $(HUNART_EXTENSION_PACK) \
183                 $(OOOP_FONTS_PACK) \
184                 $(OOOP_GALLERY_PACK) \
185                 $(OOOP_SAMPLES_PACK) \
186                 $(OOOP_TEMPLATES_PACK) \
187                 $(SUNTEMPLATES_DE_PACK) \
188                 $(SUNTEMPLATES_EN_US_PACK) \
189                 $(SUNTEMPLATES_ES_PACK) \
190                 $(SUNTEMPLATES_FR_PACK) \
191                 $(SUNTEMPLATES_HU_PACK) \
192                 $(SUNTEMPLATES_IT_PACK) \
193                 $(TYPO_EXTENSION_PACK) \
194                 $(VALIDATOR_EXTENSION_PACK) \
195                 $(WATCH_WINDOW_EXTENSION_PACK) \
196         ,$(call fetch_Download_item,http://ooo.itc.hu/oxygenoffice/download/libreoffice,$(item)))
197         $(foreach item, \
198                 $(call fetch_Optional,MOZ,$(MOZ_ZIP_INC)) \
199                 $(call fetch_Optional,MOZ,$(MOZ_ZIP_LIB)) \
200                 $(call fetch_Optional,MOZ,$(MOZ_ZIP_RUNTIME)) \
201         ,$(call fetch_Download_item,http://dev-www.libreoffice.org/mozilla,$(item),no-sum))
202         @mkdir -p $(dir $@) && touch $@
204 # vim: set noet sw=4 ts=4: