mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-16 19:50:19 +01:00
academic/wcalc: Added (scientific calculator).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
86425263ce
commit
aa17592e72
10 changed files with 164 additions and 0 deletions
13
academic/wcalc/README
Normal file
13
academic/wcalc/README
Normal file
|
@ -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.
|
9
academic/wcalc/doinst.sh
Normal file
9
academic/wcalc/doinst.sh
Normal file
|
@ -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
|
BIN
academic/wcalc/icons/128.png
Normal file
BIN
academic/wcalc/icons/128.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.1 KiB |
BIN
academic/wcalc/icons/16.png
Normal file
BIN
academic/wcalc/icons/16.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 284 B |
BIN
academic/wcalc/icons/32.png
Normal file
BIN
academic/wcalc/icons/32.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 522 B |
BIN
academic/wcalc/icons/48.png
Normal file
BIN
academic/wcalc/icons/48.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 784 B |
19
academic/wcalc/slack-desc
Normal file
19
academic/wcalc/slack-desc
Normal file
|
@ -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:
|
103
academic/wcalc/wcalc.SlackBuild
Normal file
103
academic/wcalc/wcalc.SlackBuild
Normal file
|
@ -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
|
10
academic/wcalc/wcalc.desktop
Normal file
10
academic/wcalc/wcalc.desktop
Normal file
|
@ -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
|
10
academic/wcalc/wcalc.info
Normal file
10
academic/wcalc/wcalc.info
Normal file
|
@ -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"
|
Loading…
Reference in a new issue