/[gentoo-x86]/app-office/libreoffice-l10n/libreoffice-l10n-4.0.0.2.ebuild
Gentoo

Contents of /app-office/libreoffice-l10n/libreoffice-l10n-4.0.0.2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Thu Jan 31 13:50:13 2013 UTC (17 months, 4 weeks ago) by scarabeus
Branch: MAIN
Changes since 1.1: +2 -6 lines
Drop the dependency over libo here.

(Portage version: 2.2.0_alpha161/cvs/Linux x86_64, signed Manifest commit with key 8EEE3BE8)

1 # Copyright 1999-2013 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/app-office/libreoffice-l10n/libreoffice-l10n-4.0.0.2.ebuild,v 1.1 2013/01/30 17:21:34 scarabeus Exp $
4
5 EAPI=4
6
7 inherit rpm eutils multilib versionator
8
9 MY_PV=$(get_version_component_range 1-3)
10
11 DESCRIPTION="Translations for the Libreoffice suite."
12 HOMEPAGE="http://www.libreoffice.org"
13 BASE_SRC_URI="http://download.documentfoundation.org/${PN/-l10n/}/testing/${MY_PV}/rpm"
14
15 LICENSE="|| ( LGPL-3 MPL-1.1 )"
16 SLOT="0"
17 KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux"
18 IUSE="offlinehelp"
19
20 LANGUAGES_HELP="ast bg bn_IN bn bo bs ca_XV ca cs da de dz el en_GB en en_ZA eo
21 es et eu fi fr gl gu he hi hr hu id is it ja ka km ko mk nb ne nl nn om pl
22 pt_BR pt ro ru si sk sl sq sv tg tr ug uk vi zh_CN zh_TW"
23 LANGUAGES="${LANGUAGES_HELP} af am ar as be br brx cy dgo fa ga gd kk kn kok ks
24 ku lb lo lt lv mai ml mn mni mr my nr nso oc or pa_IN rw sa_IN sat sd sh sr ss st
25 sw_TZ ta te th tn ts tt uz ve xh zu"
26
27 for lang in ${LANGUAGES_HELP}; do
28 helppack=""
29 [[ ${lang} == en ]] && lang2=${lang/en/en_US} || lang2=${lang}
30 helppack="offlinehelp? ( ${BASE_SRC_URI}/x86/LibreOffice_${PV}_Linux_x86_rpm_helppack_${lang2/_/-}.tar.gz )"
31 SRC_URI+=" linguas_${lang}? ( ${helppack} )"
32 done
33 for lang in ${LANGUAGES}; do
34 langpack=""
35 [[ ${lang} == en ]] \
36 || langpack="${BASE_SRC_URI}/x86/LibreOffice_${PV}_Linux_x86_rpm_langpack_${lang/_/-}.tar.gz"
37 [[ -z ${langpack} ]] || SRC_URI+=" linguas_${lang}? ( ${langpack} )"
38 IUSE+=" linguas_${lang}"
39 done
40 unset lang helppack langpack lang2
41
42 RDEPEND+="app-text/hunspell"
43
44 RESTRICT="strip"
45
46 S="${WORKDIR}"
47
48 src_unpack() {
49 default
50
51 local lang dir rpmdir i
52 local ooextused=()
53
54 for lang in ${LANGUAGES}; do
55 # break away if not enabled; paludis support
56 use_if_iuse linguas_${lang} || continue
57
58 dir=${lang/_/-}
59
60 # for english we provide just helppack, as translation is always there
61 if [[ ${lang} != en ]]; then
62 rpmdir="LibreOffice_${PV}_Linux_x86_rpm_langpack_${dir}/RPMS/"
63 [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
64 # First remove dictionaries, we want to use system ones.
65 rm -rf "${S}/${rpmdir}/"*dict*.rpm
66 rpm_unpack "./${rpmdir}/"*.rpm
67 fi
68 if [[ "${LANGUAGES_HELP}" =~ "${lang}" ]] && use offlinehelp; then
69 [[ ${lang} == en ]] && dir="en-US"
70 rpmdir="LibreOffice_${PV}_Linux_x86_rpm_helppack_${dir}/RPMS/"
71 [[ -d ${rpmdir} ]] || die "Missing directory: \"${rpmdir}\""
72 rpm_unpack ./"${rpmdir}/"*.rpm
73 fi
74 done
75 }
76
77 src_prepare() { :; }
78 src_configure() { :; }
79 src_compile() { :; }
80
81 src_install() {
82 local dir="${S}"/opt/${PN/-l10n/}$(get_version_component_range 1-2)/
83 # Condition required for people that do not install anything eg no linguas
84 # or just english with no offlinehelp.
85 if [[ -d "${dir}" ]] ; then
86 insinto /usr/$(get_libdir)/${PN/-l10n/}/
87 doins -r "${dir}"/*
88 fi
89 # remove extensions that are in the l10n for some weird reason
90 rm -rf "${ED}"/usr/$(get_libdir)/${PN/-l10n/}/share/extensions/
91 }

  ViewVC Help
Powered by ViewVC 1.1.20