Repository.mk                        |   37 ++++++++++++++++++++++++-----------
 RepositoryModule_host.mk             |   10 +++++++--
 config_host.mk.in                    |    1 
 drawinglayer/Library_drawinglayer.mk |    9 ++++++--
 postprocess/Rdb_services.mk          |   11 +++++++---
 solenv/bin/native-code.py            |    8 +++----
 solenv/gbuild/gbuild.mk              |    1 
 7 files changed, 55 insertions(+), 22 deletions(-)

New commits:
commit a1c508fc1c41b8ca1a13fe94f27e3f59fc1af269
Author:     Armin Le Grand (Allotropia) <armin.le.gr...@me.com>
AuthorDate: Fri May 7 21:10:24 2021 +0200
Commit:     Armin Le Grand (Allotropia) <armin.le.gr...@me.com>
CommitDate: Fri May 7 21:10:24 2021 +0200

    Stripped canvas/cppcanvas and related
    
    using ENABLE_WASM_STRIP_CANVAS define
    
    Change-Id: Ic09bb09dabd30cc7f8da92b4f9b414cf4fb1f739

diff --git a/Repository.mk b/Repository.mk
index 8a34f46506bd..4bf5933cf3c2 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -17,11 +17,16 @@
 #   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 #
 
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_executables,NONE, \
+       canvasdemo \
+))
+endif
+
 $(eval $(call gb_Helper_register_executables,NONE, \
        HelpIndexer \
        HelpLinker \
        bestreversemap \
-       canvasdemo \
        cfgex \
        concat-deps \
        cpp \
@@ -323,6 +328,20 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ogltrans, \
        OGLTrans \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
+       canvastools \
+       $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \
+       canvasfactory \
+       cppcanvas \
+       $(if $(filter WNT,$(OS)),directx9canvas) \
+       $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
+       $(if $(filter WNT,$(OS)),gdipluscanvas) \
+       simplecanvas \
+       vclcanvas \
+))
+endif
+
 $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
        $(call gb_Helper_optional,AVMEDIA,avmedia) \
        $(if $(filter MACOSX,$(OS)),\
@@ -334,14 +353,10 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
        ) \
        basegfx \
        bib \
-       $(if $(ENABLE_CAIRO_CANVAS),cairocanvas) \
-       canvasfactory \
-       canvastools \
        chartcore \
        chartcontroller \
        $(call gb_Helper_optional,OPENCL,clew) \
        $(if $(filter $(OS),WNT),,cmdmail) \
-       cppcanvas \
        configmgr \
        ctl \
        dba \
@@ -354,8 +369,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
        $(if $(filter-out MACOSX WNT,$(OS)),desktopbe1) \
        $(if $(USING_X11),desktop_detector) \
        $(call gb_Helper_optional,SCRIPTING,dlgprov) \
-       $(if $(filter WNT,$(OS)),directx9canvas) \
-       $(if $(ENABLE_OPENGL_CANVAS),oglcanvas) \
        drawinglayer \
        editeng \
        $(if $(filter WNT,$(OS)),emser) \
@@ -371,7 +384,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
        frm \
        fsstorage \
        fwk \
-       $(if $(filter WNT,$(OS)),gdipluscanvas) \
        guesslang \
        $(if $(filter DESKTOP,$(BUILD_TYPE)),helplinker) \
        i18npool \
@@ -413,7 +425,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
        sdd \
        sdfilt \
        sfx \
-       simplecanvas \
        slideshow \
        sot \
        spell \
