source: scripts/scripts/untested/blfs-scripts/blfs-tk.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: 1.9 KB
Line 
1#!/bin/bash
2#
3# Tk
4#
5# Dependencies: tcl X
6#
7
8cd ${SRC}
9LOG=tk-blfs.log
10
11SELF=`basename ${0}`
12set_buildenv
13set_libdirname
14setup_multiarch
15if [ ! "${libdirname}" = "lib" ]; then
16   extra_conf="--libdir=/usr/${libdirname}"
17fi
18
19unpack_tarball tk${TK_VER}-src &&
20cd ${PKGDIR}/unix
21
22if [ ! "${libdirname}" = "lib" ]; then
23      # change TK_LIBRARY in Makefile so it is under $(libdir)
24      test -f Makefile.in-ORIG ||
25         cp -p Makefile.in Makefile.in-ORIG
26      sed '/TK_LIBRARY/s@\$(prefix)/lib@$(libdir)@g' \
27         Makefile.in-ORIG > Makefile.in
28fi
29
30# Fix brokenness in configure with bash-3.1
31case ${TK_VER} in
32   8.4.1[12] )
33      if [ ! -f configure-ORIG ]; then cp configure configure-ORIG ; fi
34      sed "s/relid'/relid/" < configure-ORIG > configure
35   ;;
36esac
37
38max_log_init Tk ${TK_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
39CC="${CC-gcc} ${ARCH_CFLAGS}" \
40CFLAGS="${TGT_CFLAGS}" \
41 ./configure --prefix=/usr --enable-threads ${extra_conf} \
42   --with-tcl=/usr/${libdirname} \
43   >> ${LOGFILE} 2>&1 &&
44echo " o Configure OK" &&
45
46min_log_init ${BUILDLOGS} &&
47make ${PMFLAGS} LDFLAGS="-s" \
48   >> ${LOGFILE} 2>&1 &&
49echo " o Build OK" || barf
50
51#min_log_init ${TESTLOGS} &&
52#make test \
53#   >>  ${LOGFILE} 2>&1 &&
54#echo " o Test OK" &&
55
56# TODO: get version from tk itself
57V=`echo ${TK_VER} | cut -d "." -f 1,2`
58
59sed -i "s@${SRC}/${PKGDIR}/unix@/usr/${libdirname}@" tkConfig.sh &&
60sed -i "s@${SRC}/${PKGDIR}@/usr/include/tk${V}@" tkConfig.sh &&
61
62min_log_init ${INSTLOGS} &&
63make install \
64   >> ${LOGFILE} 2>&1 &&
65echo " o ALL OK" || barf
66
67install -d /usr/include/tk${V}/unix &&
68install -m644 *.h /usr/include/tk${V}/unix/ &&
69install -d /usr/include/tk${V}/generic &&
70install -c -m644 ../generic/*.h /usr/include/tk${V}/generic/ &&
71rm -f /usr/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h &&
72ln -nsf ../../include/tk${V} /usr/${libdirname}/tk${V}/include &&
73ln -sf libtk${V}.so /usr/${libdirname}/libtk.so &&
74ln -sf wish${V} /usr/bin/wish
75
Note: See TracBrowser for help on using the repository browser.