*/*: Discontinue Gentoo SuperH port
[gentoo.git] / dev-lang / jimtcl / jimtcl-0.78-r2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="7"
5
6 inherit eutils
7
8 SRC_URI="https://github.com/msteveb/jimtcl/archive/${PV}.tar.gz -> ${P}.tar.gz"
9 KEYWORDS="~amd64 ~arm ~arm64 ~m68k ~mips ~s390 ~x86"
10
11 DESCRIPTION="Small footprint implementation of Tcl programming language"
12 HOMEPAGE="http://jim.tcl.tk/"
13
14 LICENSE="LGPL-2"
15 SLOT="0/78" # SONAME=libjim.so.0.78
16 IUSE="doc static-libs"
17
18 RDEPEND=""
19 DEPEND="
20         doc? ( app-text/asciidoc )
21         app-arch/unzip
22         dev-lang/tcl:0
23 "
24
25 PATCHES="
26         "${FILESDIR}"/${PN}-0.78-no-bootstrap.patch
27 "
28
29 src_configure() {
30         CCACHE=None econf --with-jim-shared
31         if use static-libs ; then
32                 # The build does not support doing both simultaneously.
33                 mkdir static-libs || die
34                 cd static-libs || die
35                 CCACHE=None ECONF_SOURCE=${S} econf
36         fi
37 }
38
39 src_compile() {
40         # Must build static-libs first.
41         use static-libs && emake -C static-libs libjim.a
42         emake all
43         use doc && emake docs
44 }
45
46 src_install() {
47         dobin jimsh
48         use static-libs && dolib.a static-libs/libjim.a
49         ln -sf libjim.so.* libjim.so || die
50         dolib.so libjim.so*
51         insinto /usr/include
52         doins jim.h jimautoconf.h jim-subcmd.h jim-signal.h \
53                 jim-win32compat.h jim-eventloop.h jim-config.h
54         dodoc AUTHORS README TODO
55         if use doc; then
56                 docinto html
57                 dodoc Tcl.html
58         fi
59 }