]> hackdaworld.org Git - hdw-linux/hdw-linux.git/blob - packages/devel/tcltk/tcltk
added gaim
[hdw-linux/hdw-linux.git] / packages / devel / tcltk / tcltk
1 # hdw - linux tcltk package
2 #
3 # author: hackbard@hackdaworld.dyndns.org
4 #
5 # [V] 8.4.11
6 # [S] 3-4
7 # [D] tk8.4.11-src.tar.gz http://puzzle.dl.sourceforge.net/sourceforge/tcl/
8 # [D] tcl8.4.11-src.tar.gz http://puzzle.dl.sourceforge.net/sourceforge/tcl/
9
10 custmain="1"
11
12 custmain()      {
13         # extract
14         for i in tcl tk; do
15                 tar --use-compress-program=gzip -xvf \
16                 $hdw_home_dir/download/devel/tcltk/${i}${ver}-src.tar.gz
17         done &&
18
19         # prepare environment
20         export VERSION=$ver
21         export V=`echo $ver | awk -F. '{ print $1 "." $2 }'`
22         
23         # tcl
24         cd tcl$ver
25         export DIR=$PWD
26         cd unix
27         ./configure $confopt --enable-threads
28         make $make_conf
29         sed -i "s:${DIR}/unix:$prefix/lib:" tclConfig.sh
30         sed -i "s:${DIR}:$prefix/include/tcl${V}:" tclConfig.sh
31         sed -i "s,^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so',TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"," tclConfig.sh
32         make $install_conf install
33         install -v -d $prefix/include/tcl${V}/unix
34         install -v -m644 *.h $prefix/include/tcl${V}/unix/
35         install -v -d $prefix/include/tcl${V}/generic
36         install -v -c -m644 ../generic/*.h $prefix/include/tcl${V}/generic/
37         rm -v -f $prefix/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h
38         ln -v -nsf ../../include/tcl${V} $prefix/lib/tcl${V}/include
39         ln -v -sf libtcl${V}.so $prefix/lib/libtcl.so
40         ln -v -sf tclsh${V} $prefix/bin/tclsh
41         cd ../..
42         
43         # tk
44         cd tk$ver
45         export DIR=$PWD
46         cd unix
47         ./configure $confopt --enable-threads
48         make $make_conf
49         sed -i "s:${DIR}/unix:$prefix/lib:" tkConfig.sh
50         sed -i "s:${DIR}:$prefix/include/tk${V}:" tkConfig.sh
51         make $install_conf install
52         install -v -d $prefix/include/tk${V}/unix
53         install -v -m644 *.h $prefix/include/tk${V}/unix/
54         install -v -d $prefix/include/tk${V}/generic
55         install -v -m644 ../generic/*.h $prefix/include/tk${V}/generic/
56         rm -v -f $prefix/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h
57         ln -v -nsf ../../include/tk${V} $prefix/lib/tk${V}/include
58         ln -v -sf libtk${V}.so $prefix/lib/libtk.so
59         ln -v -sf wish${V} $prefix/bin/wish
60         cd ../..
61                 }