Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 14615 - (show annotations) (download)
Tue Jan 1 15:44:37 2013 UTC (11 years, 5 months ago) by niro
File size: 2711 byte(s)
-rediffed autopath patch for tcl-8.6
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_install()
61 {
62 cd ${SRCDIR}/unix
63
64 local V="$(echo ${PVER} | cut -d "." -f 1,2)"
65
66 # removes the reference to the build directory
67 # and replace them by saner system wide locations
68 sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tclConfig.sh || die
69 sed -i "s:${SRCDIR}:/usr/include/tcl${V}:" tclConfig.sh || die
70 sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh || die
71
72 # fixes a small doc issue cause Thread.3 maybe used by other packages
73 # mv ../doc/{,Tcl_}Thread.3 || die
74 # sed -i 's/ Thread.3/ Tcl_Thread.3/' mkLinks || die
75
76 # installs tcl
77 make INSTALL_ROOT=${BINDIR} \
78 MAN_INSTALL_DIR=${BINDIR}/usr/share/man \
79 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 }