Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-office/libreoffice/files/, app-office/libreoffice/
Date: Thu, 14 May 2020 20:10:37
Message-Id: 1589487002.5058ef8800018f93e7297a7ed722960502df486d.asturm@gentoo
1 commit: 5058ef8800018f93e7297a7ed722960502df486d
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu May 14 19:41:17 2020 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu May 14 20:10:02 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5058ef88
7
8 app-office/libreoffice: Fix build with boost-1.73
9
10 Reported-by: Dennis Schridde <devurandom <AT> gmx.net>
11 Closes: https://bugs.gentoo.org/721806
12 Package-Manager: Portage-2.3.99, Repoman-2.3.22
13 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
14
15 .../files/libreoffice-6.4.3.2-boost-1.73.patch | 118 +++++++++++++++++++++
16 app-office/libreoffice/libreoffice-6.4.3.2.ebuild | 3 +
17 2 files changed, 121 insertions(+)
18
19 diff --git a/app-office/libreoffice/files/libreoffice-6.4.3.2-boost-1.73.patch b/app-office/libreoffice/files/libreoffice-6.4.3.2-boost-1.73.patch
20 new file mode 100644
21 index 00000000000..0eb40699922
22 --- /dev/null
23 +++ b/app-office/libreoffice/files/libreoffice-6.4.3.2-boost-1.73.patch
24 @@ -0,0 +1,118 @@
25 +From 55c724b93dfd4c9a1afb10d60fbc2d7a9a66cf61 Mon Sep 17 00:00:00 2001
26 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@××××××.com>
27 +Date: Wed, 29 Jan 2020 12:44:52 +0000
28 +Subject: replace boost::bimap in sdext pdfimport
29 +MIME-Version: 1.0
30 +Content-Type: text/plain; charset=UTF-8
31 +Content-Transfer-Encoding: 8bit
32 +
33 +the error message with boost 1.69 and gcc 10 is so ungodly its easier to throw
34 +bimap out and use something simpler
35 +
36 +Change-Id: Ie324a0b81931bbd427483878a87beeca455ada18
37 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87683
38 +Tested-by: Jenkins
39 +Reviewed-by: Caolán McNamara <caolanm@××××××.com>
40 +---
41 + sdext/source/pdfimport/inc/pdfiprocessor.hxx | 12 ++++--------
42 + sdext/source/pdfimport/tree/pdfiprocessor.cxx | 21 ++++++++++++---------
43 + 2 files changed, 16 insertions(+), 17 deletions(-)
44 +
45 +diff --git a/sdext/source/pdfimport/inc/pdfiprocessor.hxx b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
46 +index 89f9d601b7b0..9e08d6a6a765 100644
47 +--- a/sdext/source/pdfimport/inc/pdfiprocessor.hxx
48 ++++ b/sdext/source/pdfimport/inc/pdfiprocessor.hxx
49 +@@ -37,9 +37,6 @@
50 + #include "treevisitorfactory.hxx"
51 + #include "genericelements.hxx"
52 +
53 +-#include <boost/bimap/bimap.hpp>
54 +-#include <boost/bimap/unordered_set_of.hpp>
55 +-
56 + namespace pdfi
57 + {
58 +
59 +@@ -160,10 +157,8 @@ namespace pdfi
60 + typedef std::unordered_map<sal_Int32,FontAttributes> IdToFontMap;
61 + typedef std::unordered_map<FontAttributes,sal_Int32,FontAttrHash> FontToIdMap;
62 +
63 +- typedef boost::bimaps::bimap<
64 +- boost::bimaps::unordered_set_of<GraphicsContext, GraphicsContextHash>,
65 +- boost::bimaps::unordered_set_of<sal_Int32>
66 +- > GCToIdBiMap;
67 ++ typedef std::unordered_map<sal_Int32,GraphicsContext> IdToGCMap;
68 ++ typedef std::unordered_map<GraphicsContext, sal_Int32, GraphicsContextHash> GCToIdMap;
69 +
70 + typedef std::vector<GraphicsContext> GraphicsContextStack;
71 +
72 +@@ -178,7 +173,8 @@ namespace pdfi
73 +
74 + GraphicsContextStack m_aGCStack;
75 + sal_Int32 m_nNextGCId;
76 +- GCToIdBiMap m_aGCToId;
77 ++ IdToGCMap m_aIdToGC;
78 ++ GCToIdMap m_aGCToId;
79 +
80 + ImageContainer m_aImages;
81 +
82 +diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
83 +index c6baa7fee8b2..ed2eaf6510b9 100644
84 +--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
85 ++++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
86 +@@ -54,6 +54,7 @@ namespace pdfi
87 + m_aFontToId(),
88 + m_aGCStack(),
89 + m_nNextGCId( 1 ),
90 ++ m_aIdToGC(),
91 + m_aGCToId(),
92 + m_aImages(),
93 + m_nPages(0),
94 +@@ -65,12 +66,13 @@ namespace pdfi
95 + aDefFont.isBold = false;
96 + aDefFont.isItalic = false;
97 + aDefFont.size = 10*PDFI_OUTDEV_RESOLUTION/72;
98 +- m_aIdToFont[ 0 ] = aDefFont;
99 +- m_aFontToId[ aDefFont ] = 0;
100 ++ m_aIdToFont.insert({0, aDefFont});
101 ++ m_aFontToId.insert({aDefFont, 0});
102 +
103 + GraphicsContext aDefGC;
104 + m_aGCStack.push_back( aDefGC );
105 +- m_aGCToId.insert(GCToIdBiMap::relation(aDefGC, 0));
106 ++ m_aGCToId.insert({aDefGC, 0});
107 ++ m_aIdToGC.insert({0, aDefGC});
108 + }
109 +
110 + void PDFIProcessor::setPageNum( sal_Int32 nPages )
111 +@@ -468,12 +470,13 @@ const FontAttributes& PDFIProcessor::getFont( sal_Int32 nFontId ) const
112 + sal_Int32 PDFIProcessor::getGCId( const GraphicsContext& rGC )
113 + {
114 + sal_Int32 nGCId = 0;
115 +- auto it = m_aGCToId.left.find( rGC );
116 +- if( it != m_aGCToId.left.end() )
117 ++ auto it = m_aGCToId.find( rGC );
118 ++ if( it != m_aGCToId.end() )
119 + nGCId = it->second;
120 + else
121 + {
122 +- m_aGCToId.insert(GCToIdBiMap::relation(rGC, m_nNextGCId));
123 ++ m_aGCToId.insert({rGC, m_nNextGCId});
124 ++ m_aIdToGC.insert({m_nNextGCId, rGC});
125 + nGCId = m_nNextGCId;
126 + m_nNextGCId++;
127 + }
128 +@@ -483,9 +486,9 @@ sal_Int32 PDFIProcessor::getGCId( const GraphicsContext& rGC )
129 +
130 + const GraphicsContext& PDFIProcessor::getGraphicsContext( sal_Int32 nGCId ) const
131 + {
132 +- auto it = m_aGCToId.right.find( nGCId );
133 +- if( it == m_aGCToId.right.end() )
134 +- it = m_aGCToId.right.find( 0 );
135 ++ auto it = m_aIdToGC.find( nGCId );
136 ++ if( it == m_aIdToGC.end() )
137 ++ it = m_aIdToGC.find( 0 );
138 + return it->second;
139 + }
140 +
141 +--
142 +cgit v1.2.1
143
144 diff --git a/app-office/libreoffice/libreoffice-6.4.3.2.ebuild b/app-office/libreoffice/libreoffice-6.4.3.2.ebuild
145 index 604dc556242..b379ae94244 100644
146 --- a/app-office/libreoffice/libreoffice-6.4.3.2.ebuild
147 +++ b/app-office/libreoffice/libreoffice-6.4.3.2.ebuild
148 @@ -253,6 +253,9 @@ PATCHES=(
149 "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
150 "${FILESDIR}/${PN}-6.1-nomancompress.patch"
151
152 + # git master
153 + "${FILESDIR}/${P}-boost-1.73.patch" # bug 721806
154 +
155 # TODO: upstream (for now taken from Arch Linux)
156 "${FILESDIR}/${PN}-6.4.2.2-poppler-0.86.patch" # bug 711102
157 )