office-gobmx/RepositoryModule_host.mk
Stephan Bergmann 3a445cb497 Turn onlineupdate into external/onlineupdate
...and update to latest Mozilla sources.

Originally, this was a non-external onlineupdate module (plus correspsonding
top-level include/onlineupdate/ directory) that apparently contained sources
originally copied from Mozilla and subsequently modified in-place (plus, mixed
in, presumably some sources that were not copied from Mozilla but were our own
inventions).  To clean up this mess, this has been turned into a proper
external/onlineupdate module with a tarball containing the pristine external
Mozilla sources.

The sources for the onlineupdate-c003be8b9727672e7d30972983b375f4c200233f.tar.xz
tarball are taken, somewhat arbitrarily, from a recent
<c003be8b97>
("Bug 1867784 - Force reflow all kids in the last column balancing reflow.
r=layout-reviewers,dholbert") trunk state, by running
`external/onlineupdate/generate-sources.sh ~/github.com/mozilla/gecko-dev` on a
Fedora 39 machine.

The layout of the tarball still mostly follows the old onlineupdate/ layout,
even if that deviates heavily from the actual source layout at
<https://github.com/mozilla/gecko-dev/>.  (And some files, which apparently are
not needed, anyway, lacked sources, see the "Missing source for" in
external/onlineupdate/generate-sources.sh.  And win_dirent.h/.cpp has meanwhile
been superseded by updateutils_win.h/.cpp.)  Merely newly included source files
are laid out in the tarball according to the actual source layout.

Any LO-specific modifications are made via patch files (rather than modifying
the sources inline, as was done in the past): external/onlineupdate/lo.patch
contains whatever modifications are needed to adapt the functionality, while
external/onlineupdate/gtk3deprecated.patch fixes

> workdir/UnpackedTarball/onlineupdate/onlineupdate/source/update/updater/progressui_gtk.cpp:97:21: error: use of undeclared identifier 'gtk_vbox_new'; did you mean 'gtk_box_new'?
>    97 |   GtkWidget* vbox = gtk_vbox_new(TRUE, 6);
>       |                     ^~~~~~~~~~~~
>       |                     gtk_box_new

to not use the deprecated gtk_vbox_new, which is hidden because we include
-DGTK_DISABLE_DEPRECATED in our GTK3_CFLAGS as per our configure.ac.

On Windows, the definition of __BYTE_ORDER__ etc. is needed because
workdir/UnpackedTarball/onlineupdate/include/mozilla/ says "Our supported
compilers provide architecture-independent macros for this", but MSVC doesn't
actually, so define here what would implicitly be defined by GCC.  Similarly, on
Windows -U_WIN32_WINNT is needed to undo -D_WIN32_WINNT=0x0601 in
solenv/gbuild/platform/windows.mk, which would cause

> workdir\UnpackedTarball\onlineupdate\include\mozilla/WinHeaderOnlyUtils.h(537): error C2065: 'FILE_ID_INFO': undeclared identifier

etc., despite the #include <windws.h> there.

Curiously, the original gb_CustomTarget_CustomTarget,onlineupdate/generated from
onlineupdate/CustomTarget_generated.mk had to be renamed to
gb_CustomTarget_CustomTarget,external/onlineupdate/generated when the file was
moved to external/onlineupdate/CustomTarget_generated.mk, as otherwise a
top-level `make CustomTarget_onlineupdate/generated` would have failed with "No
rule to make target..."  Also, as there is no gb_CustomTarget_use_unpacked, its
effect has been poorly mimicked for now in
external/onlineupdate/CustomTarget_generated.mk.

Similarly, as there is no gb_WinResTarget_use_unpacked, its effect has been
poorly mimicked for now in external/onlineupdate/WinResTarget_updater.mk.

The original onlineupdate/workben/test_dialog.cxx, which is actually code
written by us, has been moved to external/onlineupdate/workben/test_dialog.cxx.

The original onlineupdate/qa/ sources (which were apparently not used during the
build) have been preserved for now as external/onlineupdate/qa/, for
documentation purposes.

The original onlineupdate/astyle.options (which was apparently not used during
the build) has been removed.

Change-Id: I5ea606202e7837269e7b128e45af2f0b8c277f9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160492
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-12-15 11:27:49 +01:00

241 lines
5.4 KiB
Makefile

