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: Sat, 27 Jun 2015 13:53:46
Message-Id: 1435413165.fece60707dd706ed6191622eb822752e6617bb65.mrueg@gentoo
1 commit: fece60707dd706ed6191622eb822752e6617bb65
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jun 27 13:52:45 2015 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Sat Jun 27 13:52:45 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=fece6070
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.3.ebuild | 132 ++++++++++++++++++++++++++++
13 1 file changed, 132 insertions(+)
14
15 diff --git a/kde-apps/kde4-l10n/kde4-l10n-15.04.3.ebuild b/kde-apps/kde4-l10n/kde4-l10n-15.04.3.ebuild
16 new file mode 100644
17 index 0000000..5859dad
18 --- /dev/null
19 +++ b/kde-apps/kde4-l10n/kde4-l10n-15.04.3.ebuild
20 @@ -0,0 +1,132 @@
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/kdepim-l10n
40 +"
41 +
42 +KEYWORDS=" ~amd64 ~x86"
43 +IUSE="minimal"
44 +
45 +REMOVE_DIRS="${FILESDIR}/${PN}-15.04.1-remove-dirs"
46 +REMOVE_MSGS="${FILESDIR}/${PN}-15.04.1-remove-messages"
47 +
48 +LV="4.14.3"
49 +LEGACY_LANGS="ar bg bs ca ca@valencia cs da de el en_GB es et eu fa fi fr ga gl
50 +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
51 +sk sl sr sv tr ug uk wa zh_CN zh_TW"
52 +
53 +# /usr/portage/distfiles $ ls -1 kde-l10n-*-${PV}.* |sed -e 's:-${PV}.tar.xz::' -e 's:kde-l10n-::' |tr '\n' ' '
54 +MY_LANGS="ar bg bs ca ca@valencia cs da de el en_GB eo es et eu fa fi fr ga gl
55 +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
56 +sk sl sr sv tr ug uk wa zh_CN zh_TW"
57 +
58 +URI_BASE="${SRC_URI/-${PV}.tar.xz/}"
59 +LURI_BASE="mirror://kde/stable/${LV}/src/${KMNAME}"
60 +SRC_URI=""
61 +
62 +for MY_LANG in ${LEGACY_LANGS} ; do
63 + IUSE="${IUSE} linguas_${MY_LANG}"
64 + SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${LURI_BASE}/${KMNAME}-${MY_LANG}-${LV}.tar.xz )"
65 +done
66 +
67 +for MY_LANG in ${MY_LANGS} ; do
68 + IUSE="${IUSE} linguas_${MY_LANG}"
69 + SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${URI_BASE}/${KMNAME}-${MY_LANG}-${PV}.tar.xz )"
70 +done
71 +
72 +S="${WORKDIR}"
73 +
74 +src_unpack() {
75 + if [[ -z ${A} ]]; then
76 + elog
77 + elog "You either have the LINGUAS variable unset, or it only"
78 + elog "contains languages not supported by ${P}."
79 + elog "You won't have any additional language support."
80 + elog
81 + elog "${P} supports these language codes:"
82 + elog "${MY_LANGS}"
83 + elog
84 + fi
85 +
86 + [[ -n ${A} ]] && unpack ${A}
87 +}
88 +
89 +src_prepare() {
90 + local LNG DIR
91 + # add all linguas to cmake
92 + if [[ -n ${A} ]]; then
93 + for LNG in ${LINGUAS}; do
94 + DIR="${KMNAME}-${LNG}-${PV}"
95 + if [[ -d "${DIR}" ]] ; then
96 + echo "add_subdirectory( ${DIR} )" >> "${S}"/CMakeLists.txt
97 +
98 + # Drop KF5-based part
99 + sed -e '/add_subdirectory(5)/ s/^/#/' -i "${S}"/${DIR}/CMakeLists.txt
100 +
101 + # Drop translations that get installed with plasma 5 and kde apps 5 packages
102 + if use minimal; then
103 + einfo "Removing paths from ${LNG}"
104 + if [[ -d "${KMNAME}-${LNG}-${LV}" ]] ; then
105 + rm -rf "${KMNAME}-${LNG}-${LV}"
106 + fi
107 +
108 + # Remove dirs
109 + while read path; do
110 + if [[ -e "${S}"/${DIR}/4/${LNG}/${path%\ *}/CMakeLists.txt ]] ; then
111 + sed -e "/${path#*\ }/ s/^/#/"\
112 + -i "${S}"/${DIR}/4/${LNG}/${path%\ *}/CMakeLists.txt
113 + fi
114 + done < <(grep -v "^#" "${REMOVE_DIRS}")
115 +
116 + # Remove messages
117 + for path in $(grep -v "^#" "${REMOVE_MSGS}") ; do
118 + rm -f "${S}"/${DIR}/4/${LNG}/messages/${path}
119 + done
120 +
121 + else
122 + if [[ -d "${KMNAME}-${LNG}-${LV}" ]] ; then
123 + # Merge legacy localisation
124 + for path in $(find "${KMNAME}-${LNG}-${LV}" -name "*.po"); do
125 + cp -rn "${path}" "${path/${LV}/${PV}/4/${LNG}}" || die
126 + done
127 + rm -rf "${KMNAME}-${LNG}-${LV}"
128 + fi
129 + fi
130 + fi
131 + done
132 + fi
133 +}
134 +
135 +src_configure() {
136 + mycmakeargs=(
137 + $(cmake-utils_use_build handbook docs)
138 + )
139 + [[ -n ${A} ]] && kde4-base_src_configure
140 +}
141 +
142 +src_compile() {
143 + [[ -n ${A} ]] && kde4-base_src_compile
144 +}
145 +
146 +src_test() {
147 + [[ -n ${A} ]] && kde4-base_src_test
148 +}
149 +
150 +src_install() {
151 + [[ -n ${A} ]] && kde4-base_src_install
152 +}