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

EAPI=6

PYTHON_COMPAT=( python3_6 )

inherit multilib python-single-r1 toolchain-funcs

DESCRIPTION="Python package for Tcl"
HOMEPAGE="http://jfontain.free.fr/tclpython.htm"
SRC_URI="https://github.com/amykyta3/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"

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

REQUIRED_USE="${PYTHON_REQUIRED_USE}"

DEPEND="${PYTHON_DEPS}
	dev-lang/tcl:0="
RDEPEND="${DEPEND}"

PATCHES=( "${FILESDIR}"/${P}-gentoo.patch )

src_compile() {
	emake PKG_NAME=tclpython3 CC=$(tc-getCC) \
		MYCFLAGS="${CFLAGS}" MYLDFLAGS="${LDFLAGS}"
}

src_test() {
	emake PKG_NAME=tclpython3 CC=$(tc-getCC) test
}

src_install() {
	insinto /usr/$(get_libdir)
	doins -r build/tclpython3/tclpython3
	fperms 775 /usr/$(get_libdir)/tclpython3/tclpython3.so.${PV}
	dosym tclpython3.so.${PV} /usr/$(get_libdir)/tclpython3/tclpython3.so

	dodoc README.md VERSION.md
}