kde-apps/kde4-l10n: Add missing files
[gentoo.git] / kde-apps / kde4-l10n / kde4-l10n-4.14.3.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 KDE_HANDBOOK="optional"
8 inherit kde4-base
9
10 DESCRIPTION="KDE internationalization package"
11 HOMEPAGE="https://l10n.kde.org"
12
13 DEPEND="
14         sys-devel/gettext
15 "
16 RDEPEND="!<kde-base/konq-plugins-4.6"
17
18 KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
19 IUSE="minimal"
20
21 # /usr/portage/distfiles $ ls -1 kde-l10n-*-${PV}.* |sed -e 's:-${PV}.tar.xz::' -e 's:kde-l10n-::' |tr '\n' ' '
22 MY_LANGS="ar bg bs ca ca@valencia cs da de el en_GB es et eu fa fi fr ga gl he
23 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
24 sl sr sv tr ug uk wa zh_CN zh_TW"
25
26 URI_BASE="${SRC_URI/-${PV}.tar.xz/}"
27 SRC_URI=""
28
29 for MY_LANG in ${MY_LANGS} ; do
30         IUSE="${IUSE} linguas_${MY_LANG}"
31         SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${URI_BASE}/kde-l10n-${MY_LANG}-${PV}.tar.xz )"
32 done
33
34 S="${WORKDIR}"
35
36 src_unpack() {
37         local LNG DIR
38         if [[ -z ${A} ]]; then
39                 elog
40                 elog "You either have the LINGUAS variable unset, or it only"
41                 elog "contains languages not supported by ${P}."
42                 elog "You won't have any additional language support."
43                 elog
44                 elog "${P} supports these language codes:"
45                 elog "${MY_LANGS}"
46                 elog
47         fi
48
49         [[ -n ${A} ]] && unpack ${A}
50         cd "${S}"
51
52         # add all linguas to cmake
53         if [[ -n ${A} ]]; then
54                 for LNG in ${LINGUAS}; do
55                         DIR="kde-l10n-${LNG}-${PV}"
56                         if [[ -d "${DIR}" ]] ; then
57                                 echo "add_subdirectory( ${DIR} )" >> "${S}"/CMakeLists.txt
58                         fi
59                 done
60         fi
61 }
62
63 src_prepare() {
64         find "${S}" -name CMakeLists.txt -type f \
65                 -exec sed -i -e 's:^ *add_subdirectory( *kdepim-runtime *):# no kdepim-runtime:g' {} +
66         find "${S}" -name CMakeLists.txt -type f \
67                 -exec sed -i -e 's:^ *add_subdirectory( *kdepim *):# no kdepim:g' {} +
68
69         # quick workaround for bug 493278
70         find "${S}" -name "akonadi_knut_resource*" -delete
71
72                                 # Drop translations that get installed with plasma 5 and kde apps 5 packages
73                                 if use minimal; then
74
75                                         # KDE Workspace 4
76                                         rm -f "${S}"/*/messages/kde-workspace/{freespacenotifier,\
77 joystick,kaccess,kcmaccess,kcm_autostart,kcmbell,kcmcolors,kcm_desktoppaths,\
78 kcm_desktopthemedetails,kcmdevinfo,kcmfonts,kcm_infobase,kcminfo,\
79 kcm_infosummary,kcminit,kcminput,kcmkclock,kcmkeyboard,kcmkeys,\
80 kcmkwincompositing,kcmkwindecoration,kcm_kwindesktop,kcmkwinrules,\
81 kcmkwinscreenedges,kcm-kwin-scripts,kcm_kwintabbox,kcmkwm,kcmlaunch,kcm_memory,\
82 kcmnic,kcmopengl,kcm_pci,kcmsamba,kcmsmserver,kcm_solid_actions,\
83 kcm_standard_actions,kcmstyle,kcmusb,kcmview1394,kcmworkspaceoptions,kfontinst,\
84 khotkeys,kinfocenter,klipper,kmenuedit,krdb,krunner,kscreenlocker_greet,\
85 kscreenlocker,ksgrd,ksmserver,ksplashthemes,ksysguardlsofwidgets,ksysguard,\
86 ktouchpadenabler,kwin_clients,kwin_effects,kwin,kwin_scripting,libkdecorations,\
87 libkworkspace,liboxygenstyleconfig,libpowerdevilcommonconfig,libtaskmanager,\
88 plasma_applet_quicklaunch,plasma_applet_system-monitor,\
89 plasma_applet_webbrowser,plasma_containmentactions_contextmenu,\
90 plasma_containmentactions_switchwindow,plasma_engine_keystate,\
91 plasma_engine_mpris2,plasma_engine_network,plasma_engine_notifications,\
92 plasma_engine_rss,plasma_engine_share,plasma_engine_soliddevice,\
93 plasma_engine_weather,plasma_runner_activities,plasma_runner_bookmarksrunner,\
94 plasma_runner_calculatorrunner,plasma_runner_kill,plasma_runner_locations,\
95 plasma_runner_placesrunner,plasma_runner_plasma-desktop,\
96 plasma_runner_powerdevil,plasma_runner_recentdocuments,plasma_runner_services,\
97 plasma_runner_sessions,plasma_runner_shell,plasma_runner_solid,\
98 plasma_runner_webshortcuts,plasma_runner_windowedwidgets,plasma_runner_windows,\
99 powerdevilactivitiesconfig,powerdevilglobalconfig,powerdevil,\
100 powerdevilprofilesconfig,processcore,processui,systemsettings}.po
101
102                                         # KDE Runtime 4
103                                         rm -f "${S}"/*/messages/kde-runtime/{attica_kde,drkonqi,\
104 filetypes,htmlsearch,kcmcomponentchooser,kcm_emoticons,kcmhtmlsearch,\
105 kcmicons,kcmkded,kcmnotify,kcm_phonon,kcmshell,kdesu,kglobalaccel,\
106 khelpcenter,kio_applications,kio_archive,kio_bookmarks,kioclient,\
107 kio_fish,kio_info,kio_man,kio_nfs,kio_recentdocuments,kio_remote,\
108 kio_sftp,kio_smb,kio_thumbnail,kmimetypefinder,knetattach,kstart,\
109 ktraderclient,phonon_kde,soliduiserver}.po
110
111                                         # KDE Plasma Addons 4
112                                         rm -f "${S}"/*/messages/kdeplasma-addons/{konqprofiles,\
113 konsoleprofiles,lancelot,liblancelot-datamodels,libplasma_groupingcontainment,\
114 libplasmaweather,plasma_applet_binaryclock,plasma_applet_bookmarks,\
115 plasma_applet_bubblemon,plasma_applet_CharSelectApplet,plasma_applet_comic,\
116 plasma_applet_fifteenPuzzle,plasma_applet_fileWatcher,plasma_applet_frame,\
117 plasma_applet_groupingpanel,plasma_applet_incomingmsg,\
118 plasma_applet_knowledgebase,plasma_applet_kolourpicker,plasma_applet_leavenote,\
119 plasma_applet_life,plasma_applet_luna,plasma_applet_magnifique,\
120 plasma_applet_microblog,plasma_applet_news,plasma_applet_plasmaboard,\
121 plasma_applet_previewer,plasma_applet_qalculate,plasma_applet_qstardict,\
122 plasma_applet_rssnow,plasma_applet_showdashboard,plasma_applet_showdesktop,\
123 plasma_applet_spellcheck,plasma_applet_unitconverter,plasma_applet_weather,\
124 plasma_applet_weatherstation,plasma_applet_webslice,\
125 plasma_packagestructure_comic,plasma_runner_audioplayercontrol,\
126 plasma_runner_browserhistory,plasma_runner_CharacterRunner,\
127 plasma_runner_contacts,plasma_runner_converterrunner,plasma_runner_datetime,\
128 plasma_runner_events,plasma_runner_katesessions,\
129 plasma_runner_konquerorsessions,plasma_runner_konsolesessions,\
130 plasma_runner_kopete,plasma_runner_krunner_dictionary,plasma_runner_mediawiki,\
131 plasma_runner_spellcheckrunner,plasma_runner_translator,plasma_runner_youtube}.po
132
133                                         # KDELIBS 4
134                                         rm -f "${S}"/*/messages/kdelibs/{akonadi_baloo_indexer,\
135 baloo_file,baloo_file_extractor,baloosearch,balooshow,kcm_baloofile,kfilemetadata,\
136 kio_baloosearch,kio_tags,kio_timeline,plasma_runner_baloosearchrunner}.po
137
138                                         # KDE Applications 4
139                                         rm -f "${S}"/*/messages/applications/useraccount.po
140                                 fi
141
142         kde4-base_src_prepare
143 }
144
145 src_configure() {
146         mycmakeargs=(
147                 $(cmake-utils_use_build handbook docs)
148         )
149         [[ -n ${A} ]] && kde4-base_src_configure
150 }
151
152 src_compile() {
153         [[ -n ${A} ]] && kde4-base_src_compile
154 }
155
156 src_test() {
157         [[ -n ${A} ]] && kde4-base_src_test
158 }
159
160 src_install() {
161         [[ -n ${A} ]] && kde4-base_src_install
162 }