[arch-commits] Commit in freemat/trunk (PKGBUILD remove-qwebkit.patch)

Balló György bgyorgy at archlinux.org
Tue Feb 7 14:55:16 UTC 2017


    Date: Tuesday, February 7, 2017 @ 14:55:16
  Author: bgyorgy
Revision: 210802

upgpkg: freemat 4.2-7

Disable help (removes qtwebkit dependency)

Added:
  freemat/trunk/remove-qwebkit.patch
Modified:
  freemat/trunk/PKGBUILD

----------------------+
 PKGBUILD             |   11 ++-
 remove-qwebkit.patch |  138 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 145 insertions(+), 4 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-02-07 14:37:24 UTC (rev 210801)
+++ PKGBUILD	2017-02-07 14:55:16 UTC (rev 210802)
@@ -4,22 +4,25 @@
 
 pkgname=freemat
 pkgver=4.2
-pkgrel=6
+pkgrel=7
 pkgdesc="A free environment for rapid engineering, scientific prototyping and data processing"
 arch=('i686' 'x86_64')
 url="http://freemat.sourceforge.net"
 license=('GPL')
-depends=('arpack' 'fftw' 'glu' 'portaudio' 'qtwebkit' 'qt4' 'libffi')
+depends=('arpack' 'fftw' 'glu' 'portaudio' 'qt4' 'libffi')
 makedepends=('cmake' 'python2' 'suitesparse' 'doxygen' 'gcc-fortran')
 install=freemat.install
 source=(http://downloads.sourceforge.net/project/freemat/FreeMat4/FreeMat-$pkgver-Source.tar.gz
-	build-fix.patch)
+	build-fix.patch
+	remove-qwebkit.patch)
 md5sums=('ace147e49273ae935d363da8e2a56d4d'
-         '042f43dcae863e3fc4c9a10b46761344')
+         '042f43dcae863e3fc4c9a10b46761344'
+         '5e37816fafe46a79cc157549f5bec554')
 
 prepare() {
   cd "$srcdir"/FreeMat-$pkgver-Source
   patch -p1 <"$srcdir"/build-fix.patch
+  patch -p1 <"$srcdir"/remove-qwebkit.patch
 }
 
 build() {

Added: remove-qwebkit.patch
===================================================================
--- remove-qwebkit.patch	                        (rev 0)
+++ remove-qwebkit.patch	2017-02-07 14:55:16 UTC (rev 210802)
@@ -0,0 +1,138 @@
+Description: Remove qwebkit dependencies.
+ This is bad patch, because it disables the functionality
+ of help-menu. But it can only be fixed, when FreeMat will
+ be ported on Qt5. Qt4-Webkit will be removed soon, so we
+ do not have any choice.
+Author: Anton Gladky <gladk at debian.org>
+Last-Update: 2016-01-22
+
+Index: FreeMat-4.2-Source/libs/libCore/helpwidget.cpp
+===================================================================
+--- FreeMat-4.2-Source.orig/libs/libCore/helpwidget.cpp
++++ FreeMat-4.2-Source/libs/libCore/helpwidget.cpp
+@@ -85,7 +85,6 @@ void HelpWindow::activateModule(QListWid
+   QRegExp modname_pattern("^\\s*(\\b\\w+\\b)\\s*\\((\\b\\w+\\b)\\)");
+   if (modname_pattern.indexIn(name_and_section) < 0)
+     return;
+-  tb->load(QUrl::fromLocalFile(m_initial+"/"+modname_pattern.cap(2) + "_" + modname_pattern.cap(1)+".html"));
+ }
+ 
+ void HelpWindow::activateModuleSearch(QListWidgetItem* item) {
+@@ -93,11 +92,6 @@ void HelpWindow::activateModuleSearch(QL
+   QRegExp modname_pattern("^\\s*(\\b\\w+\\b)\\s*\\((\\b\\w+\\b)\\)");
+   if (modname_pattern.indexIn(name_and_section) < 0)
+     return;
+-  tb->load(QUrl::fromLocalFile(m_initial+"/"+modname_pattern.cap(2) + "_" + modname_pattern.cap(1)+".html"));
+-
+-  /* Highlight search text*/
+-  if (!searchString.isEmpty())
+-    tb->findText(searchString,QWebPage::HighlightAllOccurrences);
+ }
+ 
+ void HelpWindow::activateModule(QTreeWidgetItem* item, int) {
+@@ -106,7 +100,6 @@ void HelpWindow::activateModule(QTreeWid
+   if (modname.indexIn(fulltext) < 0)
+     return;
+   QString module(modname.cap(1).toLower());
+-  tb->load(QUrl::fromLocalFile(m_initial+"/"+item->text(1)+"_"+module+".html"));
+ }
+ 
+ void HelpWindow::helpText(QString fulltext) {
+@@ -122,7 +115,6 @@ void HelpWindow::helpText(QString fullte
+   QRegExp modname_pattern("^\\s*(\\b\\w+\\b)\\s*\\((\\b\\w+\\b)\\)");
+   if (modname_pattern.indexIn(name_and_section) < 0)
+     return;
+-  tb->load(QUrl::fromLocalFile(m_initial+"/"+modname_pattern.cap(2) + "_" + modname_pattern.cap(1)+".html"));
+   m_helpwidget->m_flist->setCurrentItem(item);
+ }
+ 
+@@ -156,9 +148,6 @@ HelpWindow::HelpWindow(QString url) {
+   setWindowIcon(QPixmap(":/images/freemat_help_small_mod_64.png"));
+   setWindowTitle(QString(Interpreter::getVersionString()) + " Online Help");
+   m_initial = url;
+-  tb = new QWebView(this);
+-  tb->load(QUrl::fromLocalFile(m_initial+"/index.html"));
+-  setCentralWidget(tb);
+   m_helpwidget = new HelpWidget(url,this);
+   addDockWidget(Qt::LeftDockWidgetArea,m_helpwidget);
+   createActions();
+@@ -196,29 +185,23 @@ void HelpWindow::createActions() {
+ 
+   zoominAct = new QAction(QIcon(":/images/zoomin.png"),"Zoom &In",this);
+   zoominAct->setShortcut(Qt::Key_Plus | Qt::CTRL); 
+-  connect(zoominAct,SIGNAL(triggered()),tb,SLOT(zoomIn()));
+   zoomoutAct = new QAction(QIcon(":/images/zoomout.png"),"Zoom &Out",this);
+   zoomoutAct->setShortcut(Qt::Key_Minus | Qt::CTRL); 
+-  connect(zoomoutAct,SIGNAL(triggered()),tb,SLOT(zoomOut()));
+   copyAct = new QAction(QIcon(":/images/copy.png"),"&Copy Selection",this);
+   stemp.clear();
+   stemp.push_back(QKeySequence(Qt::Key_C | Qt::CTRL));
+   stemp.push_back(QKeySequence(Qt::Key_Insert | Qt::CTRL));
+   copyAct->setShortcuts(stemp);
+ 
+-  connect(copyAct,SIGNAL(triggered()),tb,SLOT(copy()));
+   exitAct = new QAction(QIcon(":/images/quit.png"),"&Exit Help",this);
+   exitAct->setShortcut(Qt::Key_Q | Qt::CTRL); 
+   connect(exitAct,SIGNAL(triggered()),this,SLOT(close()));
+   forwardAct = new QAction(QIcon(":/images/next.png"),"&Next",this);
+   forwardAct->setShortcut(Qt::Key_Right | Qt::Key_Alt); 
+-  connect(forwardAct,SIGNAL(triggered()),tb,SLOT(forward()));
+   backAct = new QAction(QIcon(":/images/previous.png"),"&Previous",this);
+   backAct->setShortcut(Qt::Key_Left | Qt::Key_Alt); 
+-  connect(backAct,SIGNAL(triggered()),tb,SLOT(back()));
+   homeAct = new QAction(QIcon(":/images/home.png"),"&Home",this);
+   homeAct->setShortcut(Qt::Key_Home | Qt::CTRL); 
+-  connect(homeAct,SIGNAL(triggered()),tb,SLOT(home()));
+   executeSelectionAct = new QAction(QIcon(":/images/player_playselection.png"),"&Execute Selection",this);
+   executeSelectionAct->setShortcut(Qt::Key_F9); 
+   connect(executeSelectionAct,SIGNAL(triggered()),this,SLOT(execSelected()));
+@@ -226,9 +209,7 @@ void HelpWindow::createActions() {
+   helpOnSelectionAct->setShortcut(Qt::Key_F2);
+   connect(helpOnSelectionAct,SIGNAL(triggered()),this,SLOT(helpOnSelection()));
+   
+-  connect(tb,SIGNAL(forwardAvailable(bool)),forwardAct,SLOT(setEnabled(bool)));
+   forwardAct->setEnabled(false);
+-  connect(tb,SIGNAL(backwardAvailable(bool)),backAct,SLOT(setEnabled(bool)));
+   backAct->setEnabled(false);
+ }
+ 
+@@ -267,19 +248,9 @@ void HelpWindow::createStatusBar() {
+ }
+ 
+ void HelpWindow::execSelected() {
+-  QString executeText = tb->selectedText();
+-  executeText.remove("--> ");
+-  executeText.remove("-> ");
+-  executeText = executeText.trimmed();
+-  if (!executeText.isEmpty())
+-    emit EvaluateText(executeText + "\n");
+ }
+ 
+ void HelpWindow::helpOnSelection() {
+-  QString executeText = tb->selectedText();
+-  executeText = executeText.trimmed();
+-  if (!executeText.isEmpty())
+-    helpText(executeText);
+ }
+ 
+ 
+Index: FreeMat-4.2-Source/libs/libCore/helpwidget.hpp
+===================================================================
+--- FreeMat-4.2-Source.orig/libs/libCore/helpwidget.hpp
++++ FreeMat-4.2-Source/libs/libCore/helpwidget.hpp
+@@ -23,7 +23,6 @@
+ #include <QObject>
+ #include <QMainWindow>
+ #include <QDockWidget>
+-#include <QWebView>
+ #include <QMenu>
+ #include <QToolBar>
+ #include <QAction>
+@@ -80,7 +79,6 @@ private:
+   void readSettings();
+   void closeEvent(QCloseEvent* ce);
+ 
+-  QWebView *tb;
+   HelpWidget *m_helpwidget;
+   QMenu *fileMenu, *editMenu, *goMenu, *helpMenu;
+   QToolBar *editToolBar;



More information about the arch-commits mailing list