summaryrefslogtreecommitdiff
blob: 6ee739f1193b5aef56862c0539f65615460d0fdf (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
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

DESCRIPTION="Tk GUI console"
HOMEPAGE="http://tkcon.sourceforge.net/"
SRC_URI="https://github.com/wjoye/${PN}/archive/v${PV}.tar.gz ->
	${P}.tar.gz"

LICENSE="GPL-2"
KEYWORDS="~amd64 ~ppc ~x86"
SLOT="0"
IUSE="doc"

DEPEND="dev-lang/tk:*"
RDEPEND="${DEPEND}"

RESTRICT="test"

src_prepare() {
	default
	mv docs/changes.txt CHANGES
}

src_install() {
	local tclver="$(echo 'puts $tcl_version' | tclsh)"
	local instdir=/usr/$(get_libdir)/tcl${tclver}/${PN}$(ver_cut 1-2)
	dodir ${instdir}
	cp -pP pkgIndex.tcl tkcon.tcl "${D}"${instdir} || die
	dodir /usr/bin
	dosym ${instdir}/tkcon.tcl /usr/bin/tkcon
	if use doc; then
		HTML_DOCS=( docs/* )
	fi
	einstalldocs
}