1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
9 inherit cmake-utils python versionator
11 MY_PN="cairo-dock-plug-ins"
12 MY_PV=$(get_version_component_range '1-2')
13 MY_PVL=$(get_version_component_range '1-3')
15 DESCRIPTION="The official set of plugins for cairo-dock"
16 HOMEPAGE="http://www.glx-dock.org"
17 SRC_URI="http://launchpad.net/${MY_PN}/${MY_PV}/${MY_PVL}/+download/${P}.tar.gz"
22 IUSE="alsa disks doncky gmenu gnome kde nwmon scooby webkit xfce"
24 LANGS="ar cs de el en es et eu fr he hr hu id it ja lt nb nl pl pt_BR pt ru sk sr sv tr uk zh_CN zh_TW"
25 for lang in ${LANGS}; do
26 IUSE+=" linguas_${lang}"
31 !x11-plugins/cairo-dock-plugins:2
54 x11-libs/libXcomposite
62 =x11-misc/cairo-dock-${MY_PVL}*:3
63 alsa? ( media-libs/alsa-lib )
64 gmenu? ( gnome-base/gnome-menus )
68 webkit? ( net-libs/webkit-gtk:3 )
69 xfce? ( xfce-base/thunar )"
76 S="${WORKDIR}/${PN}-${MY_PVL}"
80 python_set_active_version 2
85 # Following adjustments done by removing parts of the CMakeLists until upstream makes these parts configuration switches dependent.
87 # Remove forced gcc optimization level
89 sed -i -e 's/add_definitions (-O3)//' "${S}/CMakeLists.txt" || die "sed failed"
91 # Don't build code forcing unwanted automagic dependencies on unstable / controversial / huge stuff
93 -e '/INDICATOR-APPLET/,/SHARED LIBRARIES/d' \
94 -e '/STATUS \"> Impulse:\"/,/\#\# ILLUSION/d' \
95 -e '/RECENT-EVENTS/,/\#\# REMOTE/d' \
96 "${S}/CMakeLists.txt" || die
98 # Don't build ruby \(until clean install possible\) \/ mono and vala bindings {I know nothing about that stuff\.\.\.\}
99 # Not really sure that escape sequences are needed as part of comments but... [Semi-Private joke]
101 sed -i -e '/STATUS \" \* Ruby:\"/,/GETTEXT_DBUS/ { /GETTEXT_DBUS/ !{d}}' "${S}/CMakeLists.txt" || die "sed failed"
103 # Not really needed to explicitly remove as the status notifier won't get built anyway, but some do not like the look of the build log if it is not...
105 sed -i -e '/STATUS NOTIFIER/,/\#\# SWITCHER/d' "${S}/CMakeLists.txt" || die "sed failed"
111 if [[ -z ${LINGUAS} ]]; then
112 touch po/slctd_linguas
114 for lang in ${LINGUAS}; do
115 echo "\"${S}\"/po/${lang}.po" >> po/slctd_linguas
118 sed -e "s/^\(file (\)GLOB \(PO_FILES\).*$/\1STRINGS slctd_linguas \2)/" -i po/CMakeLists.txt || die "sed failed"
123 # Don't use standard cmake-utils_use* functions because upstream tests STREQUAL "no/yes"
127 $(usex alsa "" "-Denable-alsa=no")
128 $(usex disks "-Denable-disks=yes")
129 $(usex doncky "-Denable-doncky=yes")
130 $(usex gmenu "" "-Denable-gmenu=no")
131 $(usex gnome "" "-Denable-gnome-integration=no")
132 $(usex kde "-Denable-kde-integration=yes" "")
133 $(usex nwmon "-Denable-network-monitor=yes" "")
134 $(usex scooby "-Denable-scooby-do=yes" "")
135 $(usex webkit "" "-Denable-weblets=no")
136 $(usex xfce "" "-Denable-xfce-integration=no")
138 cmake-utils_src_configure