public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Johannes Huber" <johu@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/ktp-l10n/
Date: Wed, 13 Jul 2016 18:23:31 +0000 (UTC)	[thread overview]
Message-ID: <1468434112.0ab2dfdff29b75efe16a6c1511b30160b66a891d.johu@gentoo> (raw)

commit:     0ab2dfdff29b75efe16a6c1511b30160b66a891d
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sun Jul 10 16:00:29 2016 +0000
Commit:     Johannes Huber <johu <AT> gentoo <DOT> org>
CommitDate: Wed Jul 13 18:21:52 2016 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=0ab2dfdf

kde-apps/ktp-l10n: Add KDE_L10N

This adds 3 new sr variants to L10N.

Package-Manager: portage-2.2.28

Signed-off-by: Johannes Huber <johu <AT> gentoo.org>

 kde-apps/ktp-l10n/ktp-l10n-16.04.3.ebuild | 89 ++++++++-----------------------
 1 file changed, 22 insertions(+), 67 deletions(-)

diff --git a/kde-apps/ktp-l10n/ktp-l10n-16.04.3.ebuild b/kde-apps/ktp-l10n/ktp-l10n-16.04.3.ebuild
index e662e14..be0cd37 100644
--- a/kde-apps/ktp-l10n/ktp-l10n-16.04.3.ebuild
+++ b/kde-apps/ktp-l10n/ktp-l10n-16.04.3.ebuild
@@ -5,12 +5,18 @@
 EAPI=6
 
 KDE_HANDBOOK="false"
+KDE_L10N=(
+	ar ast bg bs ca ca-valencia cs da de el en-GB eo es et eu fa fi fr ga gl 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
+	sk sl sr sr-ijekavsk sr-Latn sr-Latn-ijekavsk sv tr ug uk wa zh-CN zh-TW
+)
+KMNAME="kde-l10n"
 inherit kde5
 
 DESCRIPTION="KDE Telepathy internationalization package"
-HOMEPAGE="http://l10n.kde.org"
 
 KEYWORDS="~amd64 ~x86"
+IUSE=""
 
 DEPEND="
 	$(add_frameworks_dep ki18n)
@@ -30,99 +36,48 @@ RDEPEND="
 	!kde-apps/ktp-text-ui:4
 "
 
-# /usr/portage/distfiles $ ls -1 kde-l10n-*-${PV}.* |sed -e 's:-${PV}.tar.xz::' -e 's:kde-l10n-::' |tr '\n' ' '
-MY_LANGS="ar ast bg bs ca ca@valencia cs da de el en_GB eo es et eu fa fi fr ga
-gl 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 sk sl sr sv tr ug uk wa zh_CN zh_TW"
-
-IUSE="$(printf 'l10n_%s ' ${MY_LANGS//[@_]/-})"
-
-URI_BASE="${SRC_URI/-${PV}.tar.xz/}"
-SRC_URI=""
-for MY_LANG in ${MY_LANGS} ; do
-	SRC_URI="${SRC_URI} l10n_${MY_LANG/[@_]/-}? ( ${URI_BASE/ktp/kde}/kde-l10n-${MY_LANG}-${PV}.tar.xz )"
-done
-
-S="${WORKDIR}"
-
 pkg_setup() {
 	if [[ -z ${A} ]]; then
 		elog
 		elog "None of the requested L10N are supported by ${P}."
 		elog
 		elog "${P} supports these language codes:"
-		elog "${MY_LANGS//[@_]/-}"
+		elog "${KDE_L10N[@]}"
 		elog
 	fi
 	[[ -n ${A} ]] && kde5_pkg_setup
 }
 
