Gentoo Archives: gentoo-commits

From: Jeroen Roovers <jer@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/tk/files/, dev-lang/tk/
Date: Mon, 30 Jul 2018 05:55:37
Message-Id: 1532930129.af0a22e213a2def219aa8bb6bc8fcd0930dbf704.jer@gentoo
1 commit: af0a22e213a2def219aa8bb6bc8fcd0930dbf704
2 Author: Jeroen Roovers <jer <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 30 05:55:15 2018 +0000
4 Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 30 05:55:29 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af0a22e2
7
8 dev-lang/tk: Version 8.6.8.
9
10 Package-Manager: Portage-2.3.44, Repoman-2.3.10
11
12 dev-lang/tk/Manifest | 1 +
13 dev-lang/tk/files/tk-8.6.8-libieee.patch | 15 ++++
14 dev-lang/tk/tk-8.6.8.ebuild | 146 +++++++++++++++++++++++++++++++
15 3 files changed, 162 insertions(+)
16
17 diff --git a/dev-lang/tk/Manifest b/dev-lang/tk/Manifest
18 index a4bc999b117..04b094fe969 100644
19 --- a/dev-lang/tk/Manifest
20 +++ b/dev-lang/tk/Manifest
21 @@ -3,3 +3,4 @@ DIST tk8.5.17-src.tar.gz 4095985 BLAKE2B 4cbb140c30ca717ee499b9ad9e1a3df27a470a7
22 DIST tk8.6.5-src.tar.gz 4417393 BLAKE2B bff37ac292928095063ebd3131ab8bf9e9d0b075c115c9e9a1f0fe75c2843cae6153b15fc9b964cd16a1251feca13258034d14dadd5fa8967bff6d5fee813f8f SHA512 9acf2ef993a566a7cdd1efe21dc896b09125c65d86df53ab5a78542b21d3f031e9f9d72b81738705636c268b5ce72934c483eb087d5c0114f913c9075db9a3b1
23 DIST tk8.6.6-src.tar.gz 4273737 BLAKE2B 65b139fffe628439137a02a72af19be0f7c44956d18852f1ce8892349d0fa370281e475fbbe7451da524ab4e74a8c258ee5ee70b8a146bf1ec71e3bf420314a3 SHA512 223c72ab5a6f6040928c56843598b878efafab44ed4152a38e68aa2800f2c181adc50a8bf23279b7d446493eec43854920e8b649b6a34ecdf31ecc07ccc74044
24 DIST tk8.6.7-src.tar.gz 4282972 BLAKE2B b07102365539ee98e2972a5d3bee2bdee89cb4d3873b05c764810b89f0152b71bd0d14d007434a003cd784868afadf6a2a50deffc0c4596b4551a0be7625fd13 SHA512 adf35991b20878d18a6940cb3d24d821586828537edf6d20f9223f2989d317adbcbb5360f3226014d96fe44e7ec06cfdf434309438c90a09878345b7106c7dd9
25 +DIST tk8.6.8-src.tar.gz 4319854 BLAKE2B 167c5dc6c32e49653c04bc067c3d75df022ca230657be32797021b0e2f7748215d9ad0493c8020b8d1be1f005b9b2d561339a6a0b209721c0d05dd222d47d377 SHA512 d0d30637b733fb0b0d38461b6d872934c04af422fcdb7ec41a72331b2529cc94414e6f441f95a98642d69505e4f41469847fedd1cbe58bd08cdd818fcabd1db9
26
27 diff --git a/dev-lang/tk/files/tk-8.6.8-libieee.patch b/dev-lang/tk/files/tk-8.6.8-libieee.patch
28 new file mode 100644
29 index 00000000000..942144e68c7
30 --- /dev/null
31 +++ b/dev-lang/tk/files/tk-8.6.8-libieee.patch
32 @@ -0,0 +1,15 @@
33 +--- a/unix/tcl.m4
34 ++++ b/unix/tcl.m4
35 +@@ -2470,12 +2470,9 @@
36 + #--------------------------------------------------------------------
37 + # On a few very rare systems, all of the libm.a stuff is
38 + # already in libc.a. Set compiler flags accordingly.
39 +- # Also, Linux requires the "ieee" library for math to work
40 +- # right (and it must appear before "-lm").
41 + #--------------------------------------------------------------------
42 +
43 + AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
44 +- AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
45 +
46 + #--------------------------------------------------------------------
47 + # Interactive UNIX requires -linet instead of -lsocket, plus it
48
49 diff --git a/dev-lang/tk/tk-8.6.8.ebuild b/dev-lang/tk/tk-8.6.8.ebuild
50 new file mode 100644
51 index 00000000000..bdc7778ee50
52 --- /dev/null
53 +++ b/dev-lang/tk/tk-8.6.8.ebuild
54 @@ -0,0 +1,146 @@
55 +# Copyright 1999-2018 Gentoo Foundation
56 +# Distributed under the terms of the GNU General Public License v2
57 +
58 +EAPI=6
59 +
60 +inherit autotools eutils multilib multilib-minimal prefix toolchain-funcs versionator virtualx
61 +
62 +MY_P="${PN}${PV/_beta/b}"
63 +
64 +DESCRIPTION="Tk Widget Set"
65 +HOMEPAGE="http://www.tcl.tk/"
66 +SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
67 +
68 +LICENSE="tcltk"
69 +SLOT="0/8.6"
70 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
71 +IUSE="debug +threads truetype aqua xscreensaver"
72 +
73 +RDEPEND="
74 + !aqua? (
75 + >=media-libs/fontconfig-2.10.92[${MULTILIB_USEDEP}]
76 + >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}]
77 + >=x11-libs/libXt-1.1.4[${MULTILIB_USEDEP}]
78 + truetype? ( >=x11-libs/libXft-2.3.1-r1[${MULTILIB_USEDEP}] )
79 + xscreensaver? ( >=x11-libs/libXScrnSaver-1.2.2-r1[${MULTILIB_USEDEP}] )
80 + )
81 + ~dev-lang/tcl-${PV}:0=[${MULTILIB_USEDEP}]"
82 +DEPEND="${RDEPEND}
83 + !aqua? ( x11-base/xorg-proto )"
84 +
85 +# Not bumped to 8.6
86 +#RESTRICT=test
87 +
88 +SPARENT="${WORKDIR}/${MY_P}"
89 +S="${SPARENT}"/unix
90 +
91 +PATCHES=(
92 + "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch
93 + "${FILESDIR}"/${PN}-8.5.13-multilib.patch
94 + "${FILESDIR}"/${PN}-8.4.15-aqua.patch
95 + "${FILESDIR}"/${PN}-8.5.14-conf.patch # Bug 125971
96 + "${FILESDIR}"/${PN}-8.6.8-libieee.patch
97 +)
98 +
99 +src_prepare() {
100 + find \
101 + "${SPARENT}"/compat/* \
102 + -delete || die
103 +
104 + pushd "${SPARENT}" &>/dev/null || die
105 + default
106 + popd &>/dev/null || die
107 + eprefixify Makefile.in
108 +
109 + # Make sure we use the right pkg-config, and link against fontconfig
110 + # (since the code base uses Fc* functions).
111 + sed \
112 + -e 's/FT_New_Face/XftFontOpen/g' \
113 + -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
114 + -e 's:xft freetype2:xft freetype2 fontconfig:' \
115 + -i configure.in || die
116 + rm configure || die
117 +
118 + tc-export CC
119 +
120 + sed \
121 + -e '/chmod/s:555:755:g' \
122 + -i Makefile.in || die
123 +
124 + sed \
125 + -e 's:-O[2s]\?::g' \
126 + -i tcl.m4 || die
127 +
128 + mv configure.{in,ac} || die
129 +
130 + eautoconf
131 +
132 + multilib_copy_sources
133 +}
134 +
135 +multilib_src_configure() {
136 + if tc-is-cross-compiler ; then
137 + export ac_cv_func_strtod=yes
138 + export tcl_cv_strtod_buggy=1
139 + fi
140 +
141 + local mylibdir=$(get_libdir)
142 +
143 + econf \
144 + --with-tcl="${EPREFIX}/usr/${mylibdir}" \
145 + $(use_enable threads) \
146 + $(use_enable aqua) \
147 + $(use_enable truetype xft) \
148 + $(use_enable xscreensaver xss) \
149 + $(use_enable debug symbols)
150 +}
151 +
152 +multilib_src_test() {
153 + virtx emake test
154 +}
155 +
156 +multilib_src_install() {
157 + #short version number
158 + local v1=$(get_version_component_range 1-2)
159 + local mylibdir=$(get_libdir)
160 +
161 + S= default
162 +
163 + # normalize $S path, bug #280766 (pkgcore)
164 + local nS="$(cd "${S}"; pwd)"
165 +
166 + # fix the tkConfig.sh to eliminate refs to the build directory
167 + # and drop unnecessary -L inclusion to default system libdir
168 +
169 + sed \
170 + -e "/^TK_BUILD_LIB_SPEC=/s:-L${S}-\w*\.\w* ::g" \
171 + -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
172 + -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
173 + -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${S}-\w*\.\w* *::g" \
174 + -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
175 + -e "/^TK_BUILD_STUB_LIB_PATH=/s:${S}-\w*\.\w*:${EPREFIX}/usr/${mylibdir}:g" \
176 + -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
177 + -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
178 + if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then
179 + sed \
180 + -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
181 + -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
182 + -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
183 + fi
184 +
185 + # install private headers
186 + insinto /usr/${mylibdir}/tk${v1}/include/unix
187 + doins "${S}"/*.h
188 + insinto /usr/${mylibdir}/tk${v1}/include/generic
189 + doins "${SPARENT}"/generic/*.h
190 + rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die
191 +
192 + # install symlink for libraries
193 + dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
194 + dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
195 +
196 + if multilib_is_native_abi; then
197 + dosym wish${v1} /usr/bin/wish
198 + dodoc "${SPARENT}"/{ChangeLog*,README,changes}
199 + fi
200 +}