[SCM] sonnet packaging branch, master, updated. debian/5.28.0-1-4-g4b0255b

Maximiliano Curia maxy at moszumanska.debian.org
Sun Apr 9 09:33:55 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/frameworks/sonnet.git;a=commitdiff;h=a14b3fa

The following commit has been merged in the master branch:
commit a14b3fa692e9735c3cddf54a5d3eec222598d453
Author: Maximiliano Curia <maxy at gnuservers.com.ar>
Date:   Sun Apr 9 11:24:39 2017 +0200

    Pick "Fix segfault in trigrams generation and expose MAXGRAMS constant in the header" (c7f0b14)
    
    Add upstream patch as:
     Fix-segfault-in-trigrams-generation-and-expose-MAXGRAMS-c.patch
    
    Gbp-Dch: Full
---
 ...trigrams-generation-and-expose-MAXGRAMS-c.patch | 78 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 79 insertions(+)

diff --git a/debian/patches/Fix-segfault-in-trigrams-generation-and-expose-MAXGRAMS-c.patch b/debian/patches/Fix-segfault-in-trigrams-generation-and-expose-MAXGRAMS-c.patch
new file mode 100644
index 0000000..ffcab9b
--- /dev/null
+++ b/debian/patches/Fix-segfault-in-trigrams-generation-and-expose-MAXGRAMS-c.patch
@@ -0,0 +1,78 @@
+From: John Salatas <jsalatas at gmail.com>
+Date: Wed, 18 Jan 2017 13:51:56 -0800
+Subject: Fix segfault in trigrams generation and expose MAXGRAMS constant in
+ the header
+
+Differential Revision: https://phabricator.kde.org/D4181
+---
+ data/CMakeLists.txt        | 2 +-
+ data/gentrigrams.cpp       | 6 +++---
+ src/core/guesslanguage.cpp | 3 ---
+ src/core/guesslanguage.h   | 3 +++
+ 4 files changed, 7 insertions(+), 7 deletions(-)
+
+diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
+index 716a09f..d65cff7 100644
+--- a/data/CMakeLists.txt
++++ b/data/CMakeLists.txt
+@@ -10,7 +10,7 @@ ecm_mark_nongui_executable(parsetrigrams)
+ ecm_mark_nongui_executable(gentrigrams)
+ 
+ TARGET_LINK_LIBRARIES(parsetrigrams PUBLIC Qt5::Core)
+-TARGET_LINK_LIBRARIES(gentrigrams PUBLIC Qt5::Core)
++TARGET_LINK_LIBRARIES(gentrigrams PUBLIC Qt5::Core KF5::SonnetCore)
+ INSTALL(TARGETS parsetrigrams EXPORT KF5SonnetTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
+ INSTALL(TARGETS gentrigrams EXPORT KF5SonnetTargets ${KF5_INSTALL_TARGETS_DEFAULT_ARGS})
+ 
+diff --git a/data/gentrigrams.cpp b/data/gentrigrams.cpp
+index 7dd7755..6badbfa 100644
+--- a/data/gentrigrams.cpp
++++ b/data/gentrigrams.cpp
+@@ -25,6 +25,7 @@
+ #include <QtCore/QHash>
+ #include <QtCore/QString>
+ #include <QtCore/QDebug>
++#include "guesslanguage.h"
+ 
+ int main(int argc, char *argv[])
+ {
+@@ -75,9 +76,8 @@ int main(int argc, char *argv[])
+ 
+     qDebug() << "Weeding out...";
+     QMap<int, QString>::iterator i = orderedTrigrams.begin();
+-    while (orderedTrigrams.size() > 300) {
+-        orderedTrigrams.erase(i);
+-        i++;
++    while (orderedTrigrams.size() > Sonnet::MAXGRAMS) {
++        i = orderedTrigrams.erase(i);
+     }
+     qDebug() << "Weeded!";
+ 
+diff --git a/src/core/guesslanguage.cpp b/src/core/guesslanguage.cpp
+index 546c514..723ad96 100644
+--- a/src/core/guesslanguage.cpp
++++ b/src/core/guesslanguage.cpp
+@@ -61,9 +61,6 @@ az-Latn    az
+ namespace Sonnet
+ {
+ 
+-// Amount of trigrams in each file
+-static const int MAXGRAMS = 300;
+-
+ class GuessLanguagePrivate
+ {
+ public:
+diff --git a/src/core/guesslanguage.h b/src/core/guesslanguage.h
+index e1bb609..2f224b8 100644
+--- a/src/core/guesslanguage.h
++++ b/src/core/guesslanguage.h
+@@ -28,6 +28,9 @@
+ namespace Sonnet
+ {
+ 
++// Amount of trigrams in each file
++static const int MAXGRAMS = 300;
++
+ class GuessLanguagePrivate;
+ 
+ /**
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f30f869
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+Fix-segfault-in-trigrams-generation-and-expose-MAXGRAMS-c.patch

-- 
sonnet packaging



More information about the pkg-kde-commits mailing list