updated usbmuxd
[dottout.git] / dev-lang / tk / tk-8.6_beta1.ebuild
blob38ca472b21905f21f9c7527d0a3f8e92a4b03a81
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 $
5 WANT_AUTOCONF=latest
6 WANT_AUTOMAKE=latest
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"
15 LICENSE="BSD"
16 SLOT="0"
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
21 ~dev-lang/tcl-${PV}"
22 DEPEND="${RDEPEND}
23 truetype? ( x11-libs/libXft )
24 x11-libs/libXt
25 x11-proto/xproto"
27 S="${WORKDIR}/${MY_P}"
29 pkg_setup() {
30 if use threads ; then
31 ewarn ""
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."
37 ewarn ""
38 epause 5
42 src_unpack() {
43 unpack ${A}
44 cd "${S}"
45 epatch "${FILESDIR}"/${PN}-8.4.11-multilib.patch
47 # Bug 125971
48 epatch "${FILESDIR}"/${PN}-8.5_alpha6-tclm4-soname.patch
50 cd "${S}"/unix
51 eautoreconf
54 src_compile() {
55 tc-export CC
56 cd "${S}"/unix
58 local mylibdir=$(get_libdir) ; mylibdir=${mylibdir//\/}
60 econf \
61 --with-tcl=/usr/${mylibdir} \
62 $(use_enable threads) \
63 $(use_enable truetype xft) \
64 $(use_enable debug symbols) || die
66 emake || die
69 src_install() {
70 #short version number
71 local v1
72 v1=${PV%.*}
74 cd "${S}"/unix
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//\/}
79 sed -i \
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
104 cd "${S}"
105 dodoc ChangeLog* README changes