source: scripts/scripts/native-scripts/temp-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.0 KB
Line 
1#!/bin/bash
2
3# cross-lfs temporary tcl build (for running testsuites)
4# ------------------------------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11cd ${SRC}
12LOG=tcl-temp.log
13
14# Test if the 64 script has been called.
15# This should only really get called during bi-arch builds
16SELF=`basename ${0}`
17set_buildenv
18set_libdirname
19setup_multiarch
20
21if [ "${USE_SYSROOT}" = "Y" ]; then
22   BUILD_PREFIX=/usr
23else
24   BUILD_PREFIX=${TGT_TOOLS}
25fi
26
27unpack_tarball tcl${TCL_VER}-src &&
28cd ${PKGDIR}/unix
29
30if [ ! "${libdirname}" = "lib" ]; then
31   extra_conf="--libdir=${BUILD_PREFIX}/${libdirname}"
32
33   # Change TCL_LIBRARY in Makefile so it is under $(libdir)
34   test -f Makefile.in-ORIG || cp -p Makefile.in Makefile.in-ORIG
35   sed '/TCL_LIBRARY/s@\$(prefix)/lib@$(libdir)@g' \
36      Makefile.in-ORIG > Makefile.in
37fi
38
39# Fix brokenness in configure with bash-3.1
40case ${TCL_VER} in
41   8.4.1[12] )
42      if [ ! -f configure-ORIG ]; then cp configure configure-ORIG ; fi
43      sed "s/relid'/relid/" < configure-ORIG > configure
44   ;;
45esac
46max_log_init Tcl ${TCL_VER} "temp (shared)" ${CONFLOGS} ${LOG}
47CC="${CC-gcc} ${ARCH_CFLAGS}" \
48./configure --prefix=${BUILD_PREFIX} ${extra_conf} \
49   >> ${LOGFILE} 2>&1 &&
50echo " o Configure OK" &&
51
52min_log_init ${BUILDLOGS} &&
53make ${PMFLAGS} LDFLAGS="-s" \
54   >> ${LOGFILE} 2>&1 &&
55echo " o Build OK" &&
56
57min_log_init ${TESTLOGS} &&
58make test \
59   >>  ${LOGFILE} 2>&1 &&
60echo " o Test OK" &&
61# clock test may fail... not a real concern for our purposes...
62
63min_log_init ${INSTLOGS} &&
64make install \
65   >> ${LOGFILE} 2>&1 &&
66echo " o Install OK" || barf
67
68# Following for ~tcl 8.4.12
69case ${TCL_VER} in
70   8.4.1[2-9]* )
71      make install-private-headers \
72         >>  ${LOGFILE} 2>&1 &&
73      echo " o install-private-headers OK" || barf
74   ;;
75esac
76
77# Create symlink for tclsh
78TCLSH=$(basename $(find ${BUILD_PREFIX}/bin -type f -name tclsh\*))
79test "tclsh" != "${TCLSH}" &&
80   ln -sf ./${TCLSH} ${BUILD_PREFIX}/bin/tclsh
81
Note: See TracBrowser for help on using the repository browser.