Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13461 - (show annotations) (download)
Tue Oct 9 14:02:34 2012 UTC (11 years, 8 months ago) by niro
File size: 2406 byte(s)
-fixed UP2DATE
1 # $Id$
2
3 PNAME="tcl"
4 PVER="8.5.12"
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=">= sys-apps/sed-4"
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 mconfigure || die
46 mmake CFLAGS="${CFLAGS}" || die
47 }
48
49 src_install()
50 {
51 cd ${SRCDIR}/unix
52
53 local V="$(echo ${PVER} | cut -d "." -f 1,2)"
54
55 # removes the reference to the build directory
56 # and replace them by saner system wide locations
57 sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tclConfig.sh || die
58 sed -i "s:${SRCDIR}:/usr/include/tcl${V}:" tclConfig.sh || die
59 sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh || die
60
61 # fixes a small doc issue cause Thread.3 maybe used by other packages
62 # mv ../doc/{,Tcl_}Thread.3 || die
63 # sed -i 's/ Thread.3/ Tcl_Thread.3/' mkLinks || die
64
65 # installs tcl
66 make INSTALL_ROOT=${BINDIR} \
67 MAN_INSTALL_DIR=${BINDIR}/usr/share/man \
68 install || die
69
70 # installs the internal headers into a system-wide location.
71 minstalldir /usr/include/tcl${V}/unix || die
72 minstallfile \*.h /usr/include/tcl${V}/unix/ || die
73 minstalldir /usr/include/tcl${V}/generic || die
74 minstallfile ../generic/\*.h /usr/include/tcl${V}/generic/ || die
75 rm -f ${BINDIR}/usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h || die
76
77 # symlink unix private headers to generic (expect needs that)
78 mlink ../unix/tclUnixPort.h /usr/include/tcl${V}/generic || die
79 mlink ../unix/tclUnixThrd.h /usr/include/tcl${V}/generic || die
80
81 # creates compatibility symbolic links for the libs
82 mlink ../../include/tcl${V} /usr/$(mlibdir)/tcl${V}/include || die
83 mlink libtcl${V}.so /usr/$(mlibdir)/libtcl.so || die
84
85 mlink tclsh${V} /usr/bin/tclsh || die
86
87 cd ${SRCDIR}
88 minstalldocs ChangeLog* changes license.terms README || die
89 }