aboutsummaryrefslogtreecommitdiff
path: root/academic/gelemental
diff options
context:
space:
mode:
authorPetar Petrov <ppetrov@paju.oulu.fi>2011-08-17 08:36:52 -0300
committerNiels Horn <niels.horn@slackbuilds.org>2011-08-17 08:36:52 -0300
commit3ab698d96117abb66530613ac2ed94c7410ce68d (patch)
tree8388f26b463e04806911fe88bb01299581711ef1 /academic/gelemental
parent2eb1edfb4000dd49b3bfab090756b73073ff49ea (diff)
academic/gelemental: Added (A periodic table viewer)
Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
Diffstat (limited to 'academic/gelemental')
-rw-r--r--academic/gelemental/README7
-rw-r--r--academic/gelemental/doinst.sh9
-rw-r--r--academic/gelemental/gelemental-1.2.0-gcc43.patch10
-rw-r--r--academic/gelemental/gelemental.SlackBuild102
-rw-r--r--academic/gelemental/gelemental.info10
-rw-r--r--academic/gelemental/slack-desc19
6 files changed, 157 insertions, 0 deletions
diff --git a/academic/gelemental/README b/academic/gelemental/README
new file mode 100644
index 0000000000000..b48548bcd9071
--- /dev/null
+++ b/academic/gelemental/README
@@ -0,0 +1,7 @@
+gElemental is a periodic table viewer that provides detailed info
+on the chemical elements. It is a port of GPeriodic to C++ and gtkmm.
+It offers an improved UI, an updated and corrected data set, a better
+data format, a list view and easier coloration.
+
+This requires glibmm and gtkmm, both of which are available at
+Slackbuilds.org. \ No newline at end of file
diff --git a/academic/gelemental/doinst.sh b/academic/gelemental/doinst.sh
new file mode 100644
index 0000000000000..3e5691a052b5b
--- /dev/null
+++ b/academic/gelemental/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/gelemental/gelemental-1.2.0-gcc43.patch b/academic/gelemental/gelemental-1.2.0-gcc43.patch
new file mode 100644
index 0000000000000..87cfbcc5fd7f4
--- /dev/null
+++ b/academic/gelemental/gelemental-1.2.0-gcc43.patch
@@ -0,0 +1,10 @@
+--- gelemental-1.2.0.org/libelemental/value.hh 2007-09-25 09:10:16.000000000 +0400
++++ gelemental-1.2.0/libelemental/value.hh 2008-06-29 12:36:30.000000000 +0400
+@@ -27,6 +27,7 @@
+ #include <libelemental/misc/ucompose.hh>
+ #include <libelemental/misc/extras.hh>
+
++#include <limits>
+ #include <iomanip>
+ #include <ostream>
+ #include <vector>
diff --git a/academic/gelemental/gelemental.SlackBuild b/academic/gelemental/gelemental.SlackBuild
new file mode 100644
index 0000000000000..1d475d4ccdac0
--- /dev/null
+++ b/academic/gelemental/gelemental.SlackBuild
@@ -0,0 +1,102 @@
+#!/bin/sh
+
+# Slackware build script for gelemental
+# Written by Petar Petrov, <ppetrov@paju.oulu.fi> and
+# hereby submitted to the public domain
+
+# Based on the gelemental PKGBUILD from Archlinux AUR
+# (https://aur.archlinux.org/packages.php?ID=10591).
+# PKGBUILD submitter is Phrodo_00 and maintainer is
+# chelqo. Thank you!
+
+# THIS SLACKBUILD IS DISTRIBUTETD IN THE HOPE OF BEING
+# USEFUL BUT WITHOUT ANY WARRANTY. THE AUTHOR IS _NOT_
+# RESPONSIBLE FOR ANY DAMAGE OR DATA LOSS CAUSED BY IT.
+
+PRGNAM=gelemental
+VERSION=${VERSION:-1.2.0}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ *) export 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-$VERSION
+tar -jxvf $CWD/$PRGNAM-$VERSION.tar.bz2
+
+# The patch is from Archlinux AUR, as mentioned above.
+# For AUR it has been taken from Debian. Thank you both!
+patch -p0 -s < $CWD/$PRGNAM-$VERSION-gcc43.patch
+
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+# Change the menu category to "Education"
+cd data
+sed "s:Categories=GTK;Utility;Science;Chemistry;:Categories=Education;:" -i gelemental.desktop.in
+cd ..
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+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 AUTHORS COPYING ChangeLog INSTALL README NEWS TODO $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$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:-tgz}
diff --git a/academic/gelemental/gelemental.info b/academic/gelemental/gelemental.info
new file mode 100644
index 0000000000000..aee3a4ca2608a
--- /dev/null
+++ b/academic/gelemental/gelemental.info
@@ -0,0 +1,10 @@
+PRGNAM="gelemental"
+VERSION="1.2.0"
+HOMEPAGE="http://www.kdau.com/projects/gelemental/"
+DOWNLOAD="https://api.opensuse.org/public/source/Education/gelemental/gelemental-1.2.0.tar.bz2"
+MD5SUM="efe3dc7b408c0c8c0b72fdd0733b2fb6"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Petar Petrov"
+EMAIL="ppetrov@paju.oulu.fi"
+APPROVED="Niels Horn"
diff --git a/academic/gelemental/slack-desc b/academic/gelemental/slack-desc
new file mode 100644
index 0000000000000..5e88af218fea9
--- /dev/null
+++ b/academic/gelemental/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 ':'.
+
+ |-----handy-ruler------------------------------------------------------|
+gelemental: gelemental (A periodic table viewer)
+gelemental:
+gelemental: gElemental is a periodic table viewer that provides detailed
+gelemental: information on the chemical elements.
+gelemental:
+gelemental:
+gelemental:
+gelemental:
+gelemental:
+gelemental:
+gelemental: Home: http://www.kdau.com/projects/gelemental/