svn commit: r433677 - in head/editors/libreoffice: . files
Jung-uk Kim
jkim at FreeBSD.org
Wed Feb 8 22:22:22 UTC 2017
Author: jkim
Date: Wed Feb 8 22:22:21 2017
New Revision: 433677
URL: https://svnweb.freebsd.org/changeset/ports/433677
Log:
Do not apply the kludge for PR214473 on all supported FreeBSD versions.
These patches actually reintroduced an upstream bug.
https://gerrit.libreoffice.org/22291
PR: 214473
Added:
head/editors/libreoffice/files/extrapatch-vcl_inc_unx_gtk_gtkinst.hxx
- copied unchanged from r433676, head/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx
head/editors/libreoffice/files/extrapatch-vcl_unx_gtk_gtkinst.cxx
- copied unchanged from r433676, head/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx
Deleted:
head/editors/libreoffice/files/patch-vcl_inc_unx_gtk_gtkinst.hxx
head/editors/libreoffice/files/patch-vcl_unx_gtk_gtkinst.cxx
Modified:
head/editors/libreoffice/Makefile
Modified: head/editors/libreoffice/Makefile
==============================================================================
--- head/editors/libreoffice/Makefile Wed Feb 8 21:49:19 2017 (r433676)
+++ head/editors/libreoffice/Makefile Wed Feb 8 22:22:21 2017 (r433677)
@@ -2,7 +2,7 @@
.include "${.CURDIR}/Makefile.common"
-PORTREVISION= 3
+PORTREVISION= 4
MASTER_SITES= http://download.documentfoundation.org/libreoffice/src/${PORTVERSION}/ \
http://dev-www.libreoffice.org/src/:src \
http://dev-www.libreoffice.org/extern/:ext
@@ -273,6 +273,13 @@ _MAKE_JOBS= #
.if ${COMPILER_FEATURES:Mlibstdc++}
BROKEN= Build with system libstdc++ is unsupported
.endif
+.if (${OSVERSION} >= 1200000 && ${OSVERSION} < 1200003) || \
+ (${OSVERSION} >= 1100500 && ${OSVERSION} < 1100501) || \
+ (${OSVERSION} >= 1100000 && ${OSVERSION} < 1100122) || \
+ ${OSVERSION} < 1003506
+EXTRA_PATCHES= ${PATCHDIR}/extrapatch-vcl_inc_unx_gtk_gtkinst.hxx \
+ ${PATCHDIR}/extrapatch-vcl_unx_gtk_gtkinst.cxx
+.endif
.endif # FreeBSD
.if ${COMPILER_TYPE} == "clang"
Copied: head/editors/libreoffice/files/extrapatch-vcl_inc_unx_gtk_gtkinst.hxx (from r433676, 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/extrapatch-vcl_inc_unx_gtk_gtkinst.hxx Wed Feb 8 22:22:21 2017 (r433677, copy of r433676, head/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() {}
Copied: head/editors/libreoffice/files/extrapatch-vcl_unx_gtk_gtkinst.cxx (from r433676, 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/extrapatch-vcl_unx_gtk_gtkinst.cxx Wed Feb 8 22:22:21 2017 (r433677, copy of r433676, head/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,
More information about the svn-ports-head
mailing list