From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 93D55138306 for ; Wed, 13 Jul 2016 18:23:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6F2B921C25D; Wed, 13 Jul 2016 18:23:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D23C21C261 for ; Wed, 13 Jul 2016 18:23:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7322C340C9D for ; Wed, 13 Jul 2016 18:23:35 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BD7372453 for ; Wed, 13 Jul 2016 18:23:31 +0000 (UTC) From: "Johannes Huber" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Johannes Huber" Message-ID: <1468434112.e7c3bc790dcb09424131f830d1bb2302f8c9c7c5.johu@gentoo> Subject: [gentoo-commits] proj/kde:master commit in: kde-apps/kde4-l10n/ X-VCS-Repository: proj/kde X-VCS-Files: kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild X-VCS-Directories: kde-apps/kde4-l10n/ X-VCS-Committer: johu X-VCS-Committer-Name: Johannes Huber X-VCS-Revision: e7c3bc790dcb09424131f830d1bb2302f8c9c7c5 X-VCS-Branch: master Date: Wed, 13 Jul 2016 18:23:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: aa9dc881-eb89-4ce3-8be5-4ae6c42632c1 X-Archives-Hash: ced5f13c4f92748ac4b425d15869d80f commit: e7c3bc790dcb09424131f830d1bb2302f8c9c7c5 Author: Andreas Sturmlechner gmail com> AuthorDate: Sun Jul 10 18:08:19 2016 +0000 Commit: Johannes Huber gentoo org> CommitDate: Wed Jul 13 18:21:52 2016 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=e7c3bc79 kde-apps/kde4-l10n: Switch to kde5.eclass to remove a lot of code This adds 3 new sr variants to L10N. Still needs IUSE=aqua to avoid blocker Package-Manager: portage-2.2.28 Signed-off-by: Johannes Huber gentoo.org> kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild | 123 ++++------------------------ 1 file changed, 16 insertions(+), 107 deletions(-) diff --git a/kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild b/kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild index 4e5b493..3e41dcc 100644 --- a/kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild +++ b/kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild @@ -4,16 +4,23 @@ EAPI=6 +KDE_AUTODEPS="false" KDE_HANDBOOK="optional" +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 kde4-base +inherit kde5 DESCRIPTION="KDE legacy internationalization package" -HOMEPAGE="http://l10n.kde.org" +SLOT="4" KEYWORDS="~amd64 ~arm ~x86" DEPEND=" + kde-base/kdelibs:4 sys-devel/gettext " RDEPEND=" @@ -23,46 +30,8 @@ RDEPEND=" REMOVE_DIRS="${FILESDIR}/${PN}-16.04.2-remove-dirs" REMOVE_MSGS="${FILESDIR}/${PN}-16.03.91-remove-messages" -# /usr/portage/distfiles $ ls -1 kde-l10n-*-${PV}.* |sed -e 's:-${PV}.tar.xz::' -e 's:kde-l10n-::' |tr '\n' ' ' -# Make this correspond with kde5.eclass; important: L10N, not LINGUAS here! -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 -) - # TODO: Drop no-op +minimal in 16.08.x - necessary kde5.eclass change happened after KF-5.23/Plasma-5.6.5 -IUSE="+minimal test $(printf 'l10n_%s ' ${KDE_L10N[@]})" - -URI_BASE="${SRC_URI/-${PV}.tar.xz/}" -SRC_URI="" - -kde_l10n2lingua() { - local l - for l; do - case ${l} in - ca-valencia) echo ca@valencia;; - sr-ijekavsk) echo sr@ijekavian;; - sr-Latn-ijekavsk) echo sr@ijekavianlatin;; - sr-Latn) echo sr@latin;; - uz-Cyrl) echo uz@cyrillic;; - *) echo "${l/-/_}";; - esac - done -} - -for my_l10n in ${KDE_L10N[@]} ; do - case ${my_l10n} in - sr | sr-ijekavsk | sr-Latn-ijekavsk | sr-Latn) - SRC_URI="${SRC_URI} l10n_${my_l10n}? ( ${URI_BASE}/${KMNAME}-sr-${PV}.tar.xz )" - ;; - *) - SRC_URI="${SRC_URI} l10n_${my_l10n}? ( ${URI_BASE}/${KMNAME}-$(kde_l10n2lingua ${my_l10n})-${PV}.tar.xz )" - ;; - esac -done - -S="${WORKDIR}" +IUSE="aqua +minimal test" # TODO: Drop aqua as soon as possible pkg_setup() { if [[ -z ${A} ]]; then @@ -73,44 +42,13 @@ pkg_setup() { elog "${KDE_L10N[@]}" elog fi - [[ -n ${A} ]] && kde4-base_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/}/4" 2> /dev/null || - elog "${my_tar}: tar extract command failed at least partially - continuing" - done + [[ -n ${A} ]] && kde5_pkg_setup } src_prepare() { - default + kde5_src_prepare [[ -n ${A} ]] || return - # move known variant subdirs to root dir, currently sr@* - use_if_iuse l10n_sr-ijekavsk && _l10n_variant_subdir2root sr-ijekavsk sr - use_if_iuse l10n_sr-Latn-ijekavsk && _l10n_variant_subdir2root sr-Latn-ijekavsk sr - use_if_iuse l10n_sr-Latn && _l10n_variant_subdir2root sr-Latn sr - if use_if_iuse l10n_sr; then - rm -rf kde-l10n-sr-${PV}/4/sr/sr@* || die "Failed to cleanup L10N=sr" - _l10n_variant_subdir_buster sr - elif [[ -d kde-l10n-sr-${PV} ]]; then - # having any variant selected means parent lingua will be unpacked as well - rm -r kde-l10n-sr-${PV} || die "Failed to remove sr parent lingua" - fi - - # add all l10n to cmake - cat <<-EOF > CMakeLists.txt || die -project(kde4-l10n) -cmake_minimum_required(VERSION 2.8.12) -$(printf "add_subdirectory( %s )\n" `find . -mindepth 1 -maxdepth 1 -type d -name "*${PV}*"`) -EOF - - # Drop KF5-based part - find -maxdepth 2 -type f -name CMakeLists.txt -exec \ - sed -i -e "/add_subdirectory(5)/ s/^/#DONT/" {} + || die - einfo "Removing file collisions with Plasma 5 and Applications" [[ -f ${REMOVE_DIRS} ]] || die "Error: ${REMOVE_DIRS} not found!" [[ -f ${REMOVE_MSGS} ]] || die "Error: ${REMOVE_MSGS} not found!" @@ -161,47 +99,18 @@ EOF } src_configure() { - mycmakeargs=( + local mycmakeargs=( -DBUILD_docs=$(usex handbook) ) - [[ -n ${A} ]] && kde4-base_src_configure + [[ -n ${A} ]] && kde5_src_configure } src_compile() { - [[ -n ${A} ]] && kde4-base_src_compile + [[ -n ${A} ]] && kde5_src_compile } src_test() { :; } src_install() { - [[ -n ${A} ]] && kde4-base_src_install -} - -_l10n_variant_subdir2root() { - local lingua=$(kde_l10n2lingua ${1}) - local src=kde-l10n-${2}-${PV} - local dest=kde-l10n-${lingua}-${PV}/4 - - # create variant rootdir structure from parent lingua and adapt it - mkdir -p ${dest} || die "Failed to create ${dest}" - mv ${src}/4/${2}/${lingua} ${dest}/${lingua} || die "Failed to create ${dest}/${lingua}" - cp -f ${src}/CMakeLists.txt kde-l10n-${lingua}-${PV} || die "Failed to prepare L10N=${1} subdir" - echo "add_subdirectory(${lingua})" > ${dest}/CMakeLists.txt || - die "Failed to prepare ${dest}/CMakeLists.txt" - cp -f ${src}/4/${2}/CMakeLists.txt ${dest}/${lingua} || - die "Failed to create ${dest}/${lingua}/CMakeLists.txt" - sed -e "s/${2}/${lingua}/" -i ${dest}/${lingua}/CMakeLists.txt || - die "Failed to prepare ${dest}/${lingua}/CMakeLists.txt" - - _l10n_variant_subdir_buster ${1} -} - -_l10n_variant_subdir_buster() { - local dir=kde-l10n-$(kde_l10n2lingua ${1})-${PV}/4/$(kde_l10n2lingua ${1}) - - sed -e "/^macro.*subdirectory(/d" -i ${dir}/CMakeLists.txt || die "Failed to cleanup ${dir} subdir" - - for subdir in $(find ${dir} -mindepth 1 -maxdepth 1 -type d | sed -e "s:^\./::"); do - echo "add_subdirectory(${subdir##*/})" >> ${dir}/CMakeLists.txt - done + [[ -n ${A} ]] && kde5_src_install }