source: scripts/blfs-scripts/blfs-tcl.sh@ 0fd3a9e

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 0fd3a9e was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 2.2 KB
Line 
1#!/bin/sh
2#
3# Tcl ( Reqd for expect )
4#
5# TODO: work to be done to make tclConfig.sh behave
6cd ${SRC}
7LOG=tcl-blfs.log
8
9SELF=`basename ${0}`
10set_buildenv
11set_libdirname
12setup_multiarch
13
14unpack_tarball tcl${TCL_VER}-src &&
15cd ${PKGDIR}/unix
16
17if [ ! "${libdirname}" = "lib" ]; then
18 extra_conf="--libdir=/usr/${libdirname}"
19 # change TCL_LIBRARY in Makefile so it is under $(libdir)
20 if [ ! -f Makefile.in-ORIG ]; then cp -p Makefile.in Makefile.in-ORIG ; fi
21 sed '/TCL_LIBRARY/s@\$(prefix)/lib@$(libdir)@g' Makefile.in-ORIG > Makefile.in
22fi
23
24max_log_init Tcl ${TCL_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
25CC="${CC-gcc} ${ARCH_CFLAGS}" \
26CFLAGS="${TGT_CFLAGS}" \
27 ./configure --prefix=/usr --enable-threads ${extra_conf} \
28 --mandir=/usr/share/man --infodir=/usr/share/info \
29 >> ${LOGFILE} 2>&1 &&
30echo " o Configure OK" &&
31
32min_log_init ${BUILDLOGS} &&
33make ${PMFLAGS} LDFLAGS="-s" \
34 >> ${LOGFILE} 2>&1 &&
35echo " o Build OK" &&
36
37min_log_init ${TESTLOGS} &&
38make test \
39 >> ${LOGFILE} 2>&1 &&
40echo " o Test OK" &&
41# clock test may fail... not a real concern for our purposes...
42
43# TODO: get version from tcl itself
44V=`echo ${TCL_VER} | cut -d "." -f 1,2`
45
46sed -i "s@${SRC}/${PKGDIR}/unix@/usr/${libdirname}@" tclConfig.sh &&
47sed -i "s@${SRC}/${PKGDIR}@/usr/include/tcl${V}@" tclConfig.sh &&
48sed -i "s@^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so'@TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"@" \
49 tclConfig.sh
50
51# The following isn't required for tcl 8.4.9 ...
52# TODO: check which versions (apart from 8.4.6) this is needed for
53case ${TCL_VER} in
54 8.4.6 )
55 mv ../doc/{,Tcl_}Thread.3 &&
56 sed -i 's/ Thread.3/ Tcl_Thread.3/' mkLinks
57 ;;
58esac
59
60min_log_init ${INSTLOGS} &&
61make install \
62 >> ${LOGFILE} 2>&1 &&
63echo " o ALL OK" || barf
64
65install -d /usr/include/tcl${V}/unix &&
66install -m644 *.h /usr/include/tcl${V}/unix/ &&
67install -d /usr/include/tcl${V}/generic &&
68install -c -m644 ../generic/*.h /usr/include/tcl${V}/generic/ &&
69rm -f /usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h &&
70ln -nsf ../../include/tcl${V} /usr/${libdirname}/tcl${V}/include &&
71ln -sf libtcl${V}.so /usr/${libdirname}/libtcl.so
72
73# Create symlink for tclsh
74TCLSH=$(basename $(find /usr/bin -type f -name tclsh\*))
75test "tclsh" != "${TCLSH}" &&
76 ln -sf ./${TCLSH} /usr/bin/tclsh
77
Note: See TracBrowser for help on using the repository browser.