diff options
author | Zbigniew Baniewski <Zbigniew.Baniewski [at] gmail [dot] com> | 2019-07-04 08:07:09 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2019-07-04 08:07:09 +0700 |
commit | 6e7391595c29ec0007cea2c779f4114d6a6a70a3 (patch) | |
tree | 5701dfed3c16a460519eabd1189726b45c902375 /development/Mk4tcl/Mk4tcl.SlackBuild | |
parent | 53073ccfdbda6c52e083870537755845472ffeb1 (diff) |
development/Mk4tcl: Added (TCL binding).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'development/Mk4tcl/Mk4tcl.SlackBuild')
-rw-r--r-- | development/Mk4tcl/Mk4tcl.SlackBuild | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/development/Mk4tcl/Mk4tcl.SlackBuild b/development/Mk4tcl/Mk4tcl.SlackBuild new file mode 100644 index 000000000000..0ca8017faa5d --- /dev/null +++ b/development/Mk4tcl/Mk4tcl.SlackBuild @@ -0,0 +1,97 @@ +#!/bin/sh + +# Slackware build script for Mk4tcl + +# Written by Zbigniew Baniewski, <Zbigniew [dot] Baniewski [at] gmail [dot] com> + +PRGNAM=Mk4tcl +VERSION=${VERSION:-2.4.9.8} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf metakit +tar xvf $CWD/${VERSION}.tar.gz +cd metakit/tcl +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +cat $CWD/01-Makefile.patch | patch -p2 || exit + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --build=$ARCH-slackware-linux + +make +make install DESTDIR=$PKG + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cd .. +cp -a demos doc examples $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +cd unix +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --build=$ARCH-slackware-linux + +make all +make install DESTDIR=$PKG + +cp demo dump myio $PKG/usr/bin + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +cd .. + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} |