[arch-commits] Commit in subsurface/trunk (PKGBUILD delete.patch include.patch)

Gaëtan Bisson bisson at archlinux.org
Fri May 25 07:08:24 UTC 2018


    Date: Friday, May 25, 2018 @ 07:08:22
  Author: bisson
Revision: 329249

fix build against Qt-5.11, avoid segfault

Added:
  subsurface/trunk/delete.patch
  subsurface/trunk/include.patch
Modified:
  subsurface/trunk/PKGBUILD

---------------+
 PKGBUILD      |   16 +++++++++++++---
 delete.patch  |   37 +++++++++++++++++++++++++++++++++++++
 include.patch |   35 +++++++++++++++++++++++++++++++++++
 3 files changed, 85 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-05-25 07:08:00 UTC (rev 329248)
+++ PKGBUILD	2018-05-25 07:08:22 UTC (rev 329249)
@@ -5,7 +5,7 @@
 pkgname=subsurface
 _pkgname=Subsurface
 pkgver=4.7.8
-pkgrel=2
+pkgrel=3
 pkgdesc='Divelog program'
 url='https://subsurface-divelog.org/'
 license=('GPL2')
@@ -14,11 +14,21 @@
 depends=('libzip' 'libxml2' 'libxslt' 'sqlite' 'libusb' 'libgit2'
          'subsurface-libdc' 'qt5-svg' 'qt5-location'
          'qt5-connectivity' 'qt5-webkit' 'grantlee' 'googlemaps')
-source=("https://subsurface-divelog.org/downloads/${_pkgname}-${pkgver}.tgz")
-sha256sums=('da7c09bcc63e0b3bc6e1ce5411a4f1e38a73e6e37bce15055657d840c78b07fa')
+source=("https://subsurface-divelog.org/downloads/${_pkgname}-${pkgver}.tgz"
+        'include.patch'
+        'delete.patch')
+sha256sums=('da7c09bcc63e0b3bc6e1ce5411a4f1e38a73e6e37bce15055657d840c78b07fa'
+            '05d8ed15a42b691043617f9a5e53047db49ab7dc288778300f8c433c644e70b1'
+            '59135a6917643be1608eb88db1dc81a740c8b0cff01f9ed62fa80e7d7523ee47')
 
 # qt5-webkit still used for: printing, manual, facebook
 
+prepare() {
+	cd "${srcdir}/${_pkgname}-${pkgver}"
+	patch -p1 -i ../include.patch
+	patch -p1 -i ../delete.patch
+}
+
 build() {
 	cd "${srcdir}/${_pkgname}-${pkgver}"
 	install -d build

Added: delete.patch
===================================================================
--- delete.patch	                        (rev 0)
+++ delete.patch	2018-05-25 07:08:22 UTC (rev 329249)
@@ -0,0 +1,37 @@
+From 479eccd89ae138ecab5bf6513d5ee5051137797e Mon Sep 17 00:00:00 2001
+From: Berthold Stoeger <bstoeger at mail.tuwien.ac.at>
+Date: Thu, 24 May 2018 22:57:02 +0200
+Subject: [PATCH] Cleanup: Don't defer deletion of oldModel in
+ DiveListView::reload()
+
+There seems to be no point in using deleteLater() of the previous
+model. Set the new model and delete the old one.
+
+Signed-off-by: Berthold Stoeger <bstoeger at mail.tuwien.ac.at>
+---
+ desktop-widgets/divelistview.cpp | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
+index 659d8e842..999edd39c 100644
+--- a/desktop-widgets/divelistview.cpp
++++ b/desktop-widgets/divelistview.cpp
+@@ -425,13 +425,12 @@ void DiveListView::reload(DiveTripModel::Layout layout, bool forceSort)
+ 
+ 	QSortFilterProxyModel *m = qobject_cast<QSortFilterProxyModel *>(model());
+ 	QAbstractItemModel *oldModel = m->sourceModel();
+-	if (oldModel) {
+-		oldModel->deleteLater();
+-	}
+ 	tripModel = new DiveTripModel(this);
+ 	tripModel->setLayout(layout);
+ 
+ 	m->setSourceModel(tripModel);
++	if (oldModel)
++		delete oldModel;
+ 
+ 	if (!forceSort)
+ 		return;
+-- 
+2.14.1
+

Added: include.patch
===================================================================
--- include.patch	                        (rev 0)
+++ include.patch	2018-05-25 07:08:22 UTC (rev 329249)
@@ -0,0 +1,35 @@
+From d3af836467a2c1a4913eb9e444632d834c7a335c Mon Sep 17 00:00:00 2001
+From: Gaetan Bisson <bisson at archlinux.org>
+Date: Tue, 22 May 2018 21:55:49 -1000
+Subject: [PATCH] Fix includes for building against Qt-5.11.0
+
+Signed-off-by: Gaetan Bisson <bisson at archlinux.org>
+---
+ desktop-widgets/divelistview.cpp | 1 +
+ desktop-widgets/templateedit.cpp | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
+index e45563680..659d8e842 100644
+--- a/desktop-widgets/divelistview.cpp
++++ b/desktop-widgets/divelistview.cpp
+@@ -18,6 +18,7 @@
+ #include <QNetworkReply>
+ #include <QStandardPaths>
+ #include <QMessageBox>
++#include <QHeaderView>
+ #include "core/qthelper.h"
+ #include "desktop-widgets/undocommands.h"
+ #include "desktop-widgets/divelistview.h"
+diff --git a/desktop-widgets/templateedit.cpp b/desktop-widgets/templateedit.cpp
+index 4af1666e0..82b02c324 100644
+--- a/desktop-widgets/templateedit.cpp
++++ b/desktop-widgets/templateedit.cpp
+@@ -5,6 +5,7 @@
+ #include "ui_templateedit.h"
+ 
+ #include <QMessageBox>
++#include <QButtonGroup>
+ #include <QColorDialog>
+ 
+ TemplateEdit::TemplateEdit(QWidget *parent, struct print_options *printOptions, struct template_options *templateOptions) :



More information about the arch-commits mailing list