aboutsummaryrefslogtreecommitdiff
path: root/academic
diff options
context:
space:
mode:
Diffstat (limited to 'academic')
-rw-r--r--academic/tkgate/README12
-rw-r--r--academic/tkgate/doinst.sh9
-rw-r--r--academic/tkgate/slack-desc19
-rw-r--r--academic/tkgate/tkgate.SlackBuild154
-rw-r--r--academic/tkgate/tkgate.info10
-rw-r--r--academic/tkgate/tkgate.pngbin0 -> 2777 bytes
6 files changed, 204 insertions, 0 deletions
diff --git a/academic/tkgate/README b/academic/tkgate/README
new file mode 100644
index 0000000000000..7f82646959a9e
--- /dev/null
+++ b/academic/tkgate/README
@@ -0,0 +1,12 @@
+TkGate is a event driven digital circuit simulator
+with a tcl/tk-based graphical editor. TkGate supports
+a wide range of primitive circuit elements as well as
+user-defined modules for hierarchical design. The
+distribution comes with a number of tutorial and example
+circuits which can be loaded through the "Help" menu.
+The example circuits include a simple CPU, programmed
+to run the Animals game. For more information, check out
+the documentation. TkGate is free software provided with
+source code under the Gnu Public License.
+
+NOTE: This will not build on a stock x86_64 system.
diff --git a/academic/tkgate/doinst.sh b/academic/tkgate/doinst.sh
new file mode 100644
index 0000000000000..3e5691a052b5b
--- /dev/null
+++ b/academic/tkgate/doinst.sh
@@ -0,0 +1,9 @@
+if [ -x /usr/bin/update-desktop-database ]; then
+ /usr/bin/update-desktop-database -q usr/share/applications >/dev/null 2>&1
+fi
+
+if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then
+ if [ -x /usr/bin/gtk-update-icon-cache ]; then
+ /usr/bin/gtk-update-icon-cache usr/share/icons/hicolor >/dev/null 2>&1
+ fi
+fi
diff --git a/academic/tkgate/slack-desc b/academic/tkgate/slack-desc
new file mode 100644
index 0000000000000..a6c0676759a34
--- /dev/null
+++ b/academic/tkgate/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description.
+# Line up the first '|' above the ':' following the base package name, and
+# the '|' on the right side marks the last column you can put a character in.
+# You must make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+tkgate: tkgate (An event driven digital circuit simulator)
+tkgate:
+tkgate: TkGate is a event driven digital circuit simulator with
+tkgate: a tcl/tk-based graphical editor. TkGate supports a wide
+tkgate: range of primitive circuit elements as well as user-defined modules
+tkgate: for hierarchical design.
+tkgate:
+tkgate:
+tkgate:
+tkgate:
+tkgate:
diff --git a/academic/tkgate/tkgate.SlackBuild b/academic/tkgate/tkgate.SlackBuild
new file mode 100644
index 0000000000000..a51cc6af0b119
--- /dev/null
+++ b/academic/tkgate/tkgate.SlackBuild
@@ -0,0 +1,154 @@
+#!/bin/sh
+
+# Slackware build script for tkgate
+
+# Copyright 2014 R. S. Ananda Murthy, Mysore, India
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PRGNAM=tkgate
+VERSION=${VERSION:-2.0_b10}
+SRCVERSION=$(echo $VERSION | tr _ -)
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -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 $PRGNAM-$SRCVERSION
+tar xvf $CWD/$PRGNAM-$SRCVERSION.tgz
+cd $PRGNAM-$SRCVERSION
+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 {} \;
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+CPPFLAGS="-DUSE_INTERP_RESULT" \
+LDFLAGS='-lm' \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --enable-static=no \
+ --with-tcl=/usr/lib${LIBDIRSUFFIX} \
+ --with-tk=/usr/lib${LIBDIRSUFFIX} \
+ --build=$ARCH-slackware-linux
+make
+make DESTDIR=$PKG install
+
+rm $PKG/usr/share/tkgate/libexec/verga
+rm $PKG/usr/share/tkgate/libexec/tkgate
+
+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
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a COPYING license.txt README.* TODO INSTALL $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+cp $CWD/$PRGNAM.png $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.png
+
+cp -r $PKG/usr/share/$PRGNAM/doc/* $PKG/usr/doc/$PRGNAM-$VERSION
+rm -rf $PKG/usr/share/$PRGNAM/doc
+( cd $PKG/usr/share/$PRGNAM; ln -s ../../doc/$PRGNAM-$VERSION doc )
+
+mkdir -p $PKG/install
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+mkdir -p $PKG/usr/share/applications
+mkdir -p $PKG/usr/share/icons/hicolor/48x48/apps
+cp $CWD/$PRGNAM.png $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
+chmod -x $PKG/usr/share/icons/hicolor/48x48/apps/$PRGNAM.png
+
+# These links are needed
+( cd $PKG/usr/share/tkgate/libexec ; ln -sf ../../../bin/verga verga )
+( cd $PKG/usr/share/tkgate/libexec ; ln -sf ../../../bin/tkgate tkgate )
+
+# Removing zero length files and unwanted files
+rm $PKG/usr/share/tkgate/bindings/none
+rm $PKG/usr/share/tkgate/locale/ja/tutorials/definition.txt
+rm $PKG/usr/share/tkgate/locale/en/tutorials/definition.txt
+rm $PKG/usr/share/tkgate/test/verga/grammar.out
+find $PKG -iname "*.*~" -exec rm {} \;
+find $PKG -iname "*.bak" -exec rm {} \;
+find $PKG -iname "messages~" -exec rm {} \;
+rm $PKG/usr/share/tkgate/TODO
+rm $PKG/usr/share/tkgate/COPYING
+rm $PKG/usr/share/tkgate/INSTALL
+rm $PKG/usr/share/tkgate/README*
+rm $PKG/usr/share/tkgate/pkg*
+rm $PKG/usr/share/tkgate/license.txt
+
+cat <<EOF > $PKG/usr/share/applications/$PRGNAM.desktop
+[Desktop Entry]
+Encoding=UTF-8
+Name=TkGate
+Comment=An event driven digital circuit simulator
+Exec=tkgate
+Terminal=false
+Type=Application
+Categories=Development
+Icon=tkgate
+StartupNotify=false
+EOF
+
+# Correcting ownerships.
+(cd $PKG/usr/share/tkgate; chown -R root:root .)
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/academic/tkgate/tkgate.info b/academic/tkgate/tkgate.info
new file mode 100644
index 0000000000000..86a600a69905e
--- /dev/null
+++ b/academic/tkgate/tkgate.info
@@ -0,0 +1,10 @@
+PRGNAM="tkgate"
+VERSION="2.0_b10"
+HOMEPAGE="http://www.tkgate.org/"
+DOWNLOAD="http://www.tkgate.org/downloads/tkgate-2.0-b10.tgz"
+MD5SUM="84ffe959868d39ec856b5ff1c70136c3"
+DOWNLOAD_x86_64="UNTESTED"
+MD5SUM_x86_64=""
+REQUIRES=""
+MAINTAINER="R. S. Ananda Murthy"
+EMAIL="rsamurti@gmail.com"
diff --git a/academic/tkgate/tkgate.png b/academic/tkgate/tkgate.png
new file mode 100644
index 0000000000000..36902932bf300
--- /dev/null
+++ b/academic/tkgate/tkgate.png
Binary files differ