1 |
commit: e99a9879e975b22f39078c217b3a4aeb39360a55 |
2 |
Author: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Feb 4 19:58:16 2022 +0000 |
4 |
Commit: Alfredo Tupone <tupone <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Feb 4 19:58:16 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e99a9879 |
7 |
|
8 |
dev-tcltk/expect: EAPI 7 |
9 |
|
10 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
11 |
Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org> |
12 |
|
13 |
dev-tcltk/expect/expect-5.45.4-r1.ebuild | 84 ++++++++++++++++++++++++++++++++ |
14 |
1 file changed, 84 insertions(+) |
15 |
|
16 |
diff --git a/dev-tcltk/expect/expect-5.45.4-r1.ebuild b/dev-tcltk/expect/expect-5.45.4-r1.ebuild |
17 |
new file mode 100644 |
18 |
index 000000000000..fa02fd421cbb |
19 |
--- /dev/null |
20 |
+++ b/dev-tcltk/expect/expect-5.45.4-r1.ebuild |
21 |
@@ -0,0 +1,84 @@ |
22 |
+# Copyright 1999-2022 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+ |
27 |
+inherit autotools |
28 |
+ |
29 |
+MY_P="${PN}${PV}" |
30 |
+DESCRIPTION="tool for automating interactive applications" |
31 |
+HOMEPAGE="https://core.tcl-lang.org/expect/" |
32 |
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz" |
33 |
+ |
34 |
+LICENSE="BSD" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos ~x64-solaris ~x86-solaris" |
37 |
+IUSE="debug doc threads" |
38 |
+ |
39 |
+# We need dejagnu for src_test, but dejagnu needs expect |
40 |
+# to compile/run, so we cant add dejagnu to DEPEND :/ |
41 |
+DEPEND=">=dev-lang/tcl-8.2:0[threads?]" |
42 |
+RDEPEND="${DEPEND}" |
43 |
+ |
44 |
+S=${WORKDIR}/${MY_P} |
45 |
+ |
46 |
+PATCHES=( "${FILESDIR}"/${P}-examples.patch ) |
47 |
+ |
48 |
+src_prepare() { |
49 |
+ default |
50 |
+ sed -i "s:/usr/local/bin:${EPREFIX}/usr/bin:" expect.man || die |
51 |
+ |
52 |
+ eapply "${FILESDIR}"/${PN}-5.45-gfbsd.patch |
53 |
+ eapply "${FILESDIR}"/${PN}-5.44.1.15-ldflags.patch |
54 |
+ eapply "${FILESDIR}"/${PN}-5.45-headers.patch #337943 |
55 |
+ eapply "${FILESDIR}"/${PN}-5.45-format-security.patch |
56 |
+ sed -i 's:ifdef HAVE_SYS_WAIT_H:ifndef NO_SYS_WAIT_H:' *.c |
57 |
+ |
58 |
+ # fix install_name on darwin |
59 |
+ [[ ${CHOST} == *-darwin* ]] && \ |
60 |
+ eapply "${FILESDIR}"/${P}-darwin-install_name.patch |
61 |
+ |
62 |
+ mv configure.{in,ac} || die |
63 |
+ |
64 |
+ eautoconf |
65 |
+} |
66 |
+ |
67 |
+src_configure() { |
68 |
+ # the 64bit flag is useless ... it only adds 64bit compiler flags |
69 |
+ # (like -m64) which the target toolchain should already handle |
70 |
+ econf \ |
71 |
+ --with-tcl="${EPREFIX}/usr/$(get_libdir)" \ |
72 |
+ --disable-64bit \ |
73 |
+ --enable-shared \ |
74 |
+ $(use_enable threads) \ |
75 |
+ $(use_enable debug symbols mem) |
76 |
+} |
77 |
+ |
78 |
+src_test() { |
79 |
+ # we need dejagnu to do tests ... but dejagnu needs |
80 |
+ # expect ... so don't do tests unless we have dejagnu |
81 |
+ type -p runtest || return 0 |
82 |
+ emake test |
83 |
+} |
84 |
+ |
85 |
+expect_make_var() { |
86 |
+ touch pkgIndex.tcl-hand |
87 |
+ printf 'all:;echo $('$1')\ninclude Makefile' | emake --no-print-directory -s -f - |
88 |
+ rm -f pkgIndex.tcl-hand || die |
89 |
+} |
90 |
+ |
91 |
+src_install() { |
92 |
+ default |
93 |
+ |
94 |
+ if use doc ; then |
95 |
+ docinto examples |
96 |
+ echo dodoc \ |
97 |
+ example/README \ |
98 |
+ $(printf 'example/%s ' $(expect_make_var _SCRIPTS)) \ |
99 |
+ $(printf 'example/%s.man ' $(expect_make_var _SCRIPTS_MANPAGES)) |
100 |
+ dodoc \ |
101 |
+ example/README \ |
102 |
+ $(printf 'example/%s ' $(expect_make_var _SCRIPTS)) \ |
103 |
+ $(printf 'example/%s.man ' $(expect_make_var _SCRIPTS_MANPAGES)) |
104 |
+ fi |
105 |
+} |