Magellan Linux

Contents of /branches/magellan-next/core/tk/tk-8.5.11-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 9595 - (show annotations) (download)
Tue Dec 27 08:47:12 2011 UTC (12 years, 4 months ago) by niro
File size: 1834 byte(s)
auto added: ver bump to 8.5.11-r1
1 # $Id$
2
3 PNAME="tk"
4 PVER="8.5.11"
5 PBUILD="r1"
6
7 PCATEGORIE="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 UP2DATE="updatecmd_sourceforge tcl Tcl"
31
32 src_prepare()
33 {
34 munpack ${SRCFILE} || die
35 cd ${SRCDIR}
36
37 # support variable libdir
38 mpatch ${PNAME}-8.4.13-libdir.patch || die
39 }
40
41 src_compile()
42 {
43 cd ${SRCDIR}/unix
44
45 mconfigure --enable-threads || die
46 mmake CFLAGS="${CFLAGS}" || die
47 }
48
49 src_install()
50 {
51 cd ${SRCDIR}/unix
52
53 local V="$(echo ${PVER} | cut -d "." -f 1,2)"
54
55 # removes the reference to the build directory
56 # and replace them by saner system wide locations
57 sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tkConfig.sh || die
58 sed -i "s:${SRCDIR}:/usr/include/tk${V}:" tkConfig.sh || die
59
60 # installs tk
61 mmake INSTALL_ROOT=${BINDIR} \
62 MAN_INSTALL_DIR=${BINDIR}/usr/share/man \
63 install || die
64
65 # installs the internal headers into a system-wide location.
66 minstalldir /usr/include/tk${V}/unix || die
67 minstallfile \*.h /usr/include/tk${V}/unix/ || die
68 minstalldir /usr/include/tk${V}/generic || die
69 minstallfile ../generic/\*.h /usr/include/tk${V}/generic/ || die
70 rm -f ${BINDIR}/usr/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h || die
71
72 # creates compatibility symbolic links for the libs
73 mlink /usr/include/tk${V} /usr/$(mlibdir)/tk${V}/include || die
74 mlink libtk${V}.so /usr/$(mlibdir)/libtk.so || die
75
76 mlink whish${V} /usr/bin/whish || die
77
78 cd ${SRCDIR}
79 minstalldocs ChangeLog* changes license.terms README || die
80 }