1 |
commit: fd5d1210d5a4bdf1875ab628bc654edd4e68fb25 |
2 |
Author: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> |
3 |
AuthorDate: Fri Apr 2 10:32:24 2021 +0000 |
4 |
Commit: Andrew Ammerlaan <andrewammerlaan <AT> riseup <DOT> net> |
5 |
CommitDate: Fri Apr 2 10:32:46 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/sci.git/commit/?id=fd5d1210 |
7 |
|
8 |
dev-lang/tk: import 8.5, removed from ::gentoo |
9 |
|
10 |
dep of media-gfx/brlcad |
11 |
|
12 |
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> riseup.net> |
13 |
|
14 |
dev-lang/tk/files/tk-8.4.15-aqua.patch | 11 +++ |
15 |
dev-lang/tk/files/tk-8.5.11-fedora-xft.patch | 13 +++ |
16 |
dev-lang/tk/files/tk-8.5.13-multilib.patch | 12 +++ |
17 |
dev-lang/tk/files/tk-8.5.14-conf.patch | 16 ++++ |
18 |
dev-lang/tk/files/tk-8.6.8-libieee.patch | 15 ++++ |
19 |
dev-lang/tk/metadata.xml | 11 +++ |
20 |
dev-lang/tk/tk-8.5.17-r1.ebuild | 128 +++++++++++++++++++++++++++ |
21 |
7 files changed, 206 insertions(+) |
22 |
|
23 |
diff --git a/dev-lang/tk/files/tk-8.4.15-aqua.patch b/dev-lang/tk/files/tk-8.4.15-aqua.patch |
24 |
new file mode 100644 |
25 |
index 000000000..9e6f59d12 |
26 |
--- /dev/null |
27 |
+++ b/dev-lang/tk/files/tk-8.4.15-aqua.patch |
28 |
@@ -0,0 +1,11 @@ |
29 |
+--- unix/Makefile.in |
30 |
++++ unix/Makefile.in |
31 |
+@@ -468,7 +468,7 @@ |
32 |
+ |
33 |
+ AQUA_HDRS = $(MAC_OSX_DIR)/tkMacOSX.h $(GENERIC_DIR)/tkIntXlibDecls.h |
34 |
+ |
35 |
+-AQUA_XLIB_HDRS = $(XLIB_DIR)/X11/*.h $(XLIB_DIR)/xbytes.h |
36 |
++AQUA_XLIB_HDRS = |
37 |
+ |
38 |
+ AQUA_PRIVATE_HDRS = $(MAC_OSX_DIR)/tkMacOSXPort.h $(MAC_OSX_DIR)/tkMacOSXInt.h |
39 |
+ |
40 |
|
41 |
diff --git a/dev-lang/tk/files/tk-8.5.11-fedora-xft.patch b/dev-lang/tk/files/tk-8.5.11-fedora-xft.patch |
42 |
new file mode 100644 |
43 |
index 000000000..08bfbf759 |
44 |
--- /dev/null |
45 |
+++ b/dev-lang/tk/files/tk-8.5.11-fedora-xft.patch |
46 |
@@ -0,0 +1,13 @@ |
47 |
+--- unix/configure.in.old 2010-09-02 20:12:14.000000000 +0200 |
48 |
++++ unix/configure.in 2011-02-17 13:32:22.719116636 +0100 |
49 |
+@@ -530,8 +530,8 @@ |
50 |
+ XFT_LIBS=`xft-config --libs 2>/dev/null` || found_xft="no" |
51 |
+ if test "$found_xft" = "no" ; then |
52 |
+ found_xft=yes |
53 |
+- XFT_CFLAGS=`pkg-config --cflags xft 2>/dev/null` || found_xft="no" |
54 |
+- XFT_LIBS=`pkg-config --libs xft 2>/dev/null` || found_xft="no" |
55 |
++ XFT_CFLAGS=`pkg-config --cflags xft freetype2 2>/dev/null` || found_xft="no" |
56 |
++ XFT_LIBS=`pkg-config --libs xft freetype2 2>/dev/null` || found_xft="no" |
57 |
+ fi |
58 |
+ AC_MSG_RESULT([$found_xft]) |
59 |
+ dnl make sure that compiling against Xft header file doesn't bomb |
60 |
|
61 |
diff --git a/dev-lang/tk/files/tk-8.5.13-multilib.patch b/dev-lang/tk/files/tk-8.5.13-multilib.patch |
62 |
new file mode 100644 |
63 |
index 000000000..5ba9c19c9 |
64 |
--- /dev/null |
65 |
+++ b/dev-lang/tk/files/tk-8.5.13-multilib.patch |
66 |
@@ -0,0 +1,12 @@ |
67 |
+diff -Naur unix/configure.in unix/configure.in |
68 |
+--- unix/configure.in 2005-06-30 01:43:10.000000000 +0900 |
69 |
++++ unix/configure.in 2005-07-02 23:22:16.000000000 +0900 |
70 |
+@@ -393,7 +393,7 @@ |
71 |
+ TCL_STUB_FLAGS="-DUSE_TCL_STUBS" |
72 |
+ fi |
73 |
+ |
74 |
+-TK_LIBRARY='$(prefix)/lib/tk$(VERSION)' |
75 |
++TK_LIBRARY='$(libdir)/tk$(VERSION)' |
76 |
+ PRIVATE_INCLUDE_DIR='$(includedir)' |
77 |
+ HTML_DIR='$(DISTDIR)/html' |
78 |
+ TK_PKG_DIR='tk$(VERSION)$(TK_DBGX)' |
79 |
|
80 |
diff --git a/dev-lang/tk/files/tk-8.5.14-conf.patch b/dev-lang/tk/files/tk-8.5.14-conf.patch |
81 |
new file mode 100644 |
82 |
index 000000000..5f8274f9e |
83 |
--- /dev/null |
84 |
+++ b/dev-lang/tk/files/tk-8.5.14-conf.patch |
85 |
@@ -0,0 +1,16 @@ |
86 |
+ unix/tcl.m4 | 6 +++--- |
87 |
+ 1 file changed, 3 insertions(+), 3 deletions(-) |
88 |
+ |
89 |
+diff --git a/unix/tcl.m4 b/unix/tcl.m4 |
90 |
+index 3974753..9c36eb5 100644 |
91 |
+--- unix/tcl.m4 |
92 |
++++ unix/tcl.m4 |
93 |
+@@ -1420,7 +1420,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ |
94 |
+ # get rid of the warnings. |
95 |
+ #CFLAGS_OPTIMIZE="${CFLAGS_OPTIMIZE} -D__NO_STRING_INLINES -D__NO_MATH_INLINES" |
96 |
+ |
97 |
+- SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS}' |
98 |
++ SHLIB_LD='${CC} -shared ${CFLAGS} ${LDFLAGS} -Wl,-soname,${@}' |
99 |
+ DL_OBJS="tclLoadDl.o" |
100 |
+ DL_LIBS="-ldl" |
101 |
+ LDFLAGS="$LDFLAGS -Wl,--export-dynamic" |
102 |
|
103 |
diff --git a/dev-lang/tk/files/tk-8.6.8-libieee.patch b/dev-lang/tk/files/tk-8.6.8-libieee.patch |
104 |
new file mode 100644 |
105 |
index 000000000..6bc8fa11a |
106 |
--- /dev/null |
107 |
+++ b/dev-lang/tk/files/tk-8.6.8-libieee.patch |
108 |
@@ -0,0 +1,15 @@ |
109 |
+--- unix/tcl.m4 |
110 |
++++ unix/tcl.m4 |
111 |
+@@ -2470,12 +2470,9 @@ |
112 |
+ #-------------------------------------------------------------------- |
113 |
+ # On a few very rare systems, all of the libm.a stuff is |
114 |
+ # already in libc.a. Set compiler flags accordingly. |
115 |
+- # Also, Linux requires the "ieee" library for math to work |
116 |
+- # right (and it must appear before "-lm"). |
117 |
+ #-------------------------------------------------------------------- |
118 |
+ |
119 |
+ AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm") |
120 |
+- AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"]) |
121 |
+ |
122 |
+ #-------------------------------------------------------------------- |
123 |
+ # Interactive UNIX requires -linet instead of -lsocket, plus it |
124 |
|
125 |
diff --git a/dev-lang/tk/metadata.xml b/dev-lang/tk/metadata.xml |
126 |
new file mode 100644 |
127 |
index 000000000..354c72665 |
128 |
--- /dev/null |
129 |
+++ b/dev-lang/tk/metadata.xml |
130 |
@@ -0,0 +1,11 @@ |
131 |
+<?xml version="1.0" encoding="UTF-8"?> |
132 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
133 |
+<pkgmetadata> |
134 |
+ <maintainer type="project"> |
135 |
+ <email>sci@g.o</email> |
136 |
+ <name>Gentoo Science Project</name> |
137 |
+ </maintainer> |
138 |
+ <upstream> |
139 |
+ <remote-id type="sourceforge">tcl</remote-id> |
140 |
+ </upstream> |
141 |
+</pkgmetadata> |
142 |
|
143 |
diff --git a/dev-lang/tk/tk-8.5.17-r1.ebuild b/dev-lang/tk/tk-8.5.17-r1.ebuild |
144 |
new file mode 100644 |
145 |
index 000000000..8f7e78d7f |
146 |
--- /dev/null |
147 |
+++ b/dev-lang/tk/tk-8.5.17-r1.ebuild |
148 |
@@ -0,0 +1,128 @@ |
149 |
+# Copyright 1999-2021 Gentoo Authors |
150 |
+# Distributed under the terms of the GNU General Public License v2 |
151 |
+ |
152 |
+EAPI=7 |
153 |
+ |
154 |
+inherit autotools multilib prefix toolchain-funcs virtualx |
155 |
+ |
156 |
+MY_P="${PN}${PV/_beta/b}" |
157 |
+ |
158 |
+DESCRIPTION="Tk Widget Set" |
159 |
+HOMEPAGE="http://www.tcl.tk/" |
160 |
+SRC_URI="mirror://sourceforge/tcl/${MY_P}-src.tar.gz" |
161 |
+ |
162 |
+LICENSE="tcltk" |
163 |
+SLOT="0/8.5" |
164 |
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
165 |
+IUSE="debug threads truetype aqua xscreensaver" |
166 |
+RESTRICT="!test? ( test )" |
167 |
+ |
168 |
+RDEPEND=" |
169 |
+ !aqua? ( |
170 |
+ media-libs/fontconfig |
171 |
+ media-libs/freetype:2 |
172 |
+ x11-libs/libX11 |
173 |
+ x11-libs/libXt |
174 |
+ truetype? ( x11-libs/libXft ) |
175 |
+ xscreensaver? ( x11-libs/libXScrnSaver ) |
176 |
+ ) |
177 |
+ ~dev-lang/tcl-${PV}:0=" |
178 |
+DEPEND="${RDEPEND} |
179 |
+ !aqua? ( x11-base/xorg-proto )" |
180 |
+ |
181 |
+SPARENT="${WORKDIR}/${MY_P}" |
182 |
+S="${SPARENT}"/unix |
183 |
+ |
184 |
+src_prepare() { |
185 |
+ eapply \ |
186 |
+ "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \ |
187 |
+ "${FILESDIR}"/${PN}-8.5.13-multilib.patch |
188 |
+ |
189 |
+ eapply "${FILESDIR}"/${PN}-8.4.15-aqua.patch |
190 |
+ eprefixify Makefile.in |
191 |
+ |
192 |
+ # Bug 125971 |
193 |
+ eapply "${FILESDIR}"/${PN}-8.5.14-conf.patch |
194 |
+ |
195 |
+ # Bug 648570 |
196 |
+ eapply "${FILESDIR}"/${PN}-8.6.8-libieee.patch |
197 |
+ |
198 |
+ # Make sure we use the right pkg-config, and link against fontconfig |
199 |
+ # (since the code base uses Fc* functions). |
200 |
+ sed \ |
201 |
+ -e 's/FT_New_Face/XftFontOpen/g' \ |
202 |
+ -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \ |
203 |
+ -e 's:xft freetype2:xft freetype2 fontconfig:' \ |
204 |
+ -i configure.in || die |
205 |
+ rm -f configure || die |
206 |
+ |
207 |
+ sed \ |
208 |
+ -e '/chmod/s:555:755:g' \ |
209 |
+ -i Makefile.in || die |
210 |
+ |
211 |
+ tc-export CC |
212 |
+ |
213 |
+ default |
214 |
+ eautoconf |
215 |
+} |
216 |
+ |
217 |
+src_configure() { |
218 |
+ local mylibdir=$(get_libdir) |
219 |
+ |
220 |
+ econf \ |
221 |
+ --with-tcl="${EPREFIX}/usr/${mylibdir}" \ |
222 |
+ $(use_enable threads) \ |
223 |
+ $(use_enable aqua) \ |
224 |
+ $(use_enable truetype xft) \ |
225 |
+ $(use_enable xscreensaver xss) \ |
226 |
+ $(use_enable debug symbols) |
227 |
+} |
228 |
+ |
229 |
+src_test() { |
230 |
+ virtx emake test |
231 |
+} |
232 |
+ |
233 |
+src_install() { |
234 |
+ #short version number |
235 |
+ local v1=$(ver_cut 1-2) |
236 |
+ local mylibdir=$(get_libdir) |
237 |
+ |
238 |
+ S= default |
239 |
+ |
240 |
+ # normalize $S path, bug #280766 (pkgcore) |
241 |
+ local nS="$(cd "${S}"; pwd)" |
242 |
+ |
243 |
+ # fix the tkConfig.sh to eliminate refs to the build directory |
244 |
+ # and drop unnecessary -L inclusion to default system libdir |
245 |
+ |
246 |
+ sed \ |
247 |
+ -e "/^TK_BUILD_LIB_SPEC=/s:-L${SPARENT}.*unix *::g" \ |
248 |
+ -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \ |
249 |
+ -e "/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \ |
250 |
+ -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${SPARENT}.*unix *::g" \ |
251 |
+ -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \ |
252 |
+ -e "/^TK_BUILD_STUB_LIB_PATH=/s:${SPARENT}.*unix:${EPREFIX}/usr/${mylibdir}:g" \ |
253 |
+ -e "/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \ |
254 |
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die |
255 |
+ if use prefix && [[ ${CHOST} != *-darwin* && ${CHOST} != *-mint* ]] ; then |
256 |
+ sed \ |
257 |
+ -e "/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \ |
258 |
+ -e "/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \ |
259 |
+ -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die |
260 |
+ fi |
261 |
+ |
262 |
+ # install private headers |
263 |
+ insinto /usr/${mylibdir}/tk${v1}/include/unix |
264 |
+ doins "${S}"/*.h |
265 |
+ insinto /usr/${mylibdir}/tk${v1}/include/generic |
266 |
+ doins "${SPARENT}"/generic/*.h |
267 |
+ rm -f "${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || die |
268 |
+ |
269 |
+ # install symlink for libraries |
270 |
+ dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname) |
271 |
+ dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a |
272 |
+ |
273 |
+ dosym wish${v1} /usr/bin/wish |
274 |
+ |
275 |
+ dodoc "${SPARENT}"/{ChangeLog*,README,changes} |
276 |
+} |