summaryrefslogtreecommitdiffstats
path: root/libraries/blas/blas.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/blas/blas.SlackBuild')
-rw-r--r--libraries/blas/blas.SlackBuild62
1 files changed, 44 insertions, 18 deletions
diff --git a/libraries/blas/blas.SlackBuild b/libraries/blas/blas.SlackBuild
index 94de7720f7..fb5503f95e 100644
--- a/libraries/blas/blas.SlackBuild
+++ b/libraries/blas/blas.SlackBuild
@@ -1,8 +1,8 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for BLAS
-# Copyright 2014-2017 Kyle Guinn <elyk03@gmail.com>, USA
+# Copyright 2014-2024 Kyle Guinn <elyk03@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,11 +22,14 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=blas
SRCNAM=lapack
-VERSION=${VERSION:-3.8.0}
+VERSION=${VERSION:-3.12.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$(uname -m)" in
@@ -36,16 +39,18 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+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}
DOCS="LICENSE"
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
-elif [ "$ARCH" = "i586" ]; then
+if [ "$ARCH" = "i586" ]; then
SLKCFLAGS="-O2 -march=i586 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -106,24 +111,42 @@ if [ "${STATIC:-no}" != "no" ]; then
cd ..
fi
-# Generate man pages. Requires some fix-ups:
+# Generate man pages. Since 3.12.0 there is no longer a Doxyfile
+# intended for man page creation (only html), so attempt to recreate it.
+# Note that CMake can generate a Doxyfile, but it may differ from the
+# supplied one, and is less convenient to edit.
# 0. Join all escaped newlines so the entire value is replaced.
+# 1. Turn off GENERATE_HTML.
+# 2. Turn on GENERATE_MAN.
+# 3. Turn off MAN_LINKS, see below.
+# 4. Turn off HAVE_DOT, disable all graph generation.
+# 5. Turn off CREATE_SUBDIRS, may interfere with output file locations.
+# 6. Turn off REPEAT_BRIEF's repetitive comments.
+# 7. Turn off FULL_PATH_NAMES, omit source code paths from man pages.
+# 8. Turn off INLINE_SOURCES, don't copy the code to the man pages.
+sed -i \
+ -e ':a;/\\$/N;s/\s*\\\n\s*/ /;ta' \
+ -e 's/^\(GENERATE_HTML *=\).*/\1 NO/' \
+ -e 's/^\(GENERATE_MAN *=\).*/\1 YES/' \
+ -e 's/^\(MAN_LINKS *=\).*/\1 NO/' \
+ -e 's/^\(HAVE_DOT *=\).*/\1 NO/' \
+ -e 's/^\(CREATE_SUBDIRS *=\).*/\1 NO/' \
+ -e 's/^\(REPEAT_BRIEF *=\).*/\1 NO/' \
+ -e 's/^\(FULL_PATH_NAMES *=\).*/\1 NO/' \
+ -e 's/^\(INLINE_SOURCES *=\).*/\1 NO/' \
+ DOCS/Doxyfile
+# Limit ourselves to the BLAS functions:
# 1. Replace "LAPACK" with "BLAS" in headers/footers.
# 2. Only generate on the BLAS sources.
-# 3. Turn off recursion. Only operate on directories in INPUT.
-# 4. Turn off EXCLUDE to not conflict with INPUT.
-# 5. Turn off some repetitive comments.
-# 6. Turn off MAN_LINKS. See below.
+# 3. Turn off RECURSIVE, only operate on directories in INPUT.
+# 4. Turn off EXCLUDE, to not conflict with INPUT.
sed -i \
- -e ':a;/\\$/N;s/\\\n//;ta' \
-e 's/^\(PROJECT_NAME *=\).*/\1 BLAS/' \
-e 's/^\(INPUT *=\).*/\1 BLAS\/SRC/' \
-e 's/^\(RECURSIVE *=\).*/\1 NO/' \
-e 's/^\(EXCLUDE *=\).*/\1/' \
- -e 's/^\(REPEAT_BRIEF *=\).*/\1 NO/' \
- -e 's/^\(MAN_LINKS *=\).*/\1 NO/' \
- DOCS/Doxyfile_man
-doxygen DOCS/Doxyfile_man
+ DOCS/Doxyfile
+doxygen DOCS/Doxyfile
# Doxygen generates manpages on a file-by-file basis (note the .f extensions).
# We want a page for each function, not each file. MAN_LINKS creates a page
# for each function that just sources the page for the corresponding file.
@@ -133,6 +156,9 @@ mkdir -p $PKG/usr/man/man3
for i in DOCS/man/man3/*.f.3; do
gzip -9c $i > $PKG/usr/man/man3/$(basename $i .f.3).3.gz
done
+for i in DOCS/man/man3/*.f90.3; do
+ gzip -9c $i > $PKG/usr/man/man3/$(basename $i .f90.3).3.gz
+done
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
@@ -142,4 +168,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE