commit:     20fa07ae581a74f5cdfa35ebf62c9cebe373dd63
Author:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  5 16:17:22 2026 +0000
Commit:     Alfredo Tupone <tupone <AT> gentoo <DOT> org>
CommitDate: Thu Mar  5 16:17:22 2026 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20fa07ae

dev-lang/tk: add 9.0.3

Signed-off-by: Alfredo Tupone <tupone <AT> gentoo.org>

 dev-lang/tk/Manifest                      |   1 +
 dev-lang/tk/files/tk-9.0.3-multilib.patch |  11 +++
 dev-lang/tk/tk-9.0.3.ebuild               | 148 ++++++++++++++++++++++++++++++
 3 files changed, 160 insertions(+)

diff --git a/dev-lang/tk/Manifest b/dev-lang/tk/Manifest
index b39e7c619745..a0afeaa0beb3 100644
--- a/dev-lang/tk/Manifest
+++ b/dev-lang/tk/Manifest
@@ -1,2 +1,3 @@
 DIST tk8.6.16-src.tar.gz 4591625 BLAKE2B 
80c1a87c4d8e0f2b57313a0f75568dfa877694dc2e82c64f62013317fbbb23930be3f221648768d382bf7e0cd63bb9318af104bc5fb792df70bd3a6e5be146c4
 SHA512 
b7d37bee25f826f156137a04859ac756c682f1dd155ec9629119dc3690509ce1b6e308e23b291f2debbc10f3b1650993fea66463e5445c505860a10acac901d0
 DIST tk8.6.17-src.tar.gz 4593109 BLAKE2B 
dbbf8ca24e1bc1c057bb50d2225d39558620f38dc94c2f1a1c409921121f09916841fafa2c64ec4a989c0c0bc316bfc8781ed9df1ddd52c4fbe60657f5904ef1
 SHA512 
9997729e68a3eb2d6a2938c47c08456f2d60dfb59ccf16b5477e70e40eb127e1ff0f86f88da0c3fdd4c7f6cedc94482bba1cce9483f8cca91bdca4a54ea92707
+DIST tk9.0.3-src.tar.gz 4644835 BLAKE2B 
adfc44356507ef12040ef0b784d662971d9b9ac0a8dc1446ce60e13c6e3178e33083840f8903efcd7b981bed3c92e9d4a4b852d46b2f1cc1f1b56f936a882632
 SHA512 
8055e6c200b80c57d11b08d38683ab2f5b28fe335bfe9218207616670035aa46d0334255f82d1155a5aea0fbc38839e036406f8d6af2aa42730df12c6448e16d

diff --git a/dev-lang/tk/files/tk-9.0.3-multilib.patch 
b/dev-lang/tk/files/tk-9.0.3-multilib.patch
new file mode 100644
index 000000000000..d3cd423cb6d5
--- /dev/null
+++ b/dev-lang/tk/files/tk-9.0.3-multilib.patch
@@ -0,0 +1,11 @@
+--- a/unix/configure.ac        2020-12-26 11:26:32.952828258 +0100
++++ b/unix/configure.ac        2020-12-26 11:26:45.027642732 +0100
+@@ -663,7 +663,7 @@
+     TCL_STUB_FLAGS="-DUSE_TCL_STUBS"
+ fi
+ 
+-test -z "$TK_LIBRARY" && TK_LIBRARY='$(prefix)/lib/tk$(VERSION)'
++test -z "$TK_LIBRARY" && TK_LIBRARY='$(libdir)/tk$(VERSION)'
+ PRIVATE_INCLUDE_DIR='$(includedir)'
+ HTML_DIR='$(DISTDIR)/html'
+ TK_PKG_DIR='tk$(VERSION)'

