git: 3bbf0f33c9c3 - main - deskutils/presage: New port

Tobias C. Berner tcberner at FreeBSD.org
Wed Jun 30 11:09:22 UTC 2021


The branch main has been updated by tcberner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=3bbf0f33c9c313ee2b8579b372b503ecf937f6e9

commit 3bbf0f33c9c313ee2b8579b372b503ecf937f6e9
Author:     Tobias C. Berner <tcberner at FreeBSD.org>
AuthorDate: 2021-06-30 11:06:17 +0000
Commit:     Tobias C. Berner <tcberner at FreeBSD.org>
CommitDate: 2021-06-30 11:06:17 +0000

    deskutils/presage: New port
    
    Presage is an intelligent predictive text entry system.
    
    Presage (formerly known as Soothsayer) generates predictions by modelling
    natural language as a combination of redundant information sources. Presage
    computes probabilities for words which are most likely to be entered next by
    merging predictions generated by the different predictive algorithms. Presage’s
    modular and extensible architecture allows its language model to be extended
    and customized to utilize statistical, syntactic, and semantic predictive
    algorithms.
    
    WWW: https://presage.sourceforge.io/
    
    This port will be required by maliit-keyboard, the defacto standard
    virtual keyboard for Plasma Wayland Desktop
---
 deskutils/Makefile                             |    1 +
 deskutils/presage/Makefile                     |   37 +
 deskutils/presage/distinfo                     |    3 +
 deskutils/presage/files/patch-opensuse_gcc11   |  263 ++++++
 deskutils/presage/files/patch-opensuse_gcc6    |  531 +++++++++++
 deskutils/presage/files/patch-opensuse_python3 | 1169 ++++++++++++++++++++++++
 deskutils/presage/pkg-descr                    |   11 +
 deskutils/presage/pkg-plist                    |   33 +
 8 files changed, 2048 insertions(+)

diff --git a/deskutils/Makefile b/deskutils/Makefile
index f877e027e807..67d2fb2e23cf 100644
--- a/deskutils/Makefile
+++ b/deskutils/Makefile
@@ -194,6 +194,7 @@
     SUBDIR += plasma5-sddm-kcm
     SUBDIR += plopfolio
     SUBDIR += preferences
+    SUBDIR += presage
     SUBDIR += projectlibre
     SUBDIR += puush
     SUBDIR += py-autokey
diff --git a/deskutils/presage/Makefile b/deskutils/presage/Makefile
new file mode 100644
index 000000000000..506d6eae92ff
--- /dev/null
+++ b/deskutils/presage/Makefile
@@ -0,0 +1,37 @@
+PORTNAME=	presage
+DISTVERSION=	0.9.1
+CATEGORIES=	deskutils kde
+MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${DISTVERSION}
+
+MAINTAINER=	kde at FreeBSD.org
+COMMENT=	An intelligent predictive text entry system
+
+BUILD_DEPENDS=	help2man:misc/help2man \
+		${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR}
+LIB_DEPENDS=	libexpat.so:textproc/expat2 \
+		libfontconfig.so:x11-fonts/fontconfig \
+		libfreetype.so:print/freetype2 \
+		libharfbuzz.so:print/harfbuzz \
+		libtinyxml.so:textproc/tinyxml \
+		libuuid.so:misc/e2fsprogs-libuuid
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}dbus>0:devel/py-dbus@${PY_FLAVOR}
+
+USES=		gmake gnome libtool:build localbase shebangfix python:3.6+ sqlite
+USE_GNOME=	atk cairo gdkpixbuf2 glib20 gtk20 pango
+
+SHEBANG_FILES=	apps/dbus/presage_dbus_python_demo \
+		apps/dbus/presage_dbus_python_demo.in \
+		apps/dbus/presage_dbus_service \
+		apps/dbus/presage_dbus_service.py  \
+		apps/python/presagemate/presagemate.py \
+		apps/python/pypresagemate.in \
+		apps/python/pyprompter.in \
+		bindings/python/presage_python_demo.in
+
+GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--disable-documentation \
+		--disable-gprompter \
+		--disable-static
+INSTALL_TARGET=	install-strip
+
+.include <bsd.port.mk>
diff --git a/deskutils/presage/distinfo b/deskutils/presage/distinfo
new file mode 100644
index 000000000000..7025150d0003
--- /dev/null
+++ b/deskutils/presage/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1624863940
+SHA256 (presage-0.9.1.tar.gz) = 5ed567e350402a1d72c9053c78ecec3be710b7e72153a0223c6d19a7fe58a366
+SIZE (presage-0.9.1.tar.gz) = 2687519
diff --git a/deskutils/presage/files/patch-opensuse_gcc11 b/deskutils/presage/files/patch-opensuse_gcc11
new file mode 100644
index 000000000000..23d03029e7da
--- /dev/null
+++ b/deskutils/presage/files/patch-opensuse_gcc11
@@ -0,0 +1,263 @@
+Index: presage-0.9.1/src/lib/presage.cpp
+===================================================================
+--- src/lib/presage.cpp.orig
++++ src/lib/presage.cpp
+@@ -31,7 +31,7 @@
+ #include "core/predictorActivator.h"
+ 
+ Presage::Presage (PresageCallback* callback)
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     profileManager = new ProfileManager();
+     configuration = profileManager->get_configuration();
+@@ -42,7 +42,7 @@ Presage::Presage (PresageCallback* callb
+ }
+ 
+ Presage::Presage (PresageCallback* callback, const std::string config_filename)
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     profileManager = new ProfileManager(config_filename);
+     configuration = profileManager->get_configuration();
+@@ -62,7 +62,7 @@ Presage::~Presage()
+ }
+ 
+ std::vector<std::string> Presage::predict ()
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     std::vector<std::string> result;
+ 
+@@ -88,7 +88,7 @@ std::vector<std::string> Presage::predic
+ }
+ 
+ std::multimap<double, std::string> Presage::predict (std::vector<std::string> filter)
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     std::multimap<double, std::string> result;
+ 
+@@ -137,20 +137,20 @@ std::multimap<double, std::string> Presa
+ }
+ 
+ void Presage::learn(const std::string text) const
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     contextTracker->learn(text); // TODO: can pass additional param to
+ 				 // learn to specify offline learning
+ }
+ 
+ PresageCallback* Presage::callback (PresageCallback* callback)
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     return const_cast<PresageCallback*>(contextTracker->callback(callback));
+ }
+ 
+ std::string Presage::completion (const std::string str)
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     // There are two types of completions: normal and erasing.
+     // normal_completion  = prefix + remainder
+@@ -198,37 +198,37 @@ std::string Presage::completion (const s
+ }
+ 
+ std::string Presage::context () const
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     return contextTracker->getPastStream();
+ }
+ 
+ bool Presage::context_change () const
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     return contextTracker->contextChange();
+ }
+ 
+ std::string Presage::prefix () const
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     return contextTracker->getPrefix();
+ }
+ 
+ std::string Presage::config (const std::string variable) const
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     return configuration->find (variable)->get_value ();
+ }
+ 
+ void Presage::config (const std::string variable, const std::string value) const
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     configuration->insert (variable, value);
+ }
+ 
+ void Presage::save_config () const
+-    throw (PresageException)
++    EXCEPT (PresageException)
+ {
+     profileManager->save_profile ();
+ }
+Index: presage-0.9.1/src/lib/presage.h
+===================================================================
+--- src/lib/presage.h.orig
++++ src/lib/presage.h
+@@ -28,6 +28,12 @@
+ #include "presageException.h"
+ #include "presageCallback.h"
+ 
++#if __cplusplus >= 201103L
++#define EXCEPT(...) noexcept(false)
++#else
++#define EXCEPT(...) throw(__VA_ARGS__)
++#endif
++
+ /** \mainpage
+ 
+     \section intro_section Introduction
+@@ -112,7 +118,7 @@ public:
+      * 
+      * Presage does not take ownership of the callback object.
+      */
+-    Presage(PresageCallback* callback) throw (PresageException);
++    Presage(PresageCallback* callback) EXCEPT(PresageException);
+ 
+ 
+     /** Creates and initializes presage with supplied configuration.
+@@ -122,7 +128,7 @@ public:
+      *
+      * 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) EXCEPT(PresageException);
+ 
+ 
+     /** Destroys presage.
+@@ -138,7 +144,7 @@ public:
+      * context.
+      *
+      */
+-    std::vector<std::string> predict() throw (PresageException);
++    std::vector<std::string> predict() EXCEPT(PresageException);
+ 
+     /** \brief Obtain a prediction that matches the supplied token
+      *         filter.
+@@ -153,7 +159,7 @@ public:
+      * 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) EXCEPT(PresageException);
+ 
+     /** \brief Learn from text offline.
+      *
+@@ -167,7 +173,7 @@ public:
+      * \param text a text string to learn from.
+      *
+      */
+-    void learn(const std::string text) const throw (PresageException);
++    void learn(const std::string text) const EXCEPT(PresageException);
+ 
+     /** \brief Callback getter/setter.
+      *
+@@ -176,7 +182,7 @@ public:
+      *
+      * \return pointer to previously used callback
+      */
+-    PresageCallback* callback(PresageCallback* callback) throw (PresageException);
++    PresageCallback* callback(PresageCallback* callback) EXCEPT(PresageException);
+ 
+     /** \brief Request presage to return the completion string for the given predicted token.
+      *
+@@ -190,26 +196,26 @@ public:
+      *
+      * \return completion string
+      */
+-    std::string completion(std::string str) throw (PresageException);
++    std::string completion(std::string str) EXCEPT(PresageException);
+ 
+     /** \brief Returns the text entered so far.
+      *
+      * \return context, text entered so far.
+      */
+-    std::string context() const throw (PresageException);
++    std::string context() const EXCEPT(PresageException);
+ 
+     /** \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 EXCEPT(PresageException);
+ 
+     /** \brief Returns the current prefix.
+      *
+      * \return prefix
+      */
+-    std::string prefix() const throw (PresageException);
++    std::string prefix() const EXCEPT(PresageException);
+ 
+     /** \brief Gets the value of specified configuration variable.
+      *
+@@ -218,7 +224,7 @@ public:
+      *
+      * \return value assigned to configuration variable.
+      */
+-    std::string config(const std::string variable) const throw (PresageException);
++    std::string config(const std::string variable) const EXCEPT(PresageException);
+ 
+     /** \brief Sets the value of specified configuration variable.
+      *
+@@ -227,7 +233,7 @@ public:
+      * 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 EXCEPT(PresageException);
+ 
+     /** \brief Save current configuration to file.
+      *
+@@ -236,7 +242,7 @@ public:
+      * active XML profile.
+      *
+      */
+-    void save_config() const throw (PresageException);
++    void save_config() const EXCEPT(PresageException);
+ 
+     /*
+      * Presage public API ends here
+From e9faf7fa918e75bdf26f3068794c97b34d14b406 Mon Sep 17 00:00:00 2001
+From: Martin Liska <mliska at suse.cz>
+Date: Wed, 12 May 2021 14:13:23 +0200
+Subject: [PATCH] Fix GCC 11 warning.
+
+---
+ apps/gtk/gprompter/scintilla/gtk/ScintillaGTK.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/apps/gtk/gprompter/scintilla/gtk/ScintillaGTK.cxx b/apps/gtk/gprompter/scintilla/gtk/ScintillaGTK.cxx
+index 926457b..8f4816d 100644
+--- apps/gtk/gprompter/scintilla/gtk/ScintillaGTK.cxx.orig
++++ apps/gtk/gprompter/scintilla/gtk/ScintillaGTK.cxx
+@@ -1626,7 +1626,7 @@ void ScintillaGTK::ReceivedDrop(GtkSelectionData *selection_data) {
+ 		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) != NULL) {
+ 			SelectionText selText;
+ 			GetGtkSelectionText(selection_data, selText);
+ 			DropAt(posDrop, selText.Data(), selText.Length(), false, selText.rectangular);
+-- 
+2.31.1
+
+
diff --git a/deskutils/presage/files/patch-opensuse_gcc6 b/deskutils/presage/files/patch-opensuse_gcc6
new file mode 100644
index 000000000000..d8b4cd8e2360
--- /dev/null
+++ b/deskutils/presage/files/patch-opensuse_gcc6
@@ -0,0 +1,531 @@
+Obtained from:
+	https://build.opensuse.org/package/view_file/openSUSE:Factory/presage/presage-0.9.1-gcc6.patch
+
+Index: presage-0.9.1/src/lib/core/iso8859_1.h
+===================================================================
+--- src/lib/core/iso8859_1.h.orig
++++ src/lib/core/iso8859_1.h
+@@ -27,266 +27,266 @@
+ 
+ // ISO 8859-1 standard ///////////////////////
+ 
+-const int NUL         =  0;    // NUL
+-const int SOH         =  1;    // SOH
+-const int STX         =  2;    // STX
+-const int ETX         =  3;    // ETX
+-const int EOT         =  4;    // EOT
+-const int ENQ         =  5;    // ENQ
+-const int ACK         =  6;    // ACK
+-const int BEL         =  7;    // BEL
+-const int BS          =  8;    // BS 
+-const int HT          =  9;    // HT 
+-const int NL          =  10;   // NL 
+-const int VT          =  11;   // VT 
+-const int NP          =  12;   // NP 
+-const int CR          =  13;   // CR 
+-const int SO          =  14;   // SO 
+-const int SI          =  15;   // SI 
+-const int DLE         =  16;   // DLE
+-const int DC1         =  17;   // DC1
+-const int DC2         =  18;   // DC2
+-const int DC3         =  19;   // DC3
+-const int DC4         =  20;   // DC4
+-const int NAK         =  21;   // NAK
+-const int SYN         =  22;   // SYN
+-const int ETB         =  23;   // ETB
+-const int CAN         =  24;   // CAN
+-const int EM          =  25;   // EM 
+-const int SUB         =  26;   // SUB
+-const int ESC         =  27;   // ESC
+-const int FS          =  28;   // FS 
+-const int GS          =  29;   // GS 
+-const int RS          =  30;   // RS 
+-const int US          =  31;   // US 
+-const int space       =  32;   // normal space 
+-const int exclamation =  33;   // !
+-const int quote       =  34;   // "  
+-const int hashsign    =  35;   // #  
+-const int dollar      =  36;   // $  
+-const int percent     =  37;   // %  
+-const int ampersand   =  38;   // &  
+-const int apostrophe  =  39;   // '  
+-const int openbracket =  40;   // (  
+-const int closebracket=  41;   // )  
+-const int asterisk    =  42;   // *  
+-const int plus        =  43;   // +  
+-const int comma       =  44;   // ,  
+-const int minus       =  45;   // -  
+-const int period      =  46;   // .  
+-const int slash       =  47;   // /  
+-const int digit0      =  48;   // 0  
+-const int digit1      =  49;   // 1  
+-const int digit2      =  50;   // 2  
+-const int digit3      =  51;   // 3  
+-const int digit4      =  52;   // 4  
+-const int digit5      =  53;   // 5  
+-const int digit6      =  54;   // 6  
+-const int digit7      =  55;   // 7  
+-const int digit8      =  56;   // 8  
+-const int digit9      =  57;   // 9  
+-const int colon       =  58;   // :  
+-const int semicolon   =  59;   // ;  
+-const int lessthan    =  60;   // <  
+-const int equals      =  61;   // =  
+-const int greaterthan =  62;   // >  
+-const int question    =  63;   // ?  
+-const int at          =  64;   // @  
+-const int Aletter     =  65;   // A  
+-const int Bletter     =  66;   // B  
+-const int Cletter     =  67;   // C  
+-const int Dletter     =  68;   // D  
+-const int Eletter     =  69;   // E  
+-const int Fletter     =  70;   // F  
+-const int Gletter     =  71;   // G  
+-const int Hletter     =  72;   // H  
+-const int Iletter     =  73;   // I  
+-const int Jletter     =  74;   // J  
+-const int Kletter     =  75;   // K  
+-const int Lletter     =  76;   // L  
+-const int Mletter     =  77;   // M  
+-const int Nletter     =  78;   // N  
+-const int Oletter     =  79;   // O  
+-const int Pletter     =  80;   // P  
+-const int Qletter     =  81;   // Q  
+-const int Rletter     =  82;   // R  
+-const int Sletter     =  83;   // S  
+-const int Tletter     =  84;   // T  
+-const int Uletter     =  85;   // U  
+-const int Vletter     =  86;   // V  
+-const int Wletter     =  87;   // W  
+-const int Xletter     =  88;   // X  
+-const int Yletter     =  89;   // Y  
+-const int Zletter     =  90;   // Z  
+-const int opensquare  =  91;   // [  
+-const int backslash   =  92;   //   
+-const int closesquare =  93;   // ]  
+-const int pointer     =  94;   // ^  
+-const int underscore  =  95;   // _  
+-const int grave       =  96;   // `  
+-const int aletter     =  97;   // a  
+-const int bletter     =  98;   // b  
+-const int cletter     =  99;   // c  
+-const int dletter     = 100;   // d  
+-const int eletter     = 101;   // e  
+-const int fletter     = 102;   // f  
+-const int gletter     = 103;   // g  
+-const int hletter     = 104;   // h  
+-const int iletter     = 105;   // i  
+-const int jletter     = 106;   // j  
+-const int kletter     = 107;   // k  
+-const int lletter     = 108;   // l  
+-const int mletter     = 109;   // m  
+-const int nletter     = 110;   // n  
+-const int oletter     = 111;   // o  
+-const int pletter     = 112;   // p  
+-const int qletter     = 113;   // q  
+-const int rletter     = 114;   // r  
+-const int sletter     = 115;   // s  
+-const int tletter     = 116;   // t  
+-const int uletter     = 117;   // u  
+-const int vletter     = 118;   // v  
+-const int wletter     = 119;   // w  
+-const int xletter     = 120;   // x  
+-const int yletter     = 121;   // y  
+-const int zletter     = 122;   // z  
+-const int leftbrace   = 123;   // {  
+-const int verticalbar = 124;   // |  
+-const int rightbrace  = 125;   // }  
+-const int tilde       = 126;   // ~  
++const char NUL         =  0;    // NUL
++const char SOH         =  1;    // SOH
++const char STX         =  2;    // STX
++const char ETX         =  3;    // ETX
++const char EOT         =  4;    // EOT
++const char ENQ         =  5;    // ENQ
++const char ACK         =  6;    // ACK
++const char BEL         =  7;    // BEL
++const char BS          =  8;    // BS 
++const char HT          =  9;    // HT 
++const char NL          =  10;   // NL 
++const char VT          =  11;   // VT 
++const char NP          =  12;   // NP 
++const char CR          =  13;   // CR 
++const char SO          =  14;   // SO 
++const char SI          =  15;   // SI 
++const char DLE         =  16;   // DLE
++const char DC1         =  17;   // DC1
++const char DC2         =  18;   // DC2
++const char DC3         =  19;   // DC3
++const char DC4         =  20;   // DC4
++const char NAK         =  21;   // NAK
++const char SYN         =  22;   // SYN
++const char ETB         =  23;   // ETB
++const char CAN         =  24;   // CAN
++const char EM          =  25;   // EM 
++const char SUB         =  26;   // SUB
++const char ESC         =  27;   // ESC
++const char FS          =  28;   // FS 
++const char GS          =  29;   // GS 
++const char RS          =  30;   // RS 
++const char US          =  31;   // US 
++const char space       =  32;   // normal space 
++const char exclamation =  33;   // !
++const char quote       =  34;   // "  
++const char hashsign    =  35;   // #  
++const char dollar      =  36;   // $  
++const char percent     =  37;   // %  
++const char ampersand   =  38;   // &  
++const char apostrophe  =  39;   // '  
++const char openbracket =  40;   // (  
++const char closebracket=  41;   // )  
++const char asterisk    =  42;   // *  
++const char plus        =  43;   // +  
++const char comma       =  44;   // ,  
++const char minus       =  45;   // -  
++const char period      =  46;   // .  
++const char slash       =  47;   // /  
++const char digit0      =  48;   // 0  
++const char digit1      =  49;   // 1  
++const char digit2      =  50;   // 2  
++const char digit3      =  51;   // 3  
++const char digit4      =  52;   // 4  
++const char digit5      =  53;   // 5  
++const char digit6      =  54;   // 6  
++const char digit7      =  55;   // 7  
++const char digit8      =  56;   // 8  
++const char digit9      =  57;   // 9  
++const char colon       =  58;   // :  
++const char semicolon   =  59;   // ;  
++const char lessthan    =  60;   // <  
++const char equals      =  61;   // =  
++const char greaterthan =  62;   // >  
++const char question    =  63;   // ?  
++const char at          =  64;   // @  
++const char Aletter     =  65;   // A  
++const char Bletter     =  66;   // B  
++const char Cletter     =  67;   // C  
++const char Dletter     =  68;   // D  
++const char Eletter     =  69;   // E  
++const char Fletter     =  70;   // F  
++const char Gletter     =  71;   // G  
++const char Hletter     =  72;   // H  
++const char Iletter     =  73;   // I  
++const char Jletter     =  74;   // J  
++const char Kletter     =  75;   // K  
++const char Lletter     =  76;   // L  
++const char Mletter     =  77;   // M  
++const char Nletter     =  78;   // N  
++const char Oletter     =  79;   // O  
++const char Pletter     =  80;   // P  
++const char Qletter     =  81;   // Q  
++const char Rletter     =  82;   // R  
++const char Sletter     =  83;   // S  
++const char Tletter     =  84;   // T  
++const char Uletter     =  85;   // U  
++const char Vletter     =  86;   // V  
++const char Wletter     =  87;   // W  
++const char Xletter     =  88;   // X  
++const char Yletter     =  89;   // Y  
++const char Zletter     =  90;   // Z  
++const char opensquare  =  91;   // [  
++const char backslash   =  92;   //   
++const char closesquare =  93;   // ]  
++const char pointer     =  94;   // ^  
++const char underscore  =  95;   // _  
++const char grave       =  96;   // `  
++const char aletter     =  97;   // a  
++const char bletter     =  98;   // b  
++const char cletter     =  99;   // c  
++const char dletter     = 100;   // d  
++const char eletter     = 101;   // e  
++const char fletter     = 102;   // f  
++const char gletter     = 103;   // g  
++const char hletter     = 104;   // h  
++const char iletter     = 105;   // i  
++const char jletter     = 106;   // j  
++const char kletter     = 107;   // k  
++const char lletter     = 108;   // l  
++const char mletter     = 109;   // m  
++const char nletter     = 110;   // n  
++const char oletter     = 111;   // o  
++const char pletter     = 112;   // p  
++const char qletter     = 113;   // q  
++const char rletter     = 114;   // r  
++const char sletter     = 115;   // s  
++const char tletter     = 116;   // t  
++const char uletter     = 117;   // u  
++const char vletter     = 118;   // v  
++const char wletter     = 119;   // w  
++const char xletter     = 120;   // x  
++const char yletter     = 121;   // y  
++const char zletter     = 122;   // z  
++const char leftbrace   = 123;   // {  
++const char verticalbar = 124;   // |  
++const char rightbrace  = 125;   // }  
++const char tilde       = 126;   // ~  
+ 
+ 
+-const int DEL = 127;   // DEL
+-const int PAD = 128;   // -- 
+-const int HOP = 129;   // -- 
+-const int BPH = 130;   // -- 
+-const int NBH = 131;   // -- 
+-const int IND = 132;   // -- 
+-const int NEL = 133;   // -- 
+-const int SSA = 134;   // -- 
+-const int ESA = 135;   // -- 
+-const int HTS = 136;   // -- 
+-const int HTJ = 137;   // -- 
+-const int VTS = 138;   // -- 
+-const int PLD = 139;   // -- 
+-const int PLU = 140;   // -- 
+-const int RI  = 141;   // -- 
+-const int SS2 = 142;   // -- 
+-const int SS3 = 143;   // -- 
+-const int DCS = 144;   // -- 
+-const int PU1 = 145;   // -- 
+-const int PU2 = 146;   // -- 
+-const int STS = 147;   // -- 
+-const int CCH = 148;   // -- 
+-const int MW  = 149;   // -- 
+-const int SPA = 150;   // -- 
+-const int EPA = 151;   // -- 
+-const int SOS = 152;   // -- 
+-const int SGCI= 153;   // -- 
+-const int SCI = 154;   // -- 
+-const int CSI = 155;   // -- 
+-const int ST  = 156;   // -- 
+-const int OSC = 157;   // -- 
+-const int PM  = 158;   // -- 
+-const int APC = 159;   // -- 
++const char DEL = 127;   // DEL
++const char PAD = 128;   // -- 
++const char HOP = 129;   // -- 
++const char BPH = 130;   // -- 
++const char NBH = 131;   // -- 
++const char IND = 132;   // -- 
++const char NEL = 133;   // -- 
++const char SSA = 134;   // -- 
++const char ESA = 135;   // -- 
++const char HTS = 136;   // -- 
++const char HTJ = 137;   // -- 
++const char VTS = 138;   // -- 
++const char PLD = 139;   // -- 
++const char PLU = 140;   // -- 
++const char RI  = 141;   // -- 
++const char SS2 = 142;   // -- 
++const char SS3 = 143;   // -- 
++const char DCS = 144;   // -- 
++const char PU1 = 145;   // -- 
++const char PU2 = 146;   // -- 
++const char STS = 147;   // -- 
++const char CCH = 148;   // -- 
++const char MW  = 149;   // -- 
++const char SPA = 150;   // -- 
++const char EPA = 151;   // -- 
++const char SOS = 152;   // -- 
++const char SGCI= 153;   // -- 
++const char SCI = 154;   // -- 
++const char CSI = 155;   // -- 
++const char ST  = 156;   // -- 
++const char OSC = 157;   // -- 
++const char PM  = 158;   // -- 
++const char APC = 159;   // -- 
+ 		     
+ 
+-const int nbsp   = 160;   //    non-breaking space
+-const int iexcl  = 161;   // ¡  
+-const int cent   = 162;   // ¢  
+-const int pound  = 163;   // £  
+-const int curren = 164;   // ¤  
+-const int yen    = 165;   // ¥  
+-const int brvbar = 166;   // ¦  
+-const int sect   = 167;   // §  
+-const int uml    = 168;   // ¨  
+-const int copyr  = 169;   // ©  
+-const int ordf   = 170;   // ª  
+-const int laquo  = 171;   // «  
+-const int notsign= 172;   // ¬  
+-const int shy    = 173;   // ­  
+-const int reg    = 174;   // ®  
+-const int macr   = 175;   // ¯  
+-const int deg    = 176;   // °  
+-const int plusmn = 177;   // ±  
+-const int sup2   = 178;   // ²  
+-const int sup3   = 179;   // ³  
+-const int acute  = 180;   // ´  
+-const int micro  = 181;   // µ  
+-const int para   = 182;   // ¶  
+-const int middot = 183;   // ·  
+-const int cedil  = 184;   // ¸  
+-const int sup1   = 185;   // ¹  
+-const int ordm   = 186;   // º  
+-const int raquo  = 187;   // »  
+-const int frac14 = 188;   // ¼  
+-const int frac12 = 189;   // ½  
+-const int frac34 = 190;   // ¾  
+-const int iquest = 191;   // ¿  
+-const int Agrave = 192;   // À  
+-const int Aacute = 193;   // Á  
+-const int Acirc  = 194;   // Â  
+-const int Atilde = 195;   // Ã  
+-const int Auml   = 196;   // Ä  
+-const int Aring  = 197;   // Å  
+-const int AElig  = 198;   // Æ  
+-const int Ccedil = 199;   // Ç  
+-const int Egrave = 200;   // È  
+-const int Eacute = 201;   // É  
+-const int Ecirc  = 202;   // Ê  
+-const int Euml   = 203;   // Ë  
+-const int Igrave = 204;   // Ì  
+-const int Iacute = 205;   // Í  
+-const int Icirc  = 206;   // Î  
+-const int Iuml   = 207;   // Ï  
+-const int ETH    = 208;   // Ð  
+-const int Ntilde = 209;   // Ñ  
+-const int Ograve = 210;   // Ò  
+-const int Oacute = 211;   // Ó  
+-const int Ocirc  = 212;   // Ô  
+-const int Otilde = 213;   // Õ  
+-const int Ouml   = 214;   // Ö  
+-const int times  = 215;   // ×  
+-const int Oslash = 216;   // Ø  
+-const int Ugrave = 217;   // Ù  
+-const int Uacute = 218;   // Ú  
+-const int Ucirc  = 219;   // Û  
+-const int Uuml   = 220;   // Ü  
+-const int Yacute = 221;   // Ý  
+-const int THORN  = 222;   // Þ  
+-const int szlig  = 223;   // ß  
+-const int agrave = 224;   // à  
+-const int aacute = 225;   // á  
+-const int acirc  = 226;   // â  
+-const int atilde = 227;   // ã  
+-const int auml   = 228;   // ä  
+-const int aring  = 229;   // å  
+-const int aelig  = 230;   // æ  
+-const int ccedil = 231;   // ç  
+-const int egrave = 232;   // è  
+-const int eacute = 233;   // é  
+-const int ecirc  = 234;   // ê  
+-const int euml   = 235;   // ë  
+-const int igrave = 236;   // ì  
+-const int iacute = 237;   // í  
+-const int icirc  = 238;   // î  
+-const int iuml   = 239;   // ï  
+-const int eth    = 240;   // ð  
+-const int ntilde = 241;   // ñ  
+-const int ograve = 242;   // ò  
+-const int oacute = 243;   // ó  
+-const int ocirc  = 244;   // ô  
+-const int otilde = 245;   // õ  
+-const int ouml   = 246;   // ö  
+-const int divide = 247;   // ÷  
+-const int oslash = 248;   // ø  
+-const int ugrave = 249;   // ù  
+-const int uacute = 250;   // ú  
+-const int ucirc  = 251;   // û  
+-const int uuml   = 252;   // ü  
+-const int yacute = 253;   // ý  
+-const int thorn  = 254;   // þ  
+-const int yuml   = 255;   // ÿ  
++const char nbsp   = 160;   //    non-breaking space
++const char iexcl  = 161;   // ¡  
++const char cent   = 162;   // ¢  
++const char pound  = 163;   // £  
++const char curren = 164;   // ¤  
++const char yen    = 165;   // ¥  
++const char brvbar = 166;   // ¦  
++const char sect   = 167;   // §  
++const char uml    = 168;   // ¨  
++const char copyr  = 169;   // ©  
++const char ordf   = 170;   // ª  
++const char laquo  = 171;   // «  
++const char notsign= 172;   // ¬  
++const char shy    = 173;   // ­  
++const char reg    = 174;   // ®  
++const char macr   = 175;   // ¯  
++const char deg    = 176;   // °  
++const char plusmn = 177;   // ±  
++const char sup2   = 178;   // ²  
++const char sup3   = 179;   // ³  
++const char acute  = 180;   // ´  
++const char micro  = 181;   // µ  
++const char para   = 182;   // ¶  
++const char middot = 183;   // ·  
++const char cedil  = 184;   // ¸  
++const char sup1   = 185;   // ¹  
++const char ordm   = 186;   // º  
++const char raquo  = 187;   // »  
++const char frac14 = 188;   // ¼  
++const char frac12 = 189;   // ½  
++const char frac34 = 190;   // ¾  
++const char iquest = 191;   // ¿  
++const char Agrave = 192;   // À  
++const char Aacute = 193;   // Á  
++const char Acirc  = 194;   // Â  
++const char Atilde = 195;   // Ã  
++const char Auml   = 196;   // Ä  
++const char Aring  = 197;   // Å  
++const char AElig  = 198;   // Æ  
++const char Ccedil = 199;   // Ç  
++const char Egrave = 200;   // È  
++const char Eacute = 201;   // É  
++const char Ecirc  = 202;   // Ê  
++const char Euml   = 203;   // Ë  
++const char Igrave = 204;   // Ì  
++const char Iacute = 205;   // Í  
++const char Icirc  = 206;   // Î  
++const char Iuml   = 207;   // Ï  
++const char ETH    = 208;   // Ð  
++const char Ntilde = 209;   // Ñ  
++const char Ograve = 210;   // Ò  
++const char Oacute = 211;   // Ó  
++const char Ocirc  = 212;   // Ô  
++const char Otilde = 213;   // Õ  
++const char Ouml   = 214;   // Ö  
++const char times  = 215;   // ×  
++const char Oslash = 216;   // Ø  
++const char Ugrave = 217;   // Ù  
++const char Uacute = 218;   // Ú  
++const char Ucirc  = 219;   // Û  
++const char Uuml   = 220;   // Ü  
++const char Yacute = 221;   // Ý  
++const char THORN  = 222;   // Þ  
++const char szlig  = 223;   // ß  
++const char agrave = 224;   // à  
++const char aacute = 225;   // á  
++const char acirc  = 226;   // â  
++const char atilde = 227;   // ã  
++const char auml   = 228;   // ä  
++const char aring  = 229;   // å  
++const char aelig  = 230;   // æ  
++const char ccedil = 231;   // ç  
++const char egrave = 232;   // è  
++const char eacute = 233;   // é  
++const char ecirc  = 234;   // ê  
++const char euml   = 235;   // ë  
++const char igrave = 236;   // ì  
++const char iacute = 237;   // í  
++const char icirc  = 238;   // î  
++const char iuml   = 239;   // ï  
++const char eth    = 240;   // ð  
++const char ntilde = 241;   // ñ  
++const char ograve = 242;   // ò  
++const char oacute = 243;   // ó  
++const char ocirc  = 244;   // ô  
++const char otilde = 245;   // õ  
++const char ouml   = 246;   // ö  
++const char divide = 247;   // ÷  
++const char oslash = 248;   // ø  
++const char ugrave = 249;   // ù  
++const char uacute = 250;   // ú  
++const char ucirc  = 251;   // û  
++const char uuml   = 252;   // ü  
++const char yacute = 253;   // ý  
++const char thorn  = 254;   // þ  
++const char yuml   = 255;   // ÿ  
+ 
+ 
+ #endif // ISO8859_1
+
diff --git a/deskutils/presage/files/patch-opensuse_python3 b/deskutils/presage/files/patch-opensuse_python3
new file mode 100644
index 000000000000..76c5d9b67e0b
--- /dev/null
+++ b/deskutils/presage/files/patch-opensuse_python3
@@ -0,0 +1,1169 @@
+Index: presage-0.9.1/bindings/python/Makefile.am
+===================================================================
+--- bindings/python/Makefile.am.orig
++++ bindings/python/Makefile.am
+@@ -81,7 +81,7 @@ clean-local:
+ 	rm -rf build
+ 
+ presage_wrap.cpp presage_wrap.h presage.py:	$(SWIG_INTERFACE) $(PRESAGE_INTERFACE)
+-	$(SWIG) -c++ -python -I$(top_srcdir)/src/lib -o presage_wrap.cpp -outdir . $(srcdir)/$(SWIG_INTERFACE)
++	$(SWIG) -c++ -python -py3 -I$(top_srcdir)/src/lib -o presage_wrap.cpp -outdir . $(srcdir)/$(SWIG_INTERFACE)
+ 
+ if HAVE_HELP2MAN
+ presage_python_demo.1:	presage_python_demo.in $(top_srcdir)/configure.ac
+Index: presage-0.9.1/bindings/python/presage_python_demo.in
+===================================================================
+--- bindings/python/presage_python_demo.in.orig
++++ bindings/python/presage_python_demo.in
+@@ -25,11 +25,12 @@ import getopt
+ 
+ PROGRAM_NAME = 'presage_python_demo'
+ 
+-config = None
+-suggestions = None
++CONFIG = None
++SUGGESTIONS = None
++
+ 
+ def disclaimer():
+-	print """
++    print("""
+ Presage python demo
+ -----------------------
+ 
+@@ -42,19 +43,21 @@ Its intent is NOT to provide a predictiv
+ 
+ Think of Presage as the predictive backend that sits behind a shiny
+ user interface and does all the predictive heavy lifting.
+-"""
++""")
++
+ 
+ def print_version():
+-	print """
++    print("""
+ %s (%s) version %s
+ Copyright (C) 2004 Matteo Vescovi.
+ This is free software; see the source for copying conditions.  There is NO
+ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE,
+ to the extent permitted by law.
+-""" % (PROGRAM_NAME, '@PACKAGE_NAME@', '@PACKAGE_VERSION@')
++""" % (PROGRAM_NAME, '@PACKAGE_NAME@', '@PACKAGE_VERSION@'))
++
+ 
+ def print_usage():
+-	print """
++    print("""
+ Usage: %s [OPTION]...
+ 
+ At the prompt, type in some text. Hit enter to generate a prediction.
+@@ -66,40 +69,41 @@ Any text input is valid, including no te
+   -v, --version        output version information and exit
+ 
+ Direct your bug reports to: %s
+-""" % (PROGRAM_NAME, '@PACKAGE_BUGREPORT@')
++""" % (PROGRAM_NAME, '@PACKAGE_BUGREPORT@'))
++
+ 
+ def parse_cmd_line_args():
+-	global config
+-	global suggestions
++    global CONFIG
++    global SUGGESTIONS
++
++    short_options = "c:s:hv"
*** 1151 LINES SKIPPED ***


More information about the dev-commits-ports-main mailing list