# tk/cfg - "Build" settings for package

#---------------------------------------------------------------------

[technotes]

1. "tk" integration is tricky.  The approach used here is based partly
on BLFS.

2. Distro-specific issue:  If other packages use  "tkConfig.sh" to ob-
tain "tk" configuration information, their "configure" scripts may re-
quire minor modifications.

#---------------------------------------------------------------------

[buildtimes]

00.01 hours (or 000.53 minutes) - ThinkPad E540 i7 4x2 16GB RAM
00.01 hours (or 000.55 minutes) - 2021 L.A. dedi box: 6x2 CPU 32GB RAM
00.01 hours (or 000.58 minutes) - HP EliteBook 8560w 32GB RAM
00.02 hours (or 001.32 minutes) - Dell Inspiron 6400 2.0 GHz Intel Duo
                                  7200 2GB RAM
00.07 hours (or 004.23 minutes) - Compaq 1.7 GHz Intel Pentium 4 512MB
                                  RAM

#---------------------------------------------------------------------

[settings]
license   = tbd
proddir   = $PRODTREE/tcltk
purge     = no
revision  = numeric
shareddir = yes
setpaths  = $PRODTREE/tcltk
tmpsize   = 25M

#---------------------------------------------------------------------

[depends]
tcl:strict
xorg

#---------------------------------------------------------------------

[configure]
cd unix
if [ $LACBITS == 64 ]; then
    BITSW=--enable-64bit
else
    BITSW=
fi

bash ./configure \
    --prefix=$PKGDIR_PROD  \
    --build=$LACARCHBUILD  \
    --host=$LACARCHHOST    \
    --disable-symbols      \
    --enable-threads       \
    $BITSW

#---------------------------------------------------------------------

[build]
BINDIR=$PKGDIR_PROD/bin
INCDIR=$PKGDIR_PROD/include
LIBDIR=$PKGDIR_PROD/lib

mkdir -p $BINDIR $INCDIR $LIBDIR

cd unix
smpmake
sed -e "s@^\(TK_SRC_DIR='\).*@\1$INCDIR'@" \
    -e "/TK_B/s@='\(-L\)\?.*unix@='\1$LIBDIR@" \
    -i tkConfig.sh

make install
make install-private-headers

ln -v -sf wish8.6 $BINDIR/wish
chmod -v 755 $LIBDIR/libtk8.6.so

cd $BINDIR
chmod 755 `find ../lib/ -type f -name \*.sh`
ln -nsf   `find ../lib/ -type f -name \*.sh` .

#---------------------------------------------------------------------

# Original URLs. These URLs were valid at one point, but may have died
# since then. If you download newer versions of tarballs [etc.], don't
# delete  the  original versions,  as you may not  be able  to replace
# them.

[urls]
url_debian  = unknown
url_home    = http://www.tcl.tk/

url_lfs     = http://www.linuxfromscratch.org/blfs/view/stable/\
general/tk.html

url_tarball = http://downloads.sourceforge.net/sourceforge/\
tcl/tk8.6.12-src.tar.gz

#---------------------------------------------------------------------

[history]
171222 Updated from 8.6.7 to 8.6.8
211113 Updated to 8.6.12