add tint2-9999 ebuild
[gentoo-zh.git] / x11-misc / tint2 / tint2-9999.ebuild
blob8cefbe34d40fa4704d0318d3edb147ed9b2e8fe5
1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/x11-misc/tint2/tint2-0.11-r1.ebuild,v 1.5 2012/09/11 17:38:41 idl0r Exp $
5 EAPI="3"
7 inherit cmake-utils eutils
9 if [[ ${PV} == "9999" ]] ; then
10 ESVN_REPO_URI="http://tint2.googlecode.com/svn/trunk"
11 SRC_URI=""
12 KEYWORDS="~amd64 ~x86"
13 inherit subversion
14 else
15 MY_P="${PN}-${PV/_/-}"
16 SRC_URI="http://tint2.googlecode.com/files/${MY_P}.tar.bz2"
17 KEYWORDS="amd64 x86"
18 S="${WORKDIR}/${MY_P}"
21 DESCRIPTION="A lightweight panel/taskbar"
22 HOMEPAGE="http://code.google.com/p/tint2/"
24 LICENSE="GPL-2"
25 SLOT="0"
26 IUSE="examples tint2conf"
28 COMMON_DEPEND="dev-libs/glib:2
29 x11-libs/cairo
30 x11-libs/pango[X]
31 x11-libs/libX11
32 x11-libs/libXinerama
33 x11-libs/libXdamage
34 x11-libs/libXcomposite
35 x11-libs/libXrender
36 x11-libs/libXrandr
37 media-libs/imlib2[X]"
38 DEPEND="${COMMON_DEPEND}
39 virtual/pkgconfig
40 x11-proto/xineramaproto"
41 RDEPEND="${COMMON_DEPEND}
42 tint2conf? ( x11-misc/tintwizard )"
44 src_prepare() {
45 if [[ ${PV} == "9999" ]] ; then
46 epatch "${FILESDIR}/gtk-icon-cache.sandbox.patch"
47 else
48 epatch "${FILESDIR}/battery_segfault.patch" # bug 343963
52 src_configure() {
53 local mycmakeargs=(
54 -DBATTERY=ON
55 $(cmake-utils_use_enable examples EXAMPLES)
56 $(cmake-utils_use_enable tint2conf TINT2CONF)
58 # bug 296890
59 "-DDOCDIR=/usr/share/doc/${PF}"
62 cmake-utils_src_configure
65 src_install() {
66 cmake-utils_src_install
67 rm -f "${D}/usr/bin/tintwizard.py"