aboutsummaryrefslogtreecommitdiffstats
path: root/editors
diff options
context:
space:
mode:
authorbapt <bapt@FreeBSD.org>2016-11-14 06:38:15 +0800
committerbapt <bapt@FreeBSD.org>2016-11-14 06:38:15 +0800
commitae040c70448f47c0a3a772d86e89257e82107afc (patch)
tree1b37852fe987afdd081410b1f8d54b8cb4242a75 /editors
parentcb7719877034829dd8dbd9c85454085f67b77085 (diff)
downloadfreebsd-ports-gnome-ae040c70448f47c0a3a772d86e89257e82107afc.tar.gz
freebsd-ports-gnome-ae040c70448f47c0a3a772d86e89257e82107afc.tar.zst
freebsd-ports-gnome-ae040c70448f47c0a3a772d86e89257e82107afc.zip
Fix runtime issues related to thread_locale
__cxa_thread_atexit which is needed when building c++11 program using thread_locale is only defined on FreeBSD 11-STABLE and 12-CURRENT Backout the change in libreoffice which happened during the 5.2 dev phase adding thread_locale PR: 214473 Reported by: Dušan Vejnovič <freebsd@dussan.org> Tested by: Dušan Vejnovič <freebsd@dussan.org>
Diffstat (limited to 'editors')
-rw-r--r--editors/libreoffice/Makefile.common2
-rw-r--r--editors/libreoffice/files/patch-Makefile.in2
-rw-r--r--editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx11
-rw-r--r--editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx42
4 files changed, 55 insertions, 2 deletions
diff --git a/editors/libreoffice/Makefile.common b/editors/libreoffice/Makefile.common
index 625d06b67522..b583242118c0 100644
--- a/editors/libreoffice/Makefile.common
+++ b/editors/libreoffice/Makefile.common
@@ -2,7 +2,7 @@
PORTNAME= libreoffice
PORTVERSION= 5.2.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES+= editors
MAINTAINER= office@FreeBSD.org
diff --git a/editors/libreoffice/files/patch-Makefile.in b/editors/libreoffice/files/patch-Makefile.in
index 39b5fb6385a5..ac32968f9684 100644
--- a/editors/libreoffice/files/patch-Makefile.in
+++ b/editors/libreoffice/files/patch-Makefile.in
@@ -1,4 +1,4 @@
---- Makefile.in.orig 2016-11-11 12:49:08 UTC
+--- Makefile.in.orig 2016-10-28 14:50:26 UTC
+++ Makefile.in
@@ -52,7 +52,7 @@ $(BUILDDIR)/config_host.mk : $(wildcard
diff --git a/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx b/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx
new file mode 100644
index 000000000000..c9ab6a82b920
--- /dev/null
+++ b/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx
@@ -0,0 +1,11 @@
+--- vcl/inc/unx/gtk/gtkinst.hxx.orig 2016-10-28 14:50:26 UTC
++++ vcl/inc/unx/gtk/gtkinst.hxx
+@@ -46,7 +46,7 @@ class GtkPrintWrapper;
+ class GenPspGraphics;
+ class GtkYieldMutex : public SalYieldMutex
+ {
+- thread_local static std::stack<sal_uIntPtr> yieldCounts;
++ std::list<sal_uLong> aYieldStack;
+
+ public:
+ GtkYieldMutex() {}
diff --git a/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx b/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx
new file mode 100644
index 000000000000..b53a62613794
--- /dev/null
+++ b/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx
@@ -0,0 +1,42 @@
+--- vcl/unx/gtk/gtkinst.cxx.orig 2016-11-13 15:24:04 UTC
++++ vcl/unx/gtk/gtkinst.cxx
+@@ -298,28 +298,29 @@ SalPrinter* GtkInstance::CreatePrinter(
+ * for each pair, so we can accurately restore
+ * it later.
+ */
+-thread_local std::stack<sal_uIntPtr> GtkYieldMutex::yieldCounts;
+
+ void GtkYieldMutex::ThreadsEnter()
+ {
+ acquire();
+- if (!yieldCounts.empty()) {
+- auto n = yieldCounts.top();
+- yieldCounts.pop();
+- for (; n != 0; --n) {
++ if( !aYieldStack.empty() )
++ { /* Previously called ThreadsLeave() */
++ sal_uLong nCount = aYieldStack.front();
++ aYieldStack.pop_front();
++ while( nCount-- > 1 )
+ acquire();
+- }
+ }
+ }
+
+ void GtkYieldMutex::ThreadsLeave()
+ {
++ aYieldStack.push_front( mnCount );
+ assert(mnCount != 0);
+- auto n = mnCount - 1;
+- yieldCounts.push(n);
+- for (sal_uIntPtr i = 0; i != n + 1; ++i) {
++ SAL_WARN_IF(
++ mnThreadId && mnThreadId != osl::Thread::getCurrentIdentifier(),
++ "vcl.gtk", "other thread " << mnThreadId << " owns the mutex");
++ while( mnCount > 1 )
+ release();
+- }
++ release();
+ }
+
+ SalVirtualDevice* GtkInstance::CreateVirtualDevice( SalGraphics *pG,