external/openssl/openssl-no-ipc-cmd.patch.0 | 18 ++++++++++++++++++ linguistic/Library_lng.mk | 4 ++-- sw/Library_sw.mk | 2 +- sw/Library_swui.mk | 2 +- sw/source/ui/dialog/swdlgfact.cxx | 11 +++++++++++ sw/source/uibase/shells/textsh1.cxx | 5 +++++ 6 files changed, 38 insertions(+), 4 deletions(-)
New commits: commit b612d24d48268f1c0d07371f2d751ead6877dc54 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Nov 8 14:28:26 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Nov 8 14:30:08 2022 +0100 WASM linguistic,sw: disable curl-using deepl code Curl is currently not built - not sure if possible at all. So disable new feature added in commit e20d2de7836da52dbf9e528d1043b1e188097bfd diff --git a/linguistic/Library_lng.mk b/linguistic/Library_lng.mk index 6ac44d7770b8..49c37b807685 100644 --- a/linguistic/Library_lng.mk +++ b/linguistic/Library_lng.mk @@ -51,7 +51,7 @@ $(eval $(call gb_Library_use_externals,lng,\ boost_headers \ icuuc \ icu_headers \ - curl \ + $(if $(ENABLE_CURL),curl) \ )) $(eval $(call gb_Library_add_exception_objects,lng,\ @@ -73,7 +73,7 @@ $(eval $(call gb_Library_add_exception_objects,lng,\ linguistic/source/spelldsp \ linguistic/source/spelldta \ linguistic/source/thesdsp \ - linguistic/source/translate \ + $(if $(ENABLE_CURL),linguistic/source/translate) \ )) # vim: set noet sw=4 ts=4: diff --git a/sw/Library_sw.mk b/sw/Library_sw.mk index 483f00601b04..56ea2839ce9a 100644 --- a/sw/Library_sw.mk +++ b/sw/Library_sw.mk @@ -695,7 +695,7 @@ $(eval $(call gb_Library_add_exception_objects,sw,\ sw/source/uibase/shells/grfsh \ sw/source/uibase/shells/grfshex \ sw/source/uibase/shells/langhelper \ - sw/source/uibase/shells/translatehelper \ + $(if $(ENABLE_CURL),sw/source/uibase/shells/translatehelper) \ sw/source/uibase/shells/listsh \ sw/source/uibase/shells/mediash \ sw/source/uibase/shells/navsh \ diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk index 8e9222d97cc1..7228dca1cd7e 100644 --- a/sw/Library_swui.mk +++ b/sw/Library_swui.mk @@ -153,7 +153,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\ sw/source/ui/misc/pgfnote \ sw/source/ui/misc/pggrid \ sw/source/ui/misc/srtdlg \ - sw/source/ui/misc/translatelangselect \ + $(if $(ENABLE_CURL),sw/source/ui/misc/translatelangselect) \ sw/source/ui/misc/swmodalredlineacceptdlg \ sw/source/ui/misc/titlepage \ sw/source/ui/table/colwd \ diff --git a/sw/source/ui/dialog/swdlgfact.cxx b/sw/source/ui/dialog/swdlgfact.cxx index 6e9ebc873ab7..a6f5ddc0f455 100644 --- a/sw/source/ui/dialog/swdlgfact.cxx +++ b/sw/source/ui/dialog/swdlgfact.cxx @@ -19,6 +19,7 @@ #include <config_features.h> #include <config_fuzzers.h> +#include <config_wasm_strip.h> #include "swdlgfact.hxx" #include <svl/style.hxx> @@ -799,8 +800,12 @@ sal_uInt16 AbstractMailMergeWizard_Impl::GetRestartPage() const std::optional<SwLanguageListItem> AbstractSwTranslateLangSelectDlg_Impl::GetSelectedLanguage() { +#if !ENABLE_WASM_STRIP_EXTRA SwTranslateLangSelectDlg* pDlg = dynamic_cast<SwTranslateLangSelectDlg*>(m_xDlg.get()); return pDlg->GetSelectedLanguage(); +#else + return {}; +#endif } VclPtr<AbstractSwInsertAbstractDlg> SwAbstractDialogFactory_Impl::CreateSwInsertAbstractDlg(weld::Window* pParent) @@ -864,7 +869,13 @@ std::shared_ptr<AbstractSwBreakDlg> SwAbstractDialogFactory_Impl::CreateSwBreakD std::shared_ptr<AbstractSwTranslateLangSelectDlg> SwAbstractDialogFactory_Impl::CreateSwTranslateLangSelectDlg(weld::Window* pParent, SwWrtShell &rSh) { +#if !ENABLE_WASM_STRIP_EXTRA return std::make_shared<AbstractSwTranslateLangSelectDlg_Impl>(std::make_unique<SwTranslateLangSelectDlg>(pParent, rSh)); +#else + (void) pParent; + (void) rSh; + return nullptr; +#endif } VclPtr<VclAbstractDialog> SwAbstractDialogFactory_Impl::CreateSwChangeDBDlg(SwView& rVw) diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index da69a34ef75d..818866a03e6b 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -103,9 +103,12 @@ #include <bookmark.hxx> #include <linguistic/misc.hxx> #include <authfld.hxx> +#include <config_wasm_strip.h> +#if !ENABLE_WASM_STRIP_EXTRA #include <translatelangselect.hxx> #include <svtools/deeplcfg.hxx> #include <translatehelper.hxx> +#endif // ENABLE_WASM_STRIP_EXTRA using namespace ::com::sun::star; using namespace com::sun::star::beans; @@ -1494,6 +1497,7 @@ void SwTextShell::Execute(SfxRequest &rReq) break; case SID_FM_TRANSLATE: { +#if !ENABLE_WASM_STRIP_EXTRA const SfxPoolItem* pTargetLangStringItem = nullptr; if (pArgs && SfxItemState::SET == pArgs->GetItemState(SID_ATTR_TARGETLANG_STR, false, &pTargetLangStringItem)) { @@ -1516,6 +1520,7 @@ void SwTextShell::Execute(SfxRequest &rReq) std::shared_ptr<weld::DialogController> pDialogController(pAbstractDialog->getDialogController()); weld::DialogController::runAsync(pDialogController, [] (sal_Int32 /*nResult*/) { }); } +#endif // ENABLE_WASM_STRIP_EXTRA } break; case SID_SPELLCHECK_IGNORE: commit d155f37c59c48e928ee40dee5289ce4af58b9b92 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Tue Nov 8 13:05:39 2022 +0100 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Tue Nov 8 13:12:10 2022 +0100 openssl: patch out another call to IPC::Cmd ... which is used when cross-compiling. diff --git a/external/openssl/openssl-no-ipc-cmd.patch.0 b/external/openssl/openssl-no-ipc-cmd.patch.0 index 75ed669eabc9..7f75b8ce64fe 100644 --- a/external/openssl/openssl-no-ipc-cmd.patch.0 +++ b/external/openssl/openssl-no-ipc-cmd.patch.0 @@ -63,3 +63,21 @@ if ( $SYSTEM eq "SunOS" ) { # check for Oracle Developer Studio, expected output is "cc: blah-blah C x.x blah-blah" +--- util/perl/OpenSSL/config.pm.orig 2022-11-08 12:54:59.751298823 +0100 ++++ util/perl/OpenSSL/config.pm 2022-11-08 12:55:16.436287053 +0100 +@@ -52,13 +52,13 @@ + my @cc_version = + ( + clang => sub { +- return undef unless IPC::Cmd::can_run("$CROSS_COMPILE$CC"); ++ return undef; # unless IPC::Cmd::can_run("$CROSS_COMPILE$CC"); + my $v = `$CROSS_COMPILE$CC -v 2>&1`; + $v =~ m/(?:(?:clang|LLVM) version|.*based on LLVM)\s+([0-9]+\.[0-9]+)/; + return $1; + }, + gnu => sub { +- return undef unless IPC::Cmd::can_run("$CROSS_COMPILE$CC"); ++ return undef; # unless IPC::Cmd::can_run("$CROSS_COMPILE$CC"); + my $nul = File::Spec->devnull(); + my $v = `$CROSS_COMPILE$CC -dumpversion 2> $nul`; + # Strip off whatever prefix egcs prepends the number with.