commit:     022d2d1eb13f916ca9e34d879302bf660ff62109
Author:     Andreas K. Huettel (dilfridge) <dilfridge <AT> gentoo <DOT> org>
AuthorDate: Thu Apr 10 22:45:56 2014 +0000
Commit:     Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
CommitDate: Thu Apr 10 22:45:56 2014 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=022d2d1e

[kde] fix l10n ebuidls

---
 kde-base/kde-l10n/kde-l10n-4.13.0.ebuild       | 129 ++++++++++-------------
 kde-base/kdepim-l10n/kdepim-l10n-4.13.0.ebuild | 135 +++++++++++++------------
 2 files changed, 125 insertions(+), 139 deletions(-)

diff --git a/kde-base/kde-l10n/kde-l10n-4.13.0.ebuild 
b/kde-base/kde-l10n/kde-l10n-4.13.0.ebuild
index 0505de5..8b6218f 100644
--- a/kde-base/kde-l10n/kde-l10n-4.13.0.ebuild
+++ b/kde-base/kde-l10n/kde-l10n-4.13.0.ebuild
@@ -4,112 +4,89 @@
 
 EAPI=5
 
-KDE_SCM="svn"
+KDE_HANDBOOK="optional"
 inherit kde4-base
 
 DESCRIPTION="KDE internationalization package"
 HOMEPAGE="http://l10n.kde.org";
-DEPEND=">=sys-devel/gettext-0.17"
-RDEPEND="${DEPEND}"
 
-KEYWORDS=" ~amd64 ~x86 ~amd64-linux ~x86-linux"
+DEPEND="
+       sys-devel/gettext
+"
+RDEPEND="!<kde-base/konq-plugins-4.6"
+
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE=""
 
-LANGS="af ar be bg bn bn_IN br ca cs csb cy da de el en_GB eo es et eu fa fi fr
-       fy ga gl gu he hi hr hsb hu hy is it ja ka kk km kn ko ku lb lt lv mk ml
-       ms mt nb nds ne nl nn nso oc pa pl pt pt_BR ro ru rw se sk sl sr sv ta 
te tg
-       th tr uk uz vi wa xh zh_CN zh_HK zh_TW"
-for LNG in ${LANGS}; do
-       IUSE="${IUSE} linguas_${LNG}"
+# /usr/portage/distfiles $ ls -1 kde-l10n-*-${PV}.* |sed -e 
's:-${PV}.tar.xz::' -e 's:kde-l10n-::' |tr '\n' ' '
+MY_LANGS="ar bg bs ca ca@valencia cs da de el en_GB es et eu 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 vi wa zh_CN zh_TW"
+
+URI_BASE="${SRC_URI/-${PV}.tar.xz/}"
+SRC_URI=""
+
+for MY_LANG in ${MY_LANGS} ; do
+       IUSE="${IUSE} linguas_${MY_LANG}"
+       SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( 
${URI_BASE}/${PN}-${MY_LANG}-${PV}.tar.xz )"
 done
