Magellan Linux

Annotation of /branches/magellan-next/core/tcl/tcl-8.5.9-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7183 - (hide annotations) (download)
Thu Sep 30 12:54:31 2010 UTC (13 years, 7 months ago) by niro
File size: 2378 byte(s)
auto added: ver bump to 8.5.9-r1
1 niro 7183 # $Id: tcl-8.5.7-r4.smage2 3422 2009-10-21 18:53:03Z niro $
2    
3     PNAME="tcl"
4     PVER="8.5.9"
5     PBUILD="r1"
6    
7     PCATEGORIE="dev-lang"
8     STATE="unstable"
9    
10     DESCRIPTION="The Tcl package contains the Tool Command Language, a robust general-purpose scripting language."
11     HOMEPAGE="http://tcl.sourceforge.net/"
12    
13     DEPEND=">= virtual/glibc"
14     SDEPEND=">= sys-apps/sed-4"
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     )
26    
27     UP2DATE="updatecmd_sourceforge ${PNAME} Tcl"
28    
29     src_prepare()
30     {
31     munpack ${SRCFILE} || die
32     cd ${SRCDIR}
33    
34     # support variable libdir
35     mpatch ${PNAME}-8.5.5-libdir.patch || die
36     }
37    
38     src_compile()
39     {
40     cd ${SRCDIR}/unix
41    
42     mconfigure || die
43     mmake CFLAGS="${CFLAGS}" || die
44     }
45    
46     src_install()
47     {
48     cd ${SRCDIR}/unix
49    
50     local V="$(echo ${PVER} | cut -d "." -f 1,2)"
51    
52     # removes the reference to the build directory
53     # and replace them by saner system wide locations
54     sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tclConfig.sh || die
55     sed -i "s:${SRCDIR}:/usr/include/tcl${V}:" tclConfig.sh || die
56     sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh || die
57    
58     # fixes a small doc issue cause Thread.3 maybe used by other packages
59     # mv ../doc/{,Tcl_}Thread.3 || die
60     # sed -i 's/ Thread.3/ Tcl_Thread.3/' mkLinks || die
61    
62     # installs tcl
63     make INSTALL_ROOT=${BINDIR} \
64     MAN_INSTALL_DIR=${BINDIR}/usr/share/man \
65     install || die
66    
67     # installs the internal headers into a system-wide location.
68     minstalldir /usr/include/tcl${V}/unix || die
69     minstallfile \*.h /usr/include/tcl${V}/unix/ || die
70     minstalldir /usr/include/tcl${V}/generic || die
71     minstallfile ../generic/\*.h /usr/include/tcl${V}/generic/ || die
72     rm -f ${BINDIR}/usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h || die
73    
74     # symlink unix private headers to generic (expect needs that)
75     mlink ../unix/tclUnixPort.h /usr/include/tcl${V}/generic || die
76     mlink ../unix/tclUnixThrd.h /usr/include/tcl${V}/generic || die
77    
78     # creates compatibility symbolic links for the libs
79     mlink ../../include/tcl${V} /usr/$(mlibdir)/tcl${V}/include || die
80     mlink libtcl${V}.so /usr/$(mlibdir)/libtcl.so || die
81    
82     mlink tclsh${V} /usr/bin/tclsh || die
83    
84     cd ${SRCDIR}
85     minstalldocs ChangeLog* changes license.terms README || die
86     }