Contents of /trunk/extras/tk/tk-8.6.8-r1.smage2
Parent Directory | Revision Log
Revision 30691 -
(show annotations)
(download)
Wed Mar 7 08:34:00 2018 UTC (6 years, 6 months ago) by niro
File size: 2271 byte(s)
Wed Mar 7 08:34:00 2018 UTC (6 years, 6 months ago) by niro
File size: 2271 byte(s)
auto added: ver bump to 8.6.8-r1
1 | # $Id$ |
2 | |
3 | PNAME="tk" |
4 | PVER="8.6.8" |
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.6 |
13 | >= x11-libs/libXft-2.3 |
14 | >= x11-libs/libXScrnSaver-1.2 |
15 | == dev-lang/tcl-${PVER}" |
16 | |
17 | SDEPEND=">= virtual/sed |
18 | >= x11-libs/libXt-1" |
19 | |
20 | SRCFILE="${PNAME}${PVER}-src.tar.gz" |
21 | SRCDIR="${BUILDDIR}/${PNAME}${PVER}" |
22 | |
23 | sminclude mtools |
24 | msetfeature "!check" # disabled, requires full x11 |
25 | |
26 | SRC_URI=( |
27 | sourceforge://tcl/${SRCFILE} |
28 | mirror://${PNAME}/${SRCFILE} |
29 | mirror://${PNAME}/${PNAME}-8.4.13-libdir.patch |
30 | mirror://${PNAME}/${PNAME}-8.6.1-flags.patch |
31 | ) |
32 | |
33 | UP2SEPERATOR="${PNAME}" |
34 | UP2SUBSTITUTE="-src" |
35 | UP2DATE="updatecmd -listonly http://www.tcl.tk/software/tcltk/download.html | grep '${PNAME}[0-9]' | highesttarball gz" |
36 | |
37 | src_prepare() |
38 | { |
39 | munpack ${SRCFILE} || die |
40 | cd ${SRCDIR} |
41 | |
42 | # support variable libdir |
43 | mpatch ${PNAME}-8.4.13-libdir.patch || die |
44 | |
45 | # fix rpath and pic issues |
46 | mpatch ${PNAME}-8.6.1-flags.patch || die |
47 | cd ${SRCDIR}/unix |
48 | mautoreconf || die |
49 | } |
50 | |
51 | src_compile() |
52 | { |
53 | cd ${SRCDIR}/unix |
54 | |
55 | mconfigure --enable-threads || die |
56 | mmake || die |
57 | } |
58 | |
59 | src_check() |
60 | { |
61 | # requires X11 |
62 | cd ${SRCDIR}/unix |
63 | make test || die |
64 | } |
65 | |
66 | src_install() |
67 | { |
68 | cd ${SRCDIR}/unix |
69 | |
70 | local V="$(echo ${PVER} | cut -d "." -f 1,2)" |
71 | |
72 | # removes the reference to the build directory |
73 | # and replace them by saner system wide locations |
74 | sed -i "s:${SRCDIR}/unix:/usr/$(mlibdir):" tkConfig.sh || die |
75 | sed -i "s:${SRCDIR}:/usr/include/tk${V}:" tkConfig.sh || die |
76 | |
77 | # installs tk |
78 | mmake DESTDIR=${BINDIR} install || die |
79 | |
80 | # installs the internal headers into a system-wide location. |
81 | minstalldir /usr/include/tk${V}/unix || die |
82 | minstallfile \*.h /usr/include/tk${V}/unix/ || die |
83 | minstalldir /usr/include/tk${V}/generic || die |
84 | minstallfile ../generic/\*.h /usr/include/tk${V}/generic/ || die |
85 | mdelete /usr/include/tk${V}/generic/tk.h || die |
86 | mdelete /usr/include/tk${V}/generic/tkDecls.h || die |
87 | mdelete /usr/include/tk${V}/generic/tkPlatDecls.h || die |
88 | |
89 | # creates compatibility symbolic links for the libs |
90 | mlink /usr/include/tk${V} /usr/$(mlibdir)/tk${V}/include || die |
91 | mlink libtk${V}.so /usr/$(mlibdir)/libtk.so || die |
92 | |
93 | mlink whish${V} /usr/bin/whish || die |
94 | |
95 | cd ${SRCDIR} |
96 | minstalldocs ChangeLog* changes license.terms README || die |
97 | } |