Magellan Linux

Contents of /branches/R11-unstable/extras/tcl/tcl-8.6.2-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 22628 - (show annotations) (download)
Mon Oct 27 10:25:34 2014 UTC (9 years, 6 months ago) by niro
Original Path: trunk/extras/tcl/tcl-8.6.2-r1.smage2
File size: 2921 byte(s)
auto added: ver bump to 8.6.2-r1
1 # $Id$
2
3 PNAME="tcl"
4 PVER="8.6.2"
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 >= sys-libs/zlib-1.2.8"
14 SDEPEND=">= virtual/sed"
15
16 SRCFILE="${PNAME}${PVER}-src.tar.gz"
17 SRCDIR="${BUILDDIR}/${PNAME}${PVER}"
18
19 sminclude mtools
20
21 SRC_URI=(
22 sourceforge://${PNAME}/${SRCFILE}
23 mirror://${PNAME}/${SRCFILE}
24 mirror://${PNAME}/${PNAME}-8.5.5-libdir.patch
25 mirror://${PNAME}/${PNAME}-8.6.1-flags.patch
26 mirror://${PNAME}/${PNAME}-8.6.0-autopath.patch
27 )
28
29 # no alphas or betas
30 UP2EXCLUDE="[0-9][ab][0-9]"
31 UP2SEPERATOR="NULL"
32 UP2TARBALL="${PNAME}"
33 UP2DATE="updatecmd_sourceforge ${PNAME} Tcl -src.tar.gz"
34
35 src_prepare()
36 {
37 munpack ${SRCFILE} || die
38 cd ${SRCDIR}
39
40 # support variable libdir
41 mpatch ${PNAME}-8.5.5-libdir.patch || die
42
43 # fix rpath and pic issues
44 mpatch ${PNAME}-8.6.1-flags.patch || die
45
46 # fix library runtime detection with disabled rpath from the patch above
47 mpatch ${PNAME}-8.6.0-autopath.patch || die
48
49 # increase value from 500 to 5000 to fix dejagnu issues
50 # see: http://lists.freebsd.org/pipermail/freebsd-tcltk/2013-June/000068.html
51 # at least libffi testsuite needs this fix
52 sed -i 's:#define DUPTRAVERSE_MAX_DEPTH 500:&0:' generic/regc_nfa.c || die
53
54 cd ${SRCDIR}/unix
55 mautoreconf || die
56 }
57
58 src_compile()
59 {
60 cd ${SRCDIR}/unix
61
62 mconfigure || die
63 mmake || die
64 }
65
66 src_check()
67 {
68 cd ${SRCDIR}/unix
69 make test || die
70 }
71
72 src_install()
73 {
74 cd ${SRCDIR}/unix
75
76 local V="$(echo ${PVER} | cut -d "." -f 1,2)"
77
78 # removes the reference to the build directory
79 # and replace them by saner system wide locations
80 sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tclConfig.sh || die
81 sed -i "s:${SRCDIR}:/usr/include/tcl${V}:" tclConfig.sh || die
82 sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh || die
83
84 # installs tcl
85 mmake -j1 DESTDIR=${BINDIR} install || die
86
87 # installs the internal headers into a system-wide location.
88 minstalldir /usr/include/tcl${V}/unix || die
89 minstallfile \*.h /usr/include/tcl${V}/unix/ || die
90 minstalldir /usr/include/tcl${V}/generic || die
91 minstallfile ../generic/\*.h /usr/include/tcl${V}/generic/ || die
92 mdelete /usr/include/tcl${V}/generic/tcl.h || die
93 mdelete /usr/include/tcl${V}/generic/tclDecls.h || die
94 mdelete /usr/include/tcl${V}/generic/tclPlatDecls.h || die
95
96 # symlink unix private headers to generic (expect needs that)
97 mlink ../unix/tclUnixPort.h /usr/include/tcl${V}/generic || die
98 mlink ../unix/tclUnixThrd.h /usr/include/tcl${V}/generic || die
99
100 # creates compatibility symbolic links for the libs
101 mlink ../../include/tcl${V} /usr/$(mlibdir)/tcl${V}/include || die
102 mlink libtcl${V}.so /usr/$(mlibdir)/libtcl.so || die
103
104 mlink tclsh${V} /usr/bin/tclsh || die
105
106 cd ${SRCDIR}
107 minstalldocs ChangeLog* changes license.terms README || die
108 }