LibreOffice: fix arch language packages

* add hu, pt, pt-BR locales
* enable galleries package
This commit is contained in:
Gerasim Troeglazov
2019-05-24 23:35:42 +10:00
parent af658ecf19
commit 942f0850be

View File

@@ -17,7 +17,7 @@ and Open Source office suite on the market:
HOMEPAGE="https://www.libreoffice.org/"
COPYRIGHT="2000-2019 LibreOffice contributors"
LICENSE="MPL v2.0"
REVISION="1"
REVISION="2"
SOURCE_URI="https://github.com/LibreOffice/core/archive/libreoffice-$portVersion.tar.gz"
SOURCE_DIR="core-libreoffice-$portVersion"
@@ -42,7 +42,7 @@ SECONDARY_ARCHITECTURES="x86"
fi
boostMinimumVersion=1.65.1
libreofficeLanguages="ru de es fr it pl ja"
libreofficeLanguages="de es fr hu it ja pl pt pt-BR ru"
PROVIDES="
libreoffice$secondaryArchSuffix = $portVersion
@@ -133,21 +133,24 @@ REQUIRES="
lib:libzmf_0.0$secondaryArchSuffix
"
#PROVIDES_galleries="
# libreoffice${secondaryArchSuffix}_galleries = $portVersion
# "
#REQUIRES_galleries="
# libreoffice$secondaryArchSuffix == $portVersion base
#"
#
PROVIDES_galleries="
libreoffice${secondaryArchSuffix}_galleries = $portVersion
"
REQUIRES_galleries="
libreoffice$secondaryArchSuffix == $portVersion base
"
for lang in $libreofficeLanguages; do
eval "PROVIDES_$lang=\"\
libreoffice${secondaryArchSuffix}_${lang} = $portVersion\
typeset -l langcode
langcode=${lang/-/_}
eval "PROVIDES_${langcode}=\"\
libreoffice${secondaryArchSuffix}_${langcode} = $portVersion\
\"; \
REQUIRES_$lang=\"\
REQUIRES_${langcode}=\"\
libreoffice$secondaryArchSuffix == $portVersion base\
\""
\"; \
DESCRIPTION_${langcode}=\"Translations for the Libreoffice suite ($lang)\"; \
ARCHITECTURES_${langcode}=\"any\""
done
BUILD_REQUIRES="
@@ -288,7 +291,6 @@ BUILD()
--disable-fetch-external \
--disable-dependency-tracking \
\
--with-galleries=no \
--with-fonts=no \
--with-vendor="HaikuPorts" \
--with-system-libs \
@@ -316,32 +318,25 @@ INSTALL()
rm -rf $appDir/user
rm -rf $appDir/share/xdg
# packageEntries galleries \
# $appDir/share/gallery $appDir/presets/gallery
allLanguages=`ls $appDir/program/resource`
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/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
files=("${files[@]}" "$appDir/readmes/README_$lang")
for f in ${files[@]}; do
if [ -f $f ] || [ -d $f ]; then
@@ -349,11 +344,7 @@ INSTALL()
fi
done
if [ "$needToPackage" = "1" ]; then
packageEntries $lang ${filesToPackage[@]}
else
rm -rf ${filesToPackage[@]}
fi
packageEntries ${langcode} ${filesToPackage[@]}
done
mkdir -p $postInstallDir