]> Pileus Git - ~andy/sunrise/blob - x11-plugins/cairo-dock-plugins/cairo-dock-plugins-3.1.2-r300.ebuild
x11-plugins/cairo-dock-plugins: Fix qt deps
[~andy/sunrise] / x11-plugins / cairo-dock-plugins / cairo-dock-plugins-3.1.2-r300.ebuild
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: $
4
5 EAPI="5"
6
7 PYTHON_DEPEND="2:2.7"
8
9 inherit cmake-utils python versionator
10
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')
14
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"
18
19 LICENSE="GPL-3"
20 SLOT="3"
21 KEYWORDS="~amd64"
22 IUSE="alsa disks doncky gmenu gnome kde nwmon scooby webkit xfce"
23
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}"
27 done
28 unset lang
29
30 RDEPEND="
31         !x11-plugins/cairo-dock-plugins:2
32         dev-libs/atk
33         dev-libs/dbus-glib
34         dev-libs/glib:2
35         dev-libs/libical
36         dev-libs/libxml2
37         gnome-base/librsvg:2
38         media-libs/fontconfig
39         media-libs/freetype:2
40         media-libs/libexif
41         net-libs/libetpan
42         net-misc/curl
43         sys-apps/dbus
44         virtual/glu
45         virtual/libintl
46         virtual/opengl
47         sys-apps/lm_sensors
48         sys-power/upower
49         x11-libs/cairo
50         x11-libs/gdk-pixbuf:2
51         x11-libs/gtk+:3
52         x11-libs/libxklavier
53         x11-libs/libX11
54         x11-libs/libXcomposite
55         x11-libs/libXinerama
56         x11-libs/libXrandr
57         x11-libs/libXrender
58         x11-libs/libXtst
59         x11-libs/libXxf86vm
60         x11-libs/pango[X]
61         x11-libs/vte:2.90
62         =x11-misc/cairo-dock-${MY_PVL}*:3
63         alsa? ( media-libs/alsa-lib )
64         gmenu? ( gnome-base/gnome-menus )
65         kde? (
66                 kde-base/kdelibs
67                 dev-libs/qtcore )
68         webkit? ( net-libs/webkit-gtk:3 )
69         xfce? ( xfce-base/thunar )"
70
71 DEPEND="${RDEPEND}
72         sys-devel/gettext
73         virtual/pkgconfig
74         x11-proto/xproto "
75
76 S="${WORKDIR}/${PN}-${MY_PVL}"
77
78 pkg_setup() {
79
80         python_set_active_version 2
81 }
82
83 src_prepare() {
84
85         # Following adjustments done by removing parts of the CMakeLists until upstream makes these parts configuration switches dependent.
86
87         # Remove forced gcc optimization level
88
89         sed -i -e 's/add_definitions (-O3)//' "${S}/CMakeLists.txt"  || die "sed failed"
90
91         # Don't build code forcing unwanted automagic dependencies on unstable / controversial / huge stuff
92         sed -i \
93                 -e '/INDICATOR-APPLET/,/SHARED LIBRARIES/d' \
94                 -e '/STATUS \"> Impulse:\"/,/\#\# ILLUSION/d' \
95                 -e '/RECENT-EVENTS/,/\#\# REMOTE/d' \
96                 "${S}/CMakeLists.txt" || die
97
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]
100
101         sed -i -e '/STATUS \" \* Ruby:\"/,/GETTEXT_DBUS/ { /GETTEXT_DBUS/ !{d}}' "${S}/CMakeLists.txt"  || die "sed failed"
102
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...
104
105         sed -i -e '/STATUS NOTIFIER/,/\#\# SWITCHER/d' "${S}/CMakeLists.txt"  || die "sed failed"
106
107         # Localization
108
109         local lang
110
111         if [[ -z ${LINGUAS} ]]; then
112                 touch po/slctd_linguas
113         else
114                 for lang in ${LINGUAS}; do
115                         echo "\"${S}\"/po/${lang}.po" >> po/slctd_linguas
116                 done
117         fi
118         sed -e "s/^\(file (\)GLOB \(PO_FILES\).*$/\1STRINGS slctd_linguas \2)/" -i po/CMakeLists.txt  || die "sed failed"
119 }
120
121 src_configure() {
122
123         # Don't use standard cmake-utils_use* functions because upstream tests STREQUAL "no/yes"
124
125         local mycmakeargs=(
126                 "-DROOT_PREFIX=${D}"
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")
137         )
138         cmake-utils_src_configure
139 }