source: scripts/untested/blfs-scripts/blfs-tk.sh@ 66f17d5

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 66f17d5 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: 1.7 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
30max_log_init Tcl ${TK_VER} "blfs (shared)" ${CONFLOGS} ${LOG}
31CC="${CC-gcc} ${ARCH_CFLAGS}" \
32CFLAGS="${TGT_CFLAGS}" \
33 ./configure --prefix=/usr --enable-threads ${extra_conf} \
34 --with-tcl=/usr/${libdirname} \
35 >> ${LOGFILE} 2>&1 &&
36echo " o Configure OK" &&
37
38min_log_init ${BUILDLOGS} &&
39make ${PMFLAGS} LDFLAGS="-s" \
40 >> ${LOGFILE} 2>&1 &&
41echo " o Build OK" || barf
42
43#min_log_init ${TESTLOGS} &&
44#make test \
45# >> ${LOGFILE} 2>&1 &&
46#echo " o Test OK" &&
47
48# TODO: get version from tk itself
49V=`echo ${TK_VER} | cut -d "." -f 1,2`
50
51sed -i "s@${SRC}/${PKGDIR}/unix@/usr/${libdirname}@" tkConfig.sh &&
52sed -i "s@${SRC}/${PKGDIR}@/usr/include/tk${V}@" tkConfig.sh &&
53
54min_log_init ${INSTLOGS} &&
55make install \
56 >> ${LOGFILE} 2>&1 &&
57echo " o ALL OK" || barf
58
59install -d /usr/include/tk${V}/unix &&
60install -m644 *.h /usr/include/tk${V}/unix/ &&
61install -d /usr/include/tk${V}/generic &&
62install -c -m644 ../generic/*.h /usr/include/tk${V}/generic/ &&
63rm -f /usr/include/tk${V}/generic/{tk,tkDecls,tkPlatDecls}.h &&
64ln -nsf ../../include/tk${V} /usr/${libdirname}/tk${V}/include &&
65ln -sf libtk${V}.so /usr/${libdirname}/libtk.so &&
66ln -sf wish${V} /usr/bin/wish
67
Note: See TracBrowser for help on using the repository browser.