libraries/blas: Add man pages.

Thanks to Mario Benincasa for the suggestion.

Signed-off-by: Kyle Guinn <elyk03@gmail.com>
This commit is contained in:
Kyle Guinn 2015-02-28 18:59:39 -06:00 committed by Willy Sudiarto Raharjo
parent 87fdc913a3
commit c211676184

View file

@ -2,7 +2,7 @@
# Slackware build script for BLAS
# Copyright 2014 Kyle Guinn <elyk03@gmail.com>, USA
# Copyright 2014-2015 Kyle Guinn <elyk03@gmail.com>, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@ -25,7 +25,7 @@
PRGNAM=blas
SRCNAM=lapack
VERSION=${VERSION:-3.5.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -120,6 +120,32 @@ sed -i \
-e "/^Libs:/s/-L[^ ]*/-L\${libdir}/" \
$PKG/usr/lib${LIBDIRSUFFIX}/pkgconfig/blas.pc
# Generate man pages. Also requires some fix-ups:
# 1. Replace "LAPACK" with "BLAS" in headers/footers.
# 2. Version is wrong.
# 3. Only generate on the BLAS sources.
# 4. Turn off some repetitive comments.
# 5. Turn off HAVE_DOT. Graphs are unnecessary for this purpose.
# 6. Turn off MAN_LINKS. See below.
sed -i \
-e "s/^\(PROJECT_NAME *=\).*/\1 BLAS/" \
-e "s/^\(PROJECT_NUMBER *=\).*/\1 ${VERSION}/" \
-e "s/^\(INPUT *=\).*/\1 BLAS\/SRC/" \
-e "s/^\(REPEAT_BRIEF *=\).*/\1 NO/" \
-e "s/^\(HAVE_DOT *=\).*/\1 NO/" \
-e "s/^\(MAN_LINKS *=\).*/\1 NO/" \
DOCS/Doxyfile_man
doxygen DOCS/Doxyfile_man
# 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.
# This adds a lot of bloat. Luckily, functions map 1:1 with files, so we can
# rename .f.3 -> .3 to have the page named after the function.
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
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild