kde-plasma/user-manager: x86 stable wrt bug #607680
[gentoo.git] / dev-lang / tk / tk-8.5.17-r100.ebuild
1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit autotools eutils flag-o-matic multilib prefix toolchain-funcs versionator virtualx
8
9 MY_P="${PN}${PV/_beta/b}"
10
11 DESCRIPTION="Tk Widget Set"
12 HOMEPAGE="http://www.tcl.tk/"
13 SRC_URI="
14         mirror://sourceforge/tcl/${MY_P}-src.tar.gz
15         mirror://sourceforge/tcl/${MY_P//tk/tcl}-src.tar.gz
16         "
17
18 LICENSE="tcltk"
19 SLOT="8.5"
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"
22
23 RDEPEND="
24         !aqua? (
25                 media-libs/fontconfig
26                 media-libs/freetype:2
27                 x11-libs/libX11
28                 x11-libs/libXt
29                 truetype? ( x11-libs/libXft )
30                 xscreensaver? ( x11-libs/libXScrnSaver )
31         )
32         ~dev-lang/tcl-${PV}:8.5=
33         !=dev-lang/tk-8.5:0"
34 DEPEND="${RDEPEND}
35         !aqua? ( x11-proto/xproto )"
36
37 SPARENT="${WORKDIR}/${MY_P}"
38 S="${SPARENT}"/unix
39
40 DOCS=()
41
42 src_prepare() {
43         epatch \
44                 "${FILESDIR}"/${PN}-8.5.11-fedora-xft.patch \
45                 "${FILESDIR}"/${PN}-8.5.13-multilib.patch
46
47         epatch "${FILESDIR}"/${PN}-8.4.15-aqua.patch
48         eprefixify Makefile.in
49
50         # Bug 125971
51         epatch "${FILESDIR}"/${PN}-8.5.14-conf.patch
52
53         # Make sure we use the right pkg-config, and link against fontconfig
54         # (since the code base uses Fc* functions).
55         sed \
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
61
62         append-cppflags \
63                 -I"${WORKDIR}/${MY_P//tk/tcl}/generic" \
64                 -I"${WORKDIR}/${MY_P//tk/tcl}/unix"
65
66         sed \
67                 -e '/chmod/s:555:755:g' \
68                 -i Makefile.in || die
69
70         tc-export CC
71
72         eautoconf
73 }
74
75 src_configure() {
76         local v1=$(get_version_component_range 1-2)
77         local mylibdir=$(get_libdir)
78
79         econf \
80                 --with-tcl="${EPREFIX}/usr/${mylibdir}/tcl${v1}" \
81                 $(use_enable threads) \
82                 $(use_enable aqua) \
83                 $(use_enable truetype xft) \
84                 $(use_enable xscreensaver xss) \
85                 $(use_enable debug symbols)
86 }
87
88 src_test() {
89         Xemake test
90 }
91
92 src_install() {
93         dolib.so libtk8.5.so
94 }