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/, app-office/libreoffice/files/
Date: Thu, 03 Nov 2022 08:40:49
Message-Id: 1667464782.26ce497268a98584860d7908496b73c85cbb40fa.asturm@gentoo
1 commit: 26ce497268a98584860d7908496b73c85cbb40fa
2 Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 3 08:36:22 2022 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 3 08:39:42 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=26ce4972
7
8 app-office/libreoffice: cleanup vulnerable 7.3.4.2-r1
9
10 Bug: https://bugs.gentoo.org/876869
11 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
12
13 app-office/libreoffice/Manifest | 3 -
14 ...Add-missing-nSize-set-for-Poppler-22.04.0.patch | 31 -
15 ...t-FreeBSD-patch-for-Poppler-22.04.0-build.patch | 78 ---
16 .../libreoffice/libreoffice-7.3.4.2-r1.ebuild | 665 ---------------------
17 4 files changed, 777 deletions(-)
18
19 diff --git a/app-office/libreoffice/Manifest b/app-office/libreoffice/Manifest
20 index 7790922bd5eb..edd0f48e11aa 100644
21 --- a/app-office/libreoffice/Manifest
22 +++ b/app-office/libreoffice/Manifest
23 @@ -17,13 +17,10 @@ DIST dtoa-20180411.tgz 48893 BLAKE2B 4a03dc67e44353ae1c0653c8305d2df9bcfef16b48d
24 DIST eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip 427800 BLAKE2B d3ac085a39ee9798182b70ba650fa954234b964e33278ac4fe3f84f8c3218ad49f12d139079328036b4f9d80cde967888c0a66393c34dedf27af69dac02c5aff SHA512 9091d3628d9c75c068507537afc9e10bfb79c1abfd36ad697af3d592a1cc049ba6640f665bfc53cc520b6a26c21d70b0275106843444b441484c2178f2784743
25 DIST f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip 211919 BLAKE2B 2c72493e44d3ad1714d294fb7baaa85d33fef2eb4ce75bf507b65f78f1d9d399bb5eb72cee188a8abc4b234eb2845a26755791fb3ac104ffe6e55013ab41ca8b SHA512 c1a15ebbfe817ec79d4b3f1c97d096bf8511737d7d35d97302856ccfb3de14a1cd16bd31000415d9ab24bbd9ef770d37855cee4b819ff0e8fca2f2766920a114
26 DIST libcmis-0.5.2.tar.xz 484404 BLAKE2B 7de242393c28fc8289bb598b34e704eb2affaaa8b9e470e10044dbfd3812391f29e1421df8d7ac3869955698ddbc9575feebcfbac27bb074a60ccc0527dca1c3 SHA512 295ab15115e75b1f6074f17d3538afe0de9b2b77ab454f5c63cb05e8df11886d82942fbf21ba01486052e3f6c75b0636b99d8e660cd3472dc4b87c31d3cd557b
27 -DIST libcuckoo-93217f8d391718380c508a722ab9acd5e9081233.tar.gz 5005888 BLAKE2B 836ec268c19c27ac079ea1084587c3e999f39ad2188be1a5cf8337ad0473ffda6c32d0695254d3797d1607707329befa88da6043f424544487238e550eda8590 SHA512 4159dfb4d08e359feb23127e12db590260913e70774161ac9513abb5183ad6ed6d2bdfbe56fc8aa68e2fc57ee29eae67aa0180e1a7d955016884ecba2ca60ff8
28 -DIST libreoffice-7.3.4.2.tar.xz 256373724 BLAKE2B 98a3a450e8b16caafdbe914b542c32e3e251ac6f2fe528e593640397d50b533f146b1cfd262c633bfee9766a5ef659f7ce606453952978c71c08f249da7d7125 SHA512 10ea93d380b8c59ec15aefc4c4f6f5cbc76b03cf444e2f172fdb8cdde637e8d3de4aa2b7adbd55ec04ba8ad5db73a1bd80e8b692ca328c416d229526f01bd4a0
29 DIST libreoffice-7.3.5.2-patchset-01.tar.xz 12700 BLAKE2B 353f6552d31616dfeb32287173bbd70366045ec437c8735e701bff357032f5ef2358920c5d8495142551116999b034db6611a72536edf14fe13ea9cace3a931c SHA512 dbd8b4b494159845efbe9ad76d5822188b9868aff8ef488793f4e2b0f2f0290942322651e8b53dd71db81cba559e3510732801d0c643cb2af9526cb1e1837891
30 DIST libreoffice-7.3.6.2.tar.xz 256616324 BLAKE2B 52456e529ae2898101824882f124a5b039a1dfb98fd77dfceef39a41a3af871123c56b83a73d0aaf92e1cea57f35af442ca0a17814a1374538a9495ac601cee0 SHA512 8f61e9c09b344cf120bc6f9463344b28644e52738360ddeb1a29d9d2294d24132b070902a089531869e11487f5a7153fc4752e6636af7ef57269d23c8187ec86
31 DIST libreoffice-7.3.7.2.tar.xz 256653492 BLAKE2B aa3e096ba46d6e23b0e6439a435a6d75fdc9da309885a28d96dc5a4fc05d854a8e4f633d9f4d623af18f6a80ca036409fb26b9a9843fb9a18144468b58ef5ad4 SHA512 f7b6279f5ef9f5ad8290d2bdf4fd54f8df7775a21094ba762dbd9299effab31d4f2c6dff9f4b3d9c5673596931df1d16b195474b547007bfc9a396c47e5e181c
32 DIST libreoffice-branding-gentoo-0.8.tar.xz 151568 BLAKE2B f03c7ddeb53c5ca3fd23401679601fcf2c4037ba17be4eb7b784c7ce7ebb71a24b8ab4aac8b7da8c6b1f14dd23bc1294ba85ff4f70ad271fb4ee3c5372e10883 SHA512 785031a699b1d1895ce4b50ffc3ddf645f3a0ef9acdf37facfd18cf75db9484cb8f53a50abb63d6006ead76a80b6ff5aa99661063245ebb84bd64013d713de7f
33 -DIST libreoffice-help-7.3.4.2.tar.xz 112208564 BLAKE2B a47b428d69c62ba38d74ee5eca1dfeba66389ea0c7ef103f97292180d43ddc92a5e6ca4f9377f802318b89fca7aab6278c23171d9480e3961e521c161ec42fd3 SHA512 68af32f017b46f7d3e664bc8cfc69de6939c33f26248273372cc7ba5a29299c79795cc13b92a921b8e2508045e0447319ad0c0cd3678929355db6ef8a79a8614
34 DIST libreoffice-help-7.3.6.2.tar.xz 112209384 BLAKE2B 629a9dae6464adb33ed4494df8cbf59305a686b0bab21d55e3c139b87c5e3eee3e77ef1f22be84973d6e51a1ffb74aa74fd7f91b82223b2e3cc6d3bc900e7305 SHA512 7a98e8d3b146638bdb608d86b617bb45ff2649957ad9391aadfbb32fb18a4c8d15675bd24076dbb2b635569bfdab988f7cac461cfe04e53b3febfb2aa35d6189
35 DIST libreoffice-help-7.3.7.2.tar.xz 112210852 BLAKE2B 3a3148d6ff9c743c97c0371290b3264f8e9eb8eb5aba3176b2e88f296abc2856f364866ba6ebb9f6364b5c98255c8593d23e3d54db6bcc27eecde53ac9a1b393 SHA512 c223ee49626e36b11a86c077001efc27ca2df9aa10ddb068e04c8ab8a0ea1942ca71b97c2f7379bf856ba7d12a5ca94f2fd8d8058703e2276af3595b75049030
36 DIST skia-m103-b301ff025004c9cd82816c86c547588e6c24b466.tar.xz 11079112 BLAKE2B d3eb44a64187ddd3097bc7473eaa6b631b4043b9679861426ae83956de7907a03b51cc472cbb9169c52e92cbc4ebe681181c675ae938324c6d3a10eff9a7084a SHA512 1234ff6e787947fb6442b7279c7ef07d48d7036b15591782ea197c827c60fba77bbe83029bf7d8dfa7dc126535a9a780f6b927fbf7339f0825061616a9c53436
37
38 diff --git a/app-office/libreoffice/files/libreoffice-7.3.3.2-Add-missing-nSize-set-for-Poppler-22.04.0.patch b/app-office/libreoffice/files/libreoffice-7.3.3.2-Add-missing-nSize-set-for-Poppler-22.04.0.patch
39 deleted file mode 100644
40 index 22de747e01e4..000000000000
41 --- a/app-office/libreoffice/files/libreoffice-7.3.3.2-Add-missing-nSize-set-for-Poppler-22.04.0.patch
42 +++ /dev/null
43 @@ -1,31 +0,0 @@
44 -https://bugs.gentoo.org/843311
45 -
46 -From: Sam James <sam@g.o>
47 -Date: Sun, 8 May 2022 21:22:49 +0000
48 -Subject: [PATCH] Add missing nSize set for Poppler 22.04.0
49 -
50 -Thanks-to: Stephan Hartmann <sultan@g.o>
51 ---- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
52 -+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
53 -@@ -478,6 +478,10 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* st
54 - char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
55 - #else
56 - std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
57 -+ if( pBuf )
58 -+ {
59 -+ nSize = pBuf->size();
60 -+ }
61 - #endif
62 - if( pBuf )
63 - {
64 -@@ -502,6 +506,10 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
65 - char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
66 - #else
67 - std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
68 -+ if( pBuf )
69 -+ {
70 -+ nSize = pBuf->size();
71 -+ }
72 - #endif
73 - if( !pBuf )
74 - return;
75
76 diff --git a/app-office/libreoffice/files/libreoffice-7.3.3.2-Import-FreeBSD-patch-for-Poppler-22.04.0-build.patch b/app-office/libreoffice/files/libreoffice-7.3.3.2-Import-FreeBSD-patch-for-Poppler-22.04.0-build.patch
77 deleted file mode 100644
78 index 39cb13bbc7d6..000000000000
79 --- a/app-office/libreoffice/files/libreoffice-7.3.3.2-Import-FreeBSD-patch-for-Poppler-22.04.0-build.patch
80 +++ /dev/null
81 @@ -1,78 +0,0 @@
82 -https://bugs.gentoo.org/843311
83 -https://cgit.freebsd.org/ports/commit/?id=d9b5ef800dbd0366eae81b03bfa89689ec73c6f7
84 -
85 -(sam: adapt version check to 22.4.0)
86 -
87 -From: Sam James <sam@g.o>
88 -Date: Sun, 8 May 2022 21:20:25 +0000
89 -Subject: [PATCH 1/2] Import FreeBSD patch for Poppler 22.04.0 build
90 -
91 ---- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
92 -+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
93 -@@ -474,11 +474,17 @@ int PDFOutDev::parseFont( long long nNewId, GfxFont* gfxFont, const GfxState* st
94 - {
95 - // TODO(P3): Unfortunately, need to read stream twice, since
96 - // we must write byte count to stdout before
97 -+#if !POPPLER_CHECK_VERSION(22, 4, 0)
98 - char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
99 -+#else
100 -+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
101 -+#endif
102 - if( pBuf )
103 - {
104 - aNewFont.isEmbedded = true;
105 -+#if !POPPLER_CHECK_VERSION(22, 4, 0)
106 - gfree(pBuf);
107 -+#endif
108 - }
109 - }
110 -
111 -@@ -492,21 +498,32 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
112 - return;
113 -
114 - int nSize = 0;
115 -- char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
116 -+#if !POPPLER_CHECK_VERSION(22, 4, 0)
117 -+ char* pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef(), &nSize );
118 -+#else
119 -+ std::optional<std::vector<unsigned char>> pBuf = gfxFont->readEmbFontFile( m_pDoc->getXRef() );
120 -+#endif
121 - if( !pBuf )
122 - return;
123 -
124 - // ---sync point--- see SYNC STREAMS above
125 - fflush(stdout);
126 --
127 -+#if !POPPLER_CHECK_VERSION(22, 4, 0)
128 - if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
129 -+#else
130 -+ if( fwrite(reinterpret_cast<char*>(pBuf.value().data()), sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
131 -+#endif
132 - {
133 -- gfree(pBuf);
134 -+#if !POPPLER_CHECK_VERSION(22, 4, 0)
135 -+ gfree(pBuf);
136 -+#endif
137 - exit(1); // error
138 - }
139 - // ---sync point--- see SYNC STREAMS above
140 - fflush(g_binary_out);
141 -- gfree(pBuf);
142 -+#if !POPPLER_CHECK_VERSION(22, 4, 0)
143 -+ gfree(pBuf);
144 -+#endif
145 - }
146 -
147 - #if POPPLER_CHECK_VERSION(0, 83, 0)
148 -@@ -759,7 +776,11 @@ void PDFOutDev::updateFont(GfxState *state)
149 - {
150 - assert(state);
151 -
152 -+#if !POPPLER_CHECK_VERSION(22, 4, 0)
153 - GfxFont *gfxFont = state->getFont();
154 -+#else
155 -+ GfxFont *gfxFont = state->getFont().get();
156 -+#endif
157 - if( !gfxFont )
158 - return;
159 -
160
161 diff --git a/app-office/libreoffice/libreoffice-7.3.4.2-r1.ebuild b/app-office/libreoffice/libreoffice-7.3.4.2-r1.ebuild
162 deleted file mode 100644
163 index e540a164ed9c..000000000000
164 --- a/app-office/libreoffice/libreoffice-7.3.4.2-r1.ebuild
165 +++ /dev/null
166 @@ -1,665 +0,0 @@
167 -# Copyright 1999-2022 Gentoo Authors
168 -# Distributed under the terms of the GNU General Public License v2
169 -
170 -EAPI=8
171 -
172 -PYTHON_COMPAT=( python3_{8..11} )
173 -PYTHON_REQ_USE="threads(+),xml(+)"
174 -
175 -MY_PV="${PV/_alpha/.alpha}"
176 -MY_PV="${MY_PV/_beta/.beta}"
177 -# experimental ; release ; old
178 -# Usually the tarballs are moved a lot so this should make everyone happy.
179 -DEV_URI="
180 - https://dev-builds.libreoffice.org/pre-releases/src
181 - https://download.documentfoundation.org/libreoffice/src/${MY_PV:0:5}/
182 - https://downloadarchive.documentfoundation.org/libreoffice/old/${MY_PV}/src
183 -"
184 -ADDONS_URI="https://dev-www.libreoffice.org/src/"
185 -
186 -BRANDING="${PN}-branding-gentoo-0.8.tar.xz"
187 -# PATCHSET="${P}-patchset-01.tar.xz"
188 -
189 -[[ ${MY_PV} == *9999* ]] && inherit git-r3
190 -inherit autotools bash-completion-r1 check-reqs flag-o-matic java-pkg-opt-2 multiprocessing python-single-r1 qmake-utils toolchain-funcs xdg-utils
191 -
192 -DESCRIPTION="A full office productivity suite"
193 -HOMEPAGE="https://www.libreoffice.org"
194 -SRC_URI="branding? ( https://dev.gentoo.org/~dilfridge/distfiles/${BRANDING} )"
195 -[[ -n ${PATCHSET} ]] && SRC_URI+=" https://dev.gentoo.org/~asturm/distfiles/${PATCHSET}"
196 -
197 -# Split modules following git/tarballs; Core MUST be first!
198 -# Help is used for the image generator
199 -# Only release has the tarballs
200 -if [[ ${MY_PV} != *9999* ]]; then
201 - for i in ${DEV_URI}; do
202 - SRC_URI+=" ${i}/${PN}-${MY_PV}.tar.xz"
203 - SRC_URI+=" ${i}/${PN}-help-${MY_PV}.tar.xz"
204 - done
205 - unset i
206 -fi
207 -unset DEV_URI
208 -
209 -# Really required addons
210 -# These are bundles that can't be removed for now due to huge patchsets.
211 -# If you want them gone, patches are welcome.
212 -ADDONS_SRC=(
213 - # not packaged in Gentoo, https://github.com/efficient/libcuckoo/
214 - "${ADDONS_URI}/libcuckoo-93217f8d391718380c508a722ab9acd5e9081233.tar.gz"
215 - # broken against latest upstream release, too many patches on top:
216 - # https://github.com/tdf/libcmis/pull/43
217 - "${ADDONS_URI}/libcmis-0.5.2.tar.xz"
218 - # not packaged in Gentoo, https://www.netlib.org/fp/dtoa.c
219 - "${ADDONS_URI}/dtoa-20180411.tgz"
220 - # not packaged in Gentoo, https://skia.org/
221 - "${ADDONS_URI}/skia-m97-a7230803d64ae9d44f4e1282444801119a3ae967.tar.xz"
222 - "base? (
223 - ${ADDONS_URI}/commons-logging-1.2-src.tar.gz
224 - ${ADDONS_URI}/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
225 - ${ADDONS_URI}/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
226 - ${ADDONS_URI}/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
227 - ${ADDONS_URI}/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip
228 - ${ADDONS_URI}/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip
229 - ${ADDONS_URI}/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip
230 - ${ADDONS_URI}/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip
231 - ${ADDONS_URI}/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip
232 - ${ADDONS_URI}/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip
233 - ${ADDONS_URI}/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip
234 - ${ADDONS_URI}/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip
235 - )"
236 - "java? ( ${ADDONS_URI}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip )"
237 - # no release for 8 years, should we package it?
238 - "libreoffice_extensions_wiki-publisher? ( ${ADDONS_URI}/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip )"
239 - # Does not build with 1.6 rhino at all
240 - "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip )"
241 - # requirement of rhino
242 - "libreoffice_extensions_scripting-javascript? ( ${ADDONS_URI}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip )"
243 - # not packageable
244 - "odk? ( http://download.go-oo.org/extern/185d60944ea767075d27247c3162b3bc-unowinreg.dll )"
245 -)
246 -SRC_URI+=" ${ADDONS_SRC[*]}"
247 -
248 -unset ADDONS_URI
249 -unset ADDONS_SRC
250 -
251 -# Extensions that need extra work:
252 -LO_EXTS="nlpsolver scripting-beanshell scripting-javascript wiki-publisher"
253 -
254 -IUSE="accessibility base bluetooth +branding clang coinmp +cups custom-cflags +dbus debug eds firebird
255 -googledrive gstreamer +gtk kde ldap +mariadb odk pdfimport postgres test vulkan
256 -$(printf 'libreoffice_extensions_%s ' ${LO_EXTS})"
257 -
258 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
259 - base? ( firebird java )
260 - bluetooth? ( dbus )
261 - gtk? ( dbus )
262 - libreoffice_extensions_nlpsolver? ( java )
263 - libreoffice_extensions_scripting-beanshell? ( java )
264 - libreoffice_extensions_scripting-javascript? ( java )
265 - libreoffice_extensions_wiki-publisher? ( java )
266 -"
267 -
268 -RESTRICT="!test? ( test )"
269 -
270 -LICENSE="|| ( LGPL-3 MPL-1.1 )"
271 -SLOT="0"
272 -
273 -[[ ${MY_PV} == *9999* ]] || \
274 -KEYWORDS="arm64"
275 -
276 -COMMON_DEPEND="${PYTHON_DEPS}
277 - app-arch/unzip
278 - app-arch/zip
279 - app-crypt/gpgme:=[cxx]
280 - app-text/hunspell:=
281 - >=app-text/libabw-0.1.0
282 - >=app-text/libebook-0.1
283 - app-text/libepubgen
284 - >=app-text/libetonyek-0.1
285 - app-text/libexttextcat
286 - app-text/liblangtag
287 - >=app-text/libmspub-0.1.0
288 - >=app-text/libmwaw-0.3.1
289 - >=app-text/libnumbertext-1.0.6
290 - >=app-text/libodfgen-0.1.0
291 - app-text/libqxp
292 - app-text/libstaroffice
293 - app-text/libwpd:0.10[tools]
294 - app-text/libwpg:0.3
295 - >=app-text/libwps-0.4
296 - app-text/mythes
297 - dev-cpp/abseil-cpp:=
298 - >=dev-cpp/clucene-2.3.3.4-r2
299 - >=dev-cpp/libcmis-0.5.2
300 - dev-db/unixODBC
301 - dev-lang/perl
302 - dev-libs/boost:=[nls]
303 - dev-libs/expat
304 - dev-libs/hyphen
305 - dev-libs/icu:=
306 - dev-libs/libassuan
307 - dev-libs/libgpg-error
308 - >=dev-libs/liborcus-0.17.2:0/0.17
309 - dev-libs/librevenge
310 - dev-libs/libxml2
311 - dev-libs/libxslt
312 - dev-libs/nspr
313 - dev-libs/nss
314 - >=dev-libs/redland-1.0.16
315 - >=dev-libs/xmlsec-1.2.28[nss]
316 - >=games-engines/box2d-2.4.1:0
317 - media-gfx/fontforge
318 - media-gfx/graphite2
319 - media-libs/fontconfig
320 - >=media-libs/freetype-2.11.0-r1:2
321 - >=media-libs/harfbuzz-0.9.42:=[graphite,icu]
322 - media-libs/lcms:2
323 - >=media-libs/libcdr-0.1.0
324 - >=media-libs/libepoxy-1.3.1[X]
325 - >=media-libs/libfreehand-0.1.0
326 - media-libs/libjpeg-turbo:=
327 - media-libs/libpagemaker
328 - >=media-libs/libpng-1.4:0=
329 - >=media-libs/libvisio-0.1.0
330 - media-libs/libzmf
331 - media-libs/openjpeg:=
332 - media-libs/zxing-cpp:=
333 - >=net-libs/neon-0.31.1:=
334 - net-misc/curl
335 - sci-mathematics/lpsolve
336 - sys-libs/zlib
337 - virtual/opengl
338 - x11-libs/cairo[X]
339 - x11-libs/libXinerama
340 - x11-libs/libXrandr
341 - x11-libs/libXrender
342 - accessibility? (
343 - $(python_gen_cond_dep 'dev-python/lxml[${PYTHON_USEDEP}]')
344 - )
345 - bluetooth? (
346 - dev-libs/glib:2
347 - net-wireless/bluez
348 - )
349 - coinmp? ( sci-libs/coinor-mp )
350 - cups? ( net-print/cups )
351 - dbus? ( sys-apps/dbus[X] )
352 - eds? (
353 - dev-libs/glib:2
354 - gnome-base/dconf
355 - gnome-extra/evolution-data-server
356 - )
357 - firebird? ( >=dev-db/firebird-3.0.2.32703.0-r1[server] )
358 - gstreamer? (
359 - media-libs/gstreamer:1.0
360 - media-libs/gst-plugins-base:1.0
361 - )
362 - gtk? (
363 - dev-libs/glib:2
364 - dev-libs/gobject-introspection
365 - gnome-base/dconf
366 - media-libs/mesa[egl(+)]
367 - x11-libs/gtk+:3[X]
368 - x11-libs/pango
369 - )
370 - kde? (
371 - dev-qt/qtcore:5
372 - dev-qt/qtgui:5
373 - dev-qt/qtwidgets:5
374 - dev-qt/qtx11extras:5
375 - kde-frameworks/kconfig:5
376 - kde-frameworks/kcoreaddons:5
377 - kde-frameworks/ki18n:5
378 - kde-frameworks/kio:5
379 - kde-frameworks/kwindowsystem:5
380 - )
381 - ldap? ( net-nds/openldap:= )
382 - libreoffice_extensions_scripting-beanshell? ( dev-java/bsh )
383 - libreoffice_extensions_scripting-javascript? ( >=dev-java/rhino-1.7.14:1.6 )
384 - mariadb? ( dev-db/mariadb-connector-c:= )
385 - !mariadb? ( dev-db/mysql-connector-c:= )
386 - pdfimport? ( >=app-text/poppler-22.06:=[cxx] )
387 - postgres? ( >=dev-db/postgresql-9.0:*[kerberos] )
388 -"
389 -# FIXME: cppunit should be moved to test conditional
390 -# after everything upstream is under gbuild
391 -# as dmake execute tests right away
392 -# tests apparently also need google-carlito-fonts (not packaged)
393 -DEPEND="${COMMON_DEPEND}
394 - >=dev-libs/libatomic_ops-7.2d
395 - dev-perl/Archive-Zip
396 - >=dev-util/cppunit-1.14.0
397 - >=dev-util/gperf-3.1
398 - dev-util/mdds:1/2.0
399 - media-libs/glm
400 - sys-devel/ucpp
401 - x11-base/xorg-proto
402 - x11-libs/libXt
403 - x11-libs/libXtst
404 - java? (
405 - dev-java/ant-core
406 - >=virtual/jdk-11
407 - )
408 - test? (
409 - app-crypt/gnupg
410 - dev-util/cppunit
411 - media-fonts/dejavu
412 - media-fonts/liberation-fonts
413 - )
414 -"
415 -RDEPEND="${COMMON_DEPEND}
416 - acct-group/libreoffice
417 - acct-user/libreoffice
418 - !app-office/libreoffice-bin
419 - !app-office/libreoffice-bin-debug
420 - media-fonts/liberation-fonts
421 - || ( x11-misc/xdg-utils kde-plasma/kde-cli-tools )
422 - java? ( >=virtual/jre-11 )
423 - kde? ( kde-frameworks/breeze-icons:* )
424 -"
425 -BDEPEND="
426 - dev-util/intltool
427 - sys-apps/which
428 - sys-devel/bison
429 - sys-devel/flex
430 - sys-devel/gettext
431 - virtual/pkgconfig
432 - clang? (
433 - || (
434 - (
435 - sys-devel/clang:14
436 - sys-devel/llvm:14
437 - =sys-devel/lld-14* )
438 - ( sys-devel/clang:13
439 - sys-devel/llvm:13
440 - =sys-devel/lld-13* )
441 - ( sys-devel/clang:12
442 - sys-devel/llvm:12
443 - =sys-devel/lld-12* )
444 - )
445 - )
446 - odk? ( >=app-doc/doxygen-1.8.4 )
447 -"
448 -if [[ ${MY_PV} != *9999* ]] && [[ ${PV} != *_* ]]; then
449 - PDEPEND="=app-office/libreoffice-l10n-$(ver_cut 1-2)*"
450 -else
451 - # Translations are not reliable on live ebuilds
452 - # rather force people to use english only.
453 - PDEPEND="!app-office/libreoffice-l10n"
454 -fi
455 -
456 -PATCHES=(
457 - # "${WORKDIR}"/${PATCHSET/.tar.xz/}
458 -
459 - # not upstreamable stuff
460 - "${FILESDIR}/${PN}-5.3.4.2-kioclient5.patch"
461 - "${FILESDIR}/${PN}-6.1-nomancompress.patch"
462 - "${FILESDIR}/${PN}-7.2.0.4-qt5detect.patch"
463 -
464 - # TODO: upstream
465 - "${FILESDIR}/${PN}-7.2.6.2-poppler-22.03.0.patch" # by Archlinux
466 - "${FILESDIR}/${PN}-7.3.3.2-Import-FreeBSD-patch-for-Poppler-22.04.0-build.patch" # from FreeBSD
467 - "${FILESDIR}/${PN}-7.3.3.2-Add-missing-nSize-set-for-Poppler-22.04.0.patch" # fixup for FreeBSD patch
468 -)
469 -
470 -S="${WORKDIR}/${PN}-${MY_PV}"
471 -
472 -_check_reqs() {
473 - CHECKREQS_MEMORY="512M"
474 - if is-flagq "-g*" && ! is-flagq "-g*0" ; then
475 - CHECKREQS_DISK_BUILD="22G"
476 - else
477 - CHECKREQS_DISK_BUILD="6G"
478 - fi
479 - check-reqs_$1
480 -}
481 -
482 -pkg_pretend() {
483 - use base ||
484 - ewarn "If you plan to use Base application you must enable USE base."
485 - use java ||
486 - ewarn "Without USE java, several wizards are not going to be available."
487 -
488 - [[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_pretend
489 -}
490 -
491 -pkg_setup() {
492 - java-pkg-opt-2_pkg_setup
493 - python-single-r1_pkg_setup
494 - xdg_environment_reset
495 -
496 - [[ ${MERGE_TYPE} != binary ]] && _check_reqs pkg_setup
497 -}
498 -
499 -src_unpack() {
500 - default
501 -
502 - if [[ ${MY_PV} = *9999* ]]; then
503 - local base_uri branch mypv
504 - base_uri="https://anongit.freedesktop.org/git"
505 - branch="master"
506 - mypv=${MY_PV/.9999}
507 - [[ ${mypv} != ${MY_PV} ]] && branch="${PN}-${mypv/./-}"
508 - git-r3_fetch "${base_uri}/${PN}/core" "refs/heads/${branch}"
509 - git-r3_checkout "${base_uri}/${PN}/core"
510 - LOCOREGIT_VERSION=${EGIT_VERSION}
511 -
512 - git-r3_fetch "${base_uri}/${PN}/help" "refs/heads/master"
513 - git-r3_checkout "${base_uri}/${PN}/help" "helpcontent2" # doesn't match on help
514 - fi
515 -}
516 -
517 -src_prepare() {
518 - default
519 -
520 - # sandbox violations on many systems, we don't need it. Bug #646406
521 - sed -i \
522 - -e "/KF5_CONFIG/s/kf5-config/no/" \
523 - configure.ac || die "Failed to disable kf5-config"
524 -
525 - AT_M4DIR="m4" eautoreconf
526 - # hack in the autogen.sh
527 - touch autogen.lastrun
528 -
529 - # sed in the tests
530 - sed -i \
531 - -e "s#all : build unitcheck#all : build#g" \
532 - solenv/gbuild/Module.mk || die
533 - sed -i \
534 - -e "s#check: dev-install subsequentcheck#check: unitcheck slowcheck dev-install subsequentcheck#g" \
535 - -e "s#Makefile.gbuild all slowcheck#Makefile.gbuild all#g" \
536 - Makefile.in || die
537 -
538 - sed -i \
539 - -e "s,/usr/share/bash-completion/completions,$(get_bashcompdir)," \
540 - -e "s,\$INSTALLDIRNAME.sh,${PN}," \
541 - bin/distro-install-desktop-integration || die
542 -
543 - if use branding; then
544 - # hack...
545 - mv -v "${WORKDIR}/branding-intro.png" "icon-themes/colibre/brand/intro.png" || die
546 - fi
547 -
548 - # Don't list pdfimport support in desktop when built with none, bug # 605464
549 - if ! use pdfimport; then
550 - sed -i \
551 - -e ":MimeType: s:application/pdf;::" \
552 - -e ":Keywords: s:pdf;::" \
553 - sysui/desktop/menus/draw.desktop || die
554 - fi
555 -}
556 -
557 -src_configure() {
558 - # Set up Google API keys, see https://www.chromium.org/developers/how-tos/api-keys
559 - # Note: these are for Gentoo use ONLY. For your own distribution, please get
560 - # your own set of keys. Feel free to contact chromium@g.o for more info.
561 - local google_default_client_id="329227923882.apps.googleusercontent.com"
562 - local google_default_client_secret="vgKG0NNv7GoDpbtoFNLxCUXu"
563 -
564 - # Show flags set at the beginning
565 - einfo "Preset CFLAGS: ${CFLAGS}"
566 - einfo "Preset LDFLAGS: ${LDFLAGS}"
567 -
568 - if use clang ; then
569 - # Force clang
570 - einfo "Enforcing the use of clang due to USE=clang ..."
571 - AR=llvm-ar
572 - CC=${CHOST}-clang
573 - CXX=${CHOST}-clang++
574 - NM=llvm-nm
575 - RANLIB=llvm-ranlib
576 - LDFLAGS+=" -fuse-ld=lld"
577 - else
578 - # Force gcc
579 - einfo "Enforcing the use of gcc due to USE=-clang ..."
580 - AR=gcc-ar
581 - CC=${CHOST}-gcc
582 - CXX=${CHOST}-g++
583 - NM=gcc-nm
584 - RANLIB=gcc-ranlib
585 -
586 - # Apparently the Clang flags get used even for GCC builds sometimes.
587 - # bug #838115
588 - sed -i -e "s/-flto=thin/-flto/" solenv/gbuild/platform/com_GCC_defs.mk || die
589 - fi
590 -
591 - if use custom-cflags ; then
592 - elog "USE=custom-cflags has been selected. You are on your own to make sure that"
593 - elog "the build succeeds. Good luck!"
594 - else
595 - strip-flags
596 - fi
597 -
598 - export LO_CLANG_CC=${CC}
599 - export LO_CLANG_CXX=${CXX}
600 -
601 - # Show flags set at the end
602 - einfo " Used CFLAGS: ${CFLAGS}"
603 - einfo " Used LDFLAGS: ${LDFLAGS}"
604 -
605 - # Ensure we use correct toolchain
606 - tc-export CC CXX LD AR NM OBJDUMP RANLIB PKG_CONFIG
607 -
608 - if use vulkan && ! use clang ; then
609 - ewarn "Building skia with gcc may lead to performance issues. Disable vulkan or enable clang."
610 - fi
611 -
612 - # optimization flags
613 - export GMAKE_OPTIONS="${MAKEOPTS}"
614 - # System python enablement:
615 - export PYTHON_CFLAGS=$(python_get_CFLAGS)
616 - export PYTHON_LIBS=$(python_get_LIBS)
617 -
618 - use kde && export QT5DIR="$(qt5_get_bindir)/.."
619 -
620 - local gentoo_buildid="Gentoo official package"
621 - if [[ -n ${LOCOREGIT_VERSION} ]]; then
622 - gentoo_buildid+=" (from git: ${LOCOREGIT_VERSION})"
623 - fi
624 -
625 - # system headers/libs/...: enforce using system packages
626 - # --disable-breakpad: requires not-yet-in-tree dev-utils/breakpad
627 - # --enable-cairo: ensure that cairo is always required
628 - # --enable-*-link: link to the library rather than just dlopen on runtime
629 - # --enable-release-build: build the libreoffice as release
630 - # --disable-fetch-external: prevent dowloading during compile phase
631 - # --enable-extension-integration: enable any extension integration support
632 - # --without-{fonts,myspell-dicts,ppsd}: prevent install of sys pkgs
633 - # --disable-report-builder: too much java packages pulled in without pkgs
634 - # --without-system-sane: just sane.h header that is used for scan in writer,
635 - # not linked or anything else, worthless to depend on
636 - # --disable-pdfium: not yet packaged
637 - local myeconfargs=(
638 - --with-system-dicts
639 - --with-system-epoxy
640 - --with-system-headers
641 - --with-system-jars
642 - --with-system-libs
643 - --enable-build-opensymbol
644 - --enable-cairo-canvas
645 - --enable-largefile
646 - --enable-mergelibs
647 - --enable-python=system
648 - --enable-randr
649 - --enable-release-build
650 - --disable-breakpad
651 - --disable-bundle-mariadb
652 - --disable-ccache
653 - --disable-epm
654 - --disable-fetch-external
655 - --disable-gtk3-kde5
656 - --disable-online-update
657 - --disable-openssl
658 - --disable-pdfium
659 - --disable-qt6
660 - --with-extra-buildid="${gentoo_buildid}"
661 - --enable-extension-integration
662 - --with-external-dict-dir="${EPREFIX}/usr/share/myspell"
663 - --with-external-hyph-dir="${EPREFIX}/usr/share/myspell"
664 - --with-external-thes-dir="${EPREFIX}/usr/share/myspell"
665 - --with-external-tar="${DISTDIR}"
666 - --with-lang=""
667 - --with-parallelism=$(makeopts_jobs)
668 - --with-system-abseil
669 - --with-system-openjpeg
670 - --with-system-ucpp
671 - --with-tls=nss
672 - --with-vendor="Gentoo Foundation"
673 - --with-webdav="neon"
674 - --with-x
675 - --without-fonts
676 - --without-myspell-dicts
677 - --with-help="html"
678 - --without-helppack-integration
679 - --with-system-gpgmepp
680 - --without-system-cuckoo
681 - --without-system-jfreereport
682 - --without-system-libcmis
683 - --without-system-sane
684 - $(use_enable base report-builder)
685 - $(use_enable bluetooth sdremote-bluetooth)
686 - $(use_enable coinmp)
687 - $(use_enable cups)
688 - $(use_enable dbus)
689 - $(use_enable debug)
690 - $(use_enable eds evolution2)
691 - $(use_enable firebird firebird-sdbc)
692 - $(use_enable gstreamer gstreamer-1-0)
693 - $(use_enable gtk gtk3)
694 - $(use_enable kde kf5)
695 - $(use_enable kde qt5)
696 - $(use_enable ldap)
697 - $(use_enable odk)
698 - $(use_enable pdfimport)
699 - $(use_enable postgres postgresql-sdbc)
700 - $(use_enable vulkan skia)
701 - $(use_with accessibility lxml)
702 - $(use_with coinmp system-coinmp)
703 - $(use_with googledrive gdrive-client-id ${google_default_client_id})
704 - $(use_with googledrive gdrive-client-secret ${google_default_client_secret})
705 - $(use_with java)
706 - $(use_with odk doxygen)
707 - )
708 -
709 - if use eds || use gtk; then
710 - myeconfargs+=( --enable-dconf --enable-gio )
711 - else
712 - myeconfargs+=( --disable-dconf --disable-gio )
713 - fi
714 -
715 - # libreoffice extensions handling
716 - for lo_xt in ${LO_EXTS}; do
717 - if [[ "${lo_xt}" == "scripting-beanshell" || "${lo_xt}" == "scripting-javascript" ]]; then
718 - myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ${lo_xt}) )
719 - else
720 - myeconfargs+=( $(use_enable libreoffice_extensions_${lo_xt} ext-${lo_xt}) )
721 - fi
722 - done
723 -
724 - if use java; then
725 - # hsqldb: system one is too new
726 - myeconfargs+=(
727 - --without-junit
728 - --without-system-hsqldb
729 - --with-ant-home="${ANT_HOME}"
730 - --with-jdk-home="${JAVA_HOME}"
731 - )
732 -
733 - use libreoffice_extensions_scripting-beanshell && \
734 - myeconfargs+=( --with-beanshell-jar=$(java-pkg_getjar bsh bsh.jar) )
735 -
736 - use libreoffice_extensions_scripting-javascript && \
737 - myeconfargs+=( --with-rhino-jar=$(java-pkg_getjar rhino-1.6 rhino.jar) )
738 - fi
739 -
740 - # Workaround to fix build w/ gpgme 1.18.0, bug #865321
741 - export ac_cv_lib_gpgmepp_progress_callback=yes
742 -
743 - is-flagq "-flto*" && myeconfargs+=( --enable-lto )
744 -
745 - MARIADBCONFIG="$(type -p $(usex mariadb mariadb mysql)_config)" \
746 - econf "${myeconfargs[@]}"
747 -}
748 -
749 -src_compile() {
750 - # more and more LO stuff tries to use OpenGL, including tests during build
751 - # bug 501508, bug 540624, bug 545974 and probably more
752 - addpredict /dev/dri
753 - addpredict /dev/ati
754 - addpredict /dev/nvidiactl
755 -
756 - default
757 -}
758 -
759 -src_test() {
760 - make unitcheck || die
761 - make slowcheck || die
762 -}
763 -
764 -src_install() {
765 - # This is not Makefile so no buildserver
766 - emake DESTDIR="${D}" distro-pack-install -o build -o check
767 -
768 - # bug 593514
769 - if use gtk; then
770 - dosym libreoffice/program/liblibreofficekitgtk.so \
771 - /usr/$(get_libdir)/liblibreofficekitgtk.so
772 - fi
773 -
774 - # bash completion aliases
775 - bashcomp_alias \
776 - libreoffice \
777 - unopkg loimpress lobase localc lodraw lomath lowriter lofromtemplate loweb loffice
778 -
779 - if use branding; then
780 - insinto /usr/$(get_libdir)/${PN}/program
781 - newins "${WORKDIR}/branding-sofficerc" sofficerc
782 - dodir /etc/env.d
783 - echo "CONFIG_PROTECT=/usr/$(get_libdir)/${PN}/program/sofficerc" > "${ED}"/etc/env.d/99${PN} || die
784 - fi
785 -
786 - # bug 703474
787 - insinto /usr/include
788 - doins -r include/LibreOfficeKit
789 -
790 - local lodir=/usr/$(get_libdir)/libreoffice
791 - # patching this would break tests
792 - cat <<-EOF > "${T}"/uno.py
793 -import sys, os
794 -sys.path.append('${EPREFIX}${lodir}/program')
795 -os.putenv('URE_BOOTSTRAP', 'vnd.sun.star.pathname:${EPREFIX}${lodir}/program/fundamentalrc')
796 -EOF
797 - sed -e "/^import sys/d" -e "/^import os/d" \
798 - -i "${D}"${lodir}/program/uno.py || die "cleanup dupl imports failed"
799 - cat "${D}"${lodir}/program/uno.py >> "${T}"/uno.py || die
800 - cp "${T}"/uno.py "${D}"${lodir}/program/uno.py || die
801 -
802 - # more system pyuno mess
803 - sed -e "/sOffice = \"\" # lets hope for the best/s:\"\":\"${EPREFIX}${lodir}/program\":" \
804 - -i "${D}"${lodir}/program/officehelper.py || die
805 -
806 - python_optimize "${D}"${lodir}/program
807 - # link python bridge in site-packages, bug 667802
808 - local py pyc loprogdir=/usr/$(get_libdir)/libreoffice/program
809 - for py in uno.py unohelper.py officehelper.py; do
810 - dosym -r ${loprogdir}/${py} $(python_get_sitedir)/${py}
811 - while IFS="" read -d $'\0' -r pyc; do
812 - pyc=${pyc//*\/}
813 - dosym -r ${loprogdir}/__pycache__/${pyc} $(python_get_sitedir)/__pycache__/${pyc}
814 - done < <(find "${D}"${lodir}/program -type f -name ${py/.py/*.pyc} -print0)
815 - done
816 -
817 - newinitd "${FILESDIR}/libreoffice.initd" libreoffice
818 - newconfd "${FILESDIR}/libreoffice.confd" libreoffice
819 -}
820 -
821 -pkg_postinst() {
822 - xdg_icon_cache_update
823 - xdg_desktop_database_update
824 - xdg_mimeinfo_database_update
825 -}
826 -
827 -pkg_postrm() {
828 - xdg_icon_cache_update
829 - xdg_desktop_database_update
830 - xdg_mimeinfo_database_update
831 -}