Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@××××××.net>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-lang/tcl/, dev-lang/tcl/files/
Date: Tue, 20 Apr 2021 19:17:17
Message-Id: 1618946225.d451e07f2c4ace05f56e3fa9a867ceb165ae62a2.andrewammerlaan@gentoo
1 commit: d451e07f2c4ace05f56e3fa9a867ceb165ae62a2
2 Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
3 AuthorDate: Tue Apr 20 19:17:05 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net>
5 CommitDate: Tue Apr 20 19:17:05 2021 +0000
6 URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=d451e07f
7
8 dev-lang/tcl: import from ::gentoo for media-gfx/brlcad
9
10 Package-Manager: Portage-3.0.18, Repoman-3.0.3
11 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net>
12
13 dev-lang/tcl/files/tcl-8.5.13-multilib.patch | 11 +++
14 dev-lang/tcl/files/tcl-8.5.14-conf.patch | 11 +++
15 dev-lang/tcl/files/tcl-8.6.8-libieee.patch | 15 ++++
16 dev-lang/tcl/metadata.xml | 11 +++
17 dev-lang/tcl/tcl-8.5.17-r1.ebuild | 117 +++++++++++++++++++++++++++
18 5 files changed, 165 insertions(+)
19
20 diff --git a/dev-lang/tcl/files/tcl-8.5.13-multilib.patch b/dev-lang/tcl/files/tcl-8.5.13-multilib.patch
21 new file mode 100644
22 index 000000000..82f5fa031
23 --- /dev/null
24 +++ b/dev-lang/tcl/files/tcl-8.5.13-multilib.patch
25 @@ -0,0 +1,11 @@
26 +--- a/configure.in
27 ++++ b/configure.in
28 +@@ -645,7 +645,7 @@
29 +
30 + eval "TCL_LIB_FILE=${TCL_LIB_FILE}"
31 +
32 +-TCL_LIBRARY='$(prefix)/lib/tcl$(VERSION)'
33 ++TCL_LIBRARY='$(libdir)/tcl$(VERSION)'
34 + PRIVATE_INCLUDE_DIR='$(includedir)'
35 + HTML_DIR='$(DISTDIR)/html'
36 +
37
38 diff --git a/dev-lang/tcl/files/tcl-8.5.14-conf.patch b/dev-lang/tcl/files/tcl-8.5.14-conf.patch
39 new file mode 100644
40 index 000000000..ffd9f6fea
41 --- /dev/null
42 +++ b/dev-lang/tcl/files/tcl-8.5.14-conf.patch
43 @@ -0,0 +1,11 @@
44 +--- a/tcl.m4
45 ++++ b/tcl.m4
46 +@@ -1427,7 +1427,7 @@ dnl AC_CHECK_TOOL(AR, ar)
47 + # get rid of the warnings.
48 + #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES"
49 +
50 +- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}'
51 ++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -fPIC -Wl,-soname,${@}'
52 + DL_OBJS="tclLoadDl.o"
53 + DL_LIBS="-ldl"
54 + LDFLAGS="$LDFLAGS -Wl,--export-dynamic"
55
56 diff --git a/dev-lang/tcl/files/tcl-8.6.8-libieee.patch b/dev-lang/tcl/files/tcl-8.6.8-libieee.patch
57 new file mode 100644
58 index 000000000..e7c1f5aae
59 --- /dev/null
60 +++ b/dev-lang/tcl/files/tcl-8.6.8-libieee.patch
61 @@ -0,0 +1,15 @@
62 +--- a/tcl.m4
63 ++++ b/tcl.m4
64 +@@ -2470,12 +2470,9 @@
65 + #--------------------------------------------------------------------
66 + # On a few very rare systems, all of the libm.a stuff is
67 + # already in libc.a. Set compiler flags accordingly.
68 +- # Also, Linux requires the "ieee" library for math to work
69 +- # right (and it must appear before "-lm").
70 + #--------------------------------------------------------------------
71 +
72 + AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
73 +- AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
74 +
75 + #--------------------------------------------------------------------
76 + # Interactive UNIX requires -linet instead of -lsocket, plus it
77
78 diff --git a/dev-lang/tcl/metadata.xml b/dev-lang/tcl/metadata.xml
79 new file mode 100644
80 index 000000000..354c72665
81 --- /dev/null
82 +++ b/dev-lang/tcl/metadata.xml
83 @@ -0,0 +1,11 @@
84 +<?xml version="1.0" encoding="UTF-8"?>
85 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
86 +<pkgmetadata>
87 + <maintainer type="project">
88 + <email>sci@g.o</email>
89 + <name>Gentoo Science Project</name>
90 + </maintainer>
91 + <upstream>
92 + <remote-id type="sourceforge">tcl</remote-id>
93 + </upstream>
94 +</pkgmetadata>
95
96 diff --git a/dev-lang/tcl/tcl-8.5.17-r1.ebuild b/dev-lang/tcl/tcl-8.5.17-r1.ebuild
97 new file mode 100644
98 index 000000000..9b2e9fa61
99 --- /dev/null
100 +++ b/dev-lang/tcl/tcl-8.5.17-r1.ebuild
101 @@ -0,0 +1,117 @@
102 +# Copyright 1999-2021 Gentoo Authors
103 +# Distributed under the terms of the GNU General Public License v2
104 +
105 +EAPI=7
106 +
107 +inherit autotools flag-o-matic multilib toolchain-funcs multilib-minimal
108 +
109 +MY_P="${PN}${PV/_beta/b}"
110 +
111 +DESCRIPTION="Tool Command Language"
112 +HOMEPAGE="http://www.tcl.tk/"
113 +SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
114 +
115 +LICENSE="tcltk"
116 +SLOT="0/8.5"
117 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x86-solaris"
118 +IUSE="debug threads"
119 +
120 +RDEPEND=">=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}]"
121 +DEPEND="${RDEPEND}"
122 +
123 +SPARENT="${WORKDIR}/${MY_P}"
124 +S="${SPARENT}"/unix
125 +
126 +PATCHES=(
127 + "${FILESDIR}"/${PN}-8.5.13-multilib.patch
128 + "${FILESDIR}"/${PN}-8.5.14-conf.patch
129 + "${FILESDIR}"/${PN}-8.6.8-libieee.patch
130 +)
131 +
132 +src_prepare() {
133 + default
134 +
135 + # workaround stack check issues, bug #280934
136 + use hppa && append-cflags "-DTCL_NO_STACK_CHECK=1"
137 +
138 + tc-export CC
139 +
140 + sed \
141 + -e '/chmod/s:555:755:g' \
142 + -i Makefile.in || die
143 +
144 + eautoconf
145 + multilib_copy_sources
146 +}
147 +
148 +multilib_src_configure() {
149 + # We went ahead and deleted the whole compat/ subdir which means
150 + # the configure tests to detect broken versions need to pass (else
151 + # we'll fail to build). This comes up when cross-compiling, but
152 + # might as well get a minor configure speed up normally.
153 + export ac_cv_func_memcmp_working="yes"
154 + export tcl_cv_str{str,toul,tod}_unbroken="ok"
155 + export tcl_cv_strtod_buggy="no"
156 +
157 + econf \
158 + $(use_enable threads) \
159 + $(use_enable debug symbols)
160 +}
161 +
162 +multilib_src_install() {
163 + #short version number
164 + local v1=$(ver_cut 1-2)
165 + local mylibdir=$(get_libdir)
166 +
167 + S= default
168 +
169 + # fix the tclConfig.sh to eliminate refs to the build directory
170 + # and drop unnecessary -L inclusion to default system libdir
171 +
172 + sed \
173 + -e "/^TCL_BUILD_LIB_SPEC=/s:-L$(pwd) *::g" \
174 + -e "/^TCL_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
175 + -e "/^TCL_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tcl${v1}/include:g" \
176 + -e "/^TCL_BUILD_STUB_LIB_SPEC=/s:-L$(pwd) *::g" \
177 + -e "/^TCL_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
178 + -e "/^TCL_BUILD_STUB_LIB_PATH=/s:$(pwd):${EPREFIX}/usr/${mylibdir}:g" \
179 + -e "/^TCL_LIB_FILE=/s:'libtcl${v1}..TCL_DBGX..so':\"libtcl${v1}\$\{TCL_DBGX\}.so\":g" \
180 + -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
181 + if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
182 + sed \
183 + -e "/^TCL_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
184 + -e "/^TCL_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
185 + -i "${ED}"/usr/${mylibdir}/tclConfig.sh || die
186 + fi
187 +
188 + # install private headers
189 + insinto /usr/${mylibdir}/tcl${v1}/include/unix
190 + doins *.h
191 + insinto /usr/${mylibdir}/tcl${v1}/include/generic
192 + doins "${SPARENT}"/generic/*.h
193 + rm -f "${ED}"/usr/${mylibdir}/tcl${v1}/include/generic/{tcl,tclDecls,tclPlatDecls}.h || die
194 +
195 + # install symlink for libraries
196 + dosym libtcl${v1}$(get_libname) /usr/${mylibdir}/libtcl$(get_libname)
197 + dosym libtclstub${v1}.a /usr/${mylibdir}/libtclstub.a
198 +
199 + if multilib_is_native_abi; then
200 + dosym tclsh${v1} /usr/bin/tclsh
201 + dodoc "${SPARENT}"/{ChangeLog*,README,changes}
202 + fi
203 +}
204 +
205 +pkg_postinst() {
206 + for version in ${REPLACING_VERSIONS}; do
207 + if ! ver_test 8.5 -ge ${version}; then
208 + echo
209 + ewarn "You're upgrading from <${P}, you must recompile the other"
210 + ewarn "packages on your system that link with tcl after the upgrade"
211 + ewarn "completes. To perform this action, please run revdep-rebuild"
212 + ewarn "in package app-portage/gentoolkit."
213 + ewarn "If you have dev-lang/tk and dev-tcltk/tclx installed you should"
214 + ewarn "upgrade them before this recompilation, too,"
215 + echo
216 + fi
217 + done
218 +}