-S="${WORKDIR}"/${PN}
-
-pkg_setup() {
-       local lng
-       for lng in ${LINGUAS}; do
-               enabled_linguas+=" ${lng}"
-       done
-       if [[ -z ${enabled_linguas} ]]; then
+
+S="${WORKDIR}"
+
+src_unpack() {
+       local LNG DIR
+       if [[ -z ${A} ]]; then
                elog
                elog "You either have the LINGUAS variable unset, or it only"
                elog "contains languages not supported by ${P}."
                elog "You won't have any additional language support."
                elog
                elog "${P} supports these language codes:"
-               elog "${LANGS}"
+               elog "${MY_LANGS}"
                elog
        fi
-       kde4-base_pkg_setup
-}
 
-src_unpack() {
-       local lng
-
-       for lng in ${enabled_linguas}; do
-               
ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4/${lng}"
-               S="${WORKDIR}"/${PN}/${lng}
-               subversion_src_unpack
-       done
-       ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4/scripts"
-       S="${WORKDIR}"/${PN}/scripts
-       subversion_src_unpack
-       S="${WORKDIR}"/${PN}
-       kde4-base_src_unpack
-}
+       [[ -n ${A} ]] && unpack ${A}
+       cd "${S}"
 
-src_prepare() {
-       for lng in ${enabled_linguas}; do
-               # we dont want l10n for all playground stuff we need it only 
for kde!
-               rm -r "${S}/${lng}"/data/calligra
-               rm -r "${S}/${lng}"/docs/extragear*
-               rm -r "${S}/${lng}"/docs/playground*
-               rm -r "${S}/${lng}"/docs/kdereview
-               rm -r "${S}/${lng}"/docs/calligra
-               rm -r "${S}/${lng}"/docs/koffice
-               rm -r "${S}/${lng}"/messages/extragear*
-               rm -r "${S}/${lng}"/messages/playground*
-               rm -r "${S}/${lng}"/messages/kdereview
-               rm -r "${S}/${lng}"/messages/calligra
-               rm -r "${S}/${lng}"/messages/koffice
-
-               # remove kdepim stuff as well, we have it in seperate 
kdepim-l10n package
-               rm -r "${S}/${lng}"/messages/kdepim*
-               rm -r "${S}/${lng}"/docmessages/kdepim*
-               rm -r "${S}/${lng}"/docs/kdepim*
-       done
+       # add all linguas to cmake
+       if [[ -n ${A} ]]; then
+               for LNG in ${LINGUAS}; do
+                       DIR="${PN}-${LNG}-${PV}"
+                       if [[ -d "${DIR}" ]] ; then
+                               echo "add_subdirectory( ${DIR} )" >> 
"${S}"/CMakeLists.txt
+                       fi
+               done
+       fi
 }
 
-src_configure() {
-       local lng
-
-       if [[ ! -z ${enabled_linguas} ]]; then
-               cat <<-EOF > "${S}"/CMakeLists.txt
-               project(kde-l10n)
-
-               find_package(KDE4 REQUIRED)
-               include (KDE4Defaults)
-               include(MacroOptionalAddSubdirectory)
+src_prepare() {
+       find "${S}" -name CMakeLists.txt -type f \
+               -exec sed -i -e 's:^ *add_subdirectory( *kdepim-runtime *):# no 
kdepim-runtime:g' {} +
+       find "${S}" -name CMakeLists.txt -type f \
+               -exec sed -i -e 's:^ *add_subdirectory( *kdepim *):# no 
kdepim:g' {} +
 
-               find_package(Gettext REQUIRED)
+       # quick workaround for bug 493278
+       find "${S}" -name "akonadi_knut_resource*" -delete
 
-               EOF
+       kde4-base_src_prepare
+}
 
-               for lng in ${enabled_linguas} ; do
-                       "${S}"/scripts/autogen.sh ${lng}
-                       echo "add_subdirectory( ${lng} )" >> 
"${S}"/CMakeLists.txt
-               done
-               kde4-base_src_configure
-       fi
+src_configure() {
+       mycmakeargs=(
+               $(cmake-utils_use_build handbook docs)
+       )
+       [[ -n ${A} ]] && kde4-base_src_configure
 }
 
 src_compile() {
-       [[ -z ${enabled_linguas} ]] || kde4-base_src_compile
+       [[ -n ${A} ]] && kde4-base_src_compile
 }
 
 src_test() {
-       [[ -z ${enabled_linguas} ]] || kde4-base_src_test
+       [[ -n ${A} ]] && kde4-base_src_test
 }
 
 src_install() {
-       [[ -z ${enabled_linguas} ]] || kde4-base_src_install
+       [[ -n ${A} ]] && kde4-base_src_install
 }

diff --git a/kde-base/kdepim-l10n/kdepim-l10n-4.13.0.ebuild 
b/kde-base/kdepim-l10n/kdepim-l10n-4.13.0.ebuild
index d84f531..30aac2c 100644
--- a/kde-base/kdepim-l10n/kdepim-l10n-4.13.0.ebuild
+++ b/kde-base/kdepim-l10n/kdepim-l10n-4.13.0.ebuild
@@ -4,99 +4,108 @@
 
 EAPI=5
 
-KDE_SCM="svn"
+KDE_HANDBOOK=optional
 inherit kde4-base
 
-DESCRIPTION="KDE internationalization package"
+DESCRIPTION="KDE PIM internationalization package"
 HOMEPAGE="http://l10n.kde.org";
 
-DEPEND=">=sys-devel/gettext-0.17"
-RDEPEND="${DEPEND}"
+DEPEND="
+       sys-devel/gettext
+"
+RDEPEND=""
 
-KEYWORDS=" ~amd64 ~x86 ~amd64-linux ~x86-linux"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
 IUSE=""
 
-LANGS="af ar be bg bn bn_IN br ca cs csb cy da de el en_GB eo es et eu fa fi fr
-       fy ga gl gu he hi hr hsb hu hy is it ja ka kk km kn ko ku lb lt lv mk ml
-       ms mt nb nds ne nl nn nso oc pa pl pt pt_BR ro ru rw se sk sl sr sv ta 
te tg
-       th tr uk uz vi wa xh zh_CN zh_HK zh_TW"
-for LNG in ${LANGS}; do
-       IUSE="${IUSE} linguas_${LNG}"
+MY_LANGS="ar bg bs ca ca@valencia cs da de el en_GB es et eu 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 vi wa zh_CN zh_TW"
+
+URI_BASE="${SRC_URI/-${PV}.tar.xz/}"
+SRC_URI=""
+
+for MY_LANG in ${MY_LANGS} ; do
+       IUSE="${IUSE} linguas_${MY_LANG}"
+       SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( 
${URI_BASE/kdepim/kde}/kde-l10n-${MY_LANG}-${PV}.tar.xz )"
 done
-S="${WORKDIR}"/${PN}
-
-pkg_setup() {
-       local lng
-       for lng in ${LINGUAS}; do
-               enabled_linguas+=" ${lng}"
-       done
-       if [[ -z ${enabled_linguas} ]]; then
+
+S="${WORKDIR}"
+
+src_unpack() {
+       local LNG DIR
+       if [[ -z ${A} ]]; then
                elog
                elog "You either have the LINGUAS variable unset, or it only"
                elog "contains languages not supported by ${P}."
                elog "You won't have any additional language support."
                elog
                elog "${P} supports these language codes:"
-               elog "${LANGS}"
+               elog "${MY_LANGS}"
                elog
        fi
-       kde4-base_pkg_setup
-}
 
-src_unpack() {
-       local lng
-
-       for lng in ${enabled_linguas}; do
-               
ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4/${lng}"
-               S="${WORKDIR}"/${PN}/${lng}
-               subversion_src_unpack
-       done
-       ESVN_REPO_URI="svn://anonsvn.kde.org/home/kde/trunk/l10n-kde4/scripts"
-       S="${WORKDIR}"/${PN}/scripts
-       subversion_src_unpack
-       S="${WORKDIR}"/${PN}
-       kde4-base_src_unpack
+       # For EAPI >= 3, or if not using .tar.xz archives:
+       [[ -n ${A} ]] && unpack ${A}
+       cd "${S}"
+
+       # add all linguas to cmake
+       if [[ -n ${A} ]]; then
+               for LNG in ${LINGUAS}; do
+                       DIR="kde-l10n-${LNG}-${PV}"
+                       if [[ -d "${DIR}" ]] ; then
+                               echo "add_subdirectory( ${DIR} )" >> 
"${S}"/CMakeLists.txt
+                       fi
+
+                       # remove everything except kdepim and kdepim-runtime
+                       for SUBDIR in data docs messages scripts ; do
+                               if [[ -d "${S}/${DIR}/${SUBDIR}" ]] ; then
+                                       einfo "   ${SUBDIR} subdirectory"
+                                       echo > 
"${S}/${DIR}/${SUBDIR}/CMakeLists.txt"
+                                       [[ -d "${S}/${DIR}/${SUBDIR}/kdepim" ]] 
&& ( echo "add_subdirectory(kdepim)" >> "${S}/${DIR}/${SUBDIR}/CMakeLists.txt" )
+                                       [[ -d 
"${S}/${DIR}/${SUBDIR}/kdepim-runtime" ]] && ( echo 
"add_subdirectory(kdepim-runtime)" >> "${S}/${DIR}/${SUBDIR}/CMakeLists.txt" )
+                               fi
+                       done
+
+                       # in some cases we may have sub-lingua subdirs, e.g. sr 
:(
+                       for XSUBDIR in "${S}/${DIR}/${LNG}"@* ; do
+                               XLNG=$(echo ${XSUBDIR}|sed -e 's:^.*/::')
+                               if [[ -d "${XSUBDIR}" ]] ; then
+                                       einfo "   ${XLNG} variant"
+                                       # remove everything except kdepim and 
kdepim-runtime
+                                       for SUBDIR in data docs messages 
scripts ; do
+                                               if [[ -d "${XSUBDIR}/${SUBDIR}" 
]] ; then
+                                                       einfo "      ${SUBDIR} 
subdirectory"
+                                                       echo > 
"${XSUBDIR}/${SUBDIR}/CMakeLists.txt"
+                                                       [[ -d 
"${XSUBDIR}/${SUBDIR}/kdepim" ]] && ( echo "add_subdirectory(kdepim)" >> 
"${XSUBDIR}/${SUBDIR}/CMakeLists.txt" )
+                                                       [[ -d 
"${XSUBDIR}/${SUBDIR}/kdepim-runtime" ]] && ( echo 
"add_subdirectory(kdepim-runtime)" >> "${XSUBDIR}/${SUBDIR}/CMakeLists.txt" )
+                                               fi
+                                       done
+                               fi
+                       done
+               done
+       fi
 }
 
 src_prepare() {
-       for lng in ${enabled_linguas}; do
-           # remove everything but the kdepim stuff
-               find "${S}/${lng}" -mindepth 2 -maxdepth 2 -type d ! -name 
"kdepim*" -exec rm -r {} +
-               rm "${S}/${lng}"/messages/entry.desktop
-       done
+       [[ -n ${A} ]] && kde4-base_src_prepare
 }
 
 src_configure() {
-       local lng
-
-       if [[ ! -z ${enabled_linguas} ]]; then
-               cat <<-EOF > "${S}"/CMakeLists.txt
-               project(kde-l10n)
-
-               find_package(KDE4 REQUIRED)
-               include (KDE4Defaults)
-               include(MacroOptionalAddSubdirectory)
-
-               find_package(Gettext REQUIRED)
-
-               EOF
-
-               for lng in ${enabled_linguas} ; do
-                       "${S}"/scripts/autogen.sh ${lng}
-                       echo "add_subdirectory( ${lng} )" >> 
"${S}"/CMakeLists.txt
-               done
-               kde4-base_src_configure
-       fi
+       mycmakeargs=(
+               $(cmake-utils_use_build handbook docs)
+       )
+       [[ -n ${A} ]] && kde4-base_src_configure
 }
 
 src_compile() {
-       [[ -z ${enabled_linguas} ]] || kde4-base_src_compile
+       [[ -n ${A} ]] && kde4-base_src_compile
 }
 
 src_test() {
-       [[ -z ${enabled_linguas} ]] || kde4-base_src_test
+       [[ -n ${A} ]] && kde4-base_src_test
 }
 
 src_install() {
-       [[ -z ${enabled_linguas} ]] || kde4-base_src_install
+       [[ -n ${A} ]] && kde4-base_src_install
 }

Reply via email to