394 lines
13 KiB
Bash
394 lines
13 KiB
Bash
SUMMARY="A full office productivity suite"
|
||
DESCRIPTION="LibreOffice is a powerful office suite – its clean interface and \
|
||
feature-rich tools help you unleash your creativity and enhance your \
|
||
productivity.
|
||
It's compatible with a wide range of document formats such as MS Word (.doc, \
|
||
.docx), Excel (.xls, .xlsx), PowerPoint (.ppt, .pptx) and Publisher.
|
||
|
||
LibreOffice includes several applications that make it the most powerful Free \
|
||
and Open Source office suite on the market:
|
||
|
||
- Writer (word processing)
|
||
- Calc (spreadsheets)
|
||
- Impress (presentations)
|
||
- Draw (vector graphics and flowcharts)
|
||
- Base (databases)
|
||
- Math (formula editing)"
|
||
HOMEPAGE="https://www.libreoffice.org/"
|
||
COPYRIGHT="2000-2021 LibreOffice contributors"
|
||
LICENSE="MPL v2.0"
|
||
REVISION="2"
|
||
|
||
SOURCE_URI="https://github.com/LibreOffice/core/archive/libreoffice-$portVersion.tar.gz"
|
||
SOURCE_DIR="core-libreoffice-$portVersion"
|
||
CHECKSUM_SHA256="e5deb8fd899e9018a4e21af04a2f34ed1e7a11e13563ef920a52e504d9de0f1b"
|
||
|
||
SOURCE_URI_2="https://github.com/LibreOffice/translations/archive/libreoffice-$portVersion.tar.gz"
|
||
CHECKSUM_SHA256_2="8792199a3cbab8a9bde90a9ed6026db2631b4b0b6908e29529f356164d072a88"
|
||
SOURCE_DIR_2="translations-libreoffice-$portVersion"
|
||
SOURCE_FILENAME_2="translations-libreoffice-$portVersion.tar.gz"
|
||
|
||
SOURCE_URI_3="https://dev-www.libreoffice.org/src/dtoa-20180411.tgz#noarchive"
|
||
CHECKSUM_SHA256_3="0082d0684f7db6f62361b76c4b7faba19e0c7ce5cb8e36c4b65fea8281e711b4"
|
||
|
||
srcGitRevision4="cd5a5ee2cc0e3b3a62a5827d22035752ec7813a3"
|
||
SOURCE_URI_4="https://github.com/threedeyes/LibreOfficeLauncher/archive/$srcGitRevision4.tar.gz"
|
||
CHECKSUM_SHA256_4="5314962ca770369398599e175dc2c35c685d3fc968c9894390490c737036e528"
|
||
SOURCE_DIR_4="LibreOfficeLauncher-$srcGitRevision4"
|
||
SOURCE_FILENAME_4="LibreOfficeLauncher-$srcGitRevision4.tar.gz"
|
||
|
||
PATCHES="libreoffice-$portVersion.patchset"
|
||
ADDITIONAL_FILES="
|
||
libreoffice.iom
|
||
libreoffice.rdef.in
|
||
create_buildid.sh
|
||
"
|
||
|
||
POST_INSTALL_SCRIPTS="$relativePostInstallDir/create_buildid.sh"
|
||
ARCHITECTURES="all !x86_gcc2"
|
||
SECONDARY_ARCHITECTURES="!x86"
|
||
|
||
boostMinimumVersion=1.69.0
|
||
libreofficeLanguages="af ar be bg bn br brx bs ca ca-valencia cs cy da de dsb el en-GB en-ZA eo es et eu fa fi fr fy ga gd gl he hi hr hu id is it ja ka kk kmr-Latn ko lb lt lv mk mn nb ne nl nn pl pt pt-BR ro ru sa-IN sd sk sl sq sr sr-Latn sv szl tg th tr tt ug uk uz vi zh-CN zh-TW"
|
||
|
||
PROVIDES="
|
||
libreoffice$secondaryArchSuffix = $portVersion
|
||
app:LibreOffice$secondaryArchSuffix = $portVersion
|
||
"
|
||
REQUIRES="
|
||
haiku$secondaryArchSuffix
|
||
lib:libabw_0.1$secondaryArchSuffix
|
||
lib:libboost_date_time$secondaryArchSuffix
|
||
lib:libboost_filesystem$secondaryArchSuffix
|
||
lib:libboost_iostreams$secondaryArchSuffix
|
||
lib:libboost_locale$secondaryArchSuffix
|
||
lib:libBox2D$secondaryArchSuffix
|
||
lib:libcairo$secondaryArchSuffix
|
||
lib:libcdr_0.1$secondaryArchSuffix
|
||
lib:libclucene_core$secondaryArchSuffix
|
||
lib:libcmis_0.5$secondaryArchSuffix
|
||
lib:libcrypto$secondaryArchSuffix
|
||
lib:libcurl$secondaryArchSuffix
|
||
lib:libe_book_0.1$secondaryArchSuffix
|
||
lib:libepoxy$secondaryArchSuffix
|
||
lib:libepubgen_0.1$secondaryArchSuffix
|
||
lib:libetonyek_0.1$secondaryArchSuffix
|
||
lib:libexpat$secondaryArchSuffix
|
||
lib:libexslt$secondaryArchSuffix
|
||
lib:libexttextcat_2.0$secondaryArchSuffix
|
||
lib:libfontconfig$secondaryArchSuffix
|
||
lib:libfreehand_0.1$secondaryArchSuffix
|
||
lib:libfreetype$secondaryArchSuffix
|
||
lib:libglib_2.0$secondaryArchSuffix
|
||
lib:libgraphite2$secondaryArchSuffix
|
||
lib:libharfbuzz_icu$secondaryArchSuffix
|
||
lib:libharfbuzz$secondaryArchSuffix
|
||
lib:libhunspell_1.7$secondaryArchSuffix
|
||
lib:libhyphen$secondaryArchSuffix
|
||
lib:libicui18n$secondaryArchSuffix >= 66
|
||
lib:libicuuc$secondaryArchSuffix >= 66
|
||
lib:libintl$secondaryArchSuffix
|
||
lib:libjpeg$secondaryArchSuffix
|
||
lib:libKF5ConfigCore$secondaryArchSuffix
|
||
lib:libKF5CoreAddons$secondaryArchSuffix
|
||
lib:libKF5I18n$secondaryArchSuffix
|
||
lib:libKF5KIOCore$secondaryArchSuffix
|
||
lib:libKF5KIOFileWidgets$secondaryArchSuffix
|
||
lib:libKF5KIOWidgets$secondaryArchSuffix
|
||
lib:libKF5WindowSystem$secondaryArchSuffix
|
||
lib:liblangtag$secondaryArchSuffix
|
||
lib:liblber_2.4$secondaryArchSuffix
|
||
lib:liblcms2$secondaryArchSuffix
|
||
lib:libldap_2.4$secondaryArchSuffix
|
||
lib:liblpsolve55$secondaryArchSuffix
|
||
lib:libmspub_0.1$secondaryArchSuffix
|
||
lib:libmwaw_0.3$secondaryArchSuffix
|
||
lib:libmythes_1.2$secondaryArchSuffix
|
||
lib:libmysqlclient$secondaryArchSuffix
|
||
lib:libneon$secondaryArchSuffix
|
||
lib:libnspr4$secondaryArchSuffix
|
||
lib:libnss3$secondaryArchSuffix
|
||
lib:libnssutil3$secondaryArchSuffix
|
||
lib:libnumbertext_1.0$secondaryArchSuffix
|
||
lib:libodfgen_0.1$secondaryArchSuffix
|
||
lib:liborcus_0.16$secondaryArchSuffix
|
||
lib:libpagemaker_0.0$secondaryArchSuffix
|
||
lib:libplc4$secondaryArchSuffix
|
||
lib:libplds4$secondaryArchSuffix
|
||
lib:libpng16$secondaryArchSuffix
|
||
lib:libpoppler$secondaryArchSuffix
|
||
lib:libQt5Core$secondaryArchSuffix
|
||
lib:libQt5Gui$secondaryArchSuffix
|
||
lib:libQt5Network$secondaryArchSuffix
|
||
lib:libQt5Widgets$secondaryArchSuffix
|
||
lib:libqxp_0.0$secondaryArchSuffix
|
||
lib:libraptor2$secondaryArchSuffix
|
||
lib:librdf$secondaryArchSuffix
|
||
lib:libreadline$secondaryArchSuffix >= 7
|
||
lib:librevenge_0.0$secondaryArchSuffix
|
||
lib:librevenge_stream_0.0$secondaryArchSuffix
|
||
lib:libsmime3$secondaryArchSuffix
|
||
lib:libssl$secondaryArchSuffix
|
||
lib:libssl3$secondaryArchSuffix
|
||
lib:libstaroffice_0.0$secondaryArchSuffix
|
||
lib:libuuid$secondaryArchSuffix
|
||
lib:libvisio_0.1$secondaryArchSuffix
|
||
lib:libwpd_0.10$secondaryArchSuffix
|
||
lib:libwpg_0.3$secondaryArchSuffix
|
||
lib:libwps_0.4$secondaryArchSuffix
|
||
lib:libxmlsec1_nss$secondaryArchSuffix
|
||
lib:libxml2$secondaryArchSuffix
|
||
lib:libxslt$secondaryArchSuffix
|
||
lib:libz$secondaryArchSuffix
|
||
lib:libzmf_0.0$secondaryArchSuffix
|
||
"
|
||
|
||
ARCHITECTURES_galleries="any"
|
||
PROVIDES_galleries="
|
||
libreoffice${secondaryArchSuffix}_galleries = $portVersion
|
||
"
|
||
REQUIRES_galleries="
|
||
libreoffice$secondaryArchSuffix == $portVersion base
|
||
"
|
||
|
||
for lang in $libreofficeLanguages; do
|
||
typeset -l langcode
|
||
langcode=${lang/-/_}
|
||
eval "PROVIDES_${langcode}=\"\
|
||
libreoffice${secondaryArchSuffix}_${langcode} = $portVersion\
|
||
\"; \
|
||
REQUIRES_${langcode}=\"\
|
||
libreoffice$secondaryArchSuffix == $portVersion base\
|
||
\"; \
|
||
DESCRIPTION_${langcode}=\"Translations for the Libreoffice suite ($lang)\"; \
|
||
ARCHITECTURES_${langcode}=\"any\""
|
||
done
|
||
|
||
BUILD_REQUIRES="
|
||
haiku${secondaryArchSuffix}_devel
|
||
unixodbc${secondaryArchSuffix}_devel
|
||
devel:glm
|
||
devel:libabw_0.1$secondaryArchSuffix
|
||
devel:libboost_date_time$secondaryArchSuffix >= $boostMinimumVersion
|
||
devel:libboost_filesystem$secondaryArchSuffix >= $boostMinimumVersion
|
||
devel:libboost_iostreams$secondaryArchSuffix >= $boostMinimumVersion
|
||
devel:libboost_locale$secondaryArchSuffix >= $boostMinimumVersion
|
||
devel:libBox2D$secondaryArchSuffix
|
||
devel:libcairo$secondaryArchSuffix
|
||
devel:libcdr_0.1$secondaryArchSuffix
|
||
devel:libclucene_contribs_lib$secondaryArchSuffix
|
||
devel:libclucene_core$secondaryArchSuffix
|
||
devel:libcmis_0.5$secondaryArchSuffix
|
||
devel:libcppunit$secondaryArchSuffix
|
||
devel:libcurl$secondaryArchSuffix
|
||
devel:libe_book_0.1$secondaryArchSuffix
|
||
devel:libepoxy$secondaryArchSuffix
|
||
devel:libepubgen_0.1$secondaryArchSuffix
|
||
devel:libetonyek_0.1$secondaryArchSuffix
|
||
devel:libexpat$secondaryArchSuffix
|
||
devel:libexttextcat_2.0$secondaryArchSuffix
|
||
devel:libfontconfig$secondaryArchSuffix
|
||
devel:libfreehand_0.1$secondaryArchSuffix
|
||
# devel:libgcrypt$secondaryArchSuffix
|
||
devel:libgraphite2$secondaryArchSuffix
|
||
devel:libharfbuzz_icu$secondaryArchSuffix
|
||
devel:libhunspell_1.7$secondaryArchSuffix
|
||
devel:libhyphen$secondaryArchSuffix
|
||
devel:libicuuc$secondaryArchSuffix >= 66
|
||
devel:libjpeg$secondaryArchSuffix
|
||
devel:libKF5ConfigCore$secondaryArchSuffix
|
||
devel:libKF5CoreAddons$secondaryArchSuffix
|
||
devel:libKF5I18n$secondaryArchSuffix
|
||
devel:libKF5KIOCore$secondaryArchSuffix
|
||
devel:libKF5KIOFileWidgets$secondaryArchSuffix
|
||
devel:libKF5KIOWidgets$secondaryArchSuffix
|
||
devel:libKF5WindowSystem$secondaryArchSuffix
|
||
devel:liblangtag$secondaryArchSuffix
|
||
devel:liblcms2$secondaryArchSuffix
|
||
devel:libldap$secondaryArchSuffix
|
||
devel:liblpsolve55$secondaryArchSuffix
|
||
devel:libmspub_0.1$secondaryArchSuffix
|
||
devel:libmwaw_0.3$secondaryArchSuffix
|
||
devel:libmysqlclient$secondaryArchSuffix
|
||
devel:libmythes_1.2$secondaryArchSuffix
|
||
devel:libneon$secondaryArchSuffix
|
||
devel:libnss3$secondaryArchSuffix
|
||
devel:libnumbertext_1.0$secondaryArchSuffix
|
||
devel:libodfgen_0.1$secondaryArchSuffix
|
||
devel:liborcus_0.16$secondaryArchSuffix
|
||
devel:libpagemaker_0.0$secondaryArchSuffix
|
||
devel:libpoppler$secondaryArchSuffix
|
||
devel:libqrcodegen$secondaryArchSuffix
|
||
devel:libqxp_0.0$secondaryArchSuffix
|
||
devel:libraptor2$secondaryArchSuffix
|
||
devel:librdf$secondaryArchSuffix
|
||
devel:libreadline$secondaryArchSuffix >= 7
|
||
devel:librevenge_0.0$secondaryArchSuffix
|
||
devel:libsane$secondaryArchSuffix
|
||
devel:libssl$secondaryArchSuffix
|
||
devel:libstaroffice_0.0$secondaryArchSuffix
|
||
devel:libvisio_0.1$secondaryArchSuffix
|
||
devel:libwpd_0.10$secondaryArchSuffix
|
||
devel:libwpg_0.3$secondaryArchSuffix
|
||
devel:libwps_0.4$secondaryArchSuffix
|
||
devel:libuuid$secondaryArchSuffix
|
||
devel:libxmlsec1_nss$secondaryArchSuffix
|
||
devel:libxslt$secondaryArchSuffix
|
||
devel:libz$secondaryArchSuffix
|
||
devel:libzmf_0.0$secondaryArchSuffix
|
||
devel:mdds >= 1.5
|
||
"
|
||
BUILD_PREREQUIRES="
|
||
cmd:aclocal
|
||
cmd:autoconf
|
||
cmd:bison
|
||
cmd:find
|
||
cmd:flex
|
||
cmd:fontforge
|
||
cmd:gcc$secondaryArchSuffix
|
||
cmd:genbrk
|
||
cmd:genccode
|
||
cmd:gencmn
|
||
cmd:git
|
||
cmd:gperf
|
||
cmd:grep
|
||
cmd:kf5_config$secondaryArchSuffix
|
||
cmd:ld$secondaryArchSuffix
|
||
cmd:libtool$secondaryArchSuffix
|
||
cmd:make
|
||
cmd:patch
|
||
cmd:perl
|
||
cmd:pkg_config$secondaryArchSuffix
|
||
cmd:python3.7
|
||
cmd:ucpp
|
||
cmd:which
|
||
cmd:xz
|
||
cmd:zip
|
||
"
|
||
|
||
PATCH()
|
||
{
|
||
# disable tooltips as they crash libreoffice currently
|
||
cd officecfg/registry/schema/org/openoffice/Office
|
||
sed -i '/Activates the Tip/{n;n;n;s/true/false/}' Common.xcs
|
||
}
|
||
|
||
BUILD()
|
||
{
|
||
mkdir -p external/tarballs
|
||
cp $sourceDir3/dtoa-20180411.tgz external/tarballs
|
||
|
||
rm -rf translations
|
||
ln -s $sourceDir2 translations
|
||
|
||
pkgconfig_libdir="`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir/pkgconfig"
|
||
pkgconfig_datadir="`finddir B_SYSTEM_DIRECTORY`/$relativeDataDir/pkgconfig"
|
||
export PKG_CONFIG_LIBDIR="$pkgconfig_libdir:$pkgconfig_datadir"
|
||
|
||
./autogen.sh \
|
||
--with-distro=LibreOfficeHaiku \
|
||
--enable-kf5 \
|
||
--enable-qt5 \
|
||
--enable-release-build \
|
||
--enable-readonly-installset \
|
||
--enable-python=no \
|
||
--enable-build-opensymbol \
|
||
--enable-sal-log \
|
||
\
|
||
--disable-ccache \
|
||
--disable-firebird-sdbc \
|
||
--disable-postgresql-sdbc \
|
||
--disable-fetch-external \
|
||
--disable-dependency-tracking \
|
||
--disable-zxing \
|
||
\
|
||
--with-fonts=no \
|
||
--with-vendor="HaikuPorts" \
|
||
--with-system-libs \
|
||
--with-tls="openssl" \
|
||
--with-boost-libdir=`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir \
|
||
--with-system-ucpp \
|
||
--with-system-cairo \
|
||
\
|
||
--without-doxygen \
|
||
--without-helppack-integration \
|
||
--without-java \
|
||
--without-system-jars \
|
||
--with-lang="$libreofficeLanguages"
|
||
|
||
make $jobArgs build-nocheck
|
||
|
||
pushd $sourceDir4/src
|
||
make
|
||
popd
|
||
}
|
||
|
||
INSTALL()
|
||
{
|
||
appDir=$appsDir/LibreOffice
|
||
mkdir -p $appDir
|
||
cp -r instdir/* $appDir
|
||
mv $appDir/program/soffice.bin $appDir/program/LibreOffice
|
||
mv $sourceDir4/src/LibreOffice\ {Calc,Database,Draw,Impress,Math,Writer} $appDir
|
||
|
||
# make sure we do not copy default profile
|
||
rm -rf $appDir/user $appDir/share/xdg
|
||
|
||
mkdir -p "$dataDir/deskbar/menu/Applications/LibreOffice"
|
||
|
||
packageEntries galleries \
|
||
$appDir/share/gallery $appDir/presets/gallery
|
||
|
||
declare -a files
|
||
declare -a filesToPackage
|
||
typeset -l langcode
|
||
|
||
for lang in $libreofficeLanguages; do
|
||
unset files
|
||
unset filesToPackage
|
||
langcode=${lang/-/_}
|
||
|
||
files=("${files[@]}" "$appDir/program/resource/${lang/-/_}")
|
||
files=("${files[@]}" "$appDir/share/autotext/$lang")
|
||
files=("${files[@]}" "$appDir/share/autocorr/$lang")
|
||
files=("${files[@]}" "$appDir/share/registry/res/registry_$lang.xcd")
|
||
files=("${files[@]}" "$appDir/share/registry/res/fcfg_langpack_$lang.xcd")
|
||
files=("${files[@]}" "$appDir/share/registry/Langpack_$lang.xcd")
|
||
files=("${files[@]}" "$appDir/readmes/README_$lang")
|
||
|
||
for f in ${files[@]}; do
|
||
if [ -f $f ] || [ -d $f ]; then
|
||
filesToPackage=("${filesToPackage[@]}" "$f")
|
||
fi
|
||
done
|
||
|
||
packageEntries ${langcode} ${filesToPackage[@]}
|
||
done
|
||
|
||
mkdir -p $postInstallDir
|
||
cp $portDir/additional-files/create_buildid.sh $postInstallDir
|
||
|
||
local APP_SIGNATURE="application/x-vnd.LibreOffice"
|
||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||
local LONG_INFO="$SUMMARY"
|
||
sed \
|
||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||
-e "s|@MAJOR@|$MAJOR|" \
|
||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||
-e "s|@MINOR@|$MINOR|" \
|
||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||
$portDir/additional-files/libreoffice.rdef.in > libreoffice.rdef
|
||
|
||
addResourcesToBinaries libreoffice.rdef $appDir/program/LibreOffice
|
||
|
||
addAppDeskbarSymlink $appDir/program/LibreOffice "LibreOffice/LibreOffice"
|
||
addAppDeskbarSymlink "$appDir/LibreOffice Calc" "LibreOffice/LibreOffice Calc"
|
||
addAppDeskbarSymlink "$appDir/LibreOffice Database" "LibreOffice/LibreOffice Database"
|
||
addAppDeskbarSymlink "$appDir/LibreOffice Draw" "LibreOffice/LibreOffice Draw"
|
||
addAppDeskbarSymlink "$appDir/LibreOffice Impress" "LibreOffice/LibreOffice Impress"
|
||
addAppDeskbarSymlink "$appDir/LibreOffice Math" "LibreOffice/LibreOffice Math"
|
||
addAppDeskbarSymlink "$appDir/LibreOffice Writer" "LibreOffice/LibreOffice Writer"
|
||
}
|