Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/kde4-l10n/
Date: Sun, 31 May 2015 19:09:59
Message-Id: 1433099271.3ea557bbb5e6265890555def7273206f9f55fc19.mrueg@gentoo
1 commit: 3ea557bbb5e6265890555def7273206f9f55fc19
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 31 19:07:51 2015 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Sun May 31 19:07:51 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=3ea557bb
7
8 [kde-apps/kde4-l10n] Version bump
9
10 Package-Manager: portage-2.2.20
11
12 kde-apps/kde4-l10n/kde4-l10n-15.04.2.ebuild | 133 ++++++++++++++++++++++++++++
13 1 file changed, 133 insertions(+)
14
15 diff --git a/kde-apps/kde4-l10n/kde4-l10n-15.04.2.ebuild b/kde-apps/kde4-l10n/kde4-l10n-15.04.2.ebuild
16 new file mode 100644
17 index 0000000..8f5a8c4
18 --- /dev/null
19 +++ b/kde-apps/kde4-l10n/kde4-l10n-15.04.2.ebuild
20 @@ -0,0 +1,133 @@
21 +# Copyright 1999-2015 Gentoo Foundation
22 +# Distributed under the terms of the GNU General Public License v2
23 +# $Header: $
24 +
25 +EAPI=5
26 +
27 +KDE_HANDBOOK="optional"
28 +KMNAME="kde-l10n"
29 +inherit kde4-base
30 +
31 +DESCRIPTION="KDE internationalization package"
32 +HOMEPAGE="http://l10n.kde.org"
33 +
34 +DEPEND="
35 + sys-devel/gettext
36 +"
37 +RDEPEND="
38 + !<kde-apps/kde-l10n-15.04.0-r1
39 + !kde-base/kde-l10n
40 + !kde-base/kdepim-l10n
41 +"
42 +
43 +KEYWORDS=" ~amd64 ~x86"
44 +IUSE="minimal"
45 +
46 +REMOVE_DIRS="${FILESDIR}/${PN}-15.04.1-remove-dirs"
47 +REMOVE_MSGS="${FILESDIR}/${PN}-15.04.1-remove-messages"
48 +
49 +LV="4.14.3"
50 +LEGACY_LANGS="ar bg bs ca ca@valencia cs da de el en_GB es et eu fa fi fr ga gl
51 +he hi hr hu ia id is it ja kk km ko lt lv mr nb nds nl nn pa pl pt pt_BR ro ru
52 +sk sl sr sv tr ug uk wa zh_CN zh_TW"
53 +
54 +# /usr/portage/distfiles $ ls -1 kde-l10n-*-${PV}.* |sed -e 's:-${PV}.tar.xz::' -e 's:kde-l10n-::' |tr '\n' ' '
55 +MY_LANGS="ar bg bs ca ca@valencia cs da de el en_GB eo es et eu fa fi fr ga gl
56 +he hi hr hu ia id is it ja kk km ko lt lv mr nb nds nl nn pa pl pt pt_BR ro ru
57 +sk sl sr sv tr ug uk wa zh_CN zh_TW"
58 +
59 +URI_BASE="${SRC_URI/-${PV}.tar.xz/}"
60 +LURI_BASE="mirror://kde/stable/${LV}/src/${KMNAME}"
61 +SRC_URI=""
62 +
63 +for MY_LANG in ${LEGACY_LANGS} ; do
64 + IUSE="${IUSE} linguas_${MY_LANG}"
65 + SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${LURI_BASE}/${KMNAME}-${MY_LANG}-${LV}.tar.xz )"
66 +done
67 +
68 +for MY_LANG in ${MY_LANGS} ; do
69 + IUSE="${IUSE} linguas_${MY_LANG}"
70 + SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${URI_BASE}/${KMNAME}-${MY_LANG}-${PV}.tar.xz )"
71 +done
72 +
73 +S="${WORKDIR}"
74 +
75 +src_unpack() {
76 + if [[ -z ${A} ]]; then
77 + elog
78 + elog "You either have the LINGUAS variable unset, or it only"
79 + elog "contains languages not supported by ${P}."
80 + elog "You won't have any additional language support."
81 + elog
82 + elog "${P} supports these language codes:"
83 + elog "${MY_LANGS}"
84 + elog
85 + fi
86 +
87 + [[ -n ${A} ]] && unpack ${A}
88 +}
89 +
90 +src_prepare() {
91 + local LNG DIR
92 + # add all linguas to cmake
93 + if [[ -n ${A} ]]; then
94 + for LNG in ${LINGUAS}; do
95 + DIR="${KMNAME}-${LNG}-${PV}"
96 + if [[ -d "${DIR}" ]] ; then
97 + echo "add_subdirectory( ${DIR} )" >> "${S}"/CMakeLists.txt
98 +
99 + # Drop KF5-based part
100 + sed -e '/add_subdirectory(5)/ s/^/#/' -i "${S}"/${DIR}/CMakeLists.txt
101 +
102 + # Drop translations that get installed with plasma 5 and kde apps 5 packages
103 + if use minimal; then
104 + einfo "Removing paths from ${LNG}"
105 + if [[ -d "${KMNAME}-${LNG}-${LV}" ]] ; then
106 + rm -rf "${KMNAME}-${LNG}-${LV}"
107 + fi
108 +
109 + # Remove dirs
110 + while read path; do
111 + if [[ -e "${S}"/${DIR}/4/${LNG}/${path%\ *}/CMakeLists.txt ]] ; then
112 + sed -e "/${path#*\ }/ s/^/#/"\
113 + -i "${S}"/${DIR}/4/${LNG}/${path%\ *}/CMakeLists.txt
114 + fi
115 + done < <(grep -v "^#" "${REMOVE_DIRS}")
116 +
117 + # Remove messages
118 + for path in $(grep -v "^#" "${REMOVE_MSGS}") ; do
119 + rm -f "${S}"/${DIR}/4/${LNG}/messages/${path}
120 + done
121 +
122 + else
123 + if [[ -d "${KMNAME}-${LNG}-${LV}" ]] ; then
124 + # Merge legacy localisation
125 + for path in $(find "${KMNAME}-${LNG}-${LV}" -name "*.po"); do
126 + cp -rn "${path}" "${path/${LV}/${PV}/4/${LNG}}" || die
127 + done
128 + rm -rf "${KMNAME}-${LNG}-${LV}"
129 + fi
130 + fi
131 + fi
132 + done
133 + fi
134 +}
135 +
136 +src_configure() {
137 + mycmakeargs=(
138 + $(cmake-utils_use_build handbook docs)
139 + )
140 + [[ -n ${A} ]] && kde4-base_src_configure
141 +}
142 +
143 +src_compile() {
144 + [[ -n ${A} ]] && kde4-base_src_compile
145 +}
146 +
147 +src_test() {
148 + [[ -n ${A} ]] && kde4-base_src_test
149 +}
150 +
151 +src_install() {
152 + [[ -n ${A} ]] && kde4-base_src_install
153 +}