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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.6 - (hide annotations) (download)
Tue Jul 31 14:15:06 2012 UTC (3 years, 11 months ago) by scarabeus
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
Stable on amd64 and ppc wrt bug#427098. Remove older.

(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)

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

  ViewVC Help
Powered by ViewVC 1.1.20