Magellan Linux

Contents of /branches/R11-stable/extras/tk/tk-8.6.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 20213 - (show annotations) (download)
Tue Nov 26 11:47:53 2013 UTC (10 years, 6 months ago) by niro
File size: 2127 byte(s)
-release branches/R11-stable
1 # $Id$
2
3 PNAME="tk"
4 PVER="8.6.1"
5 PBUILD="r1"
6
7 PCAT="dev-lang"
8
9 DESCRIPTION="tk, a tcl gui toolkit."
10 HOMEPAGE="http://www.tcl.tk/software/tcltk/"
11
12 DEPEND=">= x11-libs/libX11-1
13 == dev-lang/tcl-${PVER}"
14
15 SDEPEND=">= virtual/sed
16 >= x11-libs/libXt-1
17 >= x11-proto/xproto-1"
18
19 SRCFILE="${PNAME}${PVER}-src.tar.gz"
20 SRCDIR="${BUILDDIR}/${PNAME}${PVER}"
21
22 sminclude mtools
23 msetfeature "!check" # disabled, requires x11
24
25 SRC_URI=(
26 sourceforge://tcl/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 mirror://${PNAME}/${PNAME}-8.4.13-libdir.patch
29 mirror://${PNAME}/${PNAME}-8.6.1-flags.patch
30 )
31
32 # no alphas or betas
33 UP2EXCLUDE="[0-9][ab][0-9]"
34 UP2SEPERATOR="NULL"
35 UP2TARBALL="${PNAME}"
36 UP2DATE="updatecmd_sourceforge tcl Tcl -src.tar.gz"
37
38 src_prepare()
39 {
40 munpack ${SRCFILE} || die
41 cd ${SRCDIR}
42
43 # support variable libdir
44 mpatch ${PNAME}-8.4.13-libdir.patch || die
45
46 # fix rpath and pic issues
47 mpatch ${PNAME}-8.6.1-flags.patch || die
48 cd ${SRCDIR}/unix
49 mautoreconf || die
50 }
51
52 src_compile()
53 {
54 cd ${SRCDIR}/unix
55
56 mconfigure --enable-threads || die
57 mmake || die
58 }
59
60 src_check()
61 {
62 # requires X11
63 cd ${SRCDIR}/unix
64 make test || die
65 }
66
67 src_install()
68 {
69 cd ${SRCDIR}/unix
70
71 local V="$(echo ${PVER} | cut -d "." -f 1,2)"
72
73 # removes the reference to the build directory
74 # and replace them by saner system wide locations
75 sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tkConfig.sh || die
76 sed -i "s:${SRCDIR}:/usr/include/tk${V}:" tkConfig.sh || die
77
78 # installs tk
79 mmake DESTDIR=${BINDIR} install || die
80
81 # installs the internal headers into a system-wide location.
82 minstalldir /usr/include/tk${V}/unix || die
83 minstallfile \*.h /usr/include/tk${V}/unix/ || die
84 minstalldir /usr/include/tk${V}/generic || die
85 minstallfile ../generic/\*.h /usr/include/tk${V}/generic/ || die
86 rm -f ${BINDIR}/usr/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h || die
87
88 # creates compatibility symbolic links for the libs
89 mlink /usr/include/tk${V} /usr/$(mlibdir)/tk${V}/include || die
90 mlink libtk${V}.so /usr/$(mlibdir)/libtk.so || die
91
92 mlink whish${V} /usr/bin/whish || die
93
94 cd ${SRCDIR}
95 minstalldocs ChangeLog* changes license.terms README || die
96 }