removed old mac plugin
[dottout.git] / dev-lang / tcl / tcl-8.6_beta1.ebuild
blob17a7229b2cc94b319a5e42f32b2b54714647366e
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 $
5 WANT_AUTOCONF=latest
6 WANT_AUTOMAKE=latest
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"
15 LICENSE="BSD"
16 SLOT="0"
17 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
18 IUSE="debug threads"
20 DEPEND=""
22 S="${WORKDIR}/${MY_P}"
24 pkg_setup() {
25 if use threads ; then
26 ewarn ""
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."
32 ewarn ""
33 epause 5
37 src_unpack() {
38 unpack ${A}
39 cd "${S}"
40 epatch "${FILESDIR}"/${PN}-8.5_alpha6-multilib.patch
42 # Bug 125971
43 epatch "${FILESDIR}"/${PN}-8.5_alpha6-tclm4-soname.patch
45 cd "${S}"/unix
46 eautoreconf
49 src_compile() {
50 tc-export CC
52 cd "${S}"/unix
53 econf \
54 $(use_enable threads) \
55 $(use_enable debug symbols) || die
56 emake || die
59 src_install() {
60 #short version number
61 local v1
62 v1=${PV%.*}
64 cd "${S}"/unix
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//\/}
69 sed -i \
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
94 cd "${S}"
95 dodoc ChangeLog* README changes
98 pkg_postinst() {
99 ewarn
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,"
106 ewarn