From aa17592e7225cdc9d0a7a9461e2024c122e5e66c Mon Sep 17 00:00:00 2001 From: B. Watson Date: Sun, 31 Dec 2023 20:15:30 +0700 Subject: academic/wcalc: Added (scientific calculator). Signed-off-by: Willy Sudiarto Raharjo --- academic/wcalc/README | 13 +++++ academic/wcalc/doinst.sh | 9 ++++ academic/wcalc/icons/128.png | Bin 0 -> 2168 bytes academic/wcalc/icons/16.png | Bin 0 -> 284 bytes academic/wcalc/icons/32.png | Bin 0 -> 522 bytes academic/wcalc/icons/48.png | Bin 0 -> 784 bytes academic/wcalc/slack-desc | 19 ++++++++ academic/wcalc/wcalc.SlackBuild | 103 ++++++++++++++++++++++++++++++++++++++++ academic/wcalc/wcalc.desktop | 10 ++++ academic/wcalc/wcalc.info | 10 ++++ 10 files changed, 164 insertions(+) create mode 100644 academic/wcalc/README create mode 100644 academic/wcalc/doinst.sh create mode 100644 academic/wcalc/icons/128.png create mode 100644 academic/wcalc/icons/16.png create mode 100644 academic/wcalc/icons/32.png create mode 100644 academic/wcalc/icons/48.png create mode 100644 academic/wcalc/slack-desc create mode 100644 academic/wcalc/wcalc.SlackBuild create mode 100644 academic/wcalc/wcalc.desktop create mode 100644 academic/wcalc/wcalc.info (limited to 'academic') diff --git a/academic/wcalc/README b/academic/wcalc/README new file mode 100644 index 0000000000..c1522dce07 --- /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 0000000000..65c7e2eeb9 --- /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 new file mode 100644 index 0000000000..cafefc348c Binary files /dev/null and b/academic/wcalc/icons/128.png differ diff --git a/academic/wcalc/icons/16.png b/academic/wcalc/icons/16.png new file mode 100644 index 0000000000..ab6bf4aba0 Binary files /dev/null and b/academic/wcalc/icons/16.png differ diff --git a/academic/wcalc/icons/32.png b/academic/wcalc/icons/32.png new file mode 100644 index 0000000000..5077cee603 Binary files /dev/null and b/academic/wcalc/icons/32.png differ diff --git a/academic/wcalc/icons/48.png b/academic/wcalc/icons/48.png new file mode 100644 index 0000000000..e188f42fa7 Binary files /dev/null and b/academic/wcalc/icons/48.png differ diff --git a/academic/wcalc/slack-desc b/academic/wcalc/slack-desc new file mode 100644 index 0000000000..f7e41e97e1 --- /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 0000000000..21bd7932cd --- /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 0000000000..a47430d238 --- /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 0000000000..f92e778cc0 --- /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" -- cgit v1.2.3