1 # Copyright 1999-2009 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-lang/tk/tk-8.5.6.ebuild,v 1.1 2009/01/17 13:34:39 mescalinum Exp $
8 inherit autotools eutils multilib toolchain-funcs
10 MY_P
="${PN}${PV/_beta/b}"
11 DESCRIPTION
="Tk Widget Set"
12 HOMEPAGE
="http://www.tcl.tk/"
13 SRC_URI
="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
17 KEYWORDS
="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd"
18 IUSE
="debug threads truetype"
20 RDEPEND
="x11-libs/libX11
23 truetype? ( x11-libs/libXft )
27 S
="${WORKDIR}/${MY_P}"
32 ewarn
"PLEASE NOTE: You are compiling ${P} with"
33 ewarn
"threading enabled."
34 ewarn
"Threading is not supported by all applications"
35 ewarn
"that compile against tcl. You use threading at"
36 ewarn
"your own discretion."
45 epatch
"${FILESDIR}"/${PN}-8.4
.11-multilib.
patch
48 epatch
"${FILESDIR}"/${PN}-8.5_alpha6-tclm4-soname.
patch
58 local mylibdir
=$
(get_libdir
) ; mylibdir
=${mylibdir//\/}
61 --with-tcl=/usr
/${mylibdir} \
62 $
(use_enable threads
) \
63 $
(use_enable truetype xft
) \
64 $
(use_enable debug symbols
) || die
75 S
= emake DESTDIR
="${D}" install || die
77 # fix the tkConfig.sh to eliminate refs to the build directory
78 local mylibdir
=$
(get_libdir
) ; mylibdir
=${mylibdir//\/}
80 -e "s,^\(TK_BUILD_LIB_SPEC='-L\)${S}/unix,\1/usr/${mylibdir}," \
81 -e "s,^\(TK_SRC_DIR='\)${S}',\1/usr/${mylibdir}/tk${v1}/include'," \
82 -e "s,^\(TK_BUILD_STUB_LIB_SPEC='-L\)${S}/unix,\1/usr/${mylibdir}," \
83 -e "s,^\(TK_BUILD_STUB_LIB_PATH='\)${S}/unix,\1/usr/${mylibdir}," \
84 -e "s,^\(TK_CC_SEARCH_FLAGS='.*\)',\1:/usr/${mylibdir}'," \
85 -e "s,^\(TK_LD_SEARCH_FLAGS='.*\)',\1:/usr/${mylibdir}'," \
86 "${D}"/usr
/${mylibdir}/tkConfig.sh || die
88 # install private headers
89 insinto
/usr
/${mylibdir}/tk
${v1}/include
/unix
90 doins
"${S}"/unix
/*.h || die
91 insinto
/usr
/${mylibdir}/tk
${v1}/include
/generic
92 doins
"${S}"/generic
/*.h || die
93 rm -f "${D}"/usr/${mylibdir}/tk${v1}/include/generic/tk.h
94 rm -f "${D}"/usr/${mylibdir}/tk${v1}/include
/generic
/tkDecls.h
95 rm -f "${D}"/usr/${mylibdir}/tk${v1}/include/generic/tkPlatDecls.h
97 # install symlink for libraries
98 #dosym libtk${v1}.a /usr/${mylibdir}/libtk.a
99 dosym libtk${v1}.so /usr/${mylibdir}/libtk.so
100 dosym libtkstub${v1}.a /usr/${mylibdir}/libtkstub.a
102 dosym wish${v1} /usr/bin/wish
105 dodoc ChangeLog* README changes