Files
haikuports/app-office/libreoffice/libreoffice-6.2.4.2.recipe
Gerasim Troeglazov f83542cabf LibreOffice: bump version
* add ru,de,es,fr,it,pl,ja locale packages
2019-05-22 20:39:13 +10:00

380 lines
12 KiB
Bash
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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-2019 LibreOffice contributors"
LICENSE="MPL v2.0"
REVISION="1"
SOURCE_URI="https://github.com/LibreOffice/core/archive/libreoffice-$portVersion.tar.gz"
SOURCE_DIR="core-libreoffice-$portVersion"
CHECKSUM_SHA256="0c67e692fd2f87d73c6de5ffd44028c7e89d22e8cdcc93204bd0b9629e65085a"
SOURCE_URI_2="https://github.com/LibreOffice/translations/archive/libreoffice-$portVersion.tar.gz"
CHECKSUM_SHA256_2="a1dd07cc8acf0ccf295b425c9a1799488d25cb00abc33ecc609f97c02ee9e89a"
SOURCE_DIR_2="translations-libreoffice-$portVersion"
SOURCE_FILENAME_2="translations-libreoffice-$portVersion.tar.gz"
PATCHES="libreoffice-$portVersion.patchset"
ADDITIONAL_FILES="
libreoffice.iom
libreoffice.rdef.in
create_buildid.sh
"
POST_INSTALL_SCRIPTS="$relativePostInstallDir/create_buildid.sh"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
if [ "$targetArchitecture" = x86_gcc2 ]; then
SECONDARY_ARCHITECTURES="x86"
fi
boostMinimumVersion=1.65.1
libreofficeLanguages="ru de es fr it pl ja"
PROVIDES="
libreoffice$secondaryArchSuffix = $portVersion
app:LibreOffice$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libabw_0.1$secondaryArchSuffix
lib:libboost_date_time$secondaryArchSuffix >= $boostMinimumVersion
lib:libboost_filesystem$secondaryArchSuffix >= $boostMinimumVersion
lib:libboost_iostreams$secondaryArchSuffix >= $boostMinimumVersion
lib:libboost_locale$secondaryArchSuffix >= $boostMinimumVersion
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.6$secondaryArchSuffix
lib:libhyphen$secondaryArchSuffix
lib:libicui18n$secondaryArchSuffix
lib:libicuuc$secondaryArchSuffix
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.14$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: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: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
"
#PROVIDES_galleries="
# libreoffice${secondaryArchSuffix}_galleries = $portVersion
# "
#REQUIRES_galleries="
# libreoffice$secondaryArchSuffix == $portVersion base
#"
#
for lang in $libreofficeLanguages; do
eval "PROVIDES_$lang=\"\
libreoffice${secondaryArchSuffix}_${lang} = $portVersion\
\"; \
REQUIRES_$lang=\"\
libreoffice$secondaryArchSuffix == $portVersion base\
\""
done
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
glm${secondaryArchSuffix}_devel
unixodbc${secondaryArchSuffix}_devel
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: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:libfreehand_0.1$secondaryArchSuffix
# devel:libgcrypt$secondaryArchSuffix
devel:libgraphite2$secondaryArchSuffix
devel:libharfbuzz_icu$secondaryArchSuffix
devel:libhunspell_1.6$secondaryArchSuffix
devel:libhyphen$secondaryArchSuffix
devel:libicuuc$secondaryArchSuffix
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.14$secondaryArchSuffix
devel:libpagemaker_0.0$secondaryArchSuffix
devel:libpoppler$secondaryArchSuffix
devel:libqxp_0.0$secondaryArchSuffix
devel:libraptor2$secondaryArchSuffix
devel:librdf$secondaryArchSuffix
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:libxmlsec1_nss$secondaryArchSuffix
devel:libxslt$secondaryArchSuffix
devel:libz$secondaryArchSuffix
devel:libzmf_0.0$secondaryArchSuffix
devel:mdds
"
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:python2.7
cmd:python3.6
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()
{
# TODO: enable commented out stuff when there is a "stable" release
# currently there are too many things in flux to waste space
# rename $sourceDir to something shorter, otherwise build fails with
# execv: Argument too big /sources/core/sw/Library_sw.mk:20
cd .. ; mv core-libreoffice-$portVersion core
ln -s core core-libreoffice-$portVersion; cd core
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-kde5 \
--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 \
\
--with-galleries=no \
--with-fonts=no \
--with-vendor="HaikuPorts" \
--with-system-libs \
--with-tls="openssl" \
--with-boost-libdir=`finddir B_SYSTEM_DIRECTORY`/$relativeDevelopLibDir \
--with-system-ucpp \
\
--without-doxygen \
--without-helppack-integration \
--without-java \
--without-system-jars \
--with-lang="$libreofficeLanguages"
make $jobArgs build-nocheck
}
INSTALL()
{
appDir=$appsDir/LibreOffice
mkdir -p $appDir
cp -r ../core/instdir/* $appDir
mv $appDir/program/soffice.bin $appDir/program/LibreOffice
# make sure we do not copy default profile
rm -rf $appDir/user
rm -rf $appDir/share/xdg
# packageEntries galleries \
# $appDir/share/gallery $appDir/presets/gallery
allLanguages=`ls $appDir/program/resource`
declare -a files
declare -a filesToPackage
for lang in $libreofficeLanguages; do
unset files
unset filesToPackage
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/readme/README_$lang")
needToPackage=0
for item in $allLanguages; do
if [ "$item" = "$lang" ]; then
needToPackage=1
break
fi
done
for f in ${files[@]}; do
if [ -f $f ] || [ -d $f ]; then
filesToPackage=("${filesToPackage[@]}" "$f")
fi
done
if [ "$needToPackage" = "1" ]; then
packageEntries $lang ${filesToPackage[@]}
else
rm -rf ${filesToPackage[@]}
fi
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 > \
$sourceDir/../core/libreoffice.rdef
addResourcesToBinaries $sourceDir/../core/libreoffice.rdef \
$appDir/program/LibreOffice
addAppDeskbarSymlink $appDir/program/LibreOffice
}