summaryrefslogtreecommitdiff
blob: 555e528a9e50847f0c3415e76ec1b17fc55cc93c (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
58
59
60
61
62
63
64
65
66
67
68
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

EAPI="5"

PYTHON_COMPAT=( python2_6 python2_7 )
inherit eutils gnome2 python-single-r1

DESCRIPTION="A graphical tool for changing the Bashs behaviour"
HOMEPAGE="http://www.nanolx.org/"
SRC_URI="http://download.tuxfamily.org/bashstyleng/${P}.tar.bz2"

LICENSE="GPL-3"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="acpi dmi doc pci pdf usb"

DEPEND="${PYTHON_DEPS}
	app-shells/bash
	dev-libs/newt
	dev-python/gconf-python:2
	dev-python/pygtk[${PYTHON_USEDEP}]
	sys-devel/gettext
	x11-libs/vte[python]
	x11-misc/xdg-utils
	acpi? ( sys-power/acpi )
	dmi? ( sys-apps/dmidecode )
	pci? ( sys-apps/pciutils )
	pdf? ( app-text/ghostscript-gpl )
	usb? ( sys-apps/usbutils )"
RDEPEND="${DEPEND}"

DOCS="AUTHORS ChangeLog README TODO"

src_prepare() {
	gnome2_src_prepare

	# remove hardcoded python
	sed -i \
		-e "s#^python#${EPYTHON}#" \
		data/bashstyle.in || die "fixing python impl failed!"

	# use xdg-open
	sed -i \
		-e 's/x-www-browser/xdg-open/' \
		ui/bs-ng.py || die "fixing help button failed!"
}

src_configure() {
	gnome2_src_configure

	# fix schema install destination
	sed -i \
		-e 's#GCONFDIR=.*$#GCONFDIR="/etc/gconf/schemas"#' \
		./.configure/results || die "fixing schema install dest failed!"
}

src_install() {
	if use doc; then
		dohtml documentation/*
	fi

	gnome2_src_install DISABLE_POSTINSTALL=1

	python_fix_shebang "${D}"/usr/bin/text2morse \
		"${D}"/usr/share/bashstyle-ng/ui/{bs-ng,undobuffer}.py
}