source: scripts/scripts/blfs-scripts/blfs-tcl.sh @ deb72bc

clfs-1.2clfs-2.1clfs-3.0.0-systemdclfs-3.0.0-sysvinitsystemdsysvinit
Last change on this file since deb72bc was deb72bc, checked in by Jim Gifford <clfs@…>, 18 years ago

r2512@server (orig r1251): ryan | 2006-03-10 02:09:04 -0800

r1301@rei: lfs | 2006-03-09 19:34:34 +1100
Fix configure issues in tcl and Tk versions 8.4.11 and 8.4.12 when using bash-3.1


  • Property mode set to 100755
File size: 2.5 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
24# Fix brokenness in configure with bash-3.1
25case ${TCL_VER} in
26   8.4.1[12] )
27      if [ ! -f configure-ORIG ]; then cp configure configure-ORIG ; fi
28      sed "s/relid'/relid/" < configure-ORIG > configure
29   ;;
30esac
31
32max_log_init Tcl ${TCL_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
33CC="${CC-gcc} ${ARCH_CFLAGS}" \
34CFLAGS="${TGT_CFLAGS}" \
35 ./configure --prefix=/usr --enable-threads ${extra_conf} \
36   --mandir=/usr/share/man --infodir=/usr/share/info \
37   >> ${LOGFILE} 2>&1 &&
38echo " o Configure OK" &&
39
40min_log_init ${BUILDLOGS} &&
41make ${PMFLAGS} LDFLAGS="-s" \
42   >> ${LOGFILE} 2>&1 &&
43echo " o Build OK" &&
44
45min_log_init ${TESTLOGS} &&
46make test \
47   >>  ${LOGFILE} 2>&1 &&
48echo " o Test OK" &&
49# clock test may fail... not a real concern for our purposes...
50
51# TODO: get version from tcl itself
52V=`echo ${TCL_VER} | cut -d "." -f 1,2`
53
54sed -i "s@${SRC}/${PKGDIR}/unix@/usr/${libdirname}@" tclConfig.sh &&
55sed -i "s@${SRC}/${PKGDIR}@/usr/include/tcl${V}@" tclConfig.sh &&
56sed -i "s@^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so'@TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\"@" \
57    tclConfig.sh
58
59# The following isn't required for tcl 8.4.9 ...
60# TODO: check which versions (apart from 8.4.6) this is needed for
61case ${TCL_VER} in
62   8.4.6 )
63      mv ../doc/{,Tcl_}Thread.3 &&
64      sed -i 's/ Thread.3/ Tcl_Thread.3/' mkLinks
65   ;;
66esac
67
68min_log_init ${INSTLOGS} &&
69make install \
70   >> ${LOGFILE} 2>&1 &&
71echo " o ALL OK" || barf
72
73install -d /usr/include/tcl${V}/unix &&
74install -m644 *.h /usr/include/tcl${V}/unix/ &&
75install -d /usr/include/tcl${V}/generic &&
76install -c -m644 ../generic/*.h /usr/include/tcl${V}/generic/ &&
77rm -f /usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h &&
78ln -nsf ../../include/tcl${V} /usr/${libdirname}/tcl${V}/include &&
79ln -sf libtcl${V}.so /usr/${libdirname}/libtcl.so
80
81# Create symlink for tclsh
82TCLSH=$(basename $(find /usr/bin -type f -name tclsh\*))
83test "tclsh" != "${TCLSH}" &&
84   ln -sf ./${TCLSH} /usr/bin/tclsh
85
Note: See TracBrowser for help on using the repository browser.