summaryrefslogtreecommitdiffstats
path: root/libraries/openbabel/openbabel.SlackBuild
diff options
context:
space:
mode:
author Robby Workman2021-04-23 07:23:26 +0200
committer Robby Workman2021-04-23 07:23:26 +0200
commit18dea74a4fc97531b2979730401cc484d1ed5e4c (patch)
tree301ad46a662d6451bfa746d5d79ab1cb30ff8925 /libraries/openbabel/openbabel.SlackBuild
parent9842cab66fce4288d93a445da8f2385b53f690c9 (diff)
downloadslackbuilds-18dea74a4fc97531b2979730401cc484d1ed5e4c.tar.gz
libraries/openbabel: Updated for version 3.1.1.
If this is too new, then reverting is fine, but since we're working toward Slackware 15.0, and this 3.1.1 release has been out for a bit, let's see what happens...
Diffstat (limited to 'libraries/openbabel/openbabel.SlackBuild')
-rw-r--r--libraries/openbabel/openbabel.SlackBuild31
1 files changed, 21 insertions, 10 deletions
diff --git a/libraries/openbabel/openbabel.SlackBuild b/libraries/openbabel/openbabel.SlackBuild
index 426fab52d4..82107fc0f2 100644
--- a/libraries/openbabel/openbabel.SlackBuild
+++ b/libraries/openbabel/openbabel.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for openbabel
-# Copyright 2006-2013 Robby Workman, Northport, Alabama, USA
+# Copyright 2006,2013,2021 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,14 +25,13 @@
# Thanks to Daniil Bratashov (dn2010@gmail.com) for the cmake conversion
PRGNAM=openbabel
-VERSION=${VERSION:-2.4.1}
-SRCVER=$(echo $VERSION | tr . -)
+VERSION=${VERSION:-3.1.1}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) ARCH=i486 ;;
+ i?86) ARCH=i586 ;;
arm*) ARCH=arm ;;
*) ARCH=$( uname -m ) ;;
esac
@@ -43,8 +42,8 @@ TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -62,9 +61,9 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
-rm -rf $PRGNAM-$PRGNAM-$SRCVER
-tar xvf $CWD/$PRGNAM-$SRCVER.tar.gz
-cd $PRGNAM-$PRGNAM-$SRCVER
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION-source.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
@@ -85,6 +84,18 @@ cd build
make install DESTDIR=$PKG
cd ..
+# Sigh
+if [ "$LIBDIRSUFFIX" == "64" ]; then
+ sed -i \
+ -e "s,/usr/lib/,/usr/lib64/,g" \
+ -e "s,IMPORT_PREFIX}/lib/,IMPORT_PREFIX}/lib64/,g" \
+ $PKG/usr/lib/cmake/*
+ mv $PKG/usr/lib/cmake/* $PKG/usr/lib64/cmake
+ rmdir $PKG/usr/lib/cmake
+ mv $PKG/usr/lib/* $PKG/usr/lib64/
+ rmdir $PKG/usr/lib
+fi
+
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
@@ -93,7 +104,7 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a \
- AUTHORS COPYING NEWS.md README.md THANKS authors.txt doc/*.html \
+ AUTHORS COPYING README.md THANKS authors.txt doc/*.html \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild