Magellan Linux

Contents of /trunk/core/tk/tk-8.5.12-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 13461 - (show annotations) (download)
Tue Oct 9 14:02:34 2012 UTC (11 years, 8 months ago) by niro
File size: 1931 byte(s)
-fixed UP2DATE
1 # $Id$
2
3 PNAME="tk"
4 PVER="8.5.12"
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=">= sys-apps/sed-4
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
24 SRC_URI=(
25 sourceforge://tcl/${SRCFILE}
26 mirror://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${PNAME}-8.4.13-libdir.patch
28 )
29
30 # no alphas or betas
31 UP2EXCLUDE="[0-9][ab][0-9]"
32 UP2SEPERATOR="NULL"
33 UP2TARBALL="${PNAME}"
34 UP2DATE="updatecmd_sourceforge tcl Tcl -src.tar.gz"
35
36 src_prepare()
37 {
38 munpack ${SRCFILE} || die
39 cd ${SRCDIR}
40
41 # support variable libdir
42 mpatch ${PNAME}-8.4.13-libdir.patch || die
43 }
44
45 src_compile()
46 {
47 cd ${SRCDIR}/unix
48
49 mconfigure --enable-threads || die
50 mmake CFLAGS="${CFLAGS}" || die
51 }
52
53 src_install()
54 {
55 cd ${SRCDIR}/unix
56
57 local V="$(echo ${PVER} | cut -d "." -f 1,2)"
58
59 # removes the reference to the build directory
60 # and replace them by saner system wide locations
61 sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tkConfig.sh || die
62 sed -i "s:${SRCDIR}:/usr/include/tk${V}:" tkConfig.sh || die
63
64 # installs tk
65 mmake INSTALL_ROOT=${BINDIR} \
66 MAN_INSTALL_DIR=${BINDIR}/usr/share/man \
67 install || die
68
69 # installs the internal headers into a system-wide location.
70 minstalldir /usr/include/tk${V}/unix || die
71 minstallfile \*.h /usr/include/tk${V}/unix/ || die
72 minstalldir /usr/include/tk${V}/generic || die
73 minstallfile ../generic/\*.h /usr/include/tk${V}/generic/ || die
74 rm -f ${BINDIR}/usr/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h || die
75
76 # creates compatibility symbolic links for the libs
77 mlink /usr/include/tk${V} /usr/$(mlibdir)/tk${V}/include || die
78 mlink libtk${V}.so /usr/$(mlibdir)/libtk.so || die
79
80 mlink whish${V} /usr/bin/whish || die
81
82 cd ${SRCDIR}
83 minstalldocs ChangeLog* changes license.terms README || die
84 }