Annotation of /branches/R11-stable/extras/tcl/tcl-8.6.1-r1.smage2
Parent Directory | Revision Log
Revision 19918 -
(hide annotations)
(download)
Fri Oct 25 09:03:26 2013 UTC (10 years, 8 months ago) by niro
Original Path: trunk/extras/tcl/tcl-8.6.1-r1.smage2
File size: 2812 byte(s)
Fri Oct 25 09:03:26 2013 UTC (10 years, 8 months ago) by niro
Original Path: trunk/extras/tcl/tcl-8.6.1-r1.smage2
File size: 2812 byte(s)
-moved to 'extras'
1 | niro | 19648 | # $Id$ |
2 | |||
3 | PNAME="tcl" | ||
4 | PVER="8.6.1" | ||
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 | niro | 19649 | mirror://${PNAME}/${PNAME}-8.6.1-flags.patch |
25 | niro | 19648 | 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 | niro | 19649 | mpatch ${PNAME}-8.6.1-flags.patch || die |
44 | niro | 19648 | |
45 | # fix library runtime detection with disabled rpath from the patch above | ||
46 | mpatch ${PNAME}-8.6.0-autopath.patch || die | ||
47 | |||
48 | # increase value from 500 to 5000 to fix dejagnu issues | ||
49 | # see: http://lists.freebsd.org/pipermail/freebsd-tcltk/2013-June/000068.html | ||
50 | # at least libffi testsuite needs this fix | ||
51 | sed -i 's:#define DUPTRAVERSE_MAX_DEPTH 500:&0:' generic/regc_nfa.c || die | ||
52 | |||
53 | cd ${SRCDIR}/unix | ||
54 | mautoreconf || die | ||
55 | } | ||
56 | |||
57 | src_compile() | ||
58 | { | ||
59 | cd ${SRCDIR}/unix | ||
60 | |||
61 | mconfigure || die | ||
62 | mmake || die | ||
63 | } | ||
64 | |||
65 | src_check() | ||
66 | { | ||
67 | cd ${SRCDIR}/unix | ||
68 | make test || die | ||
69 | } | ||
70 | |||
71 | src_install() | ||
72 | { | ||
73 | cd ${SRCDIR}/unix | ||
74 | |||
75 | local V="$(echo ${PVER} | cut -d "." -f 1,2)" | ||
76 | |||
77 | # removes the reference to the build directory | ||
78 | # and replace them by saner system wide locations | ||
79 | sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tclConfig.sh || die | ||
80 | sed -i "s:${SRCDIR}:/usr/include/tcl${V}:" tclConfig.sh || die | ||
81 | sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh || die | ||
82 | |||
83 | # installs tcl | ||
84 | mmake -j1 DESTDIR=${BINDIR} install || die | ||
85 | |||
86 | # installs the internal headers into a system-wide location. | ||
87 | minstalldir /usr/include/tcl${V}/unix || die | ||
88 | minstallfile \*.h /usr/include/tcl${V}/unix/ || die | ||
89 | minstalldir /usr/include/tcl${V}/generic || die | ||
90 | minstallfile ../generic/\*.h /usr/include/tcl${V}/generic/ || die | ||
91 | rm -f ${BINDIR}/usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h || die | ||
92 | |||
93 | # symlink unix private headers to generic (expect needs that) | ||
94 | mlink ../unix/tclUnixPort.h /usr/include/tcl${V}/generic || die | ||
95 | mlink ../unix/tclUnixThrd.h /usr/include/tcl${V}/generic || die | ||
96 | |||
97 | # creates compatibility symbolic links for the libs | ||
98 | mlink ../../include/tcl${V} /usr/$(mlibdir)/tcl${V}/include || die | ||
99 | mlink libtcl${V}.so /usr/$(mlibdir)/libtcl.so || die | ||
100 | |||
101 | mlink tclsh${V} /usr/bin/tclsh || die | ||
102 | |||
103 | cd ${SRCDIR} | ||
104 | minstalldocs ChangeLog* changes license.terms README || die | ||
105 | } |