1 # Copyright 2021 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"
16 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"
17 for lang in ${LANGUAGES}; do
18 IUSE+="l10n_${lang%:*} "
21 RESTRICT="mirror strip"
31 dev-util/desktop-file-utils
32 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/$(get_libdir)/${PN}"
150 cd "${ED%/}/usr/$(get_libdir)/${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 e in planmaker presentations textmaker; do
172 dobin "${FILESDIR}/freeoffice-${e}"
175 for size in 16 24 32 48 64 128 256 512; do
176 newicon -s ${size} icons/pml_${size}.png ${PN}-planmaker.png
177 newicon -s ${size} icons/prl_${size}.png ${PN}-presentations.png
178 newicon -s ${size} icons/tml_${size}.png ${PN}-textmaker.png
181 insinto /usr/share/mime/packages
182 doins mime/softmaker-freeoffice21.xml
184 pax-mark -m "${ED%/}"/usr/$(get_libdir)/${PN}/planmaker
185 pax-mark -m "${ED%/}"/usr/$(get_libdir)/${PN}/presentations
186 pax-mark -m "${ED%/}"/usr/$(get_libdir)/${PN}/textmaker
191 elog "In order to use Softmaker Freeoffice, you need a serial number."
192 elog "To obtain a valid free serial number, please visit"
193 elog "https://www.freeoffice.com/en/download"