# Contributor: Timo Teräs # Maintainer: pkgname=libreoffice pkgver=5.2.4.2 pkgrel=0 pkgdesc="LibreOffice - Meta package for the full office suite" url="http://www.libreoffice.org/" arch="all" license="MPL2" depends_dev="cups-dev libjpeg-turbo-dev boost-dev clucene-dev libe-book-dev icu-dev icu libetonyek-dev libwpd-dev libwpg-dev libmspub-dev libmwaw-dev libpagemaker-dev libvisio-dev libcmis-dev lcms2-dev cppunit-dev freetype-dev libabw-dev libwps-dev libxslt-dev postgresql-dev mdds-dev glm-dev glu-dev glew-dev vigra-dev unixodbc-dev openldap-dev libressl-dev nss-dev npapi-sdk hunspell-dev libxrender-dev libxrandr-dev neon-dev apr-dev redland-dev libexttextcat-dev gconf-dev bluez-dev gstreamer1-dev gst-plugins-base1-dev gtk+2.0-dev poppler-dev cairo-dev hyphen-dev mythes-dev python3-dev harfbuzz-dev libfreehand-dev libodfgen-dev libcdr-dev" makedepends="$depends_dev autoconf automake tar coreutils findutils ucpp gperf bison flex zip perl perl-archive-zip sed libxml2-utils doxygen" # GNU sed is needed for in i18npool/CustomTarget_localedata.mk install="" subpackages="$pkgname-base $pkgname-calc $pkgname-common $pkgname-draw $pkgname-gnome $pkgname-impress $pkgname-math $pkgname-connector-postgres $pkgname-writer libreofficekit" depends="$subpackages" _addsrcurl="http://dev-www.libreoffice.org/src" case $pkgver in *.*.*.*) _v=${pkgver%.*};; *.*.*) _v=$pkgver;; esac # grep LIBXMLSEC_TARBALL download.lst source="http://download.documentfoundation.org/libreoffice/src/${_v}/libreoffice-$pkgver.tar.xz http://download.documentfoundation.org/libreoffice/src/${_v}/libreoffice-dictionaries-$pkgver.tar.xz http://download.documentfoundation.org/libreoffice/src/${_v}/libreoffice-translations-$pkgver.tar.xz $_addsrcurl/ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz linux-musl.patch fix-execinfo.patch fix-includes.patch 0010-icu-58.patch " languages="" add_lang() { local pkglang="${3:-$1}" subpackages="$subpackages $pkgname-lang-${1}:_lang_${1}" languages="$languages ${pkglang/_/-}" eval "_lang_$1() { pkgdesc=\"LibreOffice - $2 language pack\"; depends=\"\"; _split lang_${pkglang}; }" } add_lang af "Afrikaans" add_lang am "Amharic" add_lang ar "Arabic" add_lang as "Assamese" add_lang ast "Asturian" add_lang be "Belarusian" add_lang bg "Bulgarian" add_lang bn "Bengali" add_lang bn_in "Bengali (India)" bn_IN add_lang bo "Tibetan" add_lang br "Breton" add_lang brx "Bodo" add_lang bs "Bosnian" add_lang ca "Catalan" add_lang ca_valencia "Catalan (Valencian)" add_lang cs "Czech" add_lang cy "Welsh (Cymraeg)" add_lang da "Danish" add_lang de "German" add_lang dgo "Dogri proper" add_lang dz "Dzongkha" add_lang el "Greek" add_lang en_gb "English (UK)" en_GB add_lang en_us "English (US)" en_US add_lang en_za "English (South Africa)" en_ZA add_lang eo "Esperanto" add_lang es "Spanish" add_lang et "Estonian" add_lang eu "Basque" add_lang fa "Persian (Farsi)" add_lang fi "Finnish" add_lang fr "French" add_lang ga "Irish" add_lang gd "Scottish Gaelic" add_lang gl "Galician" add_lang gu "Gujarati" add_lang gug "Guaraní (Paraguay)" add_lang he "Hebrew" add_lang hi "Hindi" add_lang hr "Croatian" add_lang hu "Hungarian" add_lang id "Indonesian" add_lang is "Icelandic" add_lang it "Italian" add_lang ja "Japanese" add_lang ka "Georgian" add_lang kk "Kazakh" add_lang km "Khmer" add_lang kmr_latn "Kurmanji Kurdish (Latin)" kmr_Latn add_lang kn "Kannada" add_lang ko "Korean" add_lang kok "Konkani" add_lang ks "Kashmiri" add_lang lb "Luxembourgish" add_lang lo "Lao" add_lang lt "Lithuanian" add_lang lv "Latvian" add_lang mai "Maithili" add_lang mk "Macedonian" add_lang ml "Malayalam" add_lang mn "Mongolian" add_lang mni "Meithei (Manipuri)" add_lang mr "Marathi" add_lang my "Burmese" add_lang nb "Norwegian (Bokmal)" add_lang ne "Nepali" add_lang nl "Dutch" add_lang nn "Nynorsk" add_lang nr "Ndebele (South)" add_lang nso "Northern Sotho" add_lang oc "Occitan" add_lang om "Oromo" add_lang or "Oriya" add_lang pa_in "Punjabi (India)" pa_IN add_lang pl "Polish" add_lang pt "Portuguese" add_lang pt_br "Portuguese (Brazil)" pt_BR add_lang ro "Romanian" add_lang ru "Russian" add_lang rw "Kinyarwanda" add_lang sa_in "Sanskrit (India)" sa_IN add_lang sat "Santali" add_lang sd "Sindhi" add_lang si "Sinhala" add_lang sid "Sidamo" add_lang sk "Slovak" add_lang sl "Slovenian" add_lang sq "Albanian" add_lang sr "Serbian" add_lang sr_latn "Serbian (Latin)" sr_Latn add_lang ss "Swati" add_lang st "Southern Sotho" add_lang sv "Swedish" add_lang sw_tz "Swahili (Tanzania)" sw_TZ add_lang ta "Tamil" add_lang te "Telugu" add_lang tg "Tajik" add_lang th "Thai" add_lang tn "Tswana" add_lang tr "Turkish" add_lang ts "Tsonga" add_lang tt "Tatar" add_lang ug "Uyghur" add_lang uk "Ukrainian" add_lang uz "Uzbek" add_lang ve "Venda" add_lang vi "Vietnamese" add_lang xh "Xhosa" add_lang zh_cn "Simplified Chinese (Peoples Republic of China)" zh_CN add_lang zh_tw "Traditional Chinese (Taiwan)" zh_TW add_lang zu "Zulu" # help abuild find shared objects in rpath ldpath="/usr/lib/libreoffice/program:/usr/lib/libreoffice/ure/lib/" _builddir="$srcdir"/libreoffice-$pkgver unpack() { if [ -z "$force" ]; then verify || return 1 initdcheck || return 1 fi mkdir -p "$srcdir" msg "Unpacking sources..." local u for u in $source; do local s="$SRCDEST/$(filename_from_uri $u)" case $s in */libreoffice-*.tar.xz) msg "Unpacking $s..." unxz -c "$s" | tar -C "$srcdir" -x || return 1;; esac done } prepare() { local i cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done # https://bugs.documentfoundation.org/show_bug.cgi?id=78174 # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64812 # gcc 4.9.x -fvisibility-inlines-hidden is broken, force disable it for now sed -e 's/@HAVE_GCC_VISIBILITY_BROKEN@/TRUE/g' -i config_host.mk.in NOCONFIGURE=1 ./autogen.sh } build() { cd "$_builddir" # boost-1.59 export CPPFLAGS="$CPPFLAGS -DBOOST_ERROR_CODE_HEADER_ONLY -DBOOST_SYSTEM_NO_DEPRECATED" ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --infodir=/usr/share/info \ --localstatedir=/var \ --with-vendor="Alpine Linux" \ --disable-online-update \ --disable-fetch-external \ --disable-dependency-tracking \ --disable-crashdump \ --enable-release-build \ --enable-split-app-modules \ --enable-verbose \ --enable-python=system \ --with-alloc=system \ --with-tls=openssl \ --with-system-libs \ --with-system-dicts \ --with-system-ucpp \ --with-external-dict-dir=/usr/share/hunspell \ --with-external-hyph-dir=/usr/share/hyphen \ --with-external-tar="$srcdir" \ --with-lang="$languages" \ --without-java \ --without-fonts \ --without-system-sane \ --without-myspell-dicts \ --disable-firebird-sdbc \ --disable-orcus \ --disable-graphite \ --disable-coinmp \ --disable-lpsolve \ --disable-gltf \ --disable-liblangtag \ || return 1 # adding '-isystem /usr/include' make things break with gcc6 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823145 sed -i -e 's:-isystem /usr/include[^/]::g' config_host.mk || return 1 make build-nocheck || return 1 # build libreofficekit cd libreofficekit && make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir"/../all distro-pack-install || return 1 } _split() { local i for i in $(grep -v ^%dir $_builddir/file-lists/${1}_list.txt | sort -u); do dirname="$(dirname $i)" [ -d "$subpkgdir/$dirname" ] || install -dm755 "$subpkgdir/$dirname" mv "$pkgdir"/../all/"$i" "$subpkgdir"/"$i" done } base() { pkgdesc="LibreOffice - Database frontend" depends="libreoffice-common" _split base } calc() { pkgdesc="LibreOffice - Spreadsheet" depends="libreoffice-common" _split calc } common() { pkgdesc="LibreOffice - Common files" depends="libreoffice-lang-en_us" _split common } draw() { pkgdesc="LibreOffice - Drawing application" depends="libreoffice-common" _split draw } gnome() { pkgdesc="LibreOffice - GNOME integration" depends="libreoffice-common" _split gnome } impress() { pkgdesc="LibreOffice - Presentation application" depends="libreoffice-common" _split impress } libreofficekit() { mkdir -p "$subpkgdir"/usr/include mv "$_builddir"/include/LibreOfficeKit "$subpkgdir"/usr/include || return 1 } math() { pkgdesc="LibreOffice - Equation editor" depends="libreoffice-common" _split math } postgres() { pkgdesc="LibreOffice - Connector for PostgreSQL database" depends="libreoffice-base" _split postgresql } writer() { pkgdesc="LibreOffice - Word Processor" depends="libreoffice-common" _split writer } md5sums="6355e3750604370b51c77cdffb688275 libreoffice-5.2.4.2.tar.xz 2bd0a85518bbbefc605377891d1af424 libreoffice-dictionaries-5.2.4.2.tar.xz 8cb9b610c1e036cd39f8cf86b953e58d libreoffice-translations-5.2.4.2.tar.xz ce12af00283eb90d9281956524250d6e ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz bfde50b1b04c715cd172be03a204521f linux-musl.patch 1cff63a520d1b037edddf1b4de4799dc fix-execinfo.patch c6fc4d38ef1bab69f3570a0d087b4c52 fix-includes.patch ef0fced535314a39b836b641e593dc6c 0010-icu-58.patch" sha256sums="8b73d1afa6a1ff6bc153ab1f31afc86c42cc8d0e5831bf82e66a8df0fcf6eb10 libreoffice-5.2.4.2.tar.xz 185e420b6ef7146f971f33663aec8745bf23356ad8894bf82c5b7efad8e7344c libreoffice-dictionaries-5.2.4.2.tar.xz 620cab5f916663275895a9b50b8e00f7e96dbd8dc8129e79bc266274af3cae1c libreoffice-translations-5.2.4.2.tar.xz 3221593ca50f362b546a0888a1431ad24be1470f96b2469c0e0df5e1c55e7305 ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz fd0778cfd18b034a415a8966f7a3d8437c3f2ba1c6cfde8220ba663261b9c67f linux-musl.patch 7171dfa651a7ee81b4e13a9fd9131428d9a65af138cac4cb428ae6c3e4bcb1f3 fix-execinfo.patch 51052d983eeea85d8d71385e4eeda61b6a8746854fe046b9a91e12c013d9ed89 fix-includes.patch c3ff14bd23804b4fc3817fb6371eb7c56dcb9dcaddd2cb43ecbb7ccf6a801597 0010-icu-58.patch" sha512sums="17b892f7c6b43189a08e5b2f8844cec486293daaa9b22afe4b9a0b8e3747cc9646018eb976c80af1a8eea34c29077fb945ff724d8d0f6ee20cebbce94e5ded5b libreoffice-5.2.4.2.tar.xz 43ec8d06bcd1a7a041dbf6b00cd88a02af1c5c20272144436851c1d9c6b0efeebad5a7fbebcad2fbaf50030440596f347f97b9cf215e199da68af90c3f0f0705 libreoffice-dictionaries-5.2.4.2.tar.xz 73ca6b70d74243feb98901603b174327c5825d3cdaa8033f554c26b5cc8bc01d788b998928eefbe56b6d16239a771bbf89ed6ec9179d7e04a6ccd1610599e8ef libreoffice-translations-5.2.4.2.tar.xz 2f8d473916abf9822367edbe857fc2e12dc9858d12e790d689d787e439904bd6a452bf631043aa66e7502457ab0815a473657f58fca17a213e2490f5655e5ae5 ce12af00283eb90d9281956524250d6e-xmlsec1-1.2.20.tar.gz 6abfd9c6cf1917e9ee89695086013c94f5ec68f9732ad60faeeaabe6f3765f5ff19df575a3ef0098d6dd6ba3c76369cec871770396f5cd84829031c3e38485a8 linux-musl.patch 567123f990c4a47c2e4cebf99f3486150740015e647ca2b2521e606f3350fc55ceda6c7ac031302da34e8fc90747d66619334fcfda4e7b8998456fe3619ab860 fix-execinfo.patch c9e0b05640d7d0e6053b8dd4735664d761a7d381c5b5cbda059fb7b38ab28531c014b6d38f58a0e1f7171a43d62f04d8ecbb7b6b008d0ad30017228ec7e6601a fix-includes.patch 787eacb819935018d5230f3bceb7697bdb937ac776c88e4b5fece26dcb1069f338e2e1f1d4468df41facc3a2ec62e464f1ba14429aa2b5b509debf9146099ad2 0010-icu-58.patch"