From c2116761843b9e6234d170f1c1d21f6ab3e0c814 Mon Sep 17 00:00:00 2001 From: Kyle Guinn Date: Sat, 28 Feb 2015 18:59:39 -0600 Subject: [PATCH] libraries/blas: Add man pages. Thanks to Mario Benincasa for the suggestion. Signed-off-by: Kyle Guinn --- libraries/blas/blas.SlackBuild | 30 ++++++++++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/libraries/blas/blas.SlackBuild b/libraries/blas/blas.SlackBuild index 72d2920110..f1a563d57a 100644 --- a/libraries/blas/blas.SlackBuild +++ b/libraries/blas/blas.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for BLAS -# Copyright 2014 Kyle Guinn , USA +# Copyright 2014-2015 Kyle Guinn , 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