1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit autotools eutils flag-o-matic multilib prefix toolchain-funcs versionator virtualx
9 MY_P="${PN}${PV/_beta/b}"
11 DESCRIPTION="Tk Widget Set"
12 HOMEPAGE="http://www.tcl.tk/"
14 mirror://sourceforge/tcl/${MY_P}-src.tar.gz
15 mirror://sourceforge/tcl/${MY_P//tk/tcl}-src.tar.gz
20 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
21 IUSE="debug threads truetype aqua xscreensaver"
29 truetype? ( x11-libs/libXft )
30 xscreensaver? ( x11-libs/libXScrnSaver )
32 ~dev-lang/tcl-${PV}:8.5=
35 !aqua? ( x11-proto/xproto )"
37 SPARENT="${WORKDIR}/${MY_P}"
44 "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
45 "${FILESDIR}"/${PN}-8.5.13-multilib.patch
47 epatch "${FILESDIR}"/${PN}-8.4.15-aqua.patch
48 eprefixify Makefile.in
51 epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
53 # Make sure we use the right pkg-config, and link against fontconfig
54 # (since the code base uses Fc* functions).
56 -e 's/FT_New_Face/XftFontOpen/g' \
57 -e "s:\<pkg-config\>:$(tc-getPKG_CONFIG):" \
58 -e 's:xft freetype2:xft freetype2 fontconfig:' \
59 -i configure.in || die
60 rm -f configure || die
63 -I"${WORKDIR}/${MY_P//tk/tcl}/generic" \
64 -I"${WORKDIR}/${MY_P//tk/tcl}/unix"
67 -e '/chmod/s:555:755:g' \
76 local v1=$(get_version_component_range 1-2)
77 local mylibdir=$(get_libdir)
80 --with-tcl="${EPREFIX}/usr/${mylibdir}/tcl${v1}" \
81 $(use_enable threads) \
83 $(use_enable truetype xft) \
84 $(use_enable xscreensaver xss) \
85 $(use_enable debug symbols)