mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-24 10:02:29 +01:00
academic/octave: Add workarounds for documentation browser bugs.
Thanks to Nikos Giotis for the bug report. Signed-off-by: Kyle Guinn <elyk03@gmail.com>
This commit is contained in:
parent
fabfddfd81
commit
158949367c
2 changed files with 45 additions and 2 deletions
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
PRGNAM=octave
|
PRGNAM=octave
|
||||||
VERSION=${VERSION:-3.8.2}
|
VERSION=${VERSION:-3.8.2}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-2}
|
||||||
TAG=${TAG:-_SBo}
|
TAG=${TAG:-_SBo}
|
||||||
|
|
||||||
if [ -z "$ARCH" ]; then
|
if [ -z "$ARCH" ]; then
|
||||||
|
@ -77,6 +77,9 @@ chmod -R u+w,go-w,a+rX-st .
|
||||||
# Auto-detect OpenBLAS.
|
# Auto-detect OpenBLAS.
|
||||||
cat $CWD/patches/ax_blas.m4 > m4/ax_blas.m4
|
cat $CWD/patches/ax_blas.m4 > m4/ax_blas.m4
|
||||||
|
|
||||||
|
# Add a patch from bug 41055. See below.
|
||||||
|
patch -p1 < $CWD/patches/missing-info-error.diff
|
||||||
|
|
||||||
# Don't try to detect Qt5. It's not supported yet.
|
# Don't try to detect Qt5. It's not supported yet.
|
||||||
# https://savannah.gnu.org/bugs/?40252
|
# https://savannah.gnu.org/bugs/?40252
|
||||||
patch -p1 < $CWD/patches/no-qt5.diff
|
patch -p1 < $CWD/patches/no-qt5.diff
|
||||||
|
@ -115,7 +118,9 @@ make install-strip DESTDIR=$PKG
|
||||||
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
find $PKG/usr/man -type f -exec gzip -9 {} \;
|
||||||
|
|
||||||
rm -f $PKG/usr/info/dir
|
rm -f $PKG/usr/info/dir
|
||||||
gzip -9 $PKG/usr/info/*.info*
|
# Don't compress info pages, `octave --force-gui` can't handle them compressed.
|
||||||
|
# https://savannah.gnu.org/bugs/?41055
|
||||||
|
#gzip -9 $PKG/usr/info/*.info*
|
||||||
|
|
||||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
|
cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
|
||||||
|
|
38
academic/octave/patches/missing-info-error.diff
Normal file
38
academic/octave/patches/missing-info-error.diff
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
|
||||||
|
# HG changeset patch
|
||||||
|
# User Torsten <ttl@justmail.de>
|
||||||
|
# Date 1388608160 -3600
|
||||||
|
# Node ID d03a6d272fee1d167473a2aa25e530443fcbe5cc
|
||||||
|
# Parent 5f7f5886692263efacc7141f0bbba341ae7804d1
|
||||||
|
display error message in document browser when info file is missing
|
||||||
|
|
||||||
|
* webinfo.cc (constructor): display a message if info file does not exist
|
||||||
|
|
||||||
|
diff --git a/libgui/src/qtinfo/webinfo.cc b/libgui/src/qtinfo/webinfo.cc
|
||||||
|
--- a/libgui/src/qtinfo/webinfo.cc
|
||||||
|
+++ b/libgui/src/qtinfo/webinfo.cc
|
||||||
|
@@ -94,8 +94,22 @@
|
||||||
|
|
||||||
|
resize (500, 300);
|
||||||
|
|
||||||
|
- set_info_path (QString::fromStdString (Vinfo_file));
|
||||||
|
+ QFileInfo info_file = QFileInfo (QString::fromStdString (Vinfo_file));
|
||||||
|
|
||||||
|
+ if (info_file.exists ())
|
||||||
|
+ set_info_path (QString::fromStdString (Vinfo_file));
|
||||||
|
+ else
|
||||||
|
+ { // Info file does not exist
|
||||||
|
+ _search_check_box->setEnabled (false);
|
||||||
|
+ _search_line_edit->setEnabled (false);
|
||||||
|
+
|
||||||
|
+ QTextBrowser *msg = addNewTab (tr ("Error"));
|
||||||
|
+ QString msg_text = QString ("<html><body><br><br><center><b>%1"
|
||||||
|
+ "</b></center></body></html>").
|
||||||
|
+ arg (tr ("The info file %1 does not exist").
|
||||||
|
+ arg(info_file.absoluteFilePath ()));
|
||||||
|
+ msg->setHtml (msg_text);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
|
Loading…
Reference in a new issue