aboutsummaryrefslogtreecommitdiff
blob: ad87ce1fcafbb78e4520028616a84777f98ba94e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
#
# This script was adapted from the one used by Hwaci to build it's 
# documentation and binaries for shipping to their website. 
#
# Any similarity to the original has probably been trampled into
# oblivion modifying everything for Gentoo.
#
echo "Starting TCL Build"

# Set srcdir to the name of the directory that contains the publish.sh
# script.
#
srcdir=`echo "$0" | sed 's%\(^.*\)/[^/][^/]*$%\1%'`

#
# Build the tclsqlite.so shared library for import into tclsh or wish
# under Linux
#
make target_source
source /etc/make.conf
cd tsrc
rm shell.c

OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1'
TCLSTUBLIB=${TCL_BUILD_STUB_LIB_PATH}

export CFLAGS
gcc -fPIC $CFLAGS $OPTS -I. -shared *.c $TCLSTUBLIB -o tclsqlite.so

strip tclsqlite.so
cp tclsqlite.so ..

cd ..

echo "pkg_mkIndex [pwd] tclsqlite.so" >> make_pkgIndex.tcl
tclsh make_pkgIndex.tcl

echo "Done TCL Build"