X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fcis-tcl;h=5be0be56a20357a77272f242a85f710b462eed4b;hb=5f02c8c4b5fe6640bcdb61d1006256289a57c222;hp=6c8d8ef625f7e1476fa2cf4d3d9f8a64e8626866;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/cis-tcl b/stage3/cis-tcl index 6c8d8ef..5be0be5 100755 --- a/stage3/cis-tcl +++ b/stage3/cis-tcl @@ -1,39 +1,41 @@ #!/bin/sh +set -o errexit + +# First argument of this script is the package name. +# Remaining arguments are additional configure options. # Reading system configuration informations, functions and package versions. source ../sysinfos source ../functions source ../packages-list +PACKAGE=${1} +shift +CONFIGURE_OPTS=${*} + # Applying patches (if any) -apply_patches ${1} && - -cd ${LFS_TMP}/${1} && -export VERSION=$(echo ${1} | sed "s!tcl\(.*\)!\1!g") -export V=`echo $VERSION | cut -d "." -f 1,2` && -export DIR=$PWD && -cd unix && -sed -i "s/relid'/relid/" configure && -./configure \ - --prefix=/usr \ - --enable-threads && -make && -sed -i -e "s:${DIR}/unix:/usr/lib:" \ - -e "s:${DIR}:/usr/include/tcl${V}:" \ - -e "s:^TCL_LIB_FILE='libtcl${V}..TCL_DBGX..so':\ -TCL_LIB_FILE=\"libtcl${V}\$\{TCL_DBGX\}.so\":" tclConfig.sh && - -make install && -install -d /usr/include/tcl${V}/unix && -install -m644 *.h /usr/include/tcl${V}/unix/ && -install -d /usr/include/tcl${V}/generic && -install -c -m644 ../generic/*.h /usr/include/tcl${V}/generic/ && -rm -f /usr/include/tcl${V}/generic/{tcl,tclDecls,tclPlatDecls}.h && -ln -nsf ../../include/tcl${V} /usr/lib/tcl${V}/include && -ln -sf libtcl${V}.so /usr/lib/libtcl.so && -ln -sf tclsh${V} /usr/bin/tclsh && - -ldconfig - -# Return last error +apply_patches ${PACKAGE} + +cd ${LFS_TMP}/${PACKAGE} +cd unix +./configure --prefix=/usr \ + --enable-threads \ + --mandir=/usr/share/man +make + +# removes the references to the build directory and replaces them with saner +# system-wide locations: +sed -i \ + -e "s@^\(TCL_SRC_DIR='\).*@\1/usr/include'@" \ + -e "/TCL_B/s@='\(-L\)\?.*unix@='\1/usr/lib@" \ + -e "/SEARCH/s/=.*/=''/" \ + tclConfig.sh + +make install +make install-private-headers + +PKG_VER_BASE=$(echo ${PACKAGE} | sed "s!^tcl\([0-9]*\.[0-9]*\).*!\1!g") + +ln -svfT tclsh${PKG_VER_BASE} /usr/bin/tclsh + exit $?