diff --git a/dev-lang/tk/tk-9.0.3.ebuild b/dev-lang/tk/tk-9.0.3.ebuild
new file mode 100644
index 000000000000..26a694824c39
--- /dev/null
+++ b/dev-lang/tk/tk-9.0.3.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+# Please bump with dev-lang/tcl!
+
+inherit autotools multilib-minimal multilib prefix toolchain-funcs virtualx
+
+MY_P="${PN}${PV/_beta/b}"
+
+DESCRIPTION="Tk Widget Set"
+HOMEPAGE="https://www.tcl.tk/";
+SRC_URI="https://downloads.sourceforge.net/tcl/${MY_P}-src.tar.gz";
+
+SPARENT="${WORKDIR}/${PN}$(ver_cut 1-3 ${PV})"
+S="${SPARENT}"/unix
+
+LICENSE="tcltk"
+SLOT="0/8.6"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc ~ppc64 ~riscv 
~s390 ~sparc ~x86 ~x64-macos ~x64-solaris"
+IUSE="debug truetype aqua xscreensaver"
+RESTRICT="!test? ( test )"
+
+RDEPEND="
+       !aqua? (
+               media-libs/fontconfig[${MULTILIB_USEDEP}]
+               x11-libs/libX11[${MULTILIB_USEDEP}]
+               x11-libs/libXt[${MULTILIB_USEDEP}]
+               truetype? ( x11-libs/libXft[${MULTILIB_USEDEP}] )
+               xscreensaver? ( x11-libs/libXScrnSaver[${MULTILIB_USEDEP}] )
+       )
+       ~dev-lang/tcl-$(ver_cut 1-3):0=[${MULTILIB_USEDEP}]"
+DEPEND="${RDEPEND}
+       !aqua? ( x11-base/xorg-proto )"
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/${PN}-9.0.3-multilib.patch
+       "${FILESDIR}"/${PN}-8.4.15-aqua.patch
+       "${FILESDIR}"/${PN}-8.6.9-conf.patch # Bug 125971
+       "${FILESDIR}"/${PN}-8.6.14-test.patch
+       "${FILESDIR}"/${PN}-8.6.17-glibc-2.43.patch
+)
+
+QA_CONFIG_IMPL_DECL_SKIP=(
+       stat64 opendir64 readdir64 rewinddir64 closedir64 # used on AIX
+)
+
+src_prepare() {
+       find \
+               "${SPARENT}"/compat/* \
+               -delete || die
+
+       pushd "${SPARENT}" &>/dev/null || die
+       default
+       popd &>/dev/null || die
+       eprefixify Makefile.in
+
+       # Make sure we use the right pkg-config, and link against fontconfig
+       # (since the code base uses Fc* functions).
+       sed \
+               -e 's/FT_New_Face/XftFontOpen/g' \
+               -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
+               -e 's:xft freetype2:xft freetype2 fontconfig:' \
+               -i configure.ac || die
+       rm configure || die
+
+       tc-export CC
+
+       sed \
+               -e '/chmod/s:555:755:g' \
+               -i Makefile.in || die
+
+       sed \
+               -e 's:-O[2s]\?::g' \
+               -i tcl.m4 || die
+
+       eautoconf
+
+       multilib_copy_sources
+}
+
+multilib_src_configure() {
+       if tc-is-cross-compiler ; then
+               export ac_cv_func_strtod=yes
+               export tcl_cv_strtod_buggy=1
+       fi
+
+       local mylibdir=$(get_libdir)
+
+       econf \
+               --with-tcl="${EPREFIX}/usr/${mylibdir}" \
+               $(use_enable aqua) \
+               $(use_enable truetype xft) \
+               $(use_enable xscreensaver xss) \
+               $(use_enable debug symbols)
+}
+
+multilib_src_test() {
+       CI=1 virtx emake test || die "Tests failed"
+}
+
+multilib_src_install() {
+       #short version number
+       local v1=$(ver_cut 1-2)
+       local mylibdir=$(get_libdir)
+
+       S= default
+
+       # normalize $S path, bug #280766 (pkgcore)
+       local nS="$(cd "${S}"; pwd)"
+
+       # fix the tkConfig.sh to eliminate refs to the build directory
+       # and drop unnecessary -L inclusion to default system libdir
+
+       sed \
+               -e "/^TK_BUILD_LIB_SPEC=/s:-L${S}-\w*\.\w* ::g" \
+               -e "/^TK_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+               -e 
"/^TK_SRC_DIR=/s:${SPARENT}:${EPREFIX}/usr/${mylibdir}/tk${v1}/include:g" \
+               -e "/^TK_BUILD_STUB_LIB_SPEC=/s:-L${S}-\w*\.\w* *::g" \
+               -e "/^TK_STUB_LIB_SPEC=/s:-L${EPREFIX}/usr/${mylibdir} *::g" \
+               -e 
"/^TK_BUILD_STUB_LIB_PATH=/s:${S}-\w*\.\w*:${EPREFIX}/usr/${mylibdir}:g" \
+               -e 
"/^TK_LIB_FILE=/s:'libtk${v1}..TK_DBGX..so':\"libk${v1}\$\{TK_DBGX\}.so\":g" \
+               -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+       if use prefix && [[ ${CHOST} != *-darwin* ]] ; then
+               sed \
+                       -e 
"/^TK_CC_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|g" \
+                       -e 
"/^TK_LD_SEARCH_FLAGS=/s|'$|:${EPREFIX}/usr/${mylibdir}'|" \
+                       -i "${ED}"/usr/${mylibdir}/tkConfig.sh || die
+       fi
+
+       # install private headers
+       insinto /usr/${mylibdir}/tk${v1}/include/unix
+       doins "${S}"/*.h
+       insinto /usr/${mylibdir}/tk${v1}/include/generic
+       doins "${SPARENT}"/generic/*.h
+       rm -f 
"${ED}"/usr/${mylibdir}/tk${v1}/include/generic/{tk,tkDecls,tkPlatDecls}.h || 
die
+
+       # install symlink for libraries
+       dosym libtk${v1}$(get_libname) /usr/${mylibdir}/libtk$(get_libname)
+       dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
+
+       if multilib_is_native_abi; then
+               dosym wish${v1} /usr/bin/wish
+               dodoc "${SPARENT}"/{ChangeLog*,README.md,changes}
+       fi
+}

Reply via email to