summaryrefslogtreecommitdiff
blob: 940051f93d526f43ad24dfff1cd5c9d5cab4dd9e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-util/scanmem/scanmem-0.13.ebuild,v 1.1 2012/09/20 11:08:39 radhermit Exp $

EAPI=4
PYTHON_DEPEND="gui? 2"

inherit autotools eutils python

DESCRIPTION="Locate and modify variables in executing processes"
HOMEPAGE="http://code.google.com/p/scanmem/"
SRC_URI="http://scanmem.googlecode.com/files/${P}.tar.gz"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="gui kde"

DEPEND="sys-libs/readline"
RDEPEND="${DEPEND}
	gui? (
		dev-python/pygtk:2
		kde? ( kde-base/kdesu )
		!kde? ( x11-libs/gksu )
	)"

src_prepare() {
	epatch "${FILESDIR}"/${P}-configure.patch
	epatch "${FILESDIR}"/${P}-desktop.patch
	epatch "${FILESDIR}"/${P}-docs.patch
	sed -i "/CFLAGS/d" Makefile.am || die

	if use gui ; then
		sed -i "s/python/python2/" gui/gameconqueror.in || die

		if use kde ; then
			sed -i 's/gksu --description "GameConqueror"/kdesu -c/' gui/gameconqueror.in || die
		fi
	fi

	eautoreconf
	chmod +x configure
}

src_configure() {
	econf \
		$(use_enable gui)
}

src_install() {
	default

	if use gui ; then
		docinto gui
		dodoc gui/{README,TODO}
	fi
}