@@ -447,7 +458,6 @@ $(eval $(call 
gb_Helper_register_libraries_for_install,OOOLIBS,ooo, \
                vbahelper \
        ) \
        vcl \
-       vclcanvas \
        writerperfect \
        xmlscript \
        xmlfa \
@@ -882,6 +892,12 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
 ))
 endif
 
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Helper_register_packages_for_install,ooo,\
+       $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \
+))
+endif
+
 $(eval $(call gb_Helper_register_packages_for_install,ooo,\
        $(if $(SYSTEM_LIBEXTTEXTCAT),,libexttextcat_fingerprint) \
        officecfg_misc \
@@ -970,7 +986,6 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
        $(if $(filter WNT,$(OS)), \
                vcl_opengl_denylist \
        ) \
-       $(if $(ENABLE_OPENGL_CANVAS),canvas_opengl_shader) \
        $(if $(filter SKIA,$(BUILD_TYPE)), \
                vcl_skia_denylist ) \
        $(if $(DISABLE_PYTHON),,$(if $(filter-out AIX,$(OS)), \
diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk
index 97c26f673084..2830e69f166a 100644
--- a/RepositoryModule_host.mk
+++ b/RepositoryModule_host.mk
@@ -27,6 +27,14 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
 ))
 endif
 
+# WASM_CANVAS change
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
+$(eval $(call gb_Module_add_moduledirs,libreoffice,\
+       canvas \
+       cppcanvas \
+))
+endif
+
 $(eval $(call gb_Module_add_moduledirs,libreoffice,\
        accessibility \
        android \
@@ -38,13 +46,11 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\
        bean \
        binaryurp \
        bridges \
-       canvas \
        cli_ure \
        $(call gb_Helper_optional,DESKTOP,codemaker) \
        comphelper \
        configmgr \
        connectivity \
-       cppcanvas \
        cppu \
        cppuhelper \
        cpputools \
diff --git a/config_host.mk.in b/config_host.mk.in
index e34b635cea1f..d67616e0de72 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -207,6 +207,7 @@ export ENABLE_WASM_STRIP_RECOVERYUI=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_PINGUSER=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_RECENT=@ENABLE_WASM_STRIP@
 export ENABLE_WASM_STRIP_CHART=@ENABLE_WASM_STRIP@
+export ENABLE_WASM_STRIP_CANVAS=@ENABLE_WASM_STRIP@
 export ENABLE_WERROR=@ENABLE_WERROR@
 export ENDIANNESS=@ENDIANNESS@
 export EPM=@EPM@
diff --git a/drawinglayer/Library_drawinglayer.mk 
b/drawinglayer/Library_drawinglayer.mk
index 43a42b83b42c..06c803f5bd37 100644
--- a/drawinglayer/Library_drawinglayer.mk
+++ b/drawinglayer/Library_drawinglayer.mk
@@ -29,11 +29,16 @@ $(eval $(call gb_Library_use_externals,drawinglayer,\
        libxml2 \
 ))
 
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
 $(eval $(call gb_Library_use_libraries,drawinglayer,\
-    basegfx \
     canvastools \
-    comphelper \
     cppcanvas \
+))
+endif
+
+$(eval $(call gb_Library_use_libraries,drawinglayer,\
+    basegfx \
+    comphelper \
     cppu \
     cppuhelper \
     i18nlangtag \
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index c7de6a3ab2c9..e23412a74774 100644
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -12,9 +12,8 @@ $(eval $(call gb_Rdb_Rdb_install,services))
 #
 # "minimal" list of services for cross-compiling build tools
 #
+ifneq ($(ENABLE_WASM_STRIP_CANVAS),TRUE)
 $(eval $(call gb_Rdb_add_components,services,\
-       $(call gb_Helper_optional,AVMEDIA,avmedia/util/avmedia) \
-       $(call gb_Helper_optional,SCRIPTING,basic/util/sb) \
        canvas/source/factory/canvasfactory \
        canvas/source/simplecanvas/simplecanvas \
        canvas/source/vcl/vclcanvas \
@@ -24,13 +23,19 @@ $(eval $(call gb_Rdb_add_components,services,\
                canvas/source/directx/directx9canvas \
                canvas/source/directx/gdipluscanvas \
        ) \
+       cppcanvas/source/uno/mtfrenderer \
+))
+endif
+
+$(eval $(call gb_Rdb_add_components,services,\
+       $(call gb_Helper_optional,AVMEDIA,avmedia/util/avmedia) \
+       $(call gb_Helper_optional,SCRIPTING,basic/util/sb) \
        comphelper/util/comphelp \
        configmgr/source/configmgr \
        $(if $(filter DBCONNECTIVITY,$(BUILD_TYPE)), \
                connectivity/source/dbtools/dbtools \
                connectivity/source/drivers/dbase/dbase \
        ) \
-       cppcanvas/source/uno/mtfrenderer \
        drawinglayer/drawinglayer \
        emfio/emfio \
        filter/source/config/cache/filterconfig1 \
diff --git a/solenv/bin/native-code.py b/solenv/bin/native-code.py
index f6485c214589..7c1a45e19422 100755
--- a/solenv/bin/native-code.py
+++ b/solenv/bin/native-code.py
@@ -32,10 +32,10 @@ core_constructor_list = [
     "stardiv_UnoControls_ProgressMonitor_get_implementation",
     "stardiv_UnoControls_StatusIndicator_get_implementation",
 # canvas/source/factory/canvasfactory.component
-    "com_sun_star_comp_rendering_CanvasFactory_get_implementation",
+    ("com_sun_star_comp_rendering_CanvasFactory_get_implementation", "#ifndef 
ENABLE_WASM_STRIP_CANVAS"),
 # canvas/source/vcl/vclcanvas.component
-    "com_sun_star_comp_rendering_Canvas_VCL_get_implementation",
-    "com_sun_star_comp_rendering_SpriteCanvas_VCL_get_implementation",
+    ("com_sun_star_comp_rendering_Canvas_VCL_get_implementation", "#ifndef 
ENABLE_WASM_STRIP_CANVAS"),
+    ("com_sun_star_comp_rendering_SpriteCanvas_VCL_get_implementation", 
"#ifndef ENABLE_WASM_STRIP_CANVAS"),
 # chart2/source/chartcore.component
     ("com_sun_star_chart2_ExponentialScaling_get_implementation", "#ifndef 
ENABLE_WASM_STRIP_CHART"),
     ("com_sun_star_chart2_LinearScaling_get_implementation", "#ifndef 
ENABLE_WASM_STRIP_CHART"),
@@ -107,7 +107,7 @@ core_constructor_list = [
     "com_sun_star_comp_configuration_ReadWriteAccess_get_implementation",
     "com_sun_star_comp_configuration_Update_get_implementation",
 # cppcanvas/source/uno/mtfrenderer.component
-    "com_sun_star_comp_rendering_MtfRenderer_get_implementation",
+    ("com_sun_star_comp_rendering_MtfRenderer_get_implementation", "#ifndef 
ENABLE_WASM_STRIP_CANVAS"),
 # cui/util/cui.component
     "com_sun_star_cui_ColorPicker_get_implementation",
 # dbaccess/util/dba.component
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 2a5ec592be51..bfe010372a9c 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -228,6 +228,7 @@ gb_GLOBALDEFS += -DENABLE_WASM_STRIP_RECOVERYUI
 gb_GLOBALDEFS += -DENABLE_WASM_STRIP_PINGUSER
 gb_GLOBALDEFS += -DENABLE_WASM_STRIP_RECENT
 gb_GLOBALDEFS += -DENABLE_WASM_STRIP_CHART
+gb_GLOBALDEFS += -DENABLE_WASM_STRIP_CANVAS
 endif
 
 ifeq ($(gb_ENABLE_DBGUTIL),$(true))
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to