summaryrefslogtreecommitdiffstats
path: root/libraries/lapack/lapack.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/lapack/lapack.SlackBuild')
-rw-r--r--libraries/lapack/lapack.SlackBuild63
1 files changed, 42 insertions, 21 deletions
diff --git a/libraries/lapack/lapack.SlackBuild b/libraries/lapack/lapack.SlackBuild
index 5b9ad6886b..1ec4de8555 100644
--- a/libraries/lapack/lapack.SlackBuild
+++ b/libraries/lapack/lapack.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for LAPACK
-# Copyright 2014-2021 Kyle Guinn <elyk03@gmail.com>
+# Copyright 2014-2024 Kyle Guinn <elyk03@gmail.com>
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -26,7 +26,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=lapack
SRCNAM=lapack
-VERSION=${VERSION:-3.9.1}
+VERSION=${VERSION:-3.12.0}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -39,23 +39,18 @@ if [ -z "$ARCH" ]; then
esac
fi
-# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
-# the name of the created package would be, and then exit. This information
-# could be useful to other scripts.
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
exit 0
fi
TMP=${TMP:-/tmp/SBo}
-PKG=$TMP/package-$PRGNAM-$VERSION
+PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCS="LICENSE README.md DOCS/lapack.png DOCS/lawn81.tex DOCS/org2.ps"
-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"
@@ -126,22 +121,40 @@ if [ "${STATIC:-no}" != "no" ]; then
cd ..
fi
-# Generate man pages. Also 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 LAPACK functions:
# 1. Only generate on the LAPACK sources.
-# 2. Turn off recursion. Only operate on directories in INPUT.
-# 3. Turn off EXCLUDE to not conflict with INPUT.
-# 4. Turn off some repetitive comments.
-# 5. Turn off MAN_LINKS. See below.
+# 2. Turn off RECURSIVE, only operate on directories in INPUT.
+# 3. Turn off EXCLUDE, to not conflict with INPUT.
sed -i \
- -e ':a;/\\$/N;s/\\\n//;ta' \
-e 's/^\(INPUT *=\).*/\1 SRC SRC\/DEPRECATED/' \
-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.
@@ -151,11 +164,19 @@ 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/*.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
# Fix up some special cases where the mapping isn't 1:1.
ln -s sladiv.3.gz $PKG/usr/man/man3/sladiv1.3.gz
ln -s sladiv.3.gz $PKG/usr/man/man3/sladiv2.3.gz
ln -s dladiv.3.gz $PKG/usr/man/man3/dladiv1.3.gz
ln -s dladiv.3.gz $PKG/usr/man/man3/dladiv2.3.gz
+# Remove internal documentation.
+rm $PKG/usr/man/man3/la_constants.3.gz
# Remove files that are supplied by BLAS.
rm $PKG/usr/man/man3/xerbla.3.gz
rm $PKG/usr/man/man3/xerbla_array.3.gz
@@ -164,8 +185,8 @@ rm $PKG/usr/man/man3/xerbla_array.3.gz
# select few. Some are duplicated by BLAS (lsame.f), are unused (slamchf77.f,
# dlamchf77.f), or are test programs.
rm -rf DOCS/man
-sed -i 's/^\(INPUT *=\).*/\1 INSTALL/' DOCS/Doxyfile_man
-doxygen DOCS/Doxyfile_man
+sed -i 's/^\(INPUT *=\).*/\1 INSTALL/' DOCS/Doxyfile
+doxygen DOCS/Doxyfile
gzip -9c DOCS/man/man3/ilaver.f.3 > $PKG/usr/man/man3/ilaver.3.gz
gzip -9c DOCS/man/man3/slamch.f.3 > $PKG/usr/man/man3/slamch.3.gz
gzip -9c DOCS/man/man3/dlamch.f.3 > $PKG/usr/man/man3/dlamch.3.gz