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/tcl/tcl-8.5.6.ebuild,v 1.1 2009/01/17 13:34:46 mescalinum Exp $
8 inherit autotools eutils multilib toolchain-funcs
10 MY_P
="${PN}${PV/_beta/b}"
11 DESCRIPTION
="Tool Command Language"
12 HOMEPAGE
="http://www.tcl.tk/"
13 SRC_URI
="mirror://sourceforge/tcl/${MY_P}-src.tar.gz"
17 KEYWORDS
="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
22 S
="${WORKDIR}/${MY_P}"
27 ewarn
"PLEASE NOTE: You are compiling ${P} with"
28 ewarn
"threading enabled."
29 ewarn
"Threading is not supported by all applications"
30 ewarn
"that compile against tcl. You use threading at"
31 ewarn
"your own discretion."
40 epatch
"${FILESDIR}"/${PN}-8.5_alpha6-multilib.
patch
43 epatch
"${FILESDIR}"/${PN}-8.5_alpha6-tclm4-soname.
patch
54 $
(use_enable threads
) \
55 $
(use_enable debug symbols
) || die
65 S
= emake DESTDIR
="${D}" install || die
67 # fix the tclConfig.sh to eliminate refs to the build directory
68 local mylibdir
=$
(get_libdir
) ; mylibdir
=${mylibdir//\/}
70 -e "s,^TCL_BUILD_LIB_SPEC='-L.*/unix,TCL_BUILD_LIB_SPEC='-L$/usr/${mylibdir}," \
71 -e "s,^TCL_SRC_DIR='.*',TCL_SRC_DIR='/usr/${mylibdir}/tcl${v1}/include'," \
72 -e "s,^TCL_BUILD_STUB_LIB_SPEC='-L.*/unix,TCL_BUILD_STUB_LIB_SPEC='-L/usr/${mylibdir}," \
73 -e "s,^TCL_BUILD_STUB_LIB_PATH='.*/unix,TCL_BUILD_STUB_LIB_PATH='/usr/${mylibdir}," \
74 -e "s,^TCL_LIB_FILE='libtcl${v1}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${v1}\$\{TCL_DBGX\}.so\"," \
75 -e "s,^TCL_CC_SEARCH_FLAGS='\(.*\)',TCL_CC_SEARCH_FLAGS='\1:/usr/${mylibdir}'," \
76 -e "s,^TCL_LD_SEARCH_FLAGS='\(.*\)',TCL_LD_SEARCH_FLAGS='\1:/usr/${mylibdir}'," \
77 "${D}"/usr
/${mylibdir}/tclConfig.sh || die
79 # install private headers
80 insinto
/usr
/${mylibdir}/tcl
${v1}/include
/unix
81 doins
"${S}"/unix
/*.h || die
82 insinto
/usr
/${mylibdir}/tcl
${v1}/include
/generic
83 doins
"${S}"/generic
/*.h || die
84 rm -f "${D}"/usr/${mylibdir}/tcl${v1}/include/generic/tcl.h
85 rm -f "${D}"/usr/${mylibdir}/tcl${v1}/include
/generic
/tclDecls.h
86 rm -f "${D}"/usr/${mylibdir}/tcl${v1}/include/generic/tclPlatDecls.h
88 # install symlink for libraries
89 dosym libtcl${v1}.so /usr/${mylibdir}/libtcl.so
90 dosym libtclstub${v1}.a /usr/${mylibdir}/libtclstub.a
92 dosym tclsh${v1} /usr/bin/tclsh
95 dodoc ChangeLog* README changes
100 ewarn "If you
're upgrading from <dev-lang/tcl-8.5, you must recompile the other"
101 ewarn "packages on your system that link with tcl after the upgrade"
102 ewarn "completes. To perform this action, please run revdep-rebuild"
103 ewarn "in package app-portage/gentoolkit."
104 ewarn "If you have dev-lang/tk and dev-tcltk/tclx installed you should"
105 ewarn "upgrade them before this recompilation, too,"