#Packager: George Vlahavas # # You'll need gcc 9 # http://slackware.osuosl.org/unsupported/gcc-9.2.0-for-Slackware-14.2/ # and a newer gperf (3.1 works) for this to build on Salix 14.2 pkgname=libreoffice pkgver=7.0.1.2 pkgrel=1gv_salix14.2 _mainver=`echo $pkgver | sed "s/\(.*\)\.\(.*\)\.\(.*\)\.\(.*\)/\1.\2.\3/"` source=("https://download.documentfoundation.org/libreoffice/src/${_mainver}/libreoffice-${pkgver}.tar.xz" "libreoffice.sh" "libreoffice.csh") 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() { cd $startdir/src/$pkgname-$pkgver ./configure --prefix=/usr \ --libdir=/usr/lib${LIBDIRSUFFIX} \ --localstatedir=/var \ --sysconfdir=/etc \ --enable-ext-ct2n \ --enable-ext-numbertext \ --enable-ext-languagetool \ --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 \ --without-helppack-integration \ --without-java \ --without-junit \ --without-fonts \ --with-lang="ALL" \ --with-vendor="Salix" \ --enable-release-build="yes" \ --build=$arch-slackware-linux make build-nocheck make distro-pack-install DESTDIR=$startdir/pkg # these are the expected .desktop names for 14.2. Otherwise it messes up with # app priorities ( cd $startdir/pkg/usr/share/applications mv libreoffice-base.desktop base.desktop mv libreoffice-calc.desktop calc.desktop mv libreoffice-draw.desktop draw.desktop mv libreoffice-impress.desktop impress.desktop mv libreoffice-math.desktop math.desktop mv libreoffice-startcenter.desktop startcenter.desktop mv libreoffice-writer.desktop writer.desktop mv libreoffice-xsltfilter.desktop xsltfilter.desktop ) # remove the locale files, we're having separate locale packages anyway # these had to be built, otherwise localized help wouldn't work # en-US locale should always be there find $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/readmes \ -type f \ -not -name "README_en-US" \ -delete find $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/autotext \ -type d \ -not -name "en-US" \ -exec rm -rf {} \; find $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/program/resource \ -maxdepth 1\ -type d \ -not -name "common" \ -exec rm -rf {} \; find $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/share/registry \ -type f \ -name "Langpack-*.xcd" \ -not -name "Langpack-en-US.xcd" \ -delete find $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/share/registry/res \ -type f \ -not -name "fcfg_langpack_en-US.xcd" \ -delete # use these to override the default UI toolkit, as gtk3 has problems in Salix 14.2 mkdir -p $startdir/pkg/etc/profile.d cp $startdir/src/libreoffice.{sh,csh} $startdir/pkg/etc/profile.d/ chmod 755 $startdir/pkg/etc/profile.d/libreoffice.{sh,csh} # these are needed for running in Salix 14.2 cp -a /usr/lib${LIBDIRSUFFIX}/libgcc_s.so.* \ $startdir/pkg/usr/lib$LIBDIRSUFFIX/libreoffice/program/ LIBSTDCXX=$(readlink -f /usr/lib${LIBDIRSUFFIX}/libstdc++.so.6) cp -a $LIBSTDCXX $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/program/ ln -s `basename $LIBSTDCXX` \ $startdir/pkg/usr/lib${LIBDIRSUFFIX}/libreoffice/program/libstdc++.so.6 }