1 # Copyright 1999-2022 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit desktop pax-utils xdg
8 DESCRIPTION="A complete, free Microsoft Office-compatible alternative office suite."
9 HOMEPAGE="https://www.freeoffice.com"
10 BASE_URI="https://www.softmaker.net/down/softmaker-freeoffice-2021-${PV}"
11 SRC_URI="${BASE_URI}-amd64.tgz"
18 LANGUAGES="ar bg da de el en-GB en-US es et fi fr hu id it ja kk ko lt lv nl pl pt pt-BR ro ru sl sv tr uk zh"
19 for lang in ${LANGUAGES}; do
20 IUSE+="l10n_${lang%:*} "
23 RESTRICT="mirror strip"
33 dev-util/desktop-file-utils
34 dev-util/gtk-update-icon-cache
43 for lang in ${LANGUAGES}; do
44 use l10n_${lang%:*} && continue
54 rm fonts/NotoSansCJK${suf}-Regular.otf
59 for lang in ${LANGUAGES}; do
60 use l10n_${lang%:*} && continue
71 for lang in ${LANGUAGES}; do
72 use l10n_${lang%:*} && continue
100 suffix="${lang%:*}";;
108 for lang in ${LANGUAGES}; do
109 use l10n_${lang%:*} && continue
149 mkdir -p "${ED}/usr/lib64/${PN}"
150 cd "${ED}/usr/lib64/${PN}"
153 xz -d "freeoffice2021.tar.lzma" || die
154 tar x -f "freeoffice2021.tar" \
155 && rm "freeoffice2021.tar" || die
156 rm "installfreeoffice"
158 chrpath --delete "textmaker"
159 chrpath --delete "planmaker"
160 chrpath --delete "presentations"
167 for m in "${FILESDIR}"/*.desktop; do
171 for size in 16 24 32 48 64 128 256 512; do
172 newicon -s ${size} icons/pml_${size}.png ${PN}-planmaker.png
173 newicon -s ${size} icons/prl_${size}.png ${PN}-presentations.png
174 newicon -s ${size} icons/tml_${size}.png ${PN}-textmaker.png
177 insinto /usr/share/mime/packages
178 doins mime/softmaker-freeoffice21.xml
180 pax-mark -m "${ED}"/usr/lib64/${PN}/planmaker
181 pax-mark -m "${ED}"/usr/lib64/${PN}/presentations
182 pax-mark -m "${ED}"/usr/lib64/${PN}/textmaker
187 elog "In order to use Softmaker Freeoffice, you need a serial number."
188 elog "To obtain a valid free serial number, please visit"
189 elog "https://www.freeoffice.com/en/download"