Skip to content

Commit

Permalink
Merge pull request #20 from mariux64/add-tcl
Browse files Browse the repository at this point in the history
Add tcl (Tcl/Tk) 8.6.8
  • Loading branch information
donald authored Apr 30, 2018
2 parents 9f992a1 + 1698651 commit 81931d1
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions tcl-8.6.8-0.build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#! /bin/bash

PKG=tcl
VERSION=8.6.8
BUILD=0

PREFIX=/pkg/$PKG-$VERSION-$BUILD
#PREFIX=/dev/shm/$PKG-$VERSION-$BUILD

set -xe
umask 022

BUILD_TMPDIR=/dev/shm/$PKG-$VERSION-$BUILD.build.tmp
test -d $BUILD_TMPDIR && rm -rf $BUILD_TMPDIR
mkdir -p $BUILD_TMPDIR/home
export TMPDIR=$BUILD_TMPDIR
export HOME=$BUILD_TMPDIR/home

exec </dev/null

mkdir -p $PREFIX
cat >$PREFIX/profile <<-EOF
PATH=$PREFIX/bin:\$PATH
EOF
. $PREFIX/profile

export MAKEFLAGS="-j $(nproc)"

BUILDDIR=$PREFIX/build

mkdir -p $BUILDDIR
cd $BUILDDIR

test -e tcl$VERSION-src.tar.gz || wget https://prdownloads.sourceforge.net/tcl/tcl$VERSION-src.tar.gz
test -d tcl$VERSION || tar xf tcl$VERSION-src.tar.gz
test -e tk$VERSION-src.tar.gz || wget https://prdownloads.sourceforge.net/tcl/tk$VERSION-src.tar.gz
test -d tk$VERSION || tar xf tk$VERSION-src.tar.gz

(
cd $BUILDDIR/tcl$VERSION/unix
./configure --prefix=$PREFIX
make -j $(nproc)
make test
make install
)

(
cd $BUILDDIR/tk$VERSION/unix
./configure --prefix=$PREFIX --with-tcl=$BUILDDIR/tcl$VERSION/unix
make -j $(nproc)
# make test # disable tests. require display
make install
)

(
cd $PREFIX/bin;
ln -s tclsh[0-9]* tclsh
ln -s iwish[0-9]* wish
}

exit

0 comments on commit 81931d1

Please sign in to comment.