Magellan Linux

Contents of /branches/R11-stable/core/tcl/tcl-8.6.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14944 - (show annotations) (download)
Wed Jan 2 09:42:38 2013 UTC (11 years, 4 months ago) by niro
File size: 2557 byte(s)
-release branches/R11-stable
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 mirror://${PNAME}/${PNAME}-8.5.10-flags.patch
25 mirror://${PNAME}/${PNAME}-8.6.0-autopath.patch
26 )
27
28 # no alphas or betas
29 UP2EXCLUDE="[0-9][ab][0-9]"
30 UP2SEPERATOR="NULL"
31 UP2TARBALL="${PNAME}"
32 UP2DATE="updatecmd_sourceforge ${PNAME} Tcl -src.tar.gz"
33
34 src_prepare()
35 {
36 munpack ${SRCFILE} || die
37 cd ${SRCDIR}
38
39 # support variable libdir
40 mpatch ${PNAME}-8.5.5-libdir.patch || die
41
42 # fix rpath and pic issues
43 mpatch ${PNAME}-8.5.10-flags.patch || die
44
45 # fix library runtime detection with disabled rpath from the patch above
46 mpatch ${PNAME}-8.6.0-autopath.patch || die
47
48 cd ${SRCDIR}/unix
49 mautoreconf || die
50 }
51
52 src_compile()
53 {
54 cd ${SRCDIR}/unix
55
56 mconfigure || die
57 mmake || die
58 }
59
60 src_check()
61 {
62 cd ${SRCDIR}/unix
63 make test || die
64 }
65
66 src_install()
67 {
68 cd ${SRCDIR}/unix
69
70 local V="$(echo ${PVER} | cut -d "." -f 1,2)"
71
72 # removes the reference to the build directory
73 # and replace them by saner system wide locations
74 sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tclConfig.sh || die
75 sed -i "s:${SRCDIR}:/usr/include/tcl${V}:" tclConfig.sh || die
76 sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh || die
77
78 # installs tcl
79 mmake -j1 DESTDIR=${BINDIR} install || die
80
81 # installs the internal headers into a system-wide location.
82 minstalldir /usr/include/tcl${V}/unix || die
83 minstallfile \*.h /usr/include/tcl${V}/unix/ || die
84 minstalldir /usr/include/tcl${V}/generic || die
85 minstallfile ../generic/\*.h /usr/include/tcl${V}/generic/ || die
86 rm -f ${BINDIR}/usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h || die
87
88 # symlink unix private headers to generic (expect needs that)
89 mlink ../unix/tclUnixPort.h /usr/include/tcl${V}/generic || die
90 mlink ../unix/tclUnixThrd.h /usr/include/tcl${V}/generic || die
91
92 # creates compatibility symbolic links for the libs
93 mlink ../../include/tcl${V} /usr/$(mlibdir)/tcl${V}/include || die
94 mlink libtcl${V}.so /usr/$(mlibdir)/libtcl.so || die
95
96 mlink tclsh${V} /usr/bin/tclsh || die
97
98 cd ${SRCDIR}
99 minstalldocs ChangeLog* changes license.terms README || die
100 }