-src_unpack() {
-	for my_tar in ${A}; do
-		tar -xpf "${DISTDIR}/${my_tar}" --xz \
-			"${my_tar/.tar.xz/}/CMakeLists.txt" "${my_tar/.tar.xz/}/5" 2> /dev/null ||
-			elog "${my_tar}: tar extract command failed at least partially - continuing"
-	done
-}
-
 src_prepare() {
-	default
+	kde5_src_prepare
 	[[ -n ${A} ]] || return
 
-	# add all l10n to cmake
-	cat <<-EOF > CMakeLists.txt || die
-project(kdepim-l10n)
-cmake_minimum_required(VERSION 2.8.12)
-$(printf "add_subdirectory( %s )\n" \
-	`find . -mindepth 1 -maxdepth 1 -type d | sed -e "s:^\./::"`)
-EOF
-
-	# Drop KDE4-based part
-	find -maxdepth 2 -type f -name CMakeLists.txt -exec \
-		sed -i -e "/add_subdirectory(4)/ s/^/#DONT/" {} + || die
 	# We only want messages
 	find -mindepth 4 -maxdepth 4 -type f -name CMakeLists.txt -exec \
 		sed -i -e "/messages/!s/^add_subdirectory/#DONT/" {} + || die
+
 	# Remove Handbook
 	find -type f -name CMakeLists.txt -exec \
 		sed -i -e "/find_package.*KF5DocTools/ s/^/#/" {} + || die
 
 	# Remove everything except kdenetwork/ktp translations
-	local LNG DIR
-	for LNG in ${MY_LANGS}; do
-		DIR="kde-l10n-${LNG}-${PV}"
-		SDIR="${S}/${DIR}/5/${LNG}"
-		if [[ -d "${DIR}" ]] ; then
-
-			if [[ -d "${SDIR}/messages" ]] ; then
-				echo > "${SDIR}/messages/CMakeLists.txt"
-				[[ -d "${SDIR}/messages/kdenetwork" ]] && \
-					( echo "add_subdirectory(kdenetwork)" >> "${SDIR}/messages/CMakeLists.txt" )
+	for lng in ${KDE_L10N[@]}; do
+		local dir sdir
+		dir="kde-l10n-$(kde_l10n2lingua ${lng})-${PV}"
+		sdir="${S}/${dir}/5/$(kde_l10n2lingua ${lng})"
+		if [[ -d "${dir}" ]] ; then
+			einfo " L10N: ${lng}"
+
+			if [[ -d "${sdir}/messages" ]] ; then
+				echo > "${sdir}/messages/CMakeLists.txt"
+				[[ -d "${sdir}/messages/kdenetwork" ]] && \
+					( echo "add_subdirectory(kdenetwork)" >> "${sdir}/messages/CMakeLists.txt" )
 				# Remove everything but ktp translations
-				find "${SDIR}"/messages/kdenetwork -type f ! \( -name CMakeLists.txt \
+				find "${sdir}"/messages/kdenetwork -type f ! \( -name CMakeLists.txt \
 					-o -name kaccounts*po -o -name kcm_ktp*po -o -name kcmtelepathy*po \
 					-o -name kded_ktp*po -o -name ktp*po -o -name plasma*ktp*po \) \
 					-delete
 			fi
-
-			# In some cases we may have sub-lingua subdirs, e.g. sr :(
-			for XSUBDIR in "${SDIR}/${LNG}"@* ; do
-				XLNG=$(echo ${XSUBDIR}|sed -e 's:^.*/::')
-				if [[ -d "${XSUBDIR}" ]] ; then
-					einfo "   ${XLNG} variant"
-					# remove everything except kdenetwork
-					if [[ -d "${XSUBDIR}/messages" ]] ; then
-						echo > "${XSUBDIR}/messages/CMakeLists.txt"
-						[[ -d "${XSUBDIR}/messages/kdenetwork" ]] && \
-							( echo "add_subdirectory(kdenetwork)" >> "${XSUBDIR}/messages/CMakeLists.txt" )
-						# Remove everything but ktp translations
-						find "${XSUBDIR}"/messages/kdenetwork -type f ! \( -name CMakeLists.txt \
-							-o -name kaccounts*po -o -name kcm_ktp*po -o -name kcmtelepathy*po \
-							-o -name kded_ktp*po -o -name ktp*po -o -name plasma*ktp*po \) \
-							-delete
-					fi
-				fi
-			done
 		fi
 	done
 }


             reply	other threads:[~2016-07-13 18:23 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 18:23 Johannes Huber [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-10-13  9:05 [gentoo-commits] proj/kde:master commit in: kde-apps/ktp-l10n/ Johannes Huber
2016-08-31 15:11 Michael Palimaka
2016-08-27 19:50 Michael Palimaka
2016-08-20 17:25 Michael Palimaka
2016-04-22 12:35 Johannes Huber
2016-04-07 17:01 Michael Palimaka
2016-03-20 20:43 Johannes Huber
2015-12-06 15:30 Alexey Shvetsov
2015-09-23 13:09 Michael Palimaka
2015-09-19 14:05 Manuel Rüger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468434112.0ab2dfdff29b75efe16a6c1511b30160b66a891d.johu@gentoo \
    --to=johu@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox