diff -pruN 0.9.1-2.2/debian/changelog 0.9.1-2.5/debian/changelog
--- 0.9.1-2.2/debian/changelog	2020-01-25 09:31:19.000000000 +0000
+++ 0.9.1-2.5/debian/changelog	2022-11-27 13:02:27.000000000 +0000
@@ -1,3 +1,61 @@
+presage (0.9.1-2.5) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * d/control: Add missing Breaks/Replaces.
+    Thanks to Andreas Beckmann (Closes: #1024773)
+  * text2ngram: Ignore more characters when building models.
+    This prevents words ending with e.g. a non-breaking space. Patches were
+    cherry-picked from sailfish OSes presage fork which is more active than
+    the current upstream we track in Debian.
+  * d/control: Drop build-depends on autoreconf.
+    Not needed since debhelper 10
+  * Add lintian override for abbreviation files.
+    These are not documentation but data used by the library
+  * d/control: Bump standards version. No changes needed.
+  * d/patches: Mark css patch as forwarded too.
+    Also applied to sfos' tree now
+  * d/rules: Enable bindnow hardening.
+    Switch to DPKG_EXPORT_BUILDFLAGS for that so we can drop the
+    configure dh_auto_configure override.
+  * d/control: Use https URLs
+  * d/gbp.conf: Update syntax
+
+ -- Guido Günther <agx@sigxcpu.org>  Sun, 27 Nov 2022 14:02:27 +0100
+
+presage (0.9.1-2.4) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Use automatic debug packages
+  * Switch to dh 13
+  * Install Spanish database.
+    It's shipped upstream so let's have it.
+  * gprompter: Install svg. We install the bitmap variants so let's have the
+    svg too.
+  * presage: Install xpm and svg.
+    We install the png so let's have the other variants too.
+  * Add not-installed. Lists uninstalled (and unneeded) files
+  * d/copyright: Remove duplicate pattern
+  * Don't duplicate the same file in the dev package. It's in docs already
+  * Add a superficial autopkgtest
+  * Minimize build-depends (Closes: #981389)
+  * Link to jquery vi dh_links.
+    Instead of using a hand crafted, non-functional symlink in rules.
+  * docs: Install css too. Otherwise they're mostly unreadable
+
+ -- Guido Günther <agx@sigxcpu.org>  Tue, 08 Nov 2022 12:43:15 +0100
+
+presage (0.9.1-2.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch to fix FTBFS w/ gcc-11 (Closes: #984297)
+    + d/p/c++17.patch: fix the build against GCC-11 by porting
+      the code to C++17
+    + d/p/format-security.patch: fix insecure format strings in the
+      demo code
+    (Thanks Simon Chopin for the patches!)
+
+ -- Nilesh Patra <nilesh@debian.org>  Fri, 14 Oct 2022 08:39:51 +0530
+
 presage (0.9.1-2.2) unstable; urgency=medium
 
   [ Aron Xu ]
diff -pruN 0.9.1-2.2/debian/compat 0.9.1-2.5/debian/compat
--- 0.9.1-2.2/debian/compat	2020-01-25 09:31:19.000000000 +0000
+++ 0.9.1-2.5/debian/compat	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-10
diff -pruN 0.9.1-2.2/debian/control 0.9.1-2.5/debian/control
--- 0.9.1-2.2/debian/control	2020-01-25 09:31:19.000000000 +0000
+++ 0.9.1-2.5/debian/control	2022-11-27 13:02:27.000000000 +0000
@@ -2,23 +2,19 @@ Source: presage
 Section: devel
 Priority: optional
 Maintainer: Matteo Vescovi <matteo.vescovi@yahoo.co.uk>
-Build-Depends: debhelper (>= 9~),
- autotools-dev,
- dh-autoreconf,
+Build-Depends: debhelper-compat (= 13),
  pkg-config,
  libsqlite3-dev,
- sqlite3,
  libtinyxml-dev (>= 2.5.3),
  libncurses5-dev | libncurses-dev,
  help2man,
- libcppunit-dev (>= 1.9.6),
- swig (>= 2.0.4),
+ libcppunit-dev (>= 1.9.6) <!nocheck>,
  libgtk2.0-dev (>= 2.12),
 Build-Depends-Indep: doxygen, graphviz
-Standards-Version: 3.9.7
-Homepage: http://presage.sourceforge.net/
-Vcs-Git: git://git.code.sf.net/p/presage/presage-debian
-Vcs-Browser: http://sourceforge.net/p/presage/presage-debian/ci/master/tree/
+Standards-Version: 4.6.1
+Homepage: https://presage.sourceforge.net/
+Vcs-Git: https://git.code.sf.net/p/presage/presage-debian
+Vcs-Browser: https://sourceforge.net/p/presage/presage-debian/ci/master/tree/
 
 Package: presage
 Section: misc
@@ -33,25 +29,13 @@ Description: intelligent predictive text
  .
  This package also contains simple demonstration programs and simulator.
 
-Package: presage-dbg
-Architecture: any
-Section: debug
-Depends: presage (= ${binary:Version}), ${misc:Depends}
-Description: intelligent predictive text entry platform (tools debugging symbols)
- Presage is an intelligent predictive text entry platform.
- .
- This package contains the debugging symbols for the presage tools
- required to generate custom statistical data used by the presage
- predictive text engine to generate predictions.
- .
- This package also contains debugging symbols for simple demonstration
- programs and simulator.
-
 Package: libpresage-doc
 Section: doc
 Architecture: all
 Depends: libjs-jquery, ${misc:Depends}
 Recommends: presage
+Breaks: libpresage-dev (<< 0.9.1-2.4)
+Replaces: libpresage-dev (<< 0.9.1-2.4)
 Description: intelligent predictive text entry platform (documentation)
  Presage is an intelligent predictive text entry platform.
  .
@@ -86,28 +70,6 @@ Description: intelligent predictive text
  .
  This package contains the shared library.
 
-Package: libpresage1-dbg
-Architecture: any
-Multi-Arch: same
-Section: debug
-Depends: libpresage1v5 (= ${binary:Version}), ${misc:Depends}
-Description: intelligent predictive text entry platform (shared library debugging symbols)
- Presage is an intelligent predictive text entry platform.
- .
- A predictive text entry system attempts to improve the ease and speed
- of textual input by predicting words. Word prediction consists in
- computing which word tokens or word completions are most likely to be
- entered next. The system analyses the text already entered and
- combines the information thus extracted with other information sources
- to calculate the set of most probable tokens.
- .
- Presage exploits redundant information embedded in natural
- languages to generate word predictions. The modular architecture
- allows its language model to be extended and customized to utilize
- statistical, syntactic, and semantic information sources.
- .
- This package contains the debugging symbols for the shared library.
-
 Package: libpresage-data
 Section: libs
 Architecture: all
@@ -146,12 +108,3 @@ Description: intelligent predictive GTK+
  letter is typed. Predictions can be easily selected and inserted in
  the document.
 
-Package: gprompter-dbg
-Architecture: any
-Section: debug
-Depends: gprompter (= ${binary:Version}), ${misc:Depends}
-Description: intelligent predictive GTK+ text editor (debugging symbols)
- gprompter is a cross-platform predictive text editor, based on
- presage, the intelligent predictive text entry platform.
- .
- This package contains the debugging symbols for gprompter.
diff -pruN 0.9.1-2.2/debian/copyright 0.9.1-2.5/debian/copyright
--- 0.9.1-2.2/debian/copyright	2016-03-17 23:39:27.000000000 +0000
+++ 0.9.1-2.5/debian/copyright	2022-11-27 13:02:27.000000000 +0000
@@ -129,10 +129,7 @@ License: Scintilla-and-Scite
 
 Files: apps/gtk/gprompter/scintilla/lexers/LexSML.cxx
 Copyright: Copyright 2009 by James Moffatt and Yuzhou Xin
-License: Scintilla-and-Scite
-
-Files: apps/gtk/gprompter/scintilla/lexers/LexSML.cxx
-Copyright: Modified from LexCaml.cxx by Robert Roessler <robertr@rftp.com> Copyright 2005
+           Modified from LexCaml.cxx by Robert Roessler <robertr@rftp.com> Copyright 2005
 License: Scintilla-and-Scite
 
 Files: apps/gtk/gprompter/scintilla/lexers/LexD.cxx
diff -pruN 0.9.1-2.2/debian/gbp.conf 0.9.1-2.5/debian/gbp.conf
--- 0.9.1-2.2/debian/gbp.conf	2016-03-17 23:39:27.000000000 +0000
+++ 0.9.1-2.5/debian/gbp.conf	2022-11-27 13:02:27.000000000 +0000
@@ -1,3 +1,3 @@
-[git-buildpackage]
+[buildpackage]
 # use a build area relative to the git repository
 export-dir=../build-area
diff -pruN 0.9.1-2.2/debian/gprompter.install 0.9.1-2.5/debian/gprompter.install
--- 0.9.1-2.2/debian/gprompter.install	2016-03-17 23:39:27.000000000 +0000
+++ 0.9.1-2.5/debian/gprompter.install	2022-11-27 13:02:27.000000000 +0000
@@ -2,4 +2,5 @@ usr/bin/gprompter
 usr/share/man/man1/gprompter.1
 usr/share/pixmaps/gprompter.xpm
 usr/share/pixmaps/gprompter.png
+usr/share/icons/hicolor/scalable/apps/gprompter.svg
 usr/share/applications/gprompter.desktop
diff -pruN 0.9.1-2.2/debian/libpresage-data.install 0.9.1-2.5/debian/libpresage-data.install
--- 0.9.1-2.2/debian/libpresage-data.install	2016-03-17 23:39:27.000000000 +0000
+++ 0.9.1-2.5/debian/libpresage-data.install	2022-11-27 13:02:27.000000000 +0000
@@ -2,5 +2,6 @@ etc/presage.xml
 usr/share/presage/abbreviations_en.txt
 usr/share/presage/abbreviations_it.txt
 usr/share/presage/database_en.db
+usr/share/presage/database_es.db
 usr/share/presage/database_it.db
 usr/share/presage/presage.png
diff -pruN 0.9.1-2.2/debian/libpresage-data.lintian-overrides 0.9.1-2.5/debian/libpresage-data.lintian-overrides
--- 0.9.1-2.2/debian/libpresage-data.lintian-overrides	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/libpresage-data.lintian-overrides	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1,3 @@
+# Abbreviations files are not documentation
+libpresage-data: package-contains-documentation-outside-usr-share-doc [usr/share/presage/abbreviations_en.txt]
+libpresage-data: package-contains-documentation-outside-usr-share-doc [usr/share/presage/abbreviations_it.txt]
diff -pruN 0.9.1-2.2/debian/libpresage-dev.docs 0.9.1-2.5/debian/libpresage-dev.docs
--- 0.9.1-2.2/debian/libpresage-dev.docs	2016-03-17 23:39:27.000000000 +0000
+++ 0.9.1-2.5/debian/libpresage-dev.docs	1970-01-01 00:00:00.000000000 +0000
@@ -1 +0,0 @@
-doc/getting_started.txt
diff -pruN 0.9.1-2.2/debian/libpresage-doc.links 0.9.1-2.5/debian/libpresage-doc.links
--- 0.9.1-2.2/debian/libpresage-doc.links	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/libpresage-doc.links	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1 @@
+usr/share/javascript/jquery/jquery.js usr/share/presage/html/jquery.js
diff -pruN 0.9.1-2.2/debian/not-installed 0.9.1-2.5/debian/not-installed
--- 0.9.1-2.2/debian/not-installed	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/not-installed	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1,5 @@
+usr/lib/*/libpresage.a
+usr/lib/*/libpresage.la
+usr/share/presage/getting_started.txt
+usr/share/presage/python_binding.txt
+
diff -pruN 0.9.1-2.2/debian/patches/c++17.patch 0.9.1-2.5/debian/patches/c++17.patch
--- 0.9.1-2.2/debian/patches/c++17.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/patches/c++17.patch	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1,239 @@
+Description: Port the code to C++17
+Author: Simon Chopin <schopin@ubuntu.com>
+Origin: ubuntu
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=984297
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/presage/+bug/1988196
+Last-Update: 2022-08-30
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/src/lib/presage.h
++++ b/src/lib/presage.h
+@@ -112,7 +112,7 @@
+      * 
+      * Presage does not take ownership of the callback object.
+      */
+-    Presage(PresageCallback* callback) throw (PresageException);
++    Presage(PresageCallback* callback) noexcept(false);
+ 
+ 
+     /** Creates and initializes presage with supplied configuration.
+@@ -122,7 +122,7 @@
+      *
+      * Presage does not take ownership of the callback object.
+      */
+-    Presage(PresageCallback* callback, const std::string config) throw (PresageException);
++    Presage(PresageCallback* callback, const std::string config) noexcept(false);
+ 
+ 
+     /** Destroys presage.
+@@ -138,7 +138,7 @@
+      * context.
+      *
+      */
+-    std::vector<std::string> predict() throw (PresageException);
++    std::vector<std::string> predict() noexcept(false);
+ 
+     /** \brief Obtain a prediction that matches the supplied token
+      *         filter.
+@@ -153,7 +153,7 @@
+      * of the filter tokens.
+      *
+      */
+-    std::multimap<double, std::string> predict(std::vector<std::string> filter) throw (PresageException);
++    std::multimap<double, std::string> predict(std::vector<std::string> filter) noexcept(false);
+ 
+     /** \brief Learn from text offline.
+      *
+@@ -167,7 +167,7 @@
+      * \param text a text string to learn from.
+      *
+      */
+-    void learn(const std::string text) const throw (PresageException);
++    void learn(const std::string text) const noexcept(false);
+ 
+     /** \brief Callback getter/setter.
+      *
+@@ -176,7 +176,7 @@
+      *
+      * \return pointer to previously used callback
+      */
+-    PresageCallback* callback(PresageCallback* callback) throw (PresageException);
++    PresageCallback* callback(PresageCallback* callback) noexcept(false);
+ 
+     /** \brief Request presage to return the completion string for the given predicted token.
+      *
+@@ -190,26 +190,26 @@
+      *
+      * \return completion string
+      */
+-    std::string completion(std::string str) throw (PresageException);
++    std::string completion(std::string str) noexcept(false);
+ 
+     /** \brief Returns the text entered so far.
+      *
+      * \return context, text entered so far.
+      */
+-    std::string context() const throw (PresageException);
++    std::string context() const noexcept(false);
+ 
+     /** \brief Returns true if a context change occured.
+      *
+      * \return true if a context change occured after the last update
+      * or predict calls, or false otherwise.
+      */
+-    bool context_change() const throw (PresageException);
++    bool context_change() const noexcept(false);
+ 
+     /** \brief Returns the current prefix.
+      *
+      * \return prefix
+      */
+-    std::string prefix() const throw (PresageException);
++    std::string prefix() const noexcept(false);
+ 
+     /** \brief Gets the value of specified configuration variable.
+      *
+@@ -218,7 +218,7 @@
+      *
+      * \return value assigned to configuration variable.
+      */
+-    std::string config(const std::string variable) const throw (PresageException);
++    std::string config(const std::string variable) const noexcept(false);
+ 
+     /** \brief Sets the value of specified configuration variable.
+      *
+@@ -227,7 +227,7 @@
+      * from the configuration file in use.
+      *
+      */
+-    void config(const std::string variable, const std::string value) const throw (PresageException);
++    void config(const std::string variable, const std::string value) const noexcept(false);
+ 
+     /** \brief Save current configuration to file.
+      *
+@@ -236,7 +236,7 @@
+      * active XML profile.
+      *
+      */
+-    void save_config() const throw (PresageException);
++    void save_config() const noexcept(false);
+ 
+     /*
+      * Presage public API ends here
+--- a/src/lib/presage.cpp
++++ b/src/lib/presage.cpp
+@@ -31,7 +31,7 @@
+ #include "core/predictorActivator.h"
+ 
+ Presage::Presage (PresageCallback* callback)
+-    throw (PresageException)
++    noexcept(false)
+ {
+     profileManager = new ProfileManager();
+     configuration = profileManager->get_configuration();
+@@ -42,7 +42,7 @@
+ }
+ 
+ Presage::Presage (PresageCallback* callback, const std::string config_filename)
+-    throw (PresageException)
++    noexcept(false)
+ {
+     profileManager = new ProfileManager(config_filename);
+     configuration = profileManager->get_configuration();
+@@ -62,7 +62,7 @@
+ }
+ 
+ std::vector<std::string> Presage::predict ()
+-    throw (PresageException)
++    noexcept(false)
+ {
+     std::vector<std::string> result;
+ 
+@@ -88,7 +88,7 @@
+ }
+ 
+ std::multimap<double, std::string> Presage::predict (std::vector<std::string> filter)
+-    throw (PresageException)
++    noexcept(false)
+ {
+     std::multimap<double, std::string> result;
+ 
+@@ -137,20 +137,20 @@
+ }
+ 
+ void Presage::learn(const std::string text) const
+-    throw (PresageException)
++    noexcept(false)
+ {
+     contextTracker->learn(text); // TODO: can pass additional param to
+ 				 // learn to specify offline learning
+ }
+ 
+ PresageCallback* Presage::callback (PresageCallback* callback)
+-    throw (PresageException)
++    noexcept(false)
+ {
+     return const_cast<PresageCallback*>(contextTracker->callback(callback));
+ }
+ 
+ std::string Presage::completion (const std::string str)
+-    throw (PresageException)
++    noexcept(false)
+ {
+     // There are two types of completions: normal and erasing.
+     // normal_completion  = prefix + remainder
+@@ -198,37 +198,37 @@
+ }
+ 
+ std::string Presage::context () const
+-    throw (PresageException)
++    noexcept(false)
+ {
+     return contextTracker->getPastStream();
+ }
+ 
+ bool Presage::context_change () const
+-    throw (PresageException)
++    noexcept(false)
+ {
+     return contextTracker->contextChange();
+ }
+ 
+ std::string Presage::prefix () const
+-    throw (PresageException)
++    noexcept(false)
+ {
+     return contextTracker->getPrefix();
+ }
+ 
+ std::string Presage::config (const std::string variable) const
+-    throw (PresageException)
++    noexcept(false)
+ {
+     return configuration->find (variable)->get_value ();
+ }
+ 
+ void Presage::config (const std::string variable, const std::string value) const
+-    throw (PresageException)
++    noexcept(false)
+ {
+     configuration->insert (variable, value);
+ }
+ 
+ void Presage::save_config () const
+-    throw (PresageException)
++    noexcept(false)
+ {
+     profileManager->save_profile ();
+ }
+--- presage-0.9.1.orig/apps/gtk/gprompter/scintilla/gtk/ScintillaGTK.cxx
++++ presage-0.9.1/apps/gtk/gprompter/scintilla/gtk/ScintillaGTK.cxx
+@@ -1626,7 +1626,7 @@ void ScintillaGTK::ReceivedDrop(GtkSelec
+ 		drop.push_back('\0');
+ 		NotifyURIDropped(&drop[0]);
+ 	} else if ((TypeOfGSD(selection_data) == GDK_TARGET_STRING) || (TypeOfGSD(selection_data) == atomUTF8)) {
+-		if (TypeOfGSD(selection_data) > 0) {
++		if (TypeOfGSD(selection_data)) {
+ 			SelectionText selText;
+ 			GetGtkSelectionText(selection_data, selText);
+ 			DropAt(posDrop, selText.Data(), selText.Length(), false, selText.rectangular);
diff -pruN 0.9.1-2.2/debian/patches/format-security.patch 0.9.1-2.5/debian/patches/format-security.patch
--- 0.9.1-2.2/debian/patches/format-security.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/patches/format-security.patch	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1,52 @@
+Description: Fix insecure format strings in the demo code
+Author: Simon Chopin <schopin@ubuntu.com>
+Origin: ubuntu
+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/presage/+bug/1988196
+Last-Update: 2022-08-30
+--- a/src/tools/presageDemo.cpp
++++ b/src/tools/presageDemo.cpp
+@@ -173,7 +173,7 @@
+ 	    // key corresponding to desired token. selecting
+ 	    // suggestion.
+ 	    std::string message = "Last selected word: " + words[c - KEY_F0 - 1];
+-	    mvprintw(LINES - 3, 0, message.c_str());
++	    mvprintw(LINES - 3, 0, "%s", message.c_str());
+             clrtoeol();
+ 	    move(LINES, COLS);
+ 
+@@ -213,7 +213,7 @@
+ {
+     wclear( win );
+     box( win, 0, 0 );
+-    mvwprintw( win, 1, 1, str.c_str() );
++    mvwprintw( win, 1, 1, "%s", str.c_str() );
+     wrefresh( win );
+ }
+ 
+@@ -226,7 +226,7 @@
+     int i = 1;
+     std::vector<std::string>::const_iterator j = words.begin();
+     while( j != words.end() ) {
+-	mvwprintw( win, i, 1, j->c_str() );
++	mvwprintw( win, i, 1, "%s", j->c_str() );
+ 	i++;
+ 	j++;
+     }
+@@ -241,7 +241,7 @@
+     for (int i = 1; i <= atoi(suggestions.c_str()); i++) {
+         std::stringstream ss;
+         ss << 'F' << i;
+-        mvwprintw(win, i, 1, ss.str().c_str());
++        mvwprintw(win, i, 1, "%s", ss.str().c_str());
+     }
+     wrefresh(win);
+ }
+@@ -291,7 +291,7 @@
+ 	     strit != listit->end();
+ 	     strit++) {
+ 	    
+-	    mvwprintw(win, line, 1, strit->c_str());
++	    mvwprintw(win, line, 1, "%s", strit->c_str());
+ 	    line++;
+ 	}
+ 
diff -pruN 0.9.1-2.2/debian/patches/series 0.9.1-2.5/debian/patches/series
--- 0.9.1-2.2/debian/patches/series	2016-07-03 12:56:39.000000000 +0000
+++ 0.9.1-2.5/debian/patches/series	2022-11-27 13:02:27.000000000 +0000
@@ -1,2 +1,7 @@
 fix-bug-776720.patch
 fix-bug-811758-gcc6.patch
+c++17.patch
+format-security.patch
+sfos/docs-Install-css-too.patch
+sfos/text2ngram-Add-and-to-separators.patch
+sfos/text2ngram-Add-non-breaking-space-to-whitespace-chars.patch
diff -pruN 0.9.1-2.2/debian/patches/sfos/docs-Install-css-too.patch 0.9.1-2.5/debian/patches/sfos/docs-Install-css-too.patch
--- 0.9.1-2.2/debian/patches/sfos/docs-Install-css-too.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/patches/sfos/docs-Install-css-too.patch	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1,24 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Tue, 8 Nov 2022 12:29:22 +0100
+Subject: docs: Install css too
+
+Forwarded: https://github.com/sailfish-keyboard/presage/commit/b60c381d9f8bfa0815bd982b8c69cc3b72a0e52a
+
+Otherwise they're mostly unreadable
+---
+ doc/Makefile.am | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/doc/Makefile.am b/doc/Makefile.am
+index bfb2f09..7ee84df 100644
+--- a/doc/Makefile.am
++++ b/doc/Makefile.am
+@@ -46,7 +46,7 @@ if HAVE_DOXYGEN
+ #pkgdata_DATA =	html latex
+ install-data-local:
+ 	$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/html
+-	find html -type f \( -name "*.html" -o -name "*.png" \) \
++	find html -type f \( -name "*.html" -o -name "*.png" -o -name "*.css" \) \
+ 		-exec $(INSTALL_DATA) {} $(DESTDIR)$(pkgdatadir)/{} \;
+ 
+ all-local:	doxygen.timestamp
diff -pruN 0.9.1-2.2/debian/patches/sfos/text2ngram-Add-and-to-separators.patch 0.9.1-2.5/debian/patches/sfos/text2ngram-Add-and-to-separators.patch
--- 0.9.1-2.2/debian/patches/sfos/text2ngram-Add-and-to-separators.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/patches/sfos/text2ngram-Add-and-to-separators.patch	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1,22 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Wed, 9 Nov 2022 11:33:53 +0100
+Subject: =?utf-8?q?text2ngram=3A_Add_=C2=AB_and_=C2=BB_to_separators?=
+
+Forwarded: https://github.com/sailfish-keyboard/presage/commit/cf67f3b9018a04acd0d54114d29fcc68b1a3b506
+---
+ src/tools/text2ngram.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/tools/text2ngram.cpp b/src/tools/text2ngram.cpp
+index 807aa83..2953ff4 100644
+--- a/src/tools/text2ngram.cpp
++++ b/src/tools/text2ngram.cpp
+@@ -174,7 +174,7 @@ int main(int argc, char* argv[])
+ 	std::ifstream infile(argv[i]);
+ 	ForwardTokenizer tokenizer(infile,
+ 				   " \f\n\r\t\v",
+-				   "`~!@#$%^&*()_-+=\\|]}[{'\";:/?.>,<");
++				   "`~!@#$%^&*()_-+=\\|]}[{'\";:/?.>,<«»");
+ 	tokenizer.lowercaseMode(lowercase);
+ 
+ 	// take care of first N-1 tokens
diff -pruN 0.9.1-2.2/debian/patches/sfos/text2ngram-Add-non-breaking-space-to-whitespace-chars.patch 0.9.1-2.5/debian/patches/sfos/text2ngram-Add-non-breaking-space-to-whitespace-chars.patch
--- 0.9.1-2.2/debian/patches/sfos/text2ngram-Add-non-breaking-space-to-whitespace-chars.patch	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/patches/sfos/text2ngram-Add-non-breaking-space-to-whitespace-chars.patch	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1,22 @@
+From: =?utf-8?q?Guido_G=C3=BCnther?= <agx@sigxcpu.org>
+Date: Wed, 9 Nov 2022 12:11:14 +0100
+Subject: text2ngram: Add non-breaking space to whitespace chars
+
+Forwarded: https://github.com/sailfish-keyboard/presage/commit/a79f52421846bf01b41a87d4515694fc26e0597b
+---
+ src/tools/text2ngram.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/tools/text2ngram.cpp b/src/tools/text2ngram.cpp
+index 2953ff4..ea38e11 100644
+--- a/src/tools/text2ngram.cpp
++++ b/src/tools/text2ngram.cpp
+@@ -173,7 +173,7 @@ int main(int argc, char* argv[])
+ 	// create tokenizer object and open input file stream
+ 	std::ifstream infile(argv[i]);
+ 	ForwardTokenizer tokenizer(infile,
+-				   " \f\n\r\t\v",
++				   " \f\n\r\t\v ",
+ 				   "`~!@#$%^&*()_-+=\\|]}[{'\";:/?.>,<«»");
+ 	tokenizer.lowercaseMode(lowercase);
+ 
diff -pruN 0.9.1-2.2/debian/presage.install 0.9.1-2.5/debian/presage.install
--- 0.9.1-2.2/debian/presage.install	2016-03-17 23:39:27.000000000 +0000
+++ 0.9.1-2.5/debian/presage.install	2022-11-27 13:02:27.000000000 +0000
@@ -6,3 +6,5 @@ usr/share/man/man1/text2ngram.1
 usr/share/man/man1/presage_simulator.1
 usr/share/man/man1/presage_demo.1
 usr/share/man/man1/presage_demo_text.1
+usr/share/presage/presage.svg
+usr/share/presage/presage.xpm
diff -pruN 0.9.1-2.2/debian/rules 0.9.1-2.5/debian/rules
--- 0.9.1-2.2/debian/rules	2020-01-25 09:31:19.000000000 +0000
+++ 0.9.1-2.5/debian/rules	2022-11-27 13:02:27.000000000 +0000
@@ -2,35 +2,16 @@
 
 #export DH_VERBOSE=1
 
+DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
+
 %:
 	dh $@ --with autoreconf
 
-
-# Enable build hardening
-#
-override_dh_auto_configure:
-	dh_auto_configure -- $(shell dpkg-buildflags --export=configure)
-
 # Ensure dbus python build is cleaned out
 #
 override_dh_auto_clean:
 	dh_auto_clean
 	rm -rf apps/dbus/build
 
-# Override needed to:
-# - fix embedded-javascript-library lintian warning
-#
-override_dh_auto_install:	
-	dh_auto_install
-	set -e; if test -f debian/tmp/usr/share/presage/html/jquery.js; \
-	then \
-		rm -f debian/tmp/usr/share/presage/html/jquery.js; \
-		ln -s /usr/share/javascript/jquery/jquery.js debian/tmp/usr/share/presage/html/jquery.js; \
-	fi
-
-# Override needed to create debug packages
-#
-override_dh_strip:
-	dh_strip -plibpresage1v5 --dbg-package=libpresage1-dbg
-	dh_strip -ppresage --dbg-package=presage-dbg
-	dh_strip -pgprompter --dbg-package=gprompter-dbg
diff -pruN 0.9.1-2.2/debian/tests/control 0.9.1-2.5/debian/tests/control
--- 0.9.1-2.2/debian/tests/control	1970-01-01 00:00:00.000000000 +0000
+++ 0.9.1-2.5/debian/tests/control	2022-11-27 13:02:27.000000000 +0000
@@ -0,0 +1,4 @@
+Test-Command: presage_demo --help
+Restrictions: superficial
+Depends: presage
+
