#Packager: Dimitris Tzemos pkgname=libreoffice pkgver=25.8.4 _pkgver=25.8.4.2 pkgrel=1dj _mainver=`echo $pkgver | sed "s/\(.*\)\.\(.*\)\.\(.*\)\.\(.*\)/\1.\2.\3/"` source=("https://download.documentfoundation.org/libreoffice/src/${_mainver}/libreoffice-${_pkgver}.tar.xz" "http://download.documentfoundation.org/libreoffice/src/${_mainver}/libreoffice-dictionaries-${_pkgver}.tar.xz" "http://download.documentfoundation.org/libreoffice/src/${_mainver}/libreoffice-help-${_pkgver}.tar.xz" ) docs=("readme" "install" "copying" "changelog" "authors" "news" "todo") url=https://www.libreoffice.org/ doinst() { if [ -x /usr/bin/update-mime-database ]; then /usr/bin/update-mime-database usr/share/mime >/dev/null 2>&1 fi if [ -x /usr/bin/update-desktop-database ]; then /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1 fi if [ -d usr/share/icons/hicolor ]; then if [ -x /usr/bin/gtk-update-icon-cache ]; then /usr/bin/gtk-update-icon-cache -f -t usr/share/icons/hicolor 1> /dev/null 2> /dev/null fi fi } slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "libreoffice (free office suite)" "LibreOffice is an Open Source,community-developed,office" "productivity suite. It includes key desktop applications,such as a" "word processor,spreadsheet,presentation manager,formula editor and" "drawing program,with a user interface and feature set similar to" "other office suites. LibreOffice also works transparently with a" "variety of file formats,including Microsoft Office File Formats." "" "libreoffice home: http://www.documentfoundation.org/" ) build() { if [ "${USE_CLANG:-YES}" == "YES" ] ; then # Use Clang: export CC=/usr/bin/clang export CXX=/usr/bin/clang++ else # Use GCC: export CC=/usr/bin/gcc export CXX=/usr/bin/g++ fi # If graphite2 is installed we can use the system harfbuzz: HARFBUZZOPTS=" --without-system-boost \ --without-system-icu \ --without-system-graphite \ --without-system-harfbuzz " if /usr/bin/pkg-config --exists graphite2 ; then if /usr/bin/pkg-config --atleast-version=5.1.0 harfbuzz-icu ; then HARFBUZZOPTS=" --with-system-boost \ --with-system-icu \ --with-system-graphite \ --with-system-harfbuzz " fi fi cd $startdir/src/$pkgname-${_pkgver} unset UNO_PATH unset URE_BOOTSTRAP source /etc/profile.d/openjdk.sh # don't check for root when building sed -i "s/bootstrap: check-if-root compilerplugins/bootstrap: compilerplugins/" Makefile.in # GCC10 requirements: sed -i external/libcdr/ExternalProject_libcdr.mk \ -e '/configure /i \\t\t&& sed -i "s/TRUE/true/g" src/lib/libcdr_utils.cpp \\' sed -i external/libebook/ExternalProject_libebook.mk \ -e '/configure /i \\t\t&& sed -i "s/TRUE/true/g" src/lib/EBOOKCharsetConverter.cpp \\' sed -i i18npool/source/calendar/calendar_gregorian.cxx -e 's/TRUE/true/' ./autogen.sh \ --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --sysconfdir=/etc \ --with-system-liblangtag \ --with-system-libnumbertext \ --with-system-icu \ --with-system-graphite \ --with-system-harfbuzz \ --enable-ext-wiki-publisher \ --enable-ext-nlpsolver \ --enable-gio \ --enable-python=system \ --enable-gstreamer-1-0 \ --disable-odk \ --enable-gtk3 \ --disable-qt5 \ --with-help=html \ --with-jdk-home=$JAVA_HOME \ --with-ant-home=/usr/share/ant \ --enable-scripting-javascript \ --without-junit \ --without-fonts \ --with-lang="en-US" \ --with-vendor="Slackel" \ --enable-release-build="yes" \ ${HARFBUZZOPTS} \ --build=$arch-slackware-linux make build || exit 1 make DESTDIR=$startdir/pkg distro-pack-install # Make all i18n lang packages with help section ('1') available to # fix "F1" not opening translated offline help opening in browser # see also /usr/lib${LIBDIRSUFFFIX}/libreoffice/help/en-US/langnames.js mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/help echo "var languagesSet = new Set(['en-US', 'ar', 'bg', 'bn', 'bo', 'bs', 'ca', 'cs', 'da', 'de', 'el', 'en-GB', 'eo', 'es', 'et', 'eu', 'fi', 'fr', 'gl', 'he', 'hi', 'hr', 'hu', 'id', 'is', 'it', 'ja', 'ko', 'lt', 'lv', 'nb', 'nl', 'nn', 'pl', 'pt', 'pt-BR', 'ro', 'ru', 'si', 'sk', 'sl', 'sv', 'ta', 'tr', 'uk', 'vi', 'zh-CN', 'zh-TW']);" \ > $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/help/languages.js # add the english dictionaries and thesaurus mkdir -p $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/share/extensions/dict-en cp -r dictionaries/en/* $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/share/extensions/dict-en/ # math out of the education category sed -i "/^Categories=/s/Education;//" $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/share/xdg/math.desktop }