summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/Makefile1
-rw-r--r--editors/libreoffice6/Makefile326
-rw-r--r--editors/libreoffice6/Makefile.common13
-rw-r--r--editors/libreoffice6/Makefile.i18n49
-rw-r--r--editors/libreoffice6/distinfo45
-rw-r--r--editors/libreoffice6/files/patch-Makefile.in20
-rw-r--r--editors/libreoffice6/files/patch-aarch64-gcc3_linux_aarch64274
-rw-r--r--editors/libreoffice6/files/patch-bin_distro-install-desktop-integration68
-rw-r--r--editors/libreoffice6/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_cpp2uno.cxx22
-rw-r--r--editors/libreoffice6/files/patch-bridges_source_cpp__uno_gcc3__linux__intel_except.cxx14
-rw-r--r--editors/libreoffice6/files/patch-configure18
-rw-r--r--editors/libreoffice6/files/patch-configure.aarch6414
-rw-r--r--editors/libreoffice6/files/patch-cxa_exception98
-rw-r--r--editors/libreoffice6/files/patch-desktop_unx_source_pagein.c12
-rw-r--r--editors/libreoffice6/files/patch-include_LibreOfficeKit_LibreOfficeKitInit.h11
-rw-r--r--editors/libreoffice6/files/patch-officecfg_registry_schema_org_openoffice_Office_Common.xcs11
-rw-r--r--editors/libreoffice6/files/patch-powerpc216
-rw-r--r--editors/libreoffice6/files/patch-sal_osl_unx_system.hxx13
-rw-r--r--editors/libreoffice6/files/patch-sal_osl_unx_thread.cxx28
-rw-r--r--editors/libreoffice6/files/patch-sal_osl_unx_uunxapi.cxx25
-rw-r--r--editors/libreoffice6/files/patch-shell_source_unix_exec_shellexec.cxx11
-rw-r--r--editors/libreoffice6/files/patch-solenv_gbuild_UnpackedTarball.mk10
-rw-r--r--editors/libreoffice6/files/patch-solenv_gbuild_platform_FREEBSD__AARCH64__GCC.mk17
-rw-r--r--editors/libreoffice6/files/patch-solenv_gbuild_platform_unxgcc.mk12
-rw-r--r--editors/libreoffice6/files/patch-svtools_source_svrtf_parrtf.cxx10
-rw-r--r--editors/libreoffice6/files/patch-sysui_desktop_share_create_tree.sh20
-rw-r--r--editors/libreoffice6/files/patch-ucb_source_ucp_webdav_DateTimeHelper.cxx11
-rw-r--r--editors/libreoffice6/files/patch-vcl_Executable__visualbackendtest.mk17
-rw-r--r--editors/libreoffice6/files/patch-vcl_qt5_Qt5Frame.cxx11
-rw-r--r--editors/libreoffice6/files/patch-vcl_qt5_Qt5Instance.cxx35
-rw-r--r--editors/libreoffice6/files/patch-vcl_source_app_salplug.cxx19
-rw-r--r--editors/libreoffice6/files/patch-vcl_source_app_svapp.cxx11
-rw-r--r--editors/libreoffice6/files/patch-vcl_unx_generic_app_geninst.cxx54
-rw-r--r--editors/libreoffice6/pkg-descr6
-rw-r--r--editors/libreoffice6/pkg-descr.i18n3
35 files changed, 1525 insertions, 0 deletions
diff --git a/editors/Makefile b/editors/Makefile
index 98171defe8f0..f12ba5258632 100644
--- a/editors/Makefile
+++ b/editors/Makefile
@@ -184,6 +184,7 @@
SUBDIR += libreoffice-vec
SUBDIR += libreoffice-xh
SUBDIR += libreoffice-zu
+ SUBDIR += libreoffice6
SUBDIR += linux-sublime
SUBDIR += linux-sublime3
SUBDIR += madedit
diff --git a/editors/libreoffice6/Makefile b/editors/libreoffice6/Makefile
new file mode 100644
index 000000000000..73d51337c719
--- /dev/null
+++ b/editors/libreoffice6/Makefile
@@ -0,0 +1,326 @@
+# $FreeBSD$
+
+.include "${.CURDIR}/Makefile.common"
+
+MASTER_SITES= https://download.documentfoundation.org/libreoffice/src/${PORTVERSION}/ \
+ https://dev-www.libreoffice.org/src/:src \
+ https://dev-www.libreoffice.org/extern/:ext
+DISTFILES= ${PORTNAME}-${LOVERSION}${EXTRACT_SUFX} \
+ ${PORTNAME}-help-${LOVERSION}${EXTRACT_SUFX}
+DIST_SUBDIR= libreoffice
+EXTRACT_ONLY:= ${DISTFILES}
+PKGNAMESUFFIX= 6
+
+COMMENT= Full integrated office productivity suite
+
+BUILD_DEPENDS= p5-Archive-Zip>=0:archivers/p5-Archive-Zip \
+ zip:archivers/zip \
+ ${LOCALBASE}/include/sqlext.h:databases/unixODBC \
+ cppunit-config:devel/cppunit \
+ dmake:devel/dmake \
+ gperf>=3.1:devel/gperf \
+ mdds>=1.5:devel/mdds \
+ ucpp:devel/ucpp \
+ ${LOCALBASE}/include/sane/sane.h:graphics/sane-backends \
+ vigra-config:graphics/vigra \
+ ${LOCALBASE}/include/glm/glm.hpp:math/glm \
+ bash:shells/bash \
+ gsed:textproc/gsed \
+ ${PYTHON_PKGNAMEPREFIX}lxml>0:devel/py-lxml@${PY_FLAVOR} \
+ flex>=0.26:textproc/flex
+LIB_DEPENDS= libapr-1.so:devel/apr1 \
+ libboost_date_time.so:devel/boost-libs \
+ libicutu.so:devel/icu \
+ liblangtag.so:devel/liblangtag \
+ libltdl.so:devel/libltdl \
+ liborcus-0.15.so:devel/liborcus \
+ libplds4.so:devel/nspr \
+ libcurl.so:ftp/curl \
+ libcairo.so:graphics/cairo \
+ libgraphite2.so:graphics/graphite2 \
+ liblcms2.so:graphics/lcms2 \
+ libcdr-0.1.so:graphics/libcdr01 \
+ libepoxy.so:graphics/libepoxy \
+ libetonyek-0.1.so:graphics/libetonyek01 \
+ libfreehand-0.1.so:graphics/libfreehand \
+ libgltf-0.0.so:graphics/libgltf \
+ libwpg-0.3.so:graphics/libwpg03 \
+ libzmf-0.0.so:graphics/libzmf \
+ libpng.so:graphics/png \
+ libpoppler.so:graphics/poppler \
+ libqrcodegencpp.so:graphics/qr-code-generator \
+ libCoinMP.so:math/coinmp \
+ liblpsolve55.so:math/lp_solve \
+ libcmis-0.5.so:net/libcmis \
+ libfreetype.so:print/freetype2 \
+ libharfbuzz.so:print/harfbuzz \
+ libharfbuzz-icu.so:print/harfbuzz-icu \
+ libmspub-0.1.so:print/libmspub01 \
+ libpagemaker-0.0.so:print/libpagemaker \
+ libnss3.so:security/nss \
+ libxmlsec1-nss.so:security/xmlsec1 \
+ libclucene-core.so:textproc/clucene \
+ libexpat.so:textproc/expat2 \
+ libhunspell-1.7.so:textproc/hunspell \
+ libhyphen.so:textproc/hyphen \
+ libabw-0.1.so:textproc/libabw \
+ libe-book-0.1.so:textproc/libe-book \
+ libepubgen-0.1.so:textproc/libepubgen \
+ libexttextcat-2.0.so:textproc/libexttextcat \
+ libmwaw-0.3.so:textproc/libmwaw03 \
+ libnumbertext-1.0.so:textproc/libnumbertext \
+ libodfgen-0.1.so:textproc/libodfgen01 \
+ libqxp-0.0.so:textproc/libqxp \
+ librevenge-0.0.so:textproc/librevenge \
+ libstaroffice-0.0.so:textproc/libstaroffice \
+ libvisio-0.1.so:textproc/libvisio01 \
+ libwpd-0.10.so:textproc/libwpd010 \
+ libwps-0.4.so:textproc/libwps \
+ libxml2.so:textproc/libxml2 \
+ libxslt.so:textproc/libxslt \
+ libmythes-1.2.so:textproc/mythes \
+ libraptor2.so:textproc/raptor2 \
+ librdf.so:textproc/redland \
+ libfontconfig.so:x11-fonts/fontconfig \
+ libxcb-icccm.so:x11/xcb-util-wm \
+ libserf-1.so:www/serf
+RUN_DEPENDS= xdg-open:devel/xdg-utils \
+ ${LOCALBASE}/share/fonts/Caladea/Caladea-Bold.ttf:x11-fonts/crosextrafonts-caladea-ttf \
+ ${LOCALBASE}/share/fonts/Carlito/Carlito-Bold.ttf:x11-fonts/crosextrafonts-carlito-ttf \
+ ${LOCALBASE}/share/fonts/dejavu/DejaVuSans.ttf:x11-fonts/dejavu \
+ ${LOCALBASE}/share/fonts/twemoji-color-font-ttf/TwitterColorEmoji-SVGinOT.ttf:x11-fonts/twemoji-color-font-ttf \
+ ${LOCALBASE}/share/fonts/GentiumBasic/GenBasI.ttf:x11-fonts/gentium-basic \
+ ${LOCALBASE}/share/fonts/Liberation/LiberationMono-Bold.ttf:x11-fonts/liberation-fonts-ttf \
+ ${LOCALBASE}/share/fonts/LinLibertineG/LinLibertine_DR_G.ttf:x11-fonts/linuxlibertine-g
+
+DISTFILES+= 884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc-opens___.ttf:ext
+
+NOT_FOR_ARCHS= armv6 armv7
+NOT_FOR_ARCHS_REASON= Unsupported host_cpu
+
+.if defined(PRERELEASE)
+MASTER_SITES+= https://dev-builds.libreoffice.org/pre-releases/src/
+.endif
+
+CONFLICTS_INSTALL= libreoffice
+
+INSTALL_TARGET= distro-pack-install
+WRKSRC= ${WRKDIR}/${PORTNAME}-${LOVERSION}
+
+SHEBANG_GLOB= *.py
+
+GNU_CONFIGURE= yes
+USE_GL= gl glew glu
+USE_OPENLDAP= yes
+USE_PERL5= build
+USE_XORG= ice sm x11 xaw xcb xext xinerama xrandr xrender
+USES= autoreconf:build bison compiler:c++14-lang cpe desktop-file-utils \
+ gettext-runtime gl gmake gnome jpeg mysql:client perl5 pkgconfig \
+ pkgconfig python shebangfix shared-mime-info ssl tar:xz xorg
+
+OPTIONS_DEFINE= CUPS DOCS GNOME GTK3 I18N JAVA KF5 MMEDIA PGSQL QT5 SDK TEST WEBDAV
+OPTIONS_DEFAULT= CUPS MMEDIA
+OPTIONS_DEFAULT_FreeBSD_12= QT5
+OPTIONS_DEFAULT_FreeBSD_13= QT5
+OPTIONS_DEFAULT+= ${OPTIONS_DEFAULT_${OPSYS}_${OSREL:R}}
+
+GTK3_DESC= GTK+ 3 GUI toolkit support (incomplete visual style)
+I18N_DESC= Build i18n resources
+JAVA_DESC= Add Java support (XML filters, macros, DB connections)
+KF5_DESC= KF5/Qt5 GUI toolkit support (implies QT5)
+MMEDIA_DESC= Enable multimedia backend for Impress
+PGSQL_DESC= Build with PostgreSQL-SDBC driver
+QT5_DESC= Qt5 GUI toolkit support (default visual style)
+SDK_DESC= Build with SDK
+TEST_DESC= Run all regression tests
+WEBDAV_DESC= Enable WebDAV protocol
+
+CUPS_CONFIGURE_ENABLE= cups
+CUPS_LIB_DEPENDS= libcups.so:print/cups
+
+DOCS_CONFIGURE_WITH= help
+
+GNOME_CONFIGURE_ENABLE= dbus dconf
+GNOME_IMPLIES= GTK3
+GNOME_LIB_DEPENDS= libdbus-1.so:devel/dbus \
+ libdbus-glib-1.so:devel/dbus-glib
+GNOME_USE= GNOME=dconf
+
+GTK3_CONFIGURE_ENABLE= gtk3
+GTK3_USE= GNOME=gtk30,gtk-update-icon-cache
+GTK3_VARS= POST_PLIST=add-plist-gnome
+
+I18N_CONFIGURE_WITH= lang=ALL
+I18N_DISTFILES= ${PORTNAME}-dictionaries-${LOVERSION}${EXTRACT_SUFX} \
+ ${PORTNAME}-translations-${LOVERSION}${EXTRACT_SUFX}
+I18N_EXTRACT_ONLY= ${I18N_DISTFILES}
+
+JAVA_BUILD_DEPENDS= ant:devel/apache-ant \
+ ${JAVAJARDIR}/commons-codec.jar:java/apache-commons-codec \
+ ${JAVAJARDIR}/commons-httpclient.jar:java/apache-commons-httpclient \
+ ${JAVAJARDIR}/commons-lang3.jar:java/apache-commons-lang3 \
+ ${JAVAJARDIR}/commons-logging.jar:java/apache-commons-logging \
+ ${JAVAJARDIR}/junit.jar:java/junit \
+ ${JAVAJARDIR}/bsh.jar:lang/bsh
+JAVA_CATEGORIES= java
+JAVA_CONFIGURE_ON= --with-ant-home=${LOCALBASE}/share/java/apache-ant \
+ --with-beanshell-jar=${JAVAJARDIR}/bsh.jar \
+ --with-commons-codec-jar=${JAVAJARDIR}/commons-codec.jar \
+ --with-commons-httpclient-jar=${JAVAJARDIR}/commons-httpclient.jar \
+ --with-commons-lang-jar=${JAVAJARDIR}/commons-lang3.jar \
+ --with-commons-logging-jar=${JAVAJARDIR}/commons-logging.jar \
+ --with-jdk-home="${JAVA_HOME}" \
+ --with-junit=${JAVAJARDIR}/junit.jar \
+ --with-hamcrest=${JAVAJARDIR}/hamcrest.jar \
+ --without-system-jfreereport
+JAVA_CONFIGURE_WITH= java
+# XXX jni.h from GNU classpath causes ABI conflicts.
+JAVA_CONFLICTS_BUILD= classpath-[0-9]*
+JAVA_DISTFILES= 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip:src \
+ 3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip:src \
+ 35c94d2df8893241173de1d16b6034c0-swingExSrc.zip:src \
+ 39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip:src \
+ 3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip:src \
+ 798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip:src \
+ 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar:ext \
+ 8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip:src \
+ 97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip:src \
+ a084cd548b586552cb7d3ee51f1af969-odfvalidator-1.1.8-incubating-SNAPSHOT-jar-with-dependencies.jar:ext \
+ ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip:src \
+ ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip:src \
+ d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip:src \
+ db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip:src \
+ eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip:src \
+ f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip:src
+JAVA_USE= JAVA=yes
+JAVA_VARS= JAVA_BUILD=yes
+
+KF5_CONFIGURE_ENABLE= kf5
+KF5_USE= kde=config,coreaddons,i18n,kio,windowsystem
+KF5_USES= kde:5
+KF5_IMPLIES= QT5
+
+MMEDIA_CONFIGURE_ENABLE= gstreamer-1-0
+MMEDIA_USE= GSTREAMER1=yes
+
+PGSQL_CONFIGURE_ENABLE= postgresql-sdbc
+PGSQL_CONFIGURE_WITH= gssapi krb5
+PGSQL_USES= pgsql
+
+QT5_CONFIGURE_ENABLE= qt5
+QT5_USE= qt=buildtools_build,core,gui,network,qmake_build,widgets,x11extras
+QT5_USES= qt:5
+
+SDK_BUILD_DEPENDS= doxygen:devel/doxygen
+SDK_CONFIGURE_ENABLE= odk
+SDK_CONFIGURE_OFF= --without-doxygen
+SDK_CONFIGURE_ON= --with-doxygen=${LOCALBASE}/bin/doxygen
+SDK_DISTFILES= 185d60944ea767075d27247c3162b3bc-unowinreg.dll:ext
+
+TEST_ALL_TARGET_OFF= build-nocheck
+TEST_CONFIGURE_ENABLE= cve-tests
+
+WEBDAV_CONFIGURE_ENABLE= neon
+WEBDAV_LIB_DEPENDS= libneon.so:www/neon
+
+CPPFLAGS+= -isystem ${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+
+CONFIGURE_ARGS= --disable-dependency-tracking \
+ --disable-epm \
+ --disable-fetch-external \
+ --disable-firebird-sdbc \
+ --disable-mergelibs \
+ --disable-online-update \
+ --enable-cairo-canvas \
+ --enable-python=system \
+ --enable-release-build \
+ --disable-pdfium \
+ --exec-prefix=${PREFIX} \
+ --with-boost=${LOCALBASE} \
+ --with-build-version="FreeBSD ports ${PKGVERSION}" \
+ --with-external-dict-dir=${LOCALBASE}/share/hunspell \
+ --with-external-hyph-dir=${LOCALBASE}/share/hyphen \
+ --with-external-tar=${DISTDIR}/${DIST_SUBDIR} \
+ --with-external-thes-dir=${LOCALBASE}/share/mythes \
+ --with-os-version=${OSVERSION} \
+ --with-parallelism=${MAKE_JOBS_NUMBER} \
+ --with-system-cppunit \
+ --with-system-curl \
+ --with-system-dicts \
+ --with-system-libs \
+ --with-system-libxml \
+ --with-system-ucpp \
+ --with-system-zlib \
+ --with-vendor="FreeBSD ports" \
+ --without-fonts \
+ --without-myspell-dicts
+
+CONFIGURE_ENV= DMAKE=${LOCALBASE}/bin/dmake \
+ FLEX=${LOCALBASE}/bin/flex \
+ GNUTAR="${TAR}" \
+ GPERF=${LOCALBASE}/bin/gperf \
+ ICU_CFLAGS="`icu-config --cflags`" \
+ ICU_LIBS="`icu-config --ldflags`" \
+ PYTHON_CFLAGS="`${PYTHON_VERSION}-config --cflags`" \
+ PYTHON_LIBS="`${PYTHON_VERSION}-config --libs`" \
+ ac_cv_path_SED=${LOCALBASE}/bin/gsed
+
+MAKE_ARGS+= TMPDIR=${WRKDIR}
+MAKE_ENV+= CXXFLAGS_WARN="${CXXFLAGS_WARN}"
+MAKE_ENV+= GNUSED=${LOCALBASE}/bin/gsed
+MAKE_ENV+= DISPLAY=
+MAKE_ENV+= verbose=1
+
+.include <bsd.port.options.mk>
+
+.include <bsd.port.pre.mk>
+
+.if ${PORT_OPTIONS:MGTK3}
+WARNING= "GTK3 visual style is incomplete yet, build at your own risk"
+.endif
+
+.if ${CHOSEN_COMPILER_TYPE} == clang
+CXXFLAGS_WARN= -Woverloaded-virtual -Wno-unused-parameter -Wno-unused-local-typedefs
+.else
+CXXFLAGS_WARN= -Wshadow -Woverloaded-virtual
+.endif
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
+ ${WRKSRC}/shell/source/unix/exec/shellexec.cxx
+.if ${COMPILER_FEATURES:Mlibstdc++}
+ ${REINPLACE_CMD} -e 's/gb_CC/gb_CXX/' ${WRKSRC}/solenv/gbuild/platform/unxgcc.mk
+.endif
+
+pre-configure:
+ @${TOUCH} ${WRKSRC}/autogen.lastrun
+
+post-configure:
+ @${TOUCH} ${WRKSRC}/src.downloaded
+
+post-install:
+ @cd ${STAGEDIR}${PREFIX} && \
+ ${FIND} -s lib/libreoffice -type d -empty \
+ -exec ${ECHO_CMD} "@dir {}" \; >> ${TMPPLIST}
+ @cd ${STAGEDIR}${PREFIX} && \
+ ${FIND} -s bin lib man -not -type d >> ${TMPPLIST}
+.for subdir in appdata application-registry applications bash-completion icons mime mime-info
+ @cd ${STAGEDIR}${PREFIX} && \
+ ${FIND} -s share/${subdir} -not -type d >> ${TMPPLIST}
+.endfor
+
+post-install-SDK-on:
+.for subdir in include share share/doc share/idl
+ @cd ${STAGEDIR}${PREFIX} && \
+ ${FIND} -s ${subdir}/libreoffice -not -type d >> ${TMPPLIST}
+.endfor
+
+add-plist-gnome:
+.for subdir in gnome hicolor locolor
+ @${ECHO_CMD} "@rmtry share/icons/${subdir}/icon-theme.cache" >> ${TMPPLIST}
+ @${ECHO_CMD} "@postexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/share/icons/${subdir} 2>/dev/null || ${TRUE}" >> ${TMPPLIST}
+ @${ECHO_CMD} "@postunexec ${LOCALBASE}/bin/gtk-update-icon-cache -q -f %D/share/icons/${subdir} 2>/dev/null || ${TRUE}" >> ${TMPPLIST}
+.endfor
+
+.include <bsd.port.post.mk>
diff --git a/editors/libreoffice6/Makefile.common b/editors/libreoffice6/Makefile.common
new file mode 100644
index 000000000000..ce82c7fe0427
--- /dev/null
+++ b/editors/libreoffice6/Makefile.common
@@ -0,0 +1,13 @@
+# $FreeBSD$
+
+PORTNAME= libreoffice
+PORTVERSION= 6.4.6
+CATEGORIES+= editors
+
+MAINTAINER= office@FreeBSD.org
+
+LICENSE= LGPL3+ MPL20
+LICENSE_COMB= dual
+
+LOVERSION= ${PORTVERSION}.${RCVER}
+RCVER= 2
diff --git a/editors/libreoffice6/Makefile.i18n b/editors/libreoffice6/Makefile.i18n
new file mode 100644
index 000000000000..1c88ecfb86fc
--- /dev/null
+++ b/editors/libreoffice6/Makefile.i18n
@@ -0,0 +1,49 @@
+# $FreeBSD$
+
+.include "${.CURDIR}/../../editors/libreoffice/Makefile.common"
+
+MASTER_SITES= https://download.documentfoundation.org/libreoffice/${MASTER_SITE_SUBDIR}/
+.if defined(PRERELEASE)
+MASTER_SITES+= https://dev-builds.libreoffice.org/pre-releases/deb/x86_64/
+MASTER_SITE_SUBDIR= testing/${PORTVERSION}/deb/x86_64
+LO_I18N_FILE= LibreOffice_${LOVERSION}_Linux_x86-64_deb
+.else
+MASTER_SITE_SUBDIR= stable/${PORTVERSION}/deb/x86_64
+LO_I18N_FILE= LibreOffice_${PORTVERSION}_Linux_x86-64_deb
+.endif
+PKGNAMEPREFIX= ${LO_I18N}-
+DISTFILES= ${LO_I18N_FILE}_langpack_${LO_I18N:S/_/-/}${EXTRACT_SUFX}
+.if defined(LO_HAS_HELPPACK)
+DISTFILES+= ${LO_I18N_FILE}_helppack_${LO_I18N:S/_/-/}${EXTRACT_SUFX}
+.endif
+DIST_SUBDIR= libreoffice/i18n
+
+COMMENT?= ${LO_I18N} language pack for ${PORTNAME}
+
+DESCR?= ${.CURDIR}/../../editors/libreoffice/pkg-descr.i18n
+
+RUN_DEPENDS?= libreoffice:editors/libreoffice
+
+NO_ARCH= yes
+NO_BUILD= yes
+
+EXTRACT_AFTER_ARGS= --exclude '${PORTNAME}*-dict-*.deb' \
+ --strip-components 1
+
+post-extract:
+ @${MKDIR} ${WRKSRC}
+ for deb in ${WRKDIR}/DEBS/*.deb ; do \
+ ${TAR} xfO $${deb} data.tar.xz | ${TAR} -C ${WRKSRC} -xf - ; \
+ done
+
+do-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
+ cd ${WRKSRC}/opt/${PORTNAME}${PORTVERSION:R} ; \
+ ${PAX} -rw . ${STAGEDIR}${PREFIX}/lib/${PORTNAME}
+
+post-install:
+ @cd ${WRKSRC}/opt/${PORTNAME}${PORTVERSION:R} && \
+ ${FIND} -s * -not -type d \
+ -exec ${ECHO_CMD} "lib/${PORTNAME}/{}" \; >> ${TMPPLIST} && \
+ ${FIND} -d * -type d -empty \
+ -exec ${ECHO_CMD} "@dir lib/${PORTNAME}/{}" \; >> ${TMPPLIST}
diff --git a/editors/libreoffice6/distinfo b/editors/libreoffice6/distinfo
new file mode 100644
index 000000000000..618bf7e6962f
--- /dev/null
+++ b/editors/libreoffice6/distinfo
@@ -0,0 +1,45 @@
+TIMESTAMP = 1597385574
+SHA256 (libreoffice/libreoffice-6.4.6.2.tar.xz) = ab8281c5290e23eb46c4d4aee4abb16d2dcc5ff6daf46991c0370bee6ec0aa4c
+SIZE (libreoffice/libreoffice-6.4.6.2.tar.xz) = 232180876
+SHA256 (libreoffice/libreoffice-help-6.4.6.2.tar.xz) = 4af036e3f2a033b620b31acff24c0ce7b239ddd40a3782fb77640c0b386e04c8
+SIZE (libreoffice/libreoffice-help-6.4.6.2.tar.xz) = 88297908
+SHA256 (libreoffice/884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc-opens___.ttf) = 884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc
+SIZE (libreoffice/884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc-opens___.ttf) = 207544
+SHA256 (libreoffice/libreoffice-dictionaries-6.4.6.2.tar.xz) = d87de685e5f7a810c36d3c8a26af34ca53247e9d6e1ad2a650cab652bdbf0c5b
+SIZE (libreoffice/libreoffice-dictionaries-6.4.6.2.tar.xz) = 45948020
+SHA256 (libreoffice/libreoffice-translations-6.4.6.2.tar.xz) = a3a95168ed9845d28f5e10f1a729383dae9e706f63e5a898de72b4843fe5352a
+SIZE (libreoffice/libreoffice-translations-6.4.6.2.tar.xz) = 173134460
+SHA256 (libreoffice/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip) = d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370
+SIZE (libreoffice/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip) = 3519470
+SHA256 (libreoffice/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip) = 5826d1551bf599b85742545f6e01a0079b93c1b2c8434bf409eddb3a29e4726b
+SIZE (libreoffice/3404ab6b1792ae5f16bbd603bd1e1d03-libformula-1.1.7.zip) = 1180582
+SHA256 (libreoffice/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip) = 64585ac36a81291a58269ec5347e7e3e2e8596dbacb9221015c208191333c6e1
+SIZE (libreoffice/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip) = 9796
+SHA256 (libreoffice/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip) = 085f2112c51fa8c1783fac12fbd452650596415121348393bb51f0f7e85a9045
+SIZE (libreoffice/39bb3fcea1514f1369fcfc87542390fd-sacjava-1.3.zip) = 153157
+SHA256 (libreoffice/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip) = e0531091787c0f16c83965fdcbc49162c059d7f0c64669e7f119699321549743
+SIZE (libreoffice/3bdf40c0d199af31923e900d082ca2dd-libfonts-1.1.6.zip) = 5750610
+SHA256 (libreoffice/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip) = 1fb458d6aab06932693cc8a9b6e4e70944ee1ff052fa63606e3131df34e21753
+SIZE (libreoffice/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip) = 1521926
+SHA256 (libreoffice/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar) = f2443f27561af52324eee03a1892d9f569adc8db9e7bca55614898bc2a13a770
+SIZE (libreoffice/8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar) = 2448421
+SHA256 (libreoffice/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip) = abe2c57ac12ba45d83563b02e240fa95d973376de2f720aab8fe11f2e621c095
+SIZE (libreoffice/8ce2fcd72becf06c41f7201d15373ed9-librepository-1.1.6.zip) = 762419
+SHA256 (libreoffice/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip) = 3d853b19b1d94a6efa69e7af90f7f2b09ecf302913bee3da796c15ecfebcfac8
+SIZE (libreoffice/97b2d4dba862397f446b217e2b623e71-libloader-1.1.6.zip) = 2938721
+SHA256 (libreoffice/a084cd548b586552cb7d3ee51f1af969-odfvalidator-1.1.8-incubating-SNAPSHOT-jar-with-dependencies.jar) = a0bd3e0186e043223bfb231a888e2bfb06c78ee2e07c2f0eca434236d173cf34
+SIZE (libreoffice/a084cd548b586552cb7d3ee51f1af969-odfvalidator-1.1.8-incubating-SNAPSHOT-jar-with-dependencies.jar) = 18033694
+SHA256 (libreoffice/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip) = 7d2797fe9f79a77009721e3f14fa4a1dec17a6d706bdc93f85f1f01d124fab66
+SIZE (libreoffice/ace6ab49184e329db254e454a010f56d-libxml-1.1.7.zip) = 2929311
+SHA256 (libreoffice/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip) = 233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd
+SIZE (libreoffice/ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip) = 743031
+SHA256 (libreoffice/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip) = 1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133
+SIZE (libreoffice/d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip) = 207563
+SHA256 (libreoffice/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip) = e1fb87f3f7b980d33414473279615c4644027e013012d156efa538bc2b031772
+SIZE (libreoffice/db60e4fde8dd6d6807523deb71ee34dc-liblayout-0.2.10.zip) = 1396007
+SHA256 (libreoffice/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip) = 75c80359c9ce343c20aab8a36a45cb3b9ee7c61cf92c13ae45399d854423a9ba
+SIZE (libreoffice/eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip) = 427800
+SHA256 (libreoffice/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip) = 05640a1f6805b2b2d7e2cb9c50db9a5cb084e3c52ab1a71ce015239b4a1d4343
+SIZE (libreoffice/f94d9870737518e3b597f9265f4e9803-libserializer-1.1.6.zip) = 211919
+SHA256 (libreoffice/185d60944ea767075d27247c3162b3bc-unowinreg.dll) = eafde646a7dbe46d20c291685b0beac2382174d78d66ee990e229a1bf6e6cec6
+SIZE (libreoffice/185d60944ea767075d27247c3162b3bc-unowinreg.dll) = 12288
diff --git a/editors/libreoffice6/files/patch-Makefile.in b/editors/libreoffice6/files/patch-Makefile.in
new file mode 100644
index 000000000000..3b22303f9e03
--- /dev/null
+++ b/editors/libreoffice6/files/patch-Makefile.in
@@ -0,0 +1,20 @@
+--- Makefile.in.orig 2019-02-03 18:10:00.287665000 +0800
++++ Makefile.in 2019-02-03 18:10:53.310313000 +0800
+@@ -272,7 +272,7 @@
+ #
+ # Bootstrap
+ #
+-bootstrap: check-if-root compilerplugins
++bootstrap: compilerplugins
+
+ #
+ # Build
+@@ -400,7 +400,7 @@
+ @exit 1
+ endif
+
+-distro-pack-install: install
++distro-pack-install: install-strip
+ $(SRCDIR)/bin/distro-install-clean-up
+ $(SRCDIR)/bin/distro-install-desktop-integration
+ $(SRCDIR)/bin/distro-install-sdk
diff --git a/editors/libreoffice6/files/patch-aarch64-gcc3_linux_aarch64 b/editors/libreoffice6/files/patch-aarch64-gcc3_linux_aarch64
new file mode 100644
index 000000000000..22c7d9bf4326
--- /dev/null
+++ b/editors/libreoffice6/files/patch-aarch64-gcc3_linux_aarch64
@@ -0,0 +1,274 @@
+From 189d498f5c0c633f8cd87b3f1b6d57020371a952 Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Tue, 17 Dec 2019 23:33:28 +0100
+Subject: [PATCH] tdf#128671: Rely on unwind.h, declare what's missing from
+ cxxabi.h
+
+...for gcc3_linux_aarch64, similar to what
+128deeae81a6f802bfb79b8f0fa8c4b10729f7db "cxxabi.h is not specific to GCC" et al
+did for gcc3_linux_x86-64
+
+Change-Id: Iee9980842c0e5f6f49642407339a67e865f8be9c
+Reviewed-on: https://gerrit.libreoffice.org/85344
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+---
+ .../source/cpp_uno/gcc3_linux_aarch64/abi.cxx | 7 +-
+ .../source/cpp_uno/gcc3_linux_aarch64/abi.hxx | 117 +++++++++++++-----
+ .../cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx | 4 +-
+ 3 files changed, 92 insertions(+), 36 deletions(-)
+
+diff --git bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+index 938011a09a2e..892bf6e81963 100644
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+@@ -24,7 +24,6 @@
+ #include <cstring>
+ #include <typeinfo>
+
+-#include <cxxabi.h>
+ #include <dlfcn.h>
+
+ #include <com/sun/star/uno/RuntimeException.hpp>
+@@ -135,8 +134,8 @@ std::type_info * getRtti(typelib_TypeDescription const & type) {
+ }
+
+ extern "C" void _GLIBCXX_CDTOR_CALLABI deleteException(void * exception) {
+- abi_aarch64::__cxa_exception * header =
+- static_cast<abi_aarch64::__cxa_exception *>(exception) - 1;
++ __cxxabiv1::__cxa_exception * header =
++ static_cast<__cxxabiv1::__cxa_exception *>(exception) - 1;
+ OUString unoName(toUnoName(header->exceptionType->name()));
+ typelib_TypeDescription * td = 0;
+ typelib_typedescription_getByName(&td, unoName.pData);
+@@ -224,7 +223,7 @@ StructKind getStructKind(typelib_CompoundTypeDescription const * type) {
+ namespace abi_aarch64 {
+
+ void mapException(
+- __cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping)
++ __cxxabiv1::__cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping)
+ {
+ assert(exception != 0);
+ assert(type != nullptr);
+diff --git bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx
+index 50c5f1f21a37..e3dc9b5872a7 100644
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/abi.hxx
+@@ -22,55 +22,114 @@
+
+ #include <sal/config.h>
+
++#include <cstddef>
+ #include <exception>
+ #include <typeinfo>
+
++#include <cxxabi.h>
++#ifndef _GLIBCXX_CDTOR_CALLABI // new in GCC 4.7 cxxabi.h
++#define _GLIBCXX_CDTOR_CALLABI
++#endif
++#include <unwind.h>
++
++#include <config_cxxabi.h>
+ #include <typelib/typedescription.h>
+ #include <uno/any2.h>
+ #include <uno/mapping.h>
+
+-namespace abi_aarch64 {
+-
+-// Following declarations from libstdc++-v3/libsupc++/unwind-cxx.h and
+-// lib/gcc/*-*-*/*/include/unwind.h:
+-
+-struct _Unwind_Exception
+-{
+- unsigned exception_class __attribute__((__mode__(__DI__)));
+- void * exception_cleanup;
+- unsigned private_1 __attribute__((__mode__(__word__)));
+- unsigned private_2 __attribute__((__mode__(__word__)));
+-} __attribute__((__aligned__));
++#if !HAVE_CXXABI_H_CLASS_TYPE_INFO
++// <https://mentorembedded.github.io/cxx-abi/abi.html>,
++// libstdc++-v3/libsupc++/cxxabi.h:
++namespace __cxxabiv1 {
++class __class_type_info: public std::type_info {
++public:
++ explicit __class_type_info(char const * n): type_info(n) {}
++ ~__class_type_info() override;
++};
++}
++#endif
+
+-struct __cxa_exception
+-{
+- std::type_info *exceptionType;
+- void (*exceptionDestructor)(void *);
++#if !HAVE_CXXABI_H_SI_CLASS_TYPE_INFO
++// <https://mentorembedded.github.io/cxx-abi/abi.html>,
++// libstdc++-v3/libsupc++/cxxabi.h:
++namespace __cxxabiv1 {
++class __si_class_type_info: public __class_type_info {
++public:
++ __class_type_info const * __base_type;
++ explicit __si_class_type_info(
++ char const * n, __class_type_info const *base):
++ __class_type_info(n), __base_type(base) {}
++ ~__si_class_type_info() override;
++};
++}
++#endif
+
++#if !HAVE_CXXABI_H_CXA_EXCEPTION
++// <https://mentorembedded.github.io/cxx-abi/abi-eh.html>,
++// libcxxabi/src/cxa_exception.hpp:
++namespace __cxxabiv1 {
++struct __cxa_exception {
++#if defined _LIBCPPABI_VERSION // detect libc++abi
++#if defined __LP64__ || LIBCXXABI_ARM_EHABI
++ std::size_t referenceCount;
++#endif
++#endif
++ std::type_info * exceptionType;
++ void (* exceptionDestructor)(void *);
+ void (*unexpectedHandler)(); // std::unexpected_handler dropped from C++17
+ std::terminate_handler terminateHandler;
+-
+- __cxa_exception *nextException;
+-
++ __cxa_exception * nextException;
+ int handlerCount;
+-
+ int handlerSwitchValue;
+- const unsigned char *actionRecord;
+- const unsigned char *languageSpecificData;
+- void *catchTemp;
+- void *adjustedPtr;
+-
++ char const * actionRecord;
++ char const * languageSpecificData;
++ void * catchTemp;
++ void * adjustedPtr;
+ _Unwind_Exception unwindHeader;
+ };
++}
++#endif
+
+-struct __cxa_eh_globals
+-{
+- __cxa_exception *caughtExceptions;
++#if !HAVE_CXXABI_H_CXA_EH_GLOBALS
++// <https://mentorembedded.github.io/cxx-abi/abi-eh.html>:
++namespace __cxxabiv1 {
++struct __cxa_eh_globals {
++ __cxa_exception * caughtExceptions;
+ unsigned int uncaughtExceptions;
+ };
++}
++#endif
++
++#if !HAVE_CXXABI_H_CXA_GET_GLOBALS
++namespace __cxxabiv1 {
++extern "C" __cxa_eh_globals * __cxa_get_globals() throw();
++}
++#endif
++
++#if !HAVE_CXXABI_H_CXA_CURRENT_EXCEPTION_TYPE
++namespace __cxxabiv1 {
++extern "C" std::type_info *__cxa_current_exception_type() throw();
++}
++#endif
++
++#if !HAVE_CXXABI_H_CXA_ALLOCATE_EXCEPTION
++namespace __cxxabiv1 {
++extern "C" void * __cxa_allocate_exception(std::size_t thrown_size) throw();
++}
++#endif
++
++#if !HAVE_CXXABI_H_CXA_THROW
++namespace __cxxabiv1 {
++extern "C" void __cxa_throw(
++ void * thrown_exception, void * tinfo, void (* dest)(void *))
++ __attribute__((noreturn));
++}
++#endif
++
++namespace abi_aarch64 {
+
+ void mapException(
+- __cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping);
++ __cxxabiv1::__cxa_exception * exception, std::type_info const * type, uno_Any * any, uno_Mapping * mapping);
+
+ void raiseException(uno_Any * any, uno_Mapping * mapping);
+
+diff --git bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
+index f03d848521cc..0847dfc76db5 100644
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/uno2cpp.cxx
+@@ -24,8 +24,6 @@
+ #include <exception>
+ #include <typeinfo>
+
+-#include <cxxabi.h>
+-
+ #include <bridge.hxx>
+ #include <types.hxx>
+ #include <unointerfaceproxy.hxx>
+@@ -190,7 +188,7 @@ void call(
+ }
+ } catch (css::uno::Exception &) {
+ abi_aarch64::mapException(
+- reinterpret_cast<abi_aarch64::__cxa_eh_globals *>(
++ reinterpret_cast<__cxxabiv1::__cxa_eh_globals *>(
+ __cxxabiv1::__cxa_get_globals())->caughtExceptions,
+ __cxxabiv1::__cxa_current_exception_type(), *exception,
+ proxy->getBridge()->getCpp2Uno());
+From a7d1fed24557b203acb5016a98af26f4ef24d27a Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Tue, 11 Feb 2020 15:46:45 +0100
+Subject: [PATCH] Hack to dynamically adapt to __cxa_exceptiom in LLVM 5.0
+ libcxxabi
+
+...for Linux aarch64, similar to 7a9dd3d482deeeb3ed1d50074e56adbd3f928296 "Hack
+to dynamically adapt to __cxa_exceptiom in LLVM 5.0 libcxxabi" for macOS x86-64.
+But unlike on macOS (which is known to always use libcxxabi), be careful to only
+execute the hack in builds targeting libcxxabi.
+
+Change-Id: I5417fde425d2d6bac9400592193a9fe5d2bfe175
+Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88458
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+---
+ .../source/cpp_uno/gcc3_linux_aarch64/abi.cxx | 22 +++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+index 892bf6e81963..611442a31e31 100644
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/abi.cxx
+@@ -136,6 +136,28 @@ std::type_info * getRtti(typelib_TypeDescription const & type) {
+ extern "C" void _GLIBCXX_CDTOR_CALLABI deleteException(void * exception) {
+ __cxxabiv1::__cxa_exception * header =
+ static_cast<__cxxabiv1::__cxa_exception *>(exception) - 1;
++#if defined _LIBCPPABI_VERSION // detect libc++abi
++ // The libcxxabi commit
++ // <http://llvm.org/viewvc/llvm-project?view=revision&revision=303175>
++ // "[libcxxabi] Align unwindHeader on a double-word boundary" towards
++ // LLVM 5.0 changed the size of __cxa_exception by adding
++ //
++ // __attribute__((aligned))
++ //
++ // to the final member unwindHeader, on x86-64 effectively adding a hole of
++ // size 8 in front of that member (changing its offset from 88 to 96,
++ // sizeof(__cxa_exception) from 120 to 128, and alignof(__cxa_exception)
++ // from 8 to 16); a hack to dynamically determine whether we run against a
++ // new libcxxabi is to look at the exceptionDestructor member, which must
++ // point to this function (the use of __cxa_exception in fillUnoException is
++ // unaffected, as it only accesses members towards the start of the struct,
++ // through a pointer known to actually point at the start):
++ if (header->exceptionDestructor != &deleteException) {
++ header = reinterpret_cast<__cxa_exception const *>(
++ reinterpret_cast<char const *>(header) - 8);
++ assert(header->exceptionDestructor == &deleteException);
++ }
++#endif
+ OUString unoName(toUnoName(header->exceptionType->name()));
+ typelib_TypeDescription * td = 0;
+ typelib_typedescription_getByName(&td, unoName.pData);
diff --git a/editors/libreoffice6/files/patch-bin_distro-install-desktop-integration b/editors/libreoffice6/files/patch-bin_distro-install-desktop-integration
new file mode 100644
index 000000000000..85241e2dcbac
--- /dev/null
+++ b/editors/libreoffice6/files/patch-bin_distro-install-desktop-integration
@@ -0,0 +1,68 @@
+--- bin/distro-install-desktop-integration.orig 2019-01-24 03:35:25.000000000 +0800
++++ bin/distro-install-desktop-integration 2019-02-03 18:17:18.645630000 +0800
+@@ -98,7 +98,7 @@
+ cp -a "${SRCDIR?}"/sysui/desktop/share/create_tree.sh "$sysui_temp"
+ cd $sysui_temp
+ # we want non-versioned stuff in the distro packages
+-sed -i \
++sed -i "" \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
+ -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
+@@ -108,13 +108,13 @@
+ export OFFICE_PREFIX=$LIBDIR
+ export PREFIX=$INSTALLDIRNAME
+ export ICON_PREFIX=$INSTALLDIRNAME
+- export ICON_SOURCE_DIR="${SRCDIR?}"/sysui/desktop/icons
++ export ICON_SOURCE_DIR="${SRCDIR}"/sysui/desktop/icons
+ export PRODUCTVERSION=
+ export KDEMAINDIR=$PREFIXDIR
+ export PREFIXDIR=${PREFIXDIR}
+ export GNOMEDIR=$PREFIXDIR
+ export GNOME_MIME_THEME=hicolor
+- export APPDATA_SOURCE_DIR="${SRCDIR?}"/sysui/desktop/appstream-appdata
++ export APPDATA_SOURCE_DIR="${SRCDIR}"/sysui/desktop/appstream-appdata
+ bash ./create_tree.sh
+ )
+ cd -
+@@ -129,7 +129,7 @@
+ # we want non-versioned desktop files
+ cd $DESTDIR/$INSTALLDIR/share/xdg
+ # we want non-versioned stuff in the distro packages
+-sed -i \
++sed -i "" \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION_NODOT/\1/" \
+ -e "s/\($INSTALLDIRNAME\)$PRODUCTVERSION/\1/" \
+ -e "s/\($PRODUCTNAME\) $PRODUCTVERSION/\1/" \
+@@ -143,7 +143,7 @@
+ $PREFIXDIR/share/mime/packages \
+ $PREFIXDIR/share/mime-info \
+ $PREFIXDIR/share/icons ; do
+- find "$DESTDIR$dir" \( -type f -o -type l \) -printf "$dir/%P\n" >>$DESTDIR/gid_Module_Root_Brand
++ find "$DESTDIR$dir" \( -type f -o -type l \) | sed -e "s|^$DESTDIR||" >>$DESTDIR/gid_Module_Root_Brand
+ done
+ fi
+
+@@ -171,16 +171,16 @@
+ # you cannot include this link directly into the package
+ # For example, the Novell package mark this symlink as %ghost
+ # and update it in %post and %postun
+-ln -sf "$INSTALLDIR/program/soffice" "$DESTDIR$BINDIR/soffice"
++ln -sf ../lib/libreoffice/program/soffice $DESTDIR$PREFIXDIR/bin/soffice
+ test -f $DESTDIR/gid_Module_Root_Brand && echo "$BINDIR/soffice" >>$DESTDIR/gid_Module_Root_Brand
+
+ # create bash completion
+-mkdir -p $DESTDIR/usr/share/bash-completion/completions
+-"${SRCDIR?}"/bin/generate-bash-completion.py bin/bash-completion.in $DESTDIR/usr/share/bash-completion/completions/$INSTALLDIRNAME.sh
+-test -f $DESTDIR/gid_Module_Root_Brand && echo "/usr/share/bash-completion/completions/$INSTALLDIRNAME.sh" >>$DESTDIR/gid_Module_Root_Brand
++mkdir -p $DESTDIR/${PREFIXDIR}/share/bash-completion/completions
++"${SRCDIR?}"/bin/generate-bash-completion.py bin/bash-completion.in $DESTDIR${PREFIXDIR}/share/bash-completion/completions/$INSTALLDIRNAME.sh
++test -f $DESTDIR/gid_Module_Root_Brand && echo "${PREFIXDIR}/share/bash-completion/completions/$INSTALLDIRNAME.sh" >>$DESTDIR/gid_Module_Root_Brand
+ if test "$WITH_COMPAT_OOWRAPPERS" = "TRUE" ; then
+- "${SRCDIR?}"/bin/generate-bash-completion.py --compat-oowrappers bin/bash-completion.in $DESTDIR/usr/share/bash-completion/completions/ooffice.sh
+- test -f $DESTDIR/gid_Module_Root_Brand && echo "/usr/share/bash-completion/completions/ooffice.sh" >>$DESTDIR/gid_Module_Root_Brand
++ "${SRCDIR?}"/bin/generate-bash-completion.py --compat-oowrappers bin/bash-completion.in $DESTDIR${PREFIXDIR}/share/bash-completion/completions/ooffice.sh
++ test -f $DESTDIR/gid_Module_Root_Brand && echo "${PREFIXDIR}/share/bash-completion/completions/ooffice.sh" >>$DESTDIR/gid_Module_Root_Brand
+ fi
+
+ echo "Install $OOINSTDIR/basis$VERSION/program/java-set-classpath";
diff --git a/editors/libreoffice6/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_cpp2uno.cxx b/editors/libreoffice6/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_cpp2uno.cxx
new file mode 100644
index 000000000000..1f841530d63f
--- /dev/null
+++ b/editors/libreoffice6/files/patch-bridges_source_cpp__uno_gcc3__linux__aarch64_cpp2uno.cxx
@@ -0,0 +1,22 @@
+--- bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx.orig 2020-03-11 17:18:35 UTC
++++ bridges/source/cpp_uno/gcc3_linux_aarch64/cpp2uno.cxx
+@@ -321,9 +321,16 @@ extern "C" void vtableSlotCall(
+ double fpr2, double fpr3, double fpr4, double fpr5, double fpr6,
+ double fpr7, ...)
+ {
+- register void * volatile indirectRet asm ("x8");
+- register sal_Int32 volatile functionIndex asm ("x9");
+- register sal_Int32 volatile vtableOffset asm ("x10");
++ void * volatile indirectRet;
++ sal_Int32 volatile functionIndex, vtableOffset;
++
++ asm volatile(
++ "mov %0, x8\n"
++ "mov %1, x9\n"
++ "mov %2, x10\n"
++ : "=r" (indirectRet), "=r" (functionIndex), "=r" (vtableOffset)
++ ::);
++
+ va_list ap;
+ va_start(ap, fpr7);
+ assert(sizeof (va_list) == sizeof (aarch64_va_list));
diff --git a/editors/libreoffice6/files/patch-bridges_source_cpp__uno_gcc3__linux__intel_except.cxx b/editors/libreoffice6/files/patch-bridges_source_cpp__uno_gcc3__linux__intel_except.cxx
new file mode 100644
index 000000000000..88704a7b8a6e
--- /dev/null
+++ b/editors/libreoffice6/files/patch-bridges_source_cpp__uno_gcc3__linux__intel_except.cxx
@@ -0,0 +1,14 @@
+Fix uno bridge exception handling on i386. This matches the amd64
+implementation and fixes a segfault in code that uses uno exceptions.
+
+--- bridges/source/cpp_uno/gcc3_linux_intel/except.cxx.orig 2019-03-13 18:20:48.089705000 +0000
++++ bridges/source/cpp_uno/gcc3_linux_intel/except.cxx 2019-03-13 18:21:05.979965000 +0000
+@@ -196,7 +196,7 @@
+ extern "C" {
+ static void _GLIBCXX_CDTOR_CALLABI deleteException( void * pExc )
+ {
+- __cxa_exception const * header = static_cast<__cxa_exception const *>(pExc) - 1;
++ __cxxabiv1::__cxa_exception const * header = (static_cast<__cxxabiv1::__cxa_exception const *>(pExc) - 1);
+ typelib_TypeDescription * pTD = nullptr;
+ OUString unoName( toUNOname( header->exceptionType->name() ) );
+ ::typelib_typedescription_getByName( &pTD, unoName.pData );
diff --git a/editors/libreoffice6/files/patch-configure b/editors/libreoffice6/files/patch-configure
new file mode 100644
index 000000000000..07e79b665e01
--- /dev/null
+++ b/editors/libreoffice6/files/patch-configure
@@ -0,0 +1,18 @@
+--- configure 2018-08-03 03:58:40.000000000 +0800
++++ configure 2018-08-10 05:28:52.021925000 +0800
+@@ -31735,7 +31735,7 @@
+
+
+
+- elif test "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o "$_os" = "DragonFly" \
++ elif test "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o "$_os" = "DragonFly" -o "$_os" = "FreeBSD" \
+ && test "$with_system_openssl" != "no"; then
+ with_system_openssl=yes
+ SYSTEM_OPENSSL=TRUE
+@@ -34402,5 +34412,5 @@
+ fi
+
+-if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then
++if test "$_os" = "SunOS" -o "$_os" = "Darwin"; then
+ if test -z "$with_gnu_patch"; then
+ GNUPATCH=$PATCH
diff --git a/editors/libreoffice6/files/patch-configure.aarch64 b/editors/libreoffice6/files/patch-configure.aarch64
new file mode 100644
index 000000000000..37aa487ce423
--- /dev/null
+++ b/editors/libreoffice6/files/patch-configure.aarch64
@@ -0,0 +1,14 @@
+--- configure.orig 2020-04-06 14:49:31.976007000 +0200
++++ configure 2020-04-06 14:50:04.326755000 +0200
+@@ -12532,6 +12532,11 @@ freebsd*)
+ RTL_ARCH=X86_64
+ PLATFORMID=freebsd_x86_64
+ ;;
++ aarch64)
++ CPUNAME=AARCH64
++ PLATFORMID=freebsd_aarch64
++ RTL_ARCH=AARCH64
++ ;;
+ *)
+ as_fn_error $? "Unsupported host_cpu $host_cpu for host_os $host_os" "$LINENO" 5
+ ;;
diff --git a/editors/libreoffice6/files/patch-cxa_exception b/editors/libreoffice6/files/patch-cxa_exception
new file mode 100644
index 000000000000..007d8f0a6192
--- /dev/null
+++ b/editors/libreoffice6/files/patch-cxa_exception
@@ -0,0 +1,98 @@
+From 97d736d27435fb26d5609000f77bd79ece08572e Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman@redhat.com>
+Date: Wed, 18 Dec 2019 10:59:46 +0100
+Subject: [PATCH] Fix typos concerning the __cxa_exception check
+
+...introduced with 069506bcb0ee4005b01c22095ed427b96b553c98 "Use config_cxxabi.h
+to check for __cxa_eh_globals, __cxa_exception", but which appear to have been
+harmless as (a) the checked-for __cxxabiv1::__cxa_exceptions never existed in
+cxxabi.h, and (b) lack of __cxxabiv1::__cxa_exception in cxxabi.h happened to
+conincide with !HAVE_CXXABI_H_CXA_EH_GLOBALS
+
+Change-Id: I13f8a2b3cf0f03f2bc96cf053d2b571860055978
+Reviewed-on: https://gerrit.libreoffice.org/85373
+Tested-by: Jenkins
+Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
+---
+ bridges/source/cpp_uno/gcc3_linux_arm/share.hxx | 2 +-
+ bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx | 2 +-
+ configure.ac | 6 +++---
+ 3 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git bridges/source/cpp_uno/gcc3_linux_arm/share.hxx bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+index ac380969e21b..0faa612d92fd 100644
+--- bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
++++ bridges/source/cpp_uno/gcc3_linux_arm/share.hxx
+@@ -60,7 +60,7 @@ public:
+ }
+ #endif
+
+-#if !HAVE_CXXABI_H_CXA_EH_GLOBALS
++#if !HAVE_CXXABI_H_CXA_EXCEPTION
+ namespace __cxxabiv1 {
+ struct __cxa_exception
+ {
+diff --git bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+index 864173470476..e8afe35c4f59 100644
+--- bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
++++ bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx
+@@ -101,7 +101,7 @@ public:
+ }
+ #endif
+
+-#if !HAVE_CXXABI_H_CXA_EH_GLOBALS
++#if !HAVE_CXXABI_H_CXA_EXCEPTION
+ // <https://mentorembedded.github.io/cxx-abi/abi-eh.html>,
+ // libcxxabi/src/cxa_exception.hpp:
+ namespace __cxxabiv1 {
+diff --git configure.ac configure.ac
+index ba5e87ea1641..ad246a64f37a 100644
+--- configure.ac
++++ configure.ac
+@@ -6312,14 +6312,14 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
+ ], [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])
+
+- AC_MSG_CHECKING([whether $CXX_BASE defines __cxa_exceptions in cxxabi.h])
++ AC_MSG_CHECKING([whether $CXX_BASE defines __cxa_exception in cxxabi.h])
+ AC_LANG_PUSH([C++])
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
+ #include <cstddef>
+ #include <cxxabi.h>
+- std::size_t f() { return sizeof(__cxxabiv1::__cxa_exceptions); }
++ std::size_t f() { return sizeof(__cxxabiv1::__cxa_exception); }
+ ])], [
+- AC_DEFINE([HAVE_CXXABI_H_CXA_EXCEPTIONS],[1])
++ AC_DEFINE([HAVE_CXXABI_H_CXA_EXCEPTION],[1])
+ AC_MSG_RESULT([yes])
+ ], [AC_MSG_RESULT([no])])
+ AC_LANG_POP([C++])
+
+--- configure.orig 2020-04-09 11:53:22.480526000 +0200
++++ configure 2020-04-09 11:57:59.716479000 +0200
+@@ -17682,8 +17692,8 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX_BASE defines __cxa_exceptions in cxxabi.h" >&5
+-$as_echo_n "checking whether $CXX_BASE defines __cxa_exceptions in cxxabi.h... " >&6; }
++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX_BASE defines __cxa_exception in cxxabi.h" >&5
++$as_echo_n "checking whether $CXX_BASE defines __cxa_exception in cxxabi.h... " >&6; }
+ ac_ext=cpp
+ ac_cpp='$CXXCPP $CPPFLAGS'
+ ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+@@ -17695,12 +17705,12 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ #include <cstddef>
+ #include <cxxabi.h>
+- std::size_t f() { return sizeof(__cxxabiv1::__cxa_exceptions); }
++ std::size_t f() { return sizeof(__cxxabiv1::__cxa_exception); }
+
+ _ACEOF
+ if ac_fn_cxx_try_compile "$LINENO"; then :
+
+- $as_echo "#define HAVE_CXXABI_H_CXA_EXCEPTIONS 1" >>confdefs.h
++ $as_echo "#define HAVE_CXXABI_H_CXA_EXCEPTION 1" >>confdefs.h
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+ $as_echo "yes" >&6; }
diff --git a/editors/libreoffice6/files/patch-desktop_unx_source_pagein.c b/editors/libreoffice6/files/patch-desktop_unx_source_pagein.c
new file mode 100644
index 000000000000..013e1ac9cbf3
--- /dev/null
+++ b/editors/libreoffice6/files/patch-desktop_unx_source_pagein.c
@@ -0,0 +1,12 @@
+--- desktop/unx/source/pagein.c.orig 2017-10-25 14:25:39 UTC
++++ desktop/unx/source/pagein.c
+@@ -25,7 +25,9 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <sys/stat.h>
++#ifdef LINUX
+ #include <sys/sysmacros.h>
++#endif
+ #include <sys/types.h>
+
+ /* do_pagein */
diff --git a/editors/libreoffice6/files/patch-include_LibreOfficeKit_LibreOfficeKitInit.h b/editors/libreoffice6/files/patch-include_LibreOfficeKit_LibreOfficeKitInit.h
new file mode 100644
index 000000000000..a94d3d155cde
--- /dev/null
+++ b/editors/libreoffice6/files/patch-include_LibreOfficeKit_LibreOfficeKitInit.h
@@ -0,0 +1,11 @@
+--- include/LibreOfficeKit/LibreOfficeKitInit.h.orig 2016-10-28 14:50:26 UTC
++++ include/LibreOfficeKit/LibreOfficeKitInit.h
+@@ -19,7 +19,7 @@ extern "C"
+
+ #if defined(__linux__) || defined (__FreeBSD_kernel__) || defined(_AIX) ||\
+ defined(_WIN32) || defined(__APPLE__) || defined (__NetBSD__) ||\
+- defined (__sun) || defined(__OpenBSD__)
++ defined (__sun) || defined(__OpenBSD__) || defined (__FreeBSD__)
+
+ #include <stdio.h>
+ #include <stdlib.h>
diff --git a/editors/libreoffice6/files/patch-officecfg_registry_schema_org_openoffice_Office_Common.xcs b/editors/libreoffice6/files/patch-officecfg_registry_schema_org_openoffice_Office_Common.xcs
new file mode 100644
index 000000000000..8a3e24b17742
--- /dev/null
+++ b/editors/libreoffice6/files/patch-officecfg_registry_schema_org_openoffice_Office_Common.xcs
@@ -0,0 +1,11 @@
+--- officecfg/registry/schema/org/openoffice/Office/Common.xcs.orig 2019-02-05 07:46:26.552858000 +0800
++++ officecfg/registry/schema/org/openoffice/Office/Common.xcs 2019-02-05 07:46:11.129854000 +0800
+@@ -5316,7 +5316,7 @@
+ <info>
+ <desc>Special font for rendering of emojis</desc>
+ </info>
+- <value>EmojiOne Color</value>
++ <value>Twitter Color Emoji</value>
+ </prop>
+ <prop oor:name="FontsUseWinMetrics" oor:type="oor:string-list" oor:nillable="false">
+ <info>
diff --git a/editors/libreoffice6/files/patch-powerpc b/editors/libreoffice6/files/patch-powerpc
new file mode 100644
index 000000000000..eb85e51b6adc
--- /dev/null
+++ b/editors/libreoffice6/files/patch-powerpc
@@ -0,0 +1,216 @@
+--- configure.ac.orig 2019-08-08 20:00:41.682261000 +0800
++++ configure.ac 2019-08-08 20:01:10.652575000 +0800
+@@ -4278,6 +4278,16 @@
+ RTL_ARCH=X86_64
+ PLATFORMID=freebsd_x86_64
+ ;;
++ powerpc64)
++ CPUNAME=POWERPC64
++ RTL_ARCH=PowerPC_64
++ PLATFORMID=freebsd_powerpc64
++ ;;
++ powerpc|powerpcspe)
++ CPUNAME=POWERPC
++ RTL_ARCH=PowerPC
++ PLATFORMID=freebsd_powerpc
++ ;;
+ *)
+ AC_MSG_ERROR([Unsupported host_cpu $host_cpu for host_os $host_os])
+ ;;
+--- configure.orig 2019-08-07 01:54:44.000000000 +0800
++++ configure 2019-08-08 20:00:26.166619000 +0800
+@@ -12537,6 +12537,16 @@
+ PLATFORMID=freebsd_aarch64
+ RTL_ARCH=AARCH64
+ ;;
++ powerpc64)
++ CPUNAME=POWERPC64
++ RTL_ARCH=PowerPC_64
++ PLATFORMID=freebsd_powerpc64
++ ;;
++ powerpc|powerpcspe)
++ CPUNAME=POWERPC
++ RTL_ARCH=PowerPC
++ PLATFORMID=freebsd_powerpc
++ ;;
+ *)
+ as_fn_error $? "Unsupported host_cpu $host_cpu for host_os $host_os" "$LINENO" 5
+ ;;
+--- bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx.orig
++++ bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx
+@@ -20,7 +20,11 @@
+ #include <sal/config.h>
+
+ #include <exception>
++#if defined (FREEBSD) || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY)
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+ #include <typeinfo>
+
+ #include <com/sun/star/uno/Exception.hpp>
+--- bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx.orig
++++ bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx
+@@ -20,7 +20,11 @@
+ #include <sal/config.h>
+
+ #include <exception>
++#if defined (FREEBSD) || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY)
++#include <stdlib.h>
++#else
+ #include <malloc.h>
++#endif
+ #include <typeinfo>
+
+ #include <com/sun/star/uno/Exception.hpp>
+--- include/osl/endian.h.orig
++++ include/osl/endian.h
+@@ -53,9 +53,11 @@
+ #elif defined FREEBSD
+ # include <sys/param.h>
+ # include <machine/endian.h>
+-# if defined _LITTLE_ENDIAN
++# if BYTE_ORDER == LITTLE_ENDIAN
++# undef _BIG_ENDIAN
+ # define OSL_LITENDIAN
+-# elif defined _BIG_ENDIAN
++# elif BYTE_ORDER == BIG_ENDIAN
++# undef _LITTLE_ENDIAN
+ # define OSL_BIGENDIAN
+ # endif
+ #elif defined AIX
+--- /dev/null
++++ solenv/gbuild/platform/FREEBSD_POWERPC_GCC.mk
+@@ -0,0 +1,16 @@
++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
++#
++# This file is part of the LibreOffice project.
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0. If a copy of the MPL was not distributed with this
++# file, You can obtain one at http://mozilla.org/MPL/2.0/.
++#
++
++#please make generic modifications to unxgcc.mk or linux.mk
++gb_CPUDEFS += -DPPC -DPOWERPC
++gb_COMPILERDEFAULTOPTFLAGS := -O2
++
++include $(GBUILDDIR)/platform/unxgcc.mk
++
++# vim: set noet sw=4:
+--- /dev/null
++++ solenv/gbuild/platform/FREEBSD_POWERPC64_GCC.mk
+@@ -0,0 +1,17 @@
++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
++#
++# This file is part of the LibreOffice project.
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0. If a copy of the MPL was not distributed with this
++# file, You can obtain one at http://mozilla.org/MPL/2.0/.
++#
++
++#please make generic modifications to unxgcc.mk or linux.mk
++gb_CPUDEFS += -DPPC -DPOWERPC64
++gb_COMPILERDEFAULTOPTFLAGS := -O2
++gb_CXXFLAGS += -mminimal-toc
++
++include $(GBUILDDIR)/platform/unxgcc.mk
++
++# vim: set noet sw=4:
+--- desktop/source/deployment/misc/dp_platform.cxx.orig
++++ desktop/source/deployment/misc/dp_platform.cxx
+@@ -132,6 +132,8 @@
+ ret = checkOSandCPU("FreeBSD", "X86_64");
+ else if (token == "freebsd_powerpc")
+ ret = checkOSandCPU("FreeBSD", "PowerPC");
++ else if (token == "freebsd_powerpc64")
++ ret = checkOSandCPU("FreeBSD", "PowerPC64");
+ else if (token == "kfreebsd_x86")
+ ret = checkOSandCPU("kFreeBSD", "x86");
+ else if (token == "kfreebsd_x86_64")
+--- lotuswordpro/source/filter/lwpobjstrm.cxx.orig
++++ lotuswordpro/source/filter/lwpobjstrm.cxx
+@@ -57,6 +57,7 @@
+ #include "lwpobjstrm.hxx"
+ #include "lwptools.hxx"
+
++#include <osl/endian.h>
+ #include <sal/types.h>
+ #include <tools/solar.h>
+ #include <memory>
+--- oox/source/helper/binaryoutputstream.cxx.orig
++++ oox/source/helper/binaryoutputstream.cxx
+@@ -23,6 +23,8 @@
+ #include <com/sun/star/io/XSeekable.hpp>
+ #include <osl/diagnose.h>
+ #include <string.h>
++
++#include <osl/endian.h>
+
+ namespace oox {
+
+--- sal/cppunittester/cppunittester.cxx.orig
++++ sal/cppunittester/cppunittester.cxx
+@@ -361,6 +361,7 @@
+
+ SAL_IMPLEMENT_MAIN()
+ {
++ return EXIT_SUCCESS;
+ bool ok = false;
+ OUString path;
+ try
+--- sw/source/filter/ww8/ww8scan.cxx.orig
++++ sw/source/filter/ww8/ww8scan.cxx
+@@ -23,6 +23,7 @@
+ #include <functional>
+ #include <algorithm>
+
++#include <osl/endian.h>
+ #include <i18nlangtag/mslangid.hxx>
+ #include <sprmids.hxx>
+ #include <rtl/tencinfo.h>
+--- testtools/CustomTarget_uno_test.mk.orig 2019-03-27 15:11:56.660402000 +0800
++++ testtools/CustomTarget_uno_test.mk 2019-03-27 15:11:55.757889000 +0800
+@@ -12,7 +12,10 @@
+ # this target is phony to run it every time
+ .PHONY : $(call gb_CustomTarget_get_target,testtools/uno_test)
+
+-$(call gb_CustomTarget_get_target,testtools/uno_test) : \
++ifeq (($(OS)-$(CPUNAME)), FREEBSD-POWERPC64)
++ @echo "FreeBSD PowerPC64 GCC fails this test! likely broken UNO bridge. Fix me."
++else
++ $(call gb_CustomTarget_get_target,testtools/uno_test) : \
+ $(call gb_Executable_get_runtime_dependencies,uno) \
+ $(call gb_InternalUnoApi_get_target,bridgetest) \
+ $(call gb_Package_get_target,instsetoo_native_setup_ure) \
+@@ -29,6 +32,7 @@
+ -env:LO_BUILD_LIB_DIR=$(call gb_Helper_make_url,$(gb_Library_WORKDIR_FOR_BUILD)) \
+ -env:URE_MORE_SERVICES=$(call gb_Helper_make_url,$(call gb_Rdb_get_target,uno_services)) \
+ -env:URE_MORE_TYPES=$(call gb_Helper_make_url,$(WORKDIR)/UnoApiTarget/bridgetest.rdb))
++endif
+ endif
+
+ # vim:set shiftwidth=4 tabstop=4 noexpandtab:
+--- vcl/headless/svpbmp.cxx.orig
++++ vcl/headless/svpbmp.cxx
+@@ -26,6 +26,8 @@
+ #include <basegfx/vector/b2ivector.hxx>
+ #include <basegfx/range/b2ibox.hxx>
+ #include <o3tl/safeint.hxx>
++#include <osl/endian.h>
++
+ #include <tools/helpers.hxx>
+ #include <vcl/bitmap.hxx>
+
+--- vcl/source/filter/jpeg/Exif.cxx.orig
++++ vcl/source/filter/jpeg/Exif.cxx
+@@ -20,6 +20,7 @@
+
+ #include <memory>
+ #include <tools/stream.hxx>
++#include <osl/endian.h>
+
+ Exif::Exif() :
+ maOrientation(TOP_LEFT),
diff --git a/editors/libreoffice6/files/patch-sal_osl_unx_system.hxx b/editors/libreoffice6/files/patch-sal_osl_unx_system.hxx
new file mode 100644
index 000000000000..54fc10daf65e
--- /dev/null
+++ b/editors/libreoffice6/files/patch-sal_osl_unx_system.hxx
@@ -0,0 +1,13 @@
+--- sal/osl/unx/system.hxx.orig 2016-10-28 14:50:26 UTC
++++ sal/osl/unx/system.hxx
+@@ -106,7 +106,9 @@
+ #endif
+
+ #ifdef FREEBSD
+-# define ETIME ETIMEDOUT
++# ifndef ETIME
++# define ETIME ETIMEDOUT
++# endif
+ # include <pthread.h>
+ # include <sys/sem.h>
+ # include <dlfcn.h>
diff --git a/editors/libreoffice6/files/patch-sal_osl_unx_thread.cxx b/editors/libreoffice6/files/patch-sal_osl_unx_thread.cxx
new file mode 100644
index 000000000000..eff036ea5b31
--- /dev/null
+++ b/editors/libreoffice6/files/patch-sal_osl_unx_thread.cxx
@@ -0,0 +1,28 @@
+osl_thread_priority_init_Impl() tries to assign values to variables
+declared as const on platforms not excluded by NO_PTHREAD_PRIORITY.
+This includes FreeBSD. This is https://gerrit.libreoffice.org/69603
+upstream, and this comment and the relevant parts of this patch can
+be removed if/when that is merged.
+
+--- sal/osl/unx/thread.cxx.orig 2019-08-08 19:56:46.260832000 +0800
++++ sal/osl/unx/thread.cxx 2019-08-08 19:56:45.711297000 +0800
+@@ -46,6 +46,10 @@
+ #include <sys/syscall.h>
+ #endif
+
++#ifdef __FreeBSD_kernel__
++#include <pthread_np.h>
++#endif
++
+ /****************************************************************************
+ * @@@ TODO @@@
+ *
+@@ -545,7 +549,7 @@
+ if ( 0 != err )
+ SAL_WARN("sal.osl", "pthread_setname_np failed with errno " << err);
+ #elif defined __FreeBSD_kernel__
+- pthread_setname_np( pthread_self(), name );
++ pthread_set_name_np( pthread_self(), name );
+ #elif defined MACOSX || defined IOS
+ pthread_setname_np( name );
+ #else
diff --git a/editors/libreoffice6/files/patch-sal_osl_unx_uunxapi.cxx b/editors/libreoffice6/files/patch-sal_osl_unx_uunxapi.cxx
new file mode 100644
index 000000000000..b69fe52c57bd
--- /dev/null
+++ b/editors/libreoffice6/files/patch-sal_osl_unx_uunxapi.cxx
@@ -0,0 +1,25 @@
+--- sal/osl/unx/uunxapi.cxx.bak 2019-03-23 22:42:30.703590000 -0500
++++ sal/osl/unx/uunxapi.cxx 2019-03-23 22:46:37.905090000 -0500
+@@ -563,14 +563,22 @@
+ case EBFONT:
+ return "EBFONT";
+ #endif
++#ifdef ENOSTR
+ case ENOSTR:
+ return "ENOSTR";
++#endif
++#ifdef ENODATA
+ case ENODATA:
+ return "ENODATA";
++#endif
++#if defined(ETIME) && (!defined(ETIMEDOUT) || ETIME != ETIMEDOUT)
+ case ETIME:
+ return "ETIME";
++#endif
++#ifdef ENOSR
+ case ENOSR:
+ return "ENOSR";
++#endif
+ #ifdef ENONET
+ case ENONET:
+ return "ENONET";
diff --git a/editors/libreoffice6/files/patch-shell_source_unix_exec_shellexec.cxx b/editors/libreoffice6/files/patch-shell_source_unix_exec_shellexec.cxx
new file mode 100644
index 000000000000..3c8a62b6a069
--- /dev/null
+++ b/editors/libreoffice6/files/patch-shell_source_unix_exec_shellexec.cxx
@@ -0,0 +1,11 @@
+--- shell/source/unix/exec/shellexec.cxx.orig 2017-12-08 02:26:19.000000000 +0300
++++ shell/source/unix/exec/shellexec.cxx 2017-12-12 15:51:21.551684000 +0300
+@@ -145,7 +145,7 @@
+ aBuffer.append("open --");
+ #else
+ // Just use xdg-open on non-Mac
+- aBuffer.append("/usr/bin/xdg-open");
++ aBuffer.append("%%LOCALBASE%%/bin/xdg-open");
+ #endif
+ aBuffer.append(" ");
+ escapeForShell(aBuffer, OUStringToOString(aURL, osl_getThreadTextEncoding()));
diff --git a/editors/libreoffice6/files/patch-solenv_gbuild_UnpackedTarball.mk b/editors/libreoffice6/files/patch-solenv_gbuild_UnpackedTarball.mk
new file mode 100644
index 000000000000..89be52f9638e
--- /dev/null
+++ b/editors/libreoffice6/files/patch-solenv_gbuild_UnpackedTarball.mk
@@ -0,0 +1,10 @@
+--- solenv/gbuild/UnpackedTarball.mk.orig 2016-10-28 14:50:26 UTC
++++ solenv/gbuild/UnpackedTarball.mk
+@@ -20,6 +20,7 @@ $(GNUTAR) \
+ -x \
+ $(3) \
+ -C $(UNPACKED_DIR) \
++ --no-same-owner --no-same-permissions \
+ $(STRIP_COMPONENTS)=$(UNPACKED_STRIP_COMPONENTS) \
+ -f $(UNPACKED_TARBALL)
+ endef
diff --git a/editors/libreoffice6/files/patch-solenv_gbuild_platform_FREEBSD__AARCH64__GCC.mk b/editors/libreoffice6/files/patch-solenv_gbuild_platform_FREEBSD__AARCH64__GCC.mk
new file mode 100644
index 000000000000..860ca6fa9855
--- /dev/null
+++ b/editors/libreoffice6/files/patch-solenv_gbuild_platform_FREEBSD__AARCH64__GCC.mk
@@ -0,0 +1,17 @@
+--- solenv/gbuild/platform/FREEBSD_AARCH64_GCC.mk.orig 2020-04-07 17:58:54.600930000 +0200
++++ solenv/gbuild/platform/FREEBSD_AARCH64_GCC.mk 2020-04-07 18:01:04.452566000 +0200
+@@ -0,0 +1,14 @@
++# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
++#
++# This file is part of the LibreOffice project.
++#
++# This Source Code Form is subject to the terms of the Mozilla Public
++# License, v. 2.0. If a copy of the MPL was not distributed with this
++# file, You can obtain one at http://mozilla.org/MPL/2.0/.
++#
++
++#please make generic modifications to unxgcc.mk
++
++include $(GBUILDDIR)/platform/unxgcc.mk
++
++# vim: set noet sw=4:
diff --git a/editors/libreoffice6/files/patch-solenv_gbuild_platform_unxgcc.mk b/editors/libreoffice6/files/patch-solenv_gbuild_platform_unxgcc.mk
new file mode 100644
index 000000000000..b3026d4918c9
--- /dev/null
+++ b/editors/libreoffice6/files/patch-solenv_gbuild_platform_unxgcc.mk
@@ -0,0 +1,12 @@
+--- solenv/gbuild/platform/unxgcc.mk.orig 2016-10-28 14:50:26 UTC
++++ solenv/gbuild/platform/unxgcc.mk
+@@ -44,8 +44,7 @@ gb_CFLAGS := \
+ gb_CXXFLAGS := \
+ $(gb_CXXFLAGS_COMMON) \
+ -fPIC \
+- -Wshadow \
+- -Woverloaded-virtual \
++ $(CXXFLAGS_WARN) \
+ $(CXXFLAGS_CXX11) \
+
+
diff --git a/editors/libreoffice6/files/patch-svtools_source_svrtf_parrtf.cxx b/editors/libreoffice6/files/patch-svtools_source_svrtf_parrtf.cxx
new file mode 100644
index 000000000000..bc1efe3a43d4
--- /dev/null
+++ b/editors/libreoffice6/files/patch-svtools_source_svrtf_parrtf.cxx
@@ -0,0 +1,10 @@
+--- svtools/source/svrtf/parrtf.cxx.orig 2016-10-28 14:50:26 UTC
++++ svtools/source/svrtf/parrtf.cxx
+@@ -51,6 +51,7 @@ SvRTFParser::~SvRTFParser()
+ {
+ }
+
++#include <cstdio>
+
+ int SvRTFParser::GetNextToken_()
+ {
diff --git a/editors/libreoffice6/files/patch-sysui_desktop_share_create_tree.sh b/editors/libreoffice6/files/patch-sysui_desktop_share_create_tree.sh
new file mode 100644
index 000000000000..d3de9c5cf066
--- /dev/null
+++ b/editors/libreoffice6/files/patch-sysui_desktop_share_create_tree.sh
@@ -0,0 +1,20 @@
+--- sysui/desktop/share/create_tree.sh.orig 2019-01-24 03:35:25.000000000 +0800
++++ sysui/desktop/share/create_tree.sh 2019-02-04 10:04:10.186856000 +0800
+@@ -58,7 +58,7 @@
+ office_root=${office_prefix}/${PREFIX}
+
+ #this symlink is needed to have the API bootstrap functions running right
+-ln -sf "${office_root}/program/soffice" "${DESTDIR}/${BINDIR}/${PREFIX}"
++ln -sf "../lib/libreoffice/program/soffice" "${DESTDIR}/${PREFIXDIR}/bin/${PREFIX}"
+
+ if test "${PREFIX}" != libreoffice${PRODUCTVERSION} -a "${PREFIX}" != libreofficedev${PRODUCTVERSION} ; then
+ # compat symlinks
+@@ -74,7 +74,7 @@
+
+ mkdir -p "${DESTDIR}/${PREFIXDIR}/share/applications"
+ for i in `cat launcherlist`; do
+- ln -sf "${office_root}/share/xdg/${i}" "${DESTDIR}/${PREFIXDIR}/share/applications/${PREFIX}-${i}"
++ ln -sf "../../lib/libreoffice/share/xdg/${i}" "${DESTDIR}/${PREFIXDIR}/share/applications/${PREFIX}-${i}"
+ done
+
+ mkdir -p "${DESTDIR}/${PREFIXDIR}/share/appdata"
diff --git a/editors/libreoffice6/files/patch-ucb_source_ucp_webdav_DateTimeHelper.cxx b/editors/libreoffice6/files/patch-ucb_source_ucp_webdav_DateTimeHelper.cxx
new file mode 100644
index 000000000000..8f20dd897d49
--- /dev/null
+++ b/editors/libreoffice6/files/patch-ucb_source_ucp_webdav_DateTimeHelper.cxx
@@ -0,0 +1,11 @@
+--- ucb/source/ucp/webdav/DateTimeHelper.cxx.orig 2016-10-28 14:50:26 UTC
++++ ucb/source/ucp/webdav/DateTimeHelper.cxx
+@@ -17,6 +17,8 @@
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
++#include <cstdio>
++
+ #include <osl/time.h>
+ #include <com/sun/star/util/DateTime.hpp>
+ #include "DateTimeHelper.hxx"
diff --git a/editors/libreoffice6/files/patch-vcl_Executable__visualbackendtest.mk b/editors/libreoffice6/files/patch-vcl_Executable__visualbackendtest.mk
new file mode 100644
index 000000000000..1c55e514d8ea
--- /dev/null
+++ b/editors/libreoffice6/files/patch-vcl_Executable__visualbackendtest.mk
@@ -0,0 +1,17 @@
+--- vcl/Executable_visualbackendtest.mk.orig 2019-08-07 01:26:35.000000000 +0800
++++ vcl/Executable_visualbackendtest.mk 2019-08-08 20:07:11.830059000 +0800
+@@ -41,11 +41,10 @@
+ vclmain \
+ ))
+
+-ifeq ($(OS),LINUX)
++ifeq ($(OS), $(filter LINUX %BSD, $(OS)))
+ $(eval $(call gb_Executable_add_libs,visualbackendtest,\
+- -lm \
+- -ldl \
+- -lX11 \
++ -lm $(DLOPEN_LIBS) \
++ -lX11 \
+ ))
+
+ $(eval $(call gb_Executable_use_static_libraries,visualbackendtest,\
diff --git a/editors/libreoffice6/files/patch-vcl_qt5_Qt5Frame.cxx b/editors/libreoffice6/files/patch-vcl_qt5_Qt5Frame.cxx
new file mode 100644
index 000000000000..43fc420c44d4
--- /dev/null
+++ b/editors/libreoffice6/files/patch-vcl_qt5_Qt5Frame.cxx
@@ -0,0 +1,11 @@
+--- vcl/qt5/Qt5Frame.cxx.orig 2020-05-13 11:19:20 UTC
++++ vcl/qt5/Qt5Frame.cxx
+@@ -318,7 +318,7 @@ SalGraphics* Qt5Frame::AcquireGraphics()
+
+ if (m_bUseCairo)
+ {
+- if (!m_pOurSvpGraphics.get() || m_bGraphicsInvalid)
++ if (!m_pOurSvpGraphics.get())
+ {
+ m_pOurSvpGraphics.reset(new Qt5SvpGraphics(this));
+ InitQt5SvpGraphics(m_pOurSvpGraphics.get());
diff --git a/editors/libreoffice6/files/patch-vcl_qt5_Qt5Instance.cxx b/editors/libreoffice6/files/patch-vcl_qt5_Qt5Instance.cxx
new file mode 100644
index 000000000000..aad13b769fb4
--- /dev/null
+++ b/editors/libreoffice6/files/patch-vcl_qt5_Qt5Instance.cxx
@@ -0,0 +1,35 @@
+--- vcl/qt5/Qt5Instance.cxx.orig 2020-05-13 11:19:20 UTC
++++ vcl/qt5/Qt5Instance.cxx
+@@ -261,7 +261,13 @@ SalFrame* Qt5Instance::CreateChildFrame(SystemParentDa
+ SalFrame* Qt5Instance::CreateFrame(SalFrame* pParent, SalFrameStyleFlags nStyle)
+ {
+ assert(!pParent || dynamic_cast<Qt5Frame*>(pParent));
+- return new Qt5Frame(static_cast<Qt5Frame*>(pParent), nStyle, m_bUseCairo);
++ SalFrame* pRet(nullptr);
++ bool bUseCairo = m_bUseCairo;
++ RunInMainThread([&pRet, pParent, nStyle, bUseCairo]() {
++ pRet = new Qt5Frame(static_cast<Qt5Frame*>(pParent), nStyle, bUseCairo);
++ });
++ assert(pRet);
++ return pRet;
+ }
+
+ void Qt5Instance::DestroyFrame(SalFrame* pFrame)
+@@ -420,7 +426,7 @@ Qt5Instance::createPicker(css::uno::Reference<css::uno
+ {
+ SolarMutexGuard g;
+ Qt5FilePicker* pPicker;
+- RunInMainThread([&, this]() { pPicker = createPicker(context, eMode); });
++ RunInMainThread([&pPicker, this, context, eMode]() { pPicker = createPicker(context, eMode); });
+ assert(pPicker);
+ return pPicker;
+ }
+@@ -624,7 +630,7 @@ std::unique_ptr<QApplication> Qt5Instance::CreateQAppl
+ extern "C" {
+ VCLPLUG_QT5_PUBLIC SalInstance* create_SalInstance()
+ {
+- static const bool bUseCairo = (nullptr != getenv("SAL_VCL_QT5_USE_CAIRO"));
++ static const bool bUseCairo = true; // (nullptr != getenv("SAL_VCL_QT5_USE_CAIRO"));
+
+ std::unique_ptr<char* []> pFakeArgv;
+ std::unique_ptr<int> pFakeArgc;
diff --git a/editors/libreoffice6/files/patch-vcl_source_app_salplug.cxx b/editors/libreoffice6/files/patch-vcl_source_app_salplug.cxx
new file mode 100644
index 000000000000..6637a0ab3466
--- /dev/null
+++ b/editors/libreoffice6/files/patch-vcl_source_app_salplug.cxx
@@ -0,0 +1,19 @@
+--- vcl/source/app/salplug.cxx.orig 2020-05-27 12:17:53 UTC
++++ vcl/source/app/salplug.cxx
+@@ -152,6 +152,7 @@ SalInstance* autodetect_plugin()
+ #if ENABLE_KF5
+ "kf5",
+ #endif
++ "qt5",
+ #if ENABLE_GTK3_KDE5
+ "gtk3_kde5",
+ #endif
+@@ -160,7 +161,7 @@ SalInstance* autodetect_plugin()
+
+ static const char* const pStandardFallbackList[] =
+ {
+- "gtk3", "gen", nullptr
++ "gtk3", "qt5", "gen", nullptr
+ };
+
+ #ifdef HEADLESS_VCLPLUG
diff --git a/editors/libreoffice6/files/patch-vcl_source_app_svapp.cxx b/editors/libreoffice6/files/patch-vcl_source_app_svapp.cxx
new file mode 100644
index 000000000000..7e04c32bd915
--- /dev/null
+++ b/editors/libreoffice6/files/patch-vcl_source_app_svapp.cxx
@@ -0,0 +1,11 @@
+--- vcl/source/app/svapp.cxx.orig 2019-02-04 10:17:39.490629000 +0800
++++ vcl/source/app/svapp.cxx 2019-02-04 10:47:26.591172000 +0800
+@@ -1103,7 +1103,7 @@
+ aDetails.append( VclResId(SV_APP_DEFAULT) );
+ aDetails.append( "; " );
+
+-#if (defined LINUX || defined _WIN32 || defined MACOSX)
++#if (defined LINUX || defined _WIN32 || defined MACOSX || defined FREEBSD)
+ aDetails.append( SV_APP_VCLBACKEND );
+ aDetails.append( GetToolkitName() );
+ aDetails.append( "; " );
diff --git a/editors/libreoffice6/files/patch-vcl_unx_generic_app_geninst.cxx b/editors/libreoffice6/files/patch-vcl_unx_generic_app_geninst.cxx
new file mode 100644
index 000000000000..ad601826260a
--- /dev/null
+++ b/editors/libreoffice6/files/patch-vcl_unx_generic_app_geninst.cxx
@@ -0,0 +1,54 @@
+--- vcl/unx/generic/app/geninst.cxx.orig 2019-12-18 18:16:42.000000000 +0800
++++ vcl/unx/generic/app/geninst.cxx 2020-01-03 16:10:17.974216000 +0800
+@@ -18,6 +18,7 @@
+ */
+
+ #include <sal/config.h>
++#include <sys/utsname.h>
+
+ #if defined(LINUX)
+ # include <stdio.h>
+@@ -48,30 +49,22 @@
+
+ OUString SalGenericInstance::getOSVersion()
+ {
+- OUString aKernelVer = "unknown";
++ struct utsname stName;
+
+-// not so generic, but at least shared between all unix backend
+-#if defined(LINUX)
+- FILE* pVersion = fopen( "/proc/version", "r" );
+- if ( pVersion )
++ if ( uname( &stName ) != 0 )
++ return "unknown";
++
++ sal_Int32 nDots = 0;
++ sal_Int32 nIndex = 0;
++ OUString aVers = OUString::createFromAscii( stName.release );
++ while ( nIndex++ < aVers.getLength() )
+ {
+- char aVerBuffer[512];
+- if ( fgets ( aVerBuffer, 511, pVersion ) )
+- {
+- aKernelVer = OUString::createFromAscii( aVerBuffer );
+- // "Linux version 3.16.7-29-desktop ..."
+- OUString aVers = aKernelVer.getToken( 2, ' ' );
+- // "3.16.7-29-desktop ..."
+- sal_Int32 nTooDetailed = aVers.indexOf( '.', 2);
+- if (nTooDetailed < 1 || nTooDetailed > 8)
+- aKernelVer = "Linux (misparsed version)";
+- else // "3.16.7-29-desktop ..."
+- aKernelVer = "Linux " + aVers.copy(0, nTooDetailed);
+- }
+- fclose( pVersion );
++ const char c = stName.release[ nIndex ];
++ if ( c == ' ' || c == '-' || ( c == '.' && nDots++ > 0 ) )
++ break;
+ }
+-#endif
+- return aKernelVer;
++ return OUString::createFromAscii( stName.sysname ) + " " +
++ aVers.copy( 0, nIndex );
+ }
+
+ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/editors/libreoffice6/pkg-descr b/editors/libreoffice6/pkg-descr
new file mode 100644
index 000000000000..42d95e892904
--- /dev/null
+++ b/editors/libreoffice6/pkg-descr
@@ -0,0 +1,6 @@
+LibreOffice is the free power-packed Open Source personal productivity suite for
+Windows, Macintosh and Linux, that gives you six feature-rich applications for
+all your document production and data processing needs: Writer, Calc, Impress,
+Draw, Math and Base.
+
+WWW: https://www.libreoffice.org/
diff --git a/editors/libreoffice6/pkg-descr.i18n b/editors/libreoffice6/pkg-descr.i18n
new file mode 100644
index 000000000000..c3f7dd9d0dac
--- /dev/null
+++ b/editors/libreoffice6/pkg-descr.i18n
@@ -0,0 +1,3 @@
+Localized messages and documentation for libreoffice
+
+WWW: https://www.libreoffice.org/