Magellan Linux

Contents of /trunk/core/tcl/tcl-8.6.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14609 - (show annotations) (download)
Tue Jan 1 15:18:28 2013 UTC (11 years, 5 months ago) by niro
File size: 2478 byte(s)
-disable threading, not supported by all apps
1 # $Id$
2
3 PNAME="tcl"
4 PVER="8.6.0"
5 PBUILD="r1"
6
7 PCAT="dev-lang"
8
9 DESCRIPTION="The Tcl package contains the Tool Command Language, a robust general-purpose scripting language."
10 HOMEPAGE="http://tcl.sourceforge.net/"
11
12 DEPEND=">= virtual/glibc"
13 SDEPEND=">= virtual/sed"
14
15 SRCFILE="${PNAME}${PVER}-src.tar.gz"
16 SRCDIR="${BUILDDIR}/${PNAME}${PVER}"
17
18 sminclude mtools
19
20 SRC_URI=(
21 sourceforge://${PNAME}/${SRCFILE}
22 mirror://${PNAME}/${SRCFILE}
23 mirror://${PNAME}/${PNAME}-8.5.5-libdir.patch
24 )
25
26 # no alphas or betas
27 UP2EXCLUDE="[0-9][ab][0-9]"
28 UP2SEPERATOR="NULL"
29 UP2TARBALL="${PNAME}"
30 UP2DATE="updatecmd_sourceforge ${PNAME} Tcl -src.tar.gz"
31
32 src_prepare()
33 {
34 munpack ${SRCFILE} || die
35 cd ${SRCDIR}
36
37 # support variable libdir
38 mpatch ${PNAME}-8.5.5-libdir.patch || die
39 }
40
41 src_compile()
42 {
43 cd ${SRCDIR}/unix
44
45 local myconf
46 [[ ${ARCH} = x86_64 ]] && myconf="--enable-64bit"
47
48 mconfigure ${myconf} || die
49 mmake CFLAGS="${CFLAGS}" || die
50 }
51
52 src_install()
53 {
54 cd ${SRCDIR}/unix
55
56 local V="$(echo ${PVER} | cut -d "." -f 1,2)"
57
58 # removes the reference to the build directory
59 # and replace them by saner system wide locations
60 sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tclConfig.sh || die
61 sed -i "s:${SRCDIR}:/usr/include/tcl${V}:" tclConfig.sh || die
62 sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh || die
63
64 # fixes a small doc issue cause Thread.3 maybe used by other packages
65 # mv ../doc/{,Tcl_}Thread.3 || die
66 # sed -i 's/ Thread.3/ Tcl_Thread.3/' mkLinks || die
67
68 # installs tcl
69 make INSTALL_ROOT=${BINDIR} \
70 MAN_INSTALL_DIR=${BINDIR}/usr/share/man \
71 install || die
72
73 # installs the internal headers into a system-wide location.
74 minstalldir /usr/include/tcl${V}/unix || die
75 minstallfile \*.h /usr/include/tcl${V}/unix/ || die
76 minstalldir /usr/include/tcl${V}/generic || die
77 minstallfile ../generic/\*.h /usr/include/tcl${V}/generic/ || die
78 rm -f ${BINDIR}/usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h || die
79
80 # symlink unix private headers to generic (expect needs that)
81 mlink ../unix/tclUnixPort.h /usr/include/tcl${V}/generic || die
82 mlink ../unix/tclUnixThrd.h /usr/include/tcl${V}/generic || die
83
84 # creates compatibility symbolic links for the libs
85 mlink ../../include/tcl${V} /usr/$(mlibdir)/tcl${V}/include || die
86 mlink libtcl${V}.so /usr/$(mlibdir)/libtcl.so || die
87
88 mlink tclsh${V} /usr/bin/tclsh || die
89
90 cd ${SRCDIR}
91 minstalldocs ChangeLog* changes license.terms README || die
92 }