-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME.freewrap
124 lines (104 loc) · 3.67 KB
/
README.freewrap
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
The directory freewrap contains a slightly modified version of
freewrap-5.5/build/generic. You will need to tweak your
arch/Makefile.freewrap file to build your own copy. In particular,
version numbers and build paths for various packages are built
into the makefile.
Tcl/Tk version info is extracted from Makeconf.tcltk. This can be
generated automatically from tclConfig.sh using
./tclConfig2Makeconf [/usr | /usr/local | $HOME/tcl-xxx]
depending on where you have Tcl/Tk installed.
First build the following packages. Once they are available, tune
<ARCH>/Makefile.freewrap appropriately and build freewrapBLT with
make freewrap
I'm using the following packages:
tcl8.4.2.tar.gz
tk8.4.2.tar.gz
Tktable2.8.tar.gz
BLT2.4z.tar.gz
freewrap-5.5.tar.gz
zip23.tar.gz
upx-1.24-linux.tar.gz
bwidget1.6.tar.gz
tkcon.tcl
# zlib-1.1.4.tar.gz # part of the OS
For Mac OS X it may have been more efficient to do this with fink packages,
but I compiled everything from scratch.
# For each of tcl/tk, do the following in the unix subdirectory.
./configure --prefix=$HOME/tcl-$ver --disable-shared
make
make install
make distclean
./configure --prefix=$HOME/tcl-$ver
make
make install
make distclean
# For Tktable, do the following in the Tktable directory:
./configure --prefix=$HOME/tcl-$ver --with-tcl=$HOME/tcl-$ver/lib --with-tk=$HOME/tcl-$ver/lib --disable-shared
make
make install
make distclean
./configure --prefix=$HOME/tcl-$ver --with-tcl=$HOME/tcl-$ver/lib --with-tk=$HOME/tcl-$ver/lib
make
make install
make distclean
# For Mac OS/X we need to do the following:
# Download the following blt patch:
# http://www.swarm.org/pipermail/support/2002-December/012741.html
#
# This is html, so you will need to change > to > and < to <.
# There may be other changes required.
cd blt2.4z
patch -P0 < ../blt2.4z-patch
# In the 'darwin' section of configure.in, I needed
# to add the line:
# EXTRA_LIB_SPEC="-framework CoreFoundation"
#
# I also needed to add the following lines after bltMath.h
# in src/bltVecMath.c:
# double drand48(void) { return (double)rand() / (double)RAND_MAX; }
# void srand48(long) { srand(seed); }
# This is not the nicest thing to do. Ideally, configure.in should
# detect that drand48 is missing and this code would be conditional
# upon the result of that test. These functions are currently
# defined in bltWinUtil.c for similar reasons, so it could be removed
# from there. I don't know where the best place to put it is.
autoconf
# End of Mac OS/X instructions
./configure --prefix=$HOME/tcl-$ver --with-tcl=$HOME/tcl-$ver/lib --with-tk=$HOME/tcl-$ver/lib
# The following builds a shared library, because the last tclConfig.sh
# we installed defined TCL_SHARED_BUILD=1. This should be okay for
# our purposes since we will link freewrap against the static libraries.
make
make install
# untar bwidget into $HOME/tcl-$ver/lib
# copy tkcon to $HOME/tcl-$ver/bin/tkcon.tcl
# test
echo 'puts "$tcl_patchLevel"' | $HOME/tcl-$ver/bin/tclsh8.4
$HOME/tcl-$ver/bin/wish8.4
% pack [button .b -text hello]
% exit
$HOME/tcl-$ver/bin/wish8.4
% package require Tktable
% pack [table .t]
% exit
$HOME/tcl-$ver/bin/bltwish
% package require BLT
% pack [blt::graph .g]
% package require Tktable
% pack [table .t]
% exit
## zlib is specified as part of the Linux Standard Base, and exists
## in Mac OS X, so no need to build it or link to it statically.
## build zlib
#cd zlib-1.1.4
#prefix=$HOME ./configure
#make
#cd ..
# build info-zip
cd zip-2.3
make -f unix/Makefile generic
# If the compile flags are wrong, fix them in the
# file 'flags' and try again. I had to modify
# L1FLAGS to remove the -s on Mac OS X (it doesn't
# like stripped binaries).
cd ..