Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Nov 2016 22:38:15 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r426069 - in head/editors/libreoffice: . files
Message-ID:  <201611132238.uADMcFkP036435@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Nov 13 22:38:15 2016
New Revision: 426069
URL: https://svnweb.freebsd.org/changeset/ports/426069

Log:
  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>

Added:
  head/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx   (contents, props changed)
  head/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx   (contents, props changed)
Modified:
  head/editors/libreoffice/Makefile.common
  head/editors/libreoffice/files/patch-Makefile.in

Modified: head/editors/libreoffice/Makefile.common
==============================================================================
--- head/editors/libreoffice/Makefile.common	Sun Nov 13 22:26:53 2016	(r426068)
+++ head/editors/libreoffice/Makefile.common	Sun Nov 13 22:38:15 2016	(r426069)
@@ -2,7 +2,7 @@
 
 PORTNAME=	libreoffice
 PORTVERSION=	5.2.3
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES+=	editors
 
 MAINTAINER=	office@FreeBSD.org

Modified: head/editors/libreoffice/files/patch-Makefile.in
==============================================================================
--- head/editors/libreoffice/files/patch-Makefile.in	Sun Nov 13 22:26:53 2016	(r426068)
+++ head/editors/libreoffice/files/patch-Makefile.in	Sun Nov 13 22:38:15 2016	(r426069)
@@ -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 
  

Added: head/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx	Sun Nov 13 22:38:15 2016	(r426069)
@@ -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() {}

Added: head/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx	Sun Nov 13 22:38:15 2016	(r426069)
@@ -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,



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611132238.uADMcFkP036435>