# -*- 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/.
#
$(eval $(call gb_Module_Module,libreoffice))
# This makefile needs to be read first because some variables like T_LIBS
# for libmerged are cleared there and then later we append stuff to it
# through e.g. gb_Library_use_external for various libraries in libmerged.
ifneq ($(MERGELIBS),)
$(eval $(call gb_Module_add_targets,libreoffice,\
Library_merged \
))
endif
# WASM_CHART change
ifneq ($(ENABLE_WASM_STRIP_CHART),TRUE)
$(eval $(call gb_Module_add_moduledirs,libreoffice,\
chart2 \
))
endif
# WASM_CANVAS change
ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
$(eval $(call gb_Module_add_moduledirs,libreoffice,\
canvas \
cppcanvas \
))
endif
ifneq ($(ENABLE_WASM_STRIP_DBACCESS),TRUE)
$(eval $(call gb_Module_add_moduledirs,libreoffice,\
dbaccess \
))
endif
ifneq ($(ENABLE_WASM_STRIP_ACCESSIBILITY),TRUE)
$(eval $(call gb_Module_add_moduledirs,libreoffice,\
accessibility \
winaccessibility \
))
endif
$(eval $(call gb_Module_add_moduledirs,libreoffice,\
android \
$(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
animations \
) \
apple_remote \
avmedia \
$(if $(ENABLE_WASM_STRIP_CALC),, \
basctl \
) \
basegfx \
basic \
bean \
binaryurp \
bridges \
cli_ure \
codemaker \
comphelper \
configmgr \
connectivity \
cppu \
cppuhelper \
cpputools \
cui \
desktop \
$(call gb_Helper_optional,DICTIONARIES,dictionaries) \
docmodel\
drawinglayer \
editeng \
embeddedobj \
embedserv \
eventattacher \
extensions \
external \
extras \
filter \
$(call gb_Helper_optional,DBCONNECTIVITY,forms) \
formula \
$(call gb_Helper_optional,DESKTOP,fpicker) \
framework \
$(call gb_Helper_optionals_or,HELPTOOLS XMLHELP,helpcompiler) \
$(call gb_Helper_optional,HELP,helpcontent2) \
hwpfilter \
i18nlangtag \
i18npool \
i18nutil \
idl \
instsetoo_native \
io \
javaunohelper \
jurt \
jvmaccess \
jvmfwk \
$(call gb_Helper_optional,LIBRELOGO,librelogo) \
libreofficekit \
lingucomponent \
linguistic \
lotuswordpro \
$(call gb_Helper_optional,DESKTOP,l10ntools) \
$(call gb_Helper_optional,NLPSOLVER,nlpsolver) \
o3tl \
$(call gb_Helper_optional,ODK,odk) \
offapi \
officecfg \
oovbaapi \
oox \
$(call gb_Helper_optional,OPENCL,opencl) \
package \
pch \
postprocess \
$(call gb_Helper_optional,PYUNO,pyuno) \
$(call gb_Helper_optional,QADEVOOO,qadevOOo) \
readlicense_oo \
registry \
remotebridges \
reportbuilder \
$(call gb_Helper_optional,DBCONNECTIVITY,reportdesign) \
ridljar \
sal \
salhelper \
sax \
$(if $(ENABLE_WASM_STRIP_CALC),, \
sc \
scaddins \
sccomp \
) \
$(call gb_Helper_optional,DESKTOP,scp2) \
scripting \
$(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
sd \
sdext \
) \
$(call gb_Helper_optional,DESKTOP,setup_native) \
sfx2 \
shell \
$(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
slideshow \
) \
smoketest \
solenv \
soltools \
sot \
$(if $(ENABLE_WASM_STRIP_BASIC_DRAW_MATH_IMPRESS),, \
starmath \
) \
$(if $(ENABLE_CUSTOMTARGET_COMPONENTS),static) \
stoc \
store \
svl \
svtools \
svgio \
emfio \
svx \
$(if $(ENABLE_WASM_STRIP_WRITER),, \
sw \
swext \
) \
sysui \
test \
testtools \
toolkit \
tools \
ucb \
ucbhelper \
udkapi \
$(call gb_Helper_optional,PYUNO,uitest) \
UnoControls \
unodevtools \
unoil \
unoidl \
unotest \
unotools \
unoxml \
ure \
uui \
vbahelper \
vcl \
wizards \
writerfilter \
writerperfect \
xmerge \
$(call gb_Helper_optional,XMLHELP,xmlhelp) \
xmloff \
xmlreader \
xmlscript \
xmlsecurity \
))
ifeq (,$(DISABLE_DYNLOADING))
# Especially when building everything with symbols, the linking of the largest
# libraries takes enormous amounts of RAM. To prevent annoying OOM situations
# etc., try to prevent linking these in parallel by adding artificial build
# order dependencies here.
# Do this only if a linker is not explicitly set, as this should only apply
# to the BFD linker and any decently modern linker presumably performs better.
ifeq (,$(USE_LD))
define repositorymodule_serialize1
$(call gb_Library_get_linktarget_target,$(1)) :| $(foreach lib,$(2),$(call gb_Library_get_target,$(lib)))
endef
else
define repositorymodule_serialize1
endef
endif
define repositorymodule_serialize
$(if $(filter-out 0 1,$(words $(1))),\
$(call repositorymodule_serialize1,$(firstword $(1)),$(wordlist 2,$(words $(1)),$(1))))
$(if $(strip $(1)),\
$(call repositorymodule_serialize,$(wordlist 2,$(words $(1)),$(1))))
endef
# DO NOT SORT ALPHABETICALLY: the libraries must be listed in dependency order,
# otherwise cyclic dependencies ruin everything.
# do not serialize on a partial build as that may fail due to missing deps.
# the default goal is build (see Module.mk)
ifeq (,$(filter-out build check unitcheck slowcheck screenshot subsequentcheck uicheck coverage,$(MAKECMDGOALS)))
$(eval $(call repositorymodule_serialize,\
scfilt \
$(call gb_Helper_optional,SCRIPTING,vbaobj) \
sc msword \
$(call gb_Helper_optional,DESKTOP,swui) \
sw sd \
$(call gb_Helper_optional,DBCONNECTIVITY,dbu) \
writerfilter cui chartcontroller chartcore oox \
$(if $(MERGELIBS), merged, \
svx svxcore xo sfx fwk svt vcl) \
))
endif
endif # !$(DISABLE_DYNLOADING)
# vim: set noet sw=4 ts=4: