diff options
author | B. Watson <urchlay@slackware.uk> | 2023-12-31 20:15:30 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2023-12-31 20:20:54 +0700 |
commit | aa17592e7225cdc9d0a7a9461e2024c122e5e66c (patch) | |
tree | 48f3cb95743e8bc0a345203c2cd090e444cd2730 /academic/wcalc | |
parent | 86425263ce95410119c17ed1d96749069a5dd0a5 (diff) |
academic/wcalc: Added (scientific calculator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'academic/wcalc')
-rw-r--r-- | academic/wcalc/README | 13 | ||||
-rw-r--r-- | academic/wcalc/doinst.sh | 9 | ||||
-rw-r--r-- | academic/wcalc/icons/128.png | bin | 0 -> 2168 bytes | |||
-rw-r--r-- | academic/wcalc/icons/16.png | bin | 0 -> 284 bytes | |||
-rw-r--r-- | academic/wcalc/icons/32.png | bin | 0 -> 522 bytes | |||
-rw-r--r-- | academic/wcalc/icons/48.png | bin | 0 -> 784 bytes | |||
-rw-r--r-- | academic/wcalc/slack-desc | 19 | ||||
-rw-r--r-- | academic/wcalc/wcalc.SlackBuild | 103 | ||||
-rw-r--r-- | academic/wcalc/wcalc.desktop | 10 | ||||
-rw-r--r-- | academic/wcalc/wcalc.info | 10 |
10 files changed, 164 insertions, 0 deletions
diff --git a/academic/wcalc/README b/academic/wcalc/README new file mode 100644 index 000000000000..c1522dce07a9 --- /dev/null +++ b/academic/wcalc/README @@ -0,0 +1,13 @@ +wcalc (command-line scientific calculator) + +Wcalc is a very capable command-line calculator. It has standard +functions (sin, asinh, and sqrt for example, in either radians or +degrees), many pre-defined constants (pi, e, c, G, etc.), support +for using variables, "active" variables, a command history, +hex/octal/binary input and output, unit conversions, embedded +comments, and the ability to save history to a file and load it +from a file. Wcalc evaluates expressions using the standard order of +operations. + +Wcalc uses intuitive expressions. For example, Wcalc will evaluate +5sin 4!-7*2(4%6)^2 to be -221.96631678. diff --git a/academic/wcalc/doinst.sh b/academic/wcalc/doinst.sh new file mode 100644 index 000000000000..65c7e2eeb9aa --- /dev/null +++ b/academic/wcalc/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 -f usr/share/icons/hicolor >/dev/null 2>&1 + fi +fi diff --git a/academic/wcalc/icons/128.png b/academic/wcalc/icons/128.png Binary files differnew file mode 100644 index 000000000000..cafefc348c6f --- /dev/null +++ b/academic/wcalc/icons/128.png diff --git a/academic/wcalc/icons/16.png b/academic/wcalc/icons/16.png Binary files differnew file mode 100644 index 000000000000..ab6bf4aba0a1 --- /dev/null +++ b/academic/wcalc/icons/16.png diff --git a/academic/wcalc/icons/32.png b/academic/wcalc/icons/32.png Binary files differnew file mode 100644 index 000000000000..5077cee6037c --- /dev/null +++ b/academic/wcalc/icons/32.png diff --git a/academic/wcalc/icons/48.png b/academic/wcalc/icons/48.png Binary files differnew file mode 100644 index 000000000000..e188f42fa74b --- /dev/null +++ b/academic/wcalc/icons/48.png diff --git a/academic/wcalc/slack-desc b/academic/wcalc/slack-desc new file mode 100644 index 000000000000..f7e41e97e1ea --- /dev/null +++ b/academic/wcalc/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------------------------------------------------------| +wcalc: wcalc (command-line scientific calculator) +wcalc: +wcalc: Wcalc is a very capable command-line calculator. It has standard +wcalc: functions (sin, asinh, and sqrt for example, in either radians or +wcalc: degrees), many pre-defined constants (pi, e, c, G, etc.), support +wcalc: for using variables, "active" variables, a command history, +wcalc: hex/octal/binary input and output, unit conversions, embedded +wcalc: comments, and the ability to save history to a file and load it +wcalc: from a file. Wcalc evaluates expressions using the standard order of +wcalc: operations. +wcalc: diff --git a/academic/wcalc/wcalc.SlackBuild b/academic/wcalc/wcalc.SlackBuild new file mode 100644 index 000000000000..21bd7932cdea --- /dev/null +++ b/academic/wcalc/wcalc.SlackBuild @@ -0,0 +1,103 @@ +#!/bin/bash + +# Slackware build script for wcalc + +# Written by B. Watson (urchlay@slackware.uk) + +# Licensed under the WTFPL. See http://www.wtfpl.net/txt/copying/ for details. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=wcalc +VERSION=${VERSION:-2.5} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +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 $PRGNAM-$VERSION +# the * in the next line is in case '?viasf=1' is appended to the filename... +tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2* +cd $PRGNAM-$VERSION +chown -R root:root . +find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \ + \! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} + + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --disable-static \ + --build=$ARCH-slackware-linux + +make +make install-strip DESTDIR=$PKG +gzip -9 $PKG/usr/man/man*/* + +# Icons extracted from graphics/TheW.icns in the source. +for i in $CWD/icons/*.png; do + px="$( basename $i .png )" + sz="${px}x${px}" + dir=$PKG/usr/share/icons/hicolor/$sz/apps + mkdir -p $dir + cat $i > $dir/$PRGNAM.png +done + +mkdir -p $PKG/usr/share/pixmaps +ln -s ../icons/hicolor/48x48/apps/$PRGNAM.png $PKG/usr/share/pixmaps/$PRGNAM.png + +# .desktop file written by SlackBuild author. +mkdir -p $PKG/usr/share/applications +cat $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + +PKGDOC=$PKG/usr/doc/$PRGNAM-$VERSION +mkdir -p $PKGDOC +cp -a AUTHORS COPYRIGHT ChangeLog NEWS README $PKGDOC +cat $CWD/$PRGNAM.SlackBuild > $PKGDOC/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc +cat $CWD/doinst.sh > $PKG/install/doinst.sh + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/academic/wcalc/wcalc.desktop b/academic/wcalc/wcalc.desktop new file mode 100644 index 000000000000..a47430d23890 --- /dev/null +++ b/academic/wcalc/wcalc.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Version=1.0 +Type=Application +Name=WCalc +Comment=Scientific Calculator +Exec=wcalc +Icon=wcalc +Terminal=true +StartupNotify=false +Categories=Science;Math diff --git a/academic/wcalc/wcalc.info b/academic/wcalc/wcalc.info new file mode 100644 index 000000000000..f92e778cc097 --- /dev/null +++ b/academic/wcalc/wcalc.info @@ -0,0 +1,10 @@ +PRGNAM="wcalc" +VERSION="2.5" +HOMEPAGE="https://w-calc.sourceforge.net/" +DOWNLOAD="https://downloads.sourceforge.net/w-calc/wcalc-2.5.tar.bz2" +MD5SUM="45b02ba339a813ffc65f154d1e54a04b" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="B. Watson" +EMAIL="urchlay@slackware.uk" |