From a7eb0b93c349c443393b3c762a2e9e4212eda2d7 Mon Sep 17 00:00:00 2001 From: Sergei Reznikov Date: Wed, 5 Sep 2018 13:35:38 +0300 Subject: [PATCH] LibreOffice: workaround a crash on quit --- .../libreoffice-6.2.0.0~git.recipe | 2 +- .../patches/libreoffice-6.2.0.0~git.patchset | 37 +++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/app-office/libreoffice/libreoffice-6.2.0.0~git.recipe b/app-office/libreoffice/libreoffice-6.2.0.0~git.recipe index 5469638e6..b043888b3 100644 --- a/app-office/libreoffice/libreoffice-6.2.0.0~git.recipe +++ b/app-office/libreoffice/libreoffice-6.2.0.0~git.recipe @@ -17,7 +17,7 @@ and Open Source office suite on the market: HOMEPAGE="https://www.libreoffice.org/" COPYRIGHT="2000-2018 LibreOffice contributors" LICENSE="MPL v2.0" -REVISION="16" +REVISION="17" srcGitRev="c134154de1d96f458c4502372c7d7e4d12a58fb3" SOURCE_URI="https://github.com/LibreOffice/core/archive/$srcGitRev.tar.gz" CHECKSUM_SHA256="92c524e686cb2c51907b1cfa92c1bd52bb13440310fa6620edd393ca04c8660d" diff --git a/app-office/libreoffice/patches/libreoffice-6.2.0.0~git.patchset b/app-office/libreoffice/patches/libreoffice-6.2.0.0~git.patchset index 673872ce5..87871bf07 100644 --- a/app-office/libreoffice/patches/libreoffice-6.2.0.0~git.patchset +++ b/app-office/libreoffice/patches/libreoffice-6.2.0.0~git.patchset @@ -91,3 +91,40 @@ index a297ddc..085ddfe 100644 -- 2.16.4 + +From ce7000f16213ca50a1e67a8a5c31b7d8d37a729b Mon Sep 17 00:00:00 2001 +From: Sergei Reznikov +Date: Wed, 5 Sep 2018 13:31:45 +0300 +Subject: Workaround a crash on quit. See Haiku #13159 + + +diff --git a/desktop/source/app/main.c b/desktop/source/app/main.c +index 643c42a..d4b47cb 100644 +--- a/desktop/source/app/main.c ++++ b/desktop/source/app/main.c +@@ -17,6 +17,12 @@ + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + */ + ++#ifdef __HAIKU__ ++#include ++#include ++#include ++#endif ++ + #include + + #include "sofficemain.h" +@@ -50,6 +56,9 @@ SAL_IMPLEMENT_MAIN() { + #ifdef __gnu_linux__ + g_Exiting = 1; + #endif ++#endif ++#ifdef __HAIKU__ ++ kill (getpid(), SIGKILL); + #endif + return ret; + } +-- +2.16.4 +