1 |
|
# Copyright 1999-2020 Gentoo Authors
|
|
1 |
# Copyright 2020-2022 Gentoo Authors
|
2 |
2 |
# Distributed under the terms of the GNU General Public License v2
|
3 |
3 |
|
4 |
|
EAPI=7
|
|
4 |
EAPI=8
|
5 |
5 |
|
6 |
|
inherit autotools libtool
|
7 |
|
|
8 |
|
DEBIAN_PATCH=12
|
|
6 |
inherit autotools
|
9 |
7 |
|
10 |
8 |
DESCRIPTION="Readline extension to TCL"
|
11 |
|
HOMEPAGE="http://tclreadline.sf.net/"
|
12 |
|
SRC_URI="
|
13 |
|
mirror://sourceforge/${PN}/${P}.tar.gz
|
14 |
|
mirror://debian/pool/main/t/${PN}/${PN}_${PV}-${DEBIAN_PATCH}.debian.tar.gz"
|
|
9 |
HOMEPAGE="https://github.com/flightaware/tclreadline"
|
|
10 |
SRC_URI="https://github.com/flightaware/tclreadline/archive/v${PV}.tar.gz
|
|
11 |
-> ${P}.tar.gz"
|
15 |
12 |
|
16 |
|
SLOT="0"
|
17 |
13 |
LICENSE="BSD"
|
|
14 |
SLOT="0"
|
18 |
15 |
KEYWORDS="~alpha amd64 ppc ~sparc x86 ~amd64-linux ~x86-linux"
|
19 |
|
IUSE="static-libs"
|
|
16 |
IUSE="tk"
|
20 |
17 |
|
21 |
18 |
DEPEND="
|
22 |
|
dev-lang/tcl:0=
|
23 |
|
sys-libs/readline:0="
|
|
19 |
dev-lang/tcl:=
|
|
20 |
sys-libs/readline:=
|
|
21 |
tk? ( dev-lang/tk:= )
|
|
22 |
"
|
24 |
23 |
RDEPEND="${DEPEND}"
|
25 |
24 |
|
26 |
25 |
PATCHES=(
|
27 |
|
"${FILESDIR}"/${P}-gold.patch
|
28 |
|
"${FILESDIR}"/${P}-alloc-free.patch
|
29 |
|
"${FILESDIR}"/${P}-rl-executing-macro.patch
|
30 |
|
"${FILESDIR}"/${P}-rl-history-expand.patch
|
31 |
|
"${FILESDIR}"/${P}-rl-prompt.patch
|
32 |
|
"${WORKDIR}"/debian/patches/complete_nontcl.patch
|
33 |
|
"${WORKDIR}"/debian/patches/completion_matches.patch
|
34 |
|
"${WORKDIR}"/debian/patches/completion_pbug.patch
|
35 |
|
"${WORKDIR}"/debian/patches/kfreebsd.patch
|
36 |
|
"${WORKDIR}"/debian/patches/link.patch
|
37 |
|
"${WORKDIR}"/debian/patches/manpage.patch
|
38 |
|
"${WORKDIR}"/debian/patches/memuse.patch
|
39 |
|
"${WORKDIR}"/debian/patches/tclshpath.patch
|
40 |
|
"${WORKDIR}"/debian/patches/tinfo.patch
|
41 |
|
"${WORKDIR}"/debian/patches/varnames.patch
|
|
26 |
"${FILESDIR}"/${PN}-2.3.8-configure-clang16.patch
|
42 |
27 |
)
|
43 |
28 |
|
44 |
29 |
src_prepare() {
|
45 |
|
sed \
|
46 |
|
-e "s/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/" \
|
47 |
|
-e "/^TCLRL_LIBDIR/s:lib:$(get_libdir):g" \
|
48 |
|
-i configure.in || die
|
49 |
|
mv configure.{in,ac} || die
|
50 |
|
sed \
|
51 |
|
-e 's:configure.in:configure.ac:g' \
|
52 |
|
-i "${WORKDIR}"/debian/patches/* || die
|
53 |
|
|
54 |
30 |
default
|
|
31 |
|
|
32 |
# Needed for Clang 16 patch, can drop once in a release
|
55 |
33 |
eautoreconf
|
56 |
|
elibtoolize --patch-only
|
|
34 |
|
|
35 |
sed -i \
|
|
36 |
-e "s|^\(TCLRL_LIBDIR\)=.*|\1=\"${EPREFIX}/usr/$(get_libdir)\"|" \
|
|
37 |
configure || die
|
57 |
38 |
}
|
58 |
39 |
|
59 |
40 |
src_configure() {
|
60 |
|
econf \
|
61 |
|
--enable-shared \
|
62 |
|
$(use_enable static-libs static) \
|
63 |
|
--with-tcl="${EPREFIX}/usr/$(get_libdir)" \
|
64 |
|
--with-tcl-includes="${EPREFIX}/usr/include" \
|
65 |
|
--with-readline-includes="${EPREFIX}/usr/include" \
|
66 |
|
--with-readline-library="-lreadline"
|
|
41 |
local myConf=(
|
|
42 |
--with-tcl="${EPREFIX}/usr/$(get_libdir)"
|
|
43 |
--with-readline-includes="${EPREFIX}/usr/include/readline"
|
|
44 |
)
|
|
45 |
if ! use tk; then
|
|
46 |
myConf+=(--without-tk)
|
|
47 |
fi
|
|
48 |
econf "${myConf[@]}"
|
67 |
49 |
}
|
68 |
|
|
69 |
50 |
src_install() {
|
70 |
51 |
default
|
71 |
|
find "${D}" -name \*.la | xargs rm
|
|
52 |
find "${ED}" -name \*.la -delete
|
72 |
53 |
}
|