| 1 |
# Copyright 1999-2012 Gentoo Foundation
|
| 2 |
# Distributed under the terms of the GNU General Public License v2
|
| 3 |
# $Header: /var/cvsroot/gentoo-x86/app-office/calligra-l10n/calligra-l10n-2.5.0.ebuild,v 1.1 2012/08/13 16:36:14 scarabeus Exp $
|
| 4 |
|
| 5 |
EAPI=4
|
| 6 |
|
| 7 |
inherit kde4-base
|
| 8 |
|
| 9 |
DESCRIPTION="Calligra localization package"
|
| 10 |
HOMEPAGE="http://www.kde.org/"
|
| 11 |
LICENSE="GPL-2"
|
| 12 |
|
| 13 |
DEPEND="sys-devel/gettext"
|
| 14 |
RDEPEND="!app-office/koffice-l10n"
|
| 15 |
|
| 16 |
KEYWORDS="~amd64 ~x86"
|
| 17 |
IUSE="doc"
|
| 18 |
|
| 19 |
MY_LANGS="ca ca@valencia da de el en_GB es et fi fr gl hu it ja kk nb nds nl pl pt pt_BR ru sk sv uk zh_CN zh_TW"
|
| 20 |
URI_BASE="mirror://kde/stable/${PN/-l10n/}-${PV}/${PN}/"
|
| 21 |
SRC_URI=""
|
| 22 |
SLOT="4"
|
| 23 |
|
| 24 |
for MY_LANG in ${MY_LANGS} ; do
|
| 25 |
IUSE="${IUSE} linguas_${MY_LANG}"
|
| 26 |
SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${URI_BASE}/${PN}-${MY_LANG}-${PV}.tar.bz2 )"
|
| 27 |
done
|
| 28 |
unset MY_LANG
|
| 29 |
|
| 30 |
S="${WORKDIR}"
|
| 31 |
|
| 32 |
src_unpack() {
|
| 33 |
local lng dir
|
| 34 |
if [[ -z ${A} ]]; then
|
| 35 |
elog
|
| 36 |
elog "You either have the LINGUAS variable unset, or it only"
|
| 37 |
elog "contains languages not supported by ${P}."
|
| 38 |
elog "You won't have any additional language support."
|
| 39 |
elog
|
| 40 |
elog "${P} supports these language codes:"
|
| 41 |
elog "${MY_LANGS}"
|
| 42 |
elog
|
| 43 |
fi
|
| 44 |
|
| 45 |
[[ -n ${A} ]] && unpack ${A}
|
| 46 |
cd "${S}"
|
| 47 |
|
| 48 |
# add all linguas to cmake
|
| 49 |
if [[ -n ${A} ]]; then
|
| 50 |
for lng in ${MY_LANGS}; do
|
| 51 |
dir="${PN}-${lng}-${PV}"
|
| 52 |
if [[ -d "${dir}" ]] ; then
|
| 53 |
echo "add_subdirectory( ${dir} )" >> "${S}"/CMakeLists.txt
|
| 54 |
fi
|
| 55 |
done
|
| 56 |
fi
|
| 57 |
}
|
| 58 |
|
| 59 |
src_configure() {
|
| 60 |
local mycmakeargs=(
|
| 61 |
-DBUILD_MESSAGES=ON -DBUILD_DATA=ON
|
| 62 |
$(cmake-utils_use_build doc)
|
| 63 |
)
|
| 64 |
[[ -e "${S}"/CMakeLists.txt ]] && kde4-base_src_configure
|
| 65 |
}
|
| 66 |
|
| 67 |
src_compile() {
|
| 68 |
[[ -e "${S}"/CMakeLists.txt ]] && kde4-base_src_compile
|
| 69 |
}
|
| 70 |
|
| 71 |
src_test() {
|
| 72 |
[[ -e "${S}"/CMakeLists.txt ]] && kde4-base_src_test
|
| 73 |
}
|
| 74 |
|
| 75 |
src_install() {
|
| 76 |
[[ -e "${S}"/CMakeLists.txt ]] && kde4-base_src_install
|
| 77 |
}
|