[Libreoffice-commits] .: Branch 'feature/download' - 2 commits - config_host.mk.in configure.ac download Makefile.fetch Makefile.top
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Nov 26 05:36:29 PST 2012
Makefile.fetch | 8 ++-
Makefile.top | 44 +++++++++++++++----
config_host.mk.in | 2
configure.ac | 22 ++-------
download | 124 ------------------------------------------------------
5 files changed, 50 insertions(+), 150 deletions(-)
New commits:
commit 7c5780e3db13a0c176417a44920a12bf669c1bdb
Author: Matúš Kukan <matus.kukan at gmail.com>
Date: Mon Nov 26 14:28:59 2012 +0100
bin --disable-fetch-external; it really does not make sense
Change-Id: Ic7e65c52d431e55829fd28ca26aacceaabe6a1df
diff --git a/Makefile.fetch b/Makefile.fetch
index ae46f55..8c453b9 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -66,7 +66,7 @@ fetch_BUILD_TYPE := $(sort $(fetch_BUILD_TYPE) $(shell . $(SRCDIR)/bin/get_confi
endif
define fetch_Optional
-$(if $(filter ALL,$(DO_FETCH_TARBALLS))$(filter $1,$(fetch_BUILD_TYPE)),$2)
+$(if $(WITH_ALL_TARBALLS)$(filter $1,$(fetch_BUILD_TYPE)),$2)
endef
download: $(fetch_LOGFILE)
diff --git a/Makefile.top b/Makefile.top
index 8e134aa..4cf43c0 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -364,13 +364,12 @@ cmd:
endif
ifneq ($(filter-out clean distclean,$(MAKECMDGOALS)),)
+
#
# Fetch
#
-ifneq ($(DO_FETCH_TARBALLS),NO)
include $(SRCDIR)/Makefile.fetch
fetch: download
-endif
fetch: $(SRCDIR)/src.downloaded
fetch: get-submodules
diff --git a/config_host.mk.in b/config_host.mk.in
index 4531ce8..921b935 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -110,7 +110,6 @@ export DLLTOOL=@DLLTOOL@
export DMAKEROOT=@SRC_ROOT@/solenv/inc/startup
export DOCDIR=@DOCDIR@
export DOXYGEN=@DOXYGEN@
-export DO_FETCH_TARBALLS=@DO_FETCH_TARBALLS@
export DPKG=@DPKG@
export DYNAMIC_CRT=@DYNAMIC_CRT@
export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
@@ -592,6 +591,7 @@ export WINEGCC=@WINEGCC@
export WITHOUT_AFMS=@WITHOUT_AFMS@
export WITHOUT_PPDS=@WITHOUT_PPDS@
#export WITH_AGFA_MONOTYPE_FONTS=@WITH_AGFA_MONOTYPE_FONTS@
+export WITH_ALL_TARBALLS=@WITH_ALL_TARBALLS@
export WITH_COMPAT_OOWRAPPERS=@WITH_COMPAT_OOWRAPPERS@
export WITH_EXTENSION_INTEGRATION=@WITH_EXTENSION_INTEGRATION@
export WITH_EXTRA_EXTENSIONS=@WITH_EXTRA_EXTENSIONS@
diff --git a/configure.ac b/configure.ac
index 603a49a..2dca5a3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -665,11 +665,6 @@ AC_ARG_ENABLE(graphite,
[Enables the compilation of Graphite smart font rendering.])
)
-AC_ARG_ENABLE(fetch-external,
- AS_HELP_STRING([--disable-fetch-external],
- [Disables fetching external tarballs from web sources.])
-)
-
AC_ARG_ENABLE(lockdown,
AS_HELP_STRING([--disable-lockdown],
[Disables the gconf integration work in LibreOffice.]),
@@ -4326,20 +4321,15 @@ if test -z "$TARFILE_LOCATION"; then
fi
AC_SUBST(TARFILE_LOCATION)
-AC_MSG_CHECKING([whether we want to fetch tarballs])
-if test "$enable_fetch_external" != "no"; then
- if test "$with_all_tarballs" = "yes"; then
- AC_MSG_RESULT(["yes, all of them"])
- DO_FETCH_TARBALLS="ALL"
- else
- AC_MSG_RESULT(["yes, if we use them"])
- DO_FETCH_TARBALLS="YES"
- fi
+AC_MSG_CHECKING([whether we want to download all external tarballs unconditionally])
+if test "$with_all_tarballs" = "yes"; then
+ AC_MSG_RESULT([yes])
+ WITH_ALL_TARBALLS="TRUE"
else
AC_MSG_RESULT([no])
- DO_FETCH_TARBALLS="NO"
+ WITH_ALL_TARBALLS=""
fi
-AC_SUBST(DO_FETCH_TARBALLS)
+AC_SUBST(WITH_ALL_TARBALLS)
AC_MSG_CHECKING([whether to build help])
if test "$with_help" != "no" -a $_os != iOS -a $_os != Android; then
commit efec9735dd2a5253894b48fbd07c0bd9326b9a8d
Author: Matúš Kukan <matus.kukan at gmail.com>
Date: Mon Nov 26 14:17:18 2012 +0100
move more from download to Makefile.(top|fetch)
Change-Id: I3bee487c9c5aa72b2236f076b28ee65cf76ac0dd
diff --git a/Makefile.fetch b/Makefile.fetch
index 3da38c6..ae46f55 100644
--- a/Makefile.fetch
+++ b/Makefile.fetch
@@ -69,7 +69,11 @@ define fetch_Optional
$(if $(filter ALL,$(DO_FETCH_TARBALLS))$(filter $1,$(fetch_BUILD_TYPE)),$2)
endef
-fetch :
+download: $(fetch_LOGFILE)
+
+$(fetch_LOGFILE): $(SRCDIR)/config_host.mk $(SRCDIR)/download.lst $(SRCDIR)/Makefile.fetch
+ @mkdir -p $(TARFILE_LOCATION)/tmp
+ @date >> $(fetch_LOGFILE)
$(foreach item, \
$(call fetch_Optional,CDR,CDR_TARBALL) \
$(call fetch_Optional,MSPUB,MSPUB_TARBALL) \
diff --git a/Makefile.top b/Makefile.top
index 51635f9..8e134aa 100644
--- a/Makefile.top
+++ b/Makefile.top
@@ -1,6 +1,6 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-.PHONY : all bootstrap build check clean clean-build clean-host dev-install distclean distro-pack-install docs fetch findunusedcode id install install-strip install-tb subsequentcheck tags
+.PHONY : all bootstrap build check clean clean-build clean-host dev-install distclean distro-pack-install docs download fetch findunusedcode get-submodules id install install-strip install-tb subsequentcheck tags
ifeq ($(MAKECMDGOALS),)
MAKECMDGOALS:=all
@@ -369,14 +369,43 @@ ifneq ($(filter-out clean distclean,$(MAKECMDGOALS)),)
#
ifneq ($(DO_FETCH_TARBALLS),NO)
include $(SRCDIR)/Makefile.fetch
+fetch: download
endif
fetch: $(SRCDIR)/src.downloaded
+fetch: get-submodules
+
+ifneq (,$(wildcard .git))
+get-submodules:
+ifneq ($(foreach i,$(GIT_NEEDED_SUBMODULES),$(i)/.git),$(wildcard $(foreach i,$(GIT_NEEDED_SUBMODULES),$(i)/.git)))
+ifeq (,$(GIT_LINK_SRC))
+ ./g -f clone
+else # space-saving clone from another local workdir
+ @echo "FIXME: GIT_LINK_SRC method is not yet implemented with submodules" 1>&2
+ $(foreach i,$(GIT_NEEDED_SUBMODULES),\
+ rm -r $(i) && cp -R $(GIT_LINK_SRC)/$(i) $(i))
+# bin/git-new-workdir $GIT_LINK_SRC/$i $i
+ git submodule update $(GIT_NEEDED_SUBMODULES)
+endif
+endif
-$(SRCDIR)/src.downloaded : $(SRCDIR)/download $(SRCDIR)/config_host.mk
-ifneq ($(DO_FETCH_TARBALLS),NO)
- @$< && touch $@
-else
- @echo "Automatic fetching of external tarballs is disabled."
+else # these sources are from a tarball, so get the other source tarballs
+gb_LO_VER := $(shell . $(SRCDIR)/sources.ver && echo $$lo_sources_ver)
+$(if $(gb_LO_VER),,$(error Error while retrieving $$lo_sources_ver from $(SRCDIR)/sources.ver))
+
+get-submodules: | download
+ifneq ($(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),$(SRCDIR)/src/libreoffice-$(i)-$(gb_LO_VER)),$(wildcard $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),$(SRCDIR)/src/libreoffice-$(i)-$(gb_LO_VER))))
+ $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
+ $(call fetch_Download_item,http://download.documentfoundation.org/libreoffice/src/$(shell echo $(gb_LO_VER) | sed -e "s/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/"),libreoffice-$(i)-$(gb_LO_VER).tar.xz,no-check))
+ $(SRCDIR)/bin/unpack-sources $(SRCDIR) $(foreach i,$(subst helpcontent2,help,$(GIT_NEEDED_SUBMODULES)),\
+ $(TARFILE_LOCATION)/libreoffice-$(i)-$(gb_LO_VER).tar.xz)
+endif
+
+endif
+
+# TODO: This should be really in external/ module, I think.
+$(SRCDIR)/src.downloaded : $(SRCDIR)/download $(SRCDIR)/config_host.mk | download
+ifneq ($(COM),MSC)
+ $< && touch $@
endif
#
diff --git a/download b/download
index 0a0e7d3..985443c 100755
--- a/download
+++ b/download
@@ -30,123 +30,7 @@ set -o pipefail
# environment setup yet?
if [ -z "$TARFILE_LOCATION" ]; then
- . ./bin/get_config_variables TARFILE_LOCATION GIT_LINK_SRC GIT_NEEDED_SUBMODULES COM CPUNAME VCVER DBGHELP_DLL SRC_ROOT OXYGENOFFICE_PACK WGET CURL MD5SUM
-fi
-
-# we want to clone if we are in the bootstrap git repo and clone does not exist yet
-# we need to test for a .git in order not to clone after rsync if we are called in
-# the inner autogen of the buid-repo based build
-
-check_file()
-{
- echo "Looking for $1 ..."
- if test -f $1; then
- echo "ok"
- else
- echo "missing required archive; run './download' again";
- exit 1;
- fi
-}
-
-if [ -d .git ] ; then
- if [ -z "$GIT_LINK_SRC" ]; then
- ./g -f clone
- else
- echo "FIXME: GIT_LINK_SRC method is not yet implemented with submodules" 1>&2
- # space-saving clone from another local workdir
- for i in $GIT_NEEDED_SUBMODULES ; do
- rm -r $i
- cp -R $GIT_LINK_SRC/$i $i
-# bin/git-new-workdir $GIT_LINK_SRC/$i $i
- done
- git submodule update $GIT_NEEDED_SUBMODULES
- fi
-fi
-
-if [ ! -d "$TARFILE_LOCATION" ]; then
- mkdir $TARFILE_LOCATION
-fi
-if [ ! -d "$TARFILE_LOCATION" ]; then
- echo "Error: Cannot create $TARFILE_LOCATION."
- exit 1
-fi
-
-start_dir=`pwd`
-logfile=$TARFILE_LOCATION/fetch.log
-date >> $logfile
-
-downloaditem()
-{
- if [ "$1" != "" ]; then
- if [ ! -f "../$2" ]; then
- echo $2
- if [ ! -z "$WGET" ]; then
- $WGET --progress=dot:mega -Q 0 -P "." -l 0 -nd -nH -N $1/$2 2>&1 | tee -a $logfile
- else
- echo fetching $2
- $CURL $file_date_check -O $1/$2 2>&1 | tee -a $logfile
- fi
- wret=$?
- if [ $wret -ne 0 ]; then
- mv $2 ${i}_broken
- failed="$failed $2"
- wret=0
- fi
- if [ -f $2 -a -n "$3" -a -n "$MD5SUM" ]; then
- sum=`$MD5SUM $2 | sed "s/ .*//"`
- if [ "$sum" != "$3" ]; then
- echo checksum failure for $2 2>&1 | tee -a $logfile
- failed="$failed $2"
- mv $2 ${i}_broken
- else
- mv $2 ..
- if [ $? -ne 0 ]; then
- echo cannot mv $2 to destination 2>&1 | tee -a $logfile
- failed="$failed $2"
- fi
- fi
- else
- mv $2 ..
- if [ $? -ne 0 ]; then
- echo cannot mv $2 to destination 2>&1 | tee -a $logfile
- failed="$failed $2"
- fi
- fi
- fi
- fi
-}
-
-mkdir -p $TARFILE_LOCATION/tmp
-cd $TARFILE_LOCATION/tmp
-echo $$ > fetch-running
-
-if [ -f $start_dir/sources.ver -a ! -d $start_dir/.git ] ; then
- # these sources are from a tarball, so get the other source tarballs
- . $start_dir/sources.ver
- # sources are put into "major.minor.micro" version directory on the dowload site, e.g. "3.5.2"
- lo_bugfix_release_sources_ver=`echo $lo_sources_ver | sed -e "s/\([0-9]*\.[0-9]*\.[0-9]*\).*/\1/"`
- lo_src_dir="$start_dir/src"
- mkdir -p "$lo_src_dir"
- for piece in $GIT_NEEDED_SUBMODULES ; do
- if [ "helpcontent2" = "$piece" ] ; then piece="help"; fi
- tarname="libreoffice-$piece-$lo_sources_ver"
- if [ ! -f "$TARFILE_LOCATION/$tarname.tar.xz" ] ; then
- downloaditem "http://download.documentfoundation.org/libreoffice/src/$lo_bugfix_release_sources_ver" "$tarname.tar.xz" ""
- fi
- $start_dir/bin/unpack-sources $start_dir $TARFILE_LOCATION/$tarname.tar.xz
- done
-fi
-
-rm $TARFILE_LOCATION/tmp/*-*
-cd $start_dir
-
-if [ ! -z "$failed" ]; then
- echo
- echo ERROR: failed on:
- for i in $failed ; do
- echo $i
- done
- exit 1
+ . ./bin/get_config_variables TARFILE_LOCATION COM CPUNAME VCVER DBGHELP_DLL
fi
if [ "$COM" = "MSC" -a "$CPUNAME" = "INTEL" ]; then
@@ -189,12 +73,6 @@ if [ "$COM" = "MSC" ]; then
fi
fi
-if [ -n "$OXYGENOFFICE_PACK" ] ; then
- check_file $TARFILE_LOCATION/$OXYGENOFFICE_PACK
- echo "Unpacking OxygenOffice '$OXYGENOFFICE_PACK' ..."
- unzip -o -q $TARFILE_LOCATION/$OXYGENOFFICE_PACK -d $SRC_ROOT/src
-fi
-
# Local Variables:
# tab-width: 4
# indent-tabs-mode: nil
More information about the Libreoffice-commits
mailing list