commit e92038d2524b9840503b7ae5518c474f68e05374 Author: Adrian Schröter Date: Wed Jun 7 09:59:54 2023 +0200 Sync from SUSE:ALP:Source:Standard:1.0 presage revision 64552b3200e2254145c388d928333608 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..fecc750 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..2be6914 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + doc + diff --git a/presage-0.8.9-ncurses_flag.patch b/presage-0.8.9-ncurses_flag.patch new file mode 100644 index 0000000..e85e693 --- /dev/null +++ b/presage-0.8.9-ncurses_flag.patch @@ -0,0 +1,39 @@ +Index: presage-0.8.9.beta20130208/configure.ac +=================================================================== +--- presage-0.8.9.beta20130208.orig/configure.ac ++++ presage-0.8.9.beta20130208/configure.ac +@@ -106,7 +106,7 @@ AC_CHECK_HEADERS([pwd.h]) + dnl ================== + dnl Checks for ncurses + dnl ================== +-AC_CHECK_LIB([curses], ++AC_CHECK_LIB([ncurses], + [initscr], + [have_curses_library=true], + [AC_MSG_WARN([curses library not found. curses demo programs will not be built.])]) +Index: presage-0.8.9.beta20130208/src/tools/Makefile.am +=================================================================== +--- presage-0.8.9.beta20130208.orig/src/tools/Makefile.am ++++ presage-0.8.9.beta20130208/src/tools/Makefile.am +@@ -44,7 +44,7 @@ bin_PROGRAMS += presage_demo + + presage_demo_SOURCES = presageDemo.cpp + presage_demo_LDADD = ../lib/libpresage.la +-presage_demo_LDFLAGS = -lcurses ++presage_demo_LDFLAGS = -lncurses + endif + + presage_demo_text_SOURCES = presageDemoText.cpp +Index: presage-0.8.9.beta20130208/src/tools/Makefile.in +=================================================================== +--- presage-0.8.9.beta20130208.orig/src/tools/Makefile.in ++++ presage-0.8.9.beta20130208/src/tools/Makefile.in +@@ -360,7 +360,7 @@ libtools_la_SOURCES = ngram.cpp ngram.h + + @HAVE_CURSES_TRUE@presage_demo_SOURCES = presageDemo.cpp + @HAVE_CURSES_TRUE@presage_demo_LDADD = ../lib/libpresage.la +-@HAVE_CURSES_TRUE@presage_demo_LDFLAGS = -lcurses ++@HAVE_CURSES_TRUE@presage_demo_LDFLAGS = -lncurses + presage_demo_text_SOURCES = presageDemoText.cpp + presage_demo_text_LDADD = ../lib/libpresage.la + presage_simulator_SOURCES = presageSimulator.cpp diff --git a/presage-0.8.9-port_cmuclmtk.patch b/presage-0.8.9-port_cmuclmtk.patch new file mode 100644 index 0000000..3c0e227 --- /dev/null +++ b/presage-0.8.9-port_cmuclmtk.patch @@ -0,0 +1,22 @@ +Index: presage-0.8.9.beta20130208/resources/arpa/Makefile.am +=================================================================== +--- presage-0.8.9.beta20130208.orig/resources/arpa/Makefile.am ++++ presage-0.8.9.beta20130208/resources/arpa/Makefile.am +@@ -33,7 +33,7 @@ arpa_en.vocab: ../the_picture_of_dorian_ + $(TEXT2WFREQ) < $< | $(WFREQ2VOCAB) -top 20000 > $@ + + arpa_en.idngram: ../the_picture_of_dorian_gray.txt arpa_en.vocab +- $(TEXT2IDNGRAM) -n 3 -vocab arpa_en.vocab -temp . < $< > $@ ++ $(TEXT2IDNGRAM) -idngram arpa_en.idngram -vocab arpa_en.vocab < $< > $@ + + arpa_en.arpa: arpa_en.idngram arpa_en.vocab + $(IDNGRAM2LM) -idngram arpa_en.idngram -vocab arpa_en.vocab -arpa arpa_en.arpa +@@ -42,7 +42,7 @@ arpa_it.vocab: ../the_picture_of_dorian_ + $(TEXT2WFREQ) < $< | $(WFREQ2VOCAB) -top 20000 > $@ + + arpa_it.idngram: ../the_picture_of_dorian_gray.txt arpa_it.vocab +- $(TEXT2IDNGRAM) -n 3 -vocab arpa_it.vocab -temp . < $< > $@ ++ $(TEXT2IDNGRAM) -idngram arpa_it.idngram -vocab arpa_it.vocab < $< > $@ + + arpa_it.arpa: arpa_it.idngram arpa_it.vocab + $(IDNGRAM2LM) -idngram arpa_it.idngram -vocab arpa_it.vocab -arpa arpa_it.arpa diff --git a/presage-0.9.1-automake-1.12.patch b/presage-0.9.1-automake-1.12.patch new file mode 100644 index 0000000..cae4064 --- /dev/null +++ b/presage-0.9.1-automake-1.12.patch @@ -0,0 +1,26 @@ +Index: presage-0.9.1/Makefile.am +=================================================================== +--- presage-0.9.1.orig/Makefile.am ++++ presage-0.9.1/Makefile.am +@@ -65,7 +65,7 @@ EXTRA_DIST = FAQ + + # Ensure local m4 macros are included during autoreconf and automatic + # aclocal.m4 remaking +-ACLOCAL_AMFLAGS = -I m4 ++#ACLOCAL_AMFLAGS = -I m4 + + + # Build Debian package +Index: presage-0.9.1/configure.ac +=================================================================== +--- presage-0.9.1.orig/configure.ac ++++ presage-0.9.1/configure.ac +@@ -23,7 +23,7 @@ dnl Process this file with autoconf to p + + + AC_INIT([presage],[0.9.1],[matteo.vescovi@yahoo.co.uk]) +-AM_INIT_AUTOMAKE([1.9 tar-ustar -Wall]) ++AM_INIT_AUTOMAKE([1.9 tar-ustar -Wall -Wno-extra-portability]) + + AC_CONFIG_SRCDIR([src/lib/presage.cpp]) + AC_CONFIG_HEADERS([config.h:config.hin]) diff --git a/presage-0.9.1-automake-1.14.patch b/presage-0.9.1-automake-1.14.patch new file mode 100644 index 0000000..a63143b --- /dev/null +++ b/presage-0.9.1-automake-1.14.patch @@ -0,0 +1,13 @@ +Index: presage-0.9.1/configure.ac +=================================================================== +--- presage-0.9.1.orig/configure.ac ++++ presage-0.9.1/configure.ac +@@ -23,7 +23,7 @@ dnl Process this file with autoconf to p + + + AC_INIT([presage],[0.9.1],[matteo.vescovi@yahoo.co.uk]) +-AM_INIT_AUTOMAKE([1.9 tar-ustar -Wall -Wno-extra-portability]) ++AM_INIT_AUTOMAKE([1.9 tar-ustar -Wall -Wno-extra-portability subdir-objects]) + + AC_CONFIG_SRCDIR([src/lib/presage.cpp]) + AC_CONFIG_HEADERS([config.h:config.hin]) diff --git a/presage-0.9.1-doxygen-no-freesans.patch b/presage-0.9.1-doxygen-no-freesans.patch new file mode 100644 index 0000000..fe9643f --- /dev/null +++ b/presage-0.9.1-doxygen-no-freesans.patch @@ -0,0 +1,13 @@ +Index: presage-0.9.1/doc/Doxyfile.in +=================================================================== +--- presage-0.9.1.orig/doc/Doxyfile.in ++++ presage-0.9.1/doc/Doxyfile.in +@@ -1617,7 +1617,7 @@ DOT_NUM_THREADS = 0 + # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the + # directory containing the font. + +-DOT_FONTNAME = FreeSans ++DOT_FONTNAME = + + # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. + # The default size is 10pt. diff --git a/presage-0.9.1-gcc11.patch b/presage-0.9.1-gcc11.patch new file mode 100644 index 0000000..e66ec8a --- /dev/null +++ b/presage-0.9.1-gcc11.patch @@ -0,0 +1,262 @@ +Index: presage-0.9.1/src/lib/presage.cpp +=================================================================== +--- presage-0.9.1.orig/src/lib/presage.cpp ++++ presage-0.9.1/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 Presage::predict () +- throw (PresageException) ++ EXCEPT (PresageException) + { + std::vector result; + +@@ -88,7 +88,7 @@ std::vector Presage::predic + } + + std::multimap Presage::predict (std::vector filter) +- throw (PresageException) ++ EXCEPT (PresageException) + { + std::multimap result; + +@@ -137,20 +137,20 @@ std::multimap 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(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 +=================================================================== +--- presage-0.9.1.orig/src/lib/presage.h ++++ presage-0.9.1/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 predict() throw (PresageException); ++ std::vector predict() EXCEPT(PresageException); + + /** \brief Obtain a prediction that matches the supplied token + * filter. +@@ -153,7 +159,7 @@ public: + * of the filter tokens. + * + */ +- std::multimap predict(std::vector filter) throw (PresageException); ++ std::multimap predict(std::vector 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 +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 +--- a/apps/gtk/gprompter/scintilla/gtk/ScintillaGTK.cxx ++++ b/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/presage-0.9.1-gcc6.patch b/presage-0.9.1-gcc6.patch new file mode 100644 index 0000000..bbeb469 --- /dev/null +++ b/presage-0.9.1-gcc6.patch @@ -0,0 +1,527 @@ +Index: presage-0.9.1/src/lib/core/iso8859_1.h +=================================================================== +--- presage-0.9.1.orig/src/lib/core/iso8859_1.h ++++ presage-0.9.1/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/presage-0.9.1-python3.patch b/presage-0.9.1-python3.patch new file mode 100644 index 0000000..359ad28 --- /dev/null +++ b/presage-0.9.1-python3.patch @@ -0,0 +1,1225 @@ +Index: presage-0.9.1/bindings/python/Makefile.am +=================================================================== +--- presage-0.9.1.orig/bindings/python/Makefile.am ++++ presage-0.9.1/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 +=================================================================== +--- presage-0.9.1.orig/bindings/python/presage_python_demo.in ++++ presage-0.9.1/bindings/python/presage_python_demo.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + ########## + # Presage, an extensible predictive text entry system +@@ -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" ++ long_options = ["config=", "suggestions=", "help", "version"] + +- short_options = "c:s:hv" +- long_options = ["config=", "suggestions=", "help", "version"] +- +- try: +- opts, args = getopt.getopt(sys.argv[1:], short_options, long_options) +- except getopt.GetoptError, err: +- print str(err) +- sys.exit(1) +- +- for opt, arg in opts: +- if opt in ('-v', '--version'): +- print_version() +- sys.exit() +- elif opt in ('-h', '--help'): +- print_usage() +- sys.exit() +- elif opt in ('-c', '--config'): +- config = arg +- elif opt in ('-s', '--suggestions'): +- suggestions = arg ++ try: ++ opts, _ = getopt.getopt(sys.argv[1:], short_options, long_options) ++ except getopt.GetoptError as err: ++ print(str(err)) ++ sys.exit(1) ++ ++ for opt, arg in opts: ++ if opt in ('-v', '--version'): ++ print_version() ++ sys.exit() ++ elif opt in ('-h', '--help'): ++ print_usage() ++ sys.exit() ++ elif opt in ('-c', '--config'): ++ CONFIG = arg ++ elif opt in ('-s', '--suggestions'): ++ SUGGESTIONS = arg + + + def main(): +- try: +- import presage ++ try: ++ import presage + +- except ImportError, e: +- print ''' ++ except ImportError as err: ++ print(''' + Error: failed to import module presage. + + Check that presage python binding is properly installed (if +@@ -109,53 +113,53 @@ accordingly). + Check that presage library is properly installed (if installed in a + non-standard location, please set LD_LIBRARY_PATH (PATH, LIBPATH) + accordingly). +-''' +- print e +- sys.exit(1) +- +- try: +- # Define and create PresageCallback object +- class DemoCallback(presage.PresageCallback): +- def __init__(self): +- presage.PresageCallback.__init__(self) +- self.buffer = '' +- +- def get_past_stream(self): +- return self.buffer +- +- def get_future_stream(self): +- return '' +- +- # Presage owns callback, so we create it and disown it +- callback = DemoCallback().__disown__() +- +- # Create Presage object +- if config: +- prsg = presage.Presage(callback, config) +- else: +- prsg = presage.Presage(callback) +- +- if suggestions: +- prsg.config('Presage.Selector.SUGGESTIONS', suggestions) +- +- print "Enter text at the prompt (press enter on empty line to exit):" +- str = None +- while str != "": +- str = raw_input("> ") +- callback.buffer += str +- print prsg.predict() +- +- # Destroy Presage object +- del prsg +- +- except presage.PresageException,ex: +- print ex.what() +- sys.exit(1) ++''') ++ print(err) ++ sys.exit(1) ++ ++ try: ++ # Define and create PresageCallback object ++ class DemoCallback(presage.PresageCallback): ++ def __init__(self): ++ presage.PresageCallback.__init__(self) ++ self.buffer = '' ++ ++ def get_past_stream(self): ++ return self.buffer ++ ++ def get_future_stream(self): ++ return '' ++ ++ # Presage owns callback, so we create it and disown it ++ callback = DemoCallback().__disown__() ++ ++ # Create Presage object ++ if CONFIG: ++ prsg = presage.Presage(callback, CONFIG) ++ else: ++ prsg = presage.Presage(callback) ++ ++ if SUGGESTIONS: ++ prsg.config('Presage.Selector.SUGGESTIONS', SUGGESTIONS) ++ ++ print("Enter text at the prompt (press enter on empty line to exit):") ++ strs = None ++ while strs != "": ++ strs = input("> ") ++ callback.buffer += strs ++ print(prsg.predict()) ++ ++ # Destroy Presage object ++ del prsg ++ ++ except presage.PresageException as ex: ++ print(ex.what()) ++ sys.exit(1) + +- print "Goodbye" ++ print("Goodbye") + + + if __name__ == '__main__': +- parse_cmd_line_args() +- disclaimer() +- main() ++ parse_cmd_line_args() ++ disclaimer() ++ main() +Index: presage-0.9.1/configure.ac +=================================================================== +--- presage-0.9.1.orig/configure.ac ++++ presage-0.9.1/configure.ac +@@ -233,7 +233,7 @@ AM_PATH_PYTHON([2.0], + [AC_MSG_WARN([Python not found. Python is required to build presage python binding. Python can be obtained from http://www.python.org])]) + if test "$PYTHON" != : + then +- python_include_path=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_python_inc();"` ++ python_include_path=`$PYTHON -c "import sysconfig; print(sysconfig.get_path('include'));"` + AC_CHECK_HEADERS([${python_include_path}/Python.h], + [have_python_header=true], + [AC_MSG_WARN([Python.h header file not found. Python development files are required to build presage python binding. Python can be obtained from http://www.python.org])], +@@ -295,7 +295,7 @@ then + AC_MSG_RESULT($have_pyatspi) + + AC_MSG_CHECKING(for python gtk module) +- $PYTHON -c "import gtk" 2&>/dev/null ++ $PYTHON -c "import gi; gi.require_version('Gtk', '3.0'); from gi.repository import Gtk" 2&>/dev/null + if test $? -eq 0; + then + have_python_gtk=yes +@@ -305,7 +305,7 @@ then + AC_MSG_RESULT($have_python_gtk) + + AC_MSG_CHECKING(for python pango module) +- $PYTHON -c "import pango" 2&>/dev/null ++ $PYTHON -c "import gi; from gi.repository import Pango" 2&>/dev/null + if test $? -eq 0; + then + have_python_pango=yes +Index: presage-0.9.1/apps/python/pyprompter.in +=================================================================== +--- presage-0.9.1.orig/apps/python/pyprompter.in ++++ presage-0.9.1/apps/python/pyprompter.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + ########## + # Presage, an extensible predictive text entry system +@@ -25,20 +25,22 @@ import getopt + import os + + PROGRAM_NAME = 'pyprompter' +-config = None +-suggestions = None ++CONFIG = None ++SUGGESTIONS = None ++ + + 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 [options] + + Options: +@@ -55,60 +57,62 @@ clicking on it or by highlighting it wit + pressing ENTER; the desired text will be automatically entered. + + Direct your bug reports to: %s +-""" % (PROGRAM_NAME, '@PACKAGE_BUGREPORT@') ++""" % (PROGRAM_NAME, '@PACKAGE_BUGREPORT@')) ++ + + def parse_cmd_line_args(): +- short_options = "c:s:hv" +- long_options = ["config=", "suggestions=", "help", "version"] +- +- try: +- opts, args = getopt.getopt(sys.argv[1:], short_options, long_options) +- except getopt.GetoptError, err: +- print str(err) +- sys.exit(1) +- +- for opt, arg in opts: +- if opt in ('-v', '--version'): +- print_version() +- sys.exit() +- elif opt in ('-h', '--help'): +- print_usage() +- sys.exit() +- elif opt in ('-c', '--config'): +- global config +- config = arg +- elif opt in ('-s', '--suggestions'): +- global suggestions +- suggestions = arg ++ short_options = "c:s:hv" ++ long_options = ["config=", "suggestions=", "help", "version"] ++ ++ try: ++ opts, _ = getopt.getopt(sys.argv[1:], short_options, long_options) ++ except getopt.GetoptError as err: ++ print(str(err)) ++ sys.exit(1) ++ ++ for opt, arg in opts: ++ if opt in ('-v', '--version'): ++ print_version() ++ sys.exit() ++ elif opt in ('-h', '--help'): ++ print_usage() ++ sys.exit() ++ elif opt in ('-c', '--config'): ++ global CONFIG ++ CONFIG = arg ++ elif opt in ('-s', '--suggestions'): ++ global SUGGESTIONS ++ SUGGESTIONS = arg + + + if __name__ == "__main__": +- parse_cmd_line_args() ++ parse_cmd_line_args() + +- try: +- import prompter.prompter +- except ImportError, e: +- print ''' ++ try: ++ import prompter.prompter ++ except ImportError as err: ++ print(''' + Error: failed to import module prompter. + + Check that prompter is properly installed (if installed in a + non-standard location, please set PYTHONPATH accordingly). +-''' +- print e +- else: +- if not config: +- # try to locate presage.xml config file +- scriptdir = os.path.dirname(sys.argv[0]) +- # in scriptdir/etc +- conffile = os.path.join(scriptdir, 'etc', 'presage.xml') +- if os.path.isfile(conffile): +- config = conffile +- else: +- # in scriptdir/../etc +- conffile = os.path.join(scriptdir, '..', 'etc', 'presage.xml') +- if os.path.isfile(conffile): +- config = conffile +- print 'Configuration file: ' + str(config) +- +- app = prompter.prompter.Prompter("@PACKAGE_VERSION@", config, suggestions) +- app.MainLoop() ++''') ++ print(err) ++ else: ++ if not CONFIG: ++ # try to locate presage.xml config file ++ SCRIPTDIR = os.path.dirname(sys.argv[0]) ++ # in scriptdir/etc ++ CONFFILE = os.path.join(SCRIPTDIR, 'etc', 'presage.xml') ++ if os.path.isfile(CONFFILE): ++ CONFIG = CONFFILE ++ else: ++ # in scriptdir/../etc ++ CONFFILE = os.path.join(SCRIPTDIR, '..', 'etc', 'presage.xml') ++ if os.path.isfile(CONFFILE): ++ CONFIG = CONFFILE ++ print('Configuration file: ' + str(CONFIG)) ++ ++ APP = prompter.prompter.Prompter( ++ "@PACKAGE_VERSION@", CONFIG, SUGGESTIONS) ++ APP.MainLoop() +Index: presage-0.9.1/apps/python/prompter/prompter.py +=================================================================== +--- presage-0.9.1.orig/apps/python/prompter/prompter.py ++++ presage-0.9.1/apps/python/prompter/prompter.py +@@ -23,21 +23,22 @@ import sys + try: + import wx + import wx.stc +-except ImportError, ex: +- print ''' ++ import wx.adv ++except ImportError as ex: ++ print(''' + Error: failed to import module wxPython. + + wxPython is a Python binding for the wxWidgets toolkit. + + Check that wxPython is properly installed. +-''' +- print ex ++''') ++ print(ex) + sys.exit(1) + + try: + import presage +-except ImportError, ex: +- print ''' ++except ImportError as ex: ++ print(''' + Error: failed to import module presage. + + Check that presage python binding is properly installed (if +@@ -47,8 +48,8 @@ accordingly). + Check that presage library is properly installed (if installed in a + non-standard location, please set LD_LIBRARY_PATH (PATH, LIBPATH) + accordingly). +-''' +- print ex ++''') ++ print(ex) + sys.exit(1) + + ########## +@@ -238,7 +239,7 @@ class PrompterFrame(wx.Frame): + self.fileMenu.Enable(wx.ID_SAVEAS, False) + + def OnFileMenuOpen(self, event): +- print "Opening a file.." ++ print("Opening a file..") + + # Create the dialog. In this case the current directory is forced as the starting + # directory for the dialog, and no default file name is forced. This can easilly +@@ -249,7 +250,7 @@ class PrompterFrame(wx.Frame): + # dialog is set up to change the current working directory to the path chosen. + dlg = wx.FileDialog( + self, message="Choose a file", defaultDir="", +- defaultFile="", wildcard=self.wildcard, style=wx.OPEN | wx.CHANGE_DIR ++ defaultFile="", wildcard=self.wildcard, style=wx.FD_OPEN | wx.FD_CHANGE_DIR + ) + + # Show the dialog and retrieve the user response. If it is the OK response, +@@ -279,7 +280,7 @@ class PrompterFrame(wx.Frame): + dlg.Destroy() + + def OnFileMenuSave(self, event): +- print "Save file" ++ print("Save file") + if self.editor.file == None: + self.OnFileMenuSaveAs(event) + else: +@@ -287,7 +288,7 @@ class PrompterFrame(wx.Frame): + self.fileMenu.Enable(wx.ID_SAVE, False) + + def OnFileMenuSaveAs(self, event): +- print "Save file as" ++ print("Save file as") + + # Create the dialog. In this case the current directory is forced as the starting + # directory for the dialog, and no default file name is forced. This can easilly +@@ -298,12 +299,12 @@ class PrompterFrame(wx.Frame): + # directory than the one initially set. + dlg = wx.FileDialog( + self, message="Save file as ...", defaultDir="", +- defaultFile="", wildcard=self.wildcard, style=wx.SAVE ++ defaultFile="", wildcard=self.wildcard, style=wx.FD_SAVE + ) + + # This sets the default filter that the user will initially see. Otherwise, + # the first filter in the list will be used by default. +- dlg.SetFilterIndex(2) ++ dlg.SetFilterIndex(1) + + # Show the dialog and retrieve the user response. If it is the OK response, + # process the data. +@@ -321,31 +322,31 @@ class PrompterFrame(wx.Frame): + self.OnFileMenuNew(event) # this will do for now + + def OnFileMenuQuit(self, event): +- print "This should first check that changes have been saved..." ++ print("This should first check that changes have been saved...") + self.Close(True) + + def OnEditMenuUndo(self, event): + if self.editor.CanUndo(): + self.editor.Undo() +- print "Undo last action" ++ print("Undo last action") + + def OnEditMenuRedo(self, event): + if self.editor.CanRedo(): + self.editor.Redo() +- print "Redo last action" ++ print("Redo last action") + + def OnEditMenuCut(self, event): + self.clip = self.editor.GetSelectedText() + self.editor.ReplaceSelection('') +- print "Cut selected text: " + self.clip ++ print("Cut selected text: " + self.clip) + + def OnEditMenuCopy(self, event): + self.clip = self.editor.GetSelectedText() +- print "Stored selected text into clip: " + self.clip ++ print("Stored selected text into clip: " + self.clip) + + def OnEditMenuPaste(self, event): + self.editor.ReplaceSelection(self.clip) +- print "Replace selection with: " + self.clip ++ print("Replace selection with: " + self.clip) + + def OnEditMenuSelectAll(self, event): + self.editor.SelectAll() +@@ -360,7 +361,7 @@ class PrompterFrame(wx.Frame): + self.editor.DecreaseTextSize() + + def OnViewMenuShowToolbar(self, event): +- if event.Checked(): ++ if event.IsChecked(): + self.toolbar.Show() + else: + self.toolbar.Hide() +@@ -370,10 +371,10 @@ class PrompterFrame(wx.Frame): + self.editor.ShowPrediction() + + def OnPresageMenuToggleFunctionMode(self, event): +- self.editor.function_keys_enabled = event.Checked() ++ self.editor.function_keys_enabled = event.IsChecked() + + def OnPresageMenuToggleAutopunctuationMode(self, event): +- self.editor.autopunctuation = event.Checked() ++ self.editor.autopunctuation = event.IsChecked() + + def OnHelpMenuContents(self, event): + message = "Sorry, help not written yet." +@@ -412,7 +413,7 @@ with this program; if not, write to the + # AboutBox and AboutDialogInfo were introduced in wxPython 2.7.1.1 + if wx.VERSION > (2, 7, 1, 1): + # build about dialog information +- info = wx.AboutDialogInfo() ++ info = wx.adv.AboutDialogInfo() + info.SetName(name) + info.SetVersion(version) + info.SetCopyright(copyright) +@@ -426,7 +427,7 @@ with this program; if not, write to the + #info.SetIcon() + + # show about dialog box +- wx.AboutBox(info) ++ wx.adv.AboutBox(info) + + else: + message = name + ' ' + version + '\n' \ +@@ -517,7 +518,7 @@ class PrompterEditor(wx.stc.StyledTextCt + wx.CallAfter(self.SetSTCFocus, 1) + + def OnChar(self, event): +- print "------------ OnChar() handler" ++ print("------------ OnChar() handler") + + if event.HasModifiers(): + if self.AutoCompActive(): +@@ -535,7 +536,7 @@ class PrompterEditor(wx.stc.StyledTextCt + self.__HandleFunctionKey(keycode) + + else: +- key = unichr(key) ++ key = chr(key) + + self.parent.fileMenu.Enable(wx.ID_SAVE, True) + self.parent.fileMenu.Enable(wx.ID_SAVEAS, True) +@@ -553,7 +554,7 @@ class PrompterEditor(wx.stc.StyledTextCt + self.__ShowPrediction(string) + + def __ShowPrediction(self, string = ''): +- print "------------ __ShowPrediction()" ++ print("------------ __ShowPrediction()") + try: + prefix = self.prsg.prefix() + context = self.prsg.context() +@@ -565,18 +566,18 @@ class PrompterEditor(wx.stc.StyledTextCt + self.prediction = self.__PrependFunctionLabel(self.prediction) + self.suggestions = self.separator.join(self.prediction); + +- except presage.PresageException, ex: +- print 'Caught exception %s' % (ex) +- print ' code: %d' % (ex.code()) +- print ' what: %s' % (ex.what()) ++ except presage.PresageException as ex: ++ print('Caught exception %s' % (ex)) ++ print(' code: %d' % (ex.code())) ++ print(' what: %s' % (ex.what())) + + +- print "String: " + string +- print "Prefix: " + prefix +- print "Prefix len: " + str(len(prefix)) +- print "Context: " + context +- print "Context change: " + str(context_change) +- print "Prediction: " + self.suggestions ++ print("String: " + string) ++ print("Prefix: " + prefix) ++ print("Prefix len: " + str(len(prefix))) ++ print("Context: " + context) ++ print("Context change: " + str(context_change)) ++ print("Prediction: " + self.suggestions) + + if self.AutoCompActive(): + self.AutoCompCancel() +@@ -622,11 +623,11 @@ class PrompterEditor(wx.stc.StyledTextCt + return result + + def __HandleFunctionKey(self, key): +- print "Got function key " + str(key) ++ print("Got function key " + str(key)) + + try: + idx = self.function_keys.index(key) +- print self.prediction[idx] ++ print(self.prediction[idx]) + if self.AutoCompActive(): + self.AutoCompCancel() + +@@ -634,7 +635,7 @@ class PrompterEditor(wx.stc.StyledTextCt + self.AutoCompSelect(self.prediction[idx]) + self.AutoCompComplete() + except IndexError: +- print 'Key not in prediction completion list' ++ print('Key not in prediction completion list') + + def __PrependFunctionLabel(self, prediction): + return ['F' + str(i + 1) + ' ' + prediction[i] for i in range(len(prediction))] +@@ -646,15 +647,15 @@ class PrompterEditor(wx.stc.StyledTextCt + return completion + + def OnUserListSelection(self, event): +- completion = unicode(event.GetText()) ++ completion = str(event.GetText()) + if self.function_keys_enabled: + completion = self.__RemoveFunctionLabel(completion) +- prefix_length = len(unicode(self.prsg.prefix())) ++ prefix_length = len(str(self.prsg.prefix())) + +- print "----------- OnUserListSelection() handler" +- print "Completion: " + completion +- print "Prefix length: " + str(prefix_length) +- print "To be added: " + completion[prefix_length:] ++ print("----------- OnUserListSelection() handler") ++ print("Completion: " + completion) ++ print("Prefix length: " + str(prefix_length)) ++ print("To be added: " + completion[prefix_length:]) + + # no need to call complete, using callbacks + #self.prsg.complete(completion.encode('utf-8')) +Index: presage-0.9.1/apps/dbus/presage_dbus_python_demo.in +=================================================================== +--- presage-0.9.1.orig/apps/dbus/presage_dbus_python_demo.in ++++ presage-0.9.1/apps/dbus/presage_dbus_python_demo.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ########## + # Presage, an extensible predictive text entry system +@@ -32,13 +32,13 @@ PROGRAM_NAME = 'presage_dbus_python_demo + + config = None + +-presage_service_name = 'org.gnome.presage.beta' +-presage_service_path = '/org/gnome/presage/beta' ++presage_service_name = 'org.gnome.presage.beta' ++presage_service_path = '/org/gnome/presage/beta' + presage_service_interface = 'org.gnome.presage.beta' + + + def disclaimer(): +- print """ ++ print(""" + Presage dbus python demo + ------------------------ + +@@ -51,19 +51,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) 2010 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. +@@ -74,29 +76,30 @@ 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 config ++ ++ short_options = "c:s:hv" ++ long_options = ["config=", "suggestions=", "help", "version"] ++ ++ try: ++ opts, _ = getopt.getopt(sys.argv[1:], short_options, long_options) ++ except getopt.GetoptError as err: ++ print(str(err)) ++ sys.exit(1) + +- short_options = "c:s:hv" +- long_options = ["config=", "suggestions=", "help", "version"] +- +- try: +- opts, args = getopt.getopt(sys.argv[1:], short_options, long_options) +- except getopt.GetoptError, err: +- print str(err) +- sys.exit(1) +- +- for opt, arg in opts: +- if opt in ('-v', '--version'): +- print_version() +- sys.exit() +- elif opt in ('-h', '--help'): +- print_usage() +- sys.exit() +- elif opt in ('-c', '--config'): +- config = arg ++ for opt, arg in opts: ++ if opt in ('-v', '--version'): ++ print_version() ++ sys.exit() ++ elif opt in ('-h', '--help'): ++ print_usage() ++ sys.exit() ++ elif opt in ('-c', '--config'): ++ config = arg + + + def main(): +@@ -107,32 +110,38 @@ def main(): + try: + bus = dbus.SessionBus(gloop) + if config: +- presage_object_path = bus.get_object(presage_service_name, presage_service_path).get_presage_object_path(config) ++ presage_object_path = bus.get_object( ++ presage_service_name, ++ presage_service_path).get_presage_object_path(config) + else: +- presage_object_path = bus.get_object(presage_service_name, presage_service_path).get_presage_object_path() ++ presage_object_path = bus.get_object( ++ presage_service_name, presage_service_path).get_presage_object_path() + # Get the Presage object +- presage_object = bus.get_object(presage_service_name, presage_object_path) ++ presage_object = bus.get_object( ++ presage_service_name, presage_object_path) + +- print 'D-BUS connection to presage object %s created' % presage_object_path ++ print( ++ 'D-BUS connection to presage object %s created' % ++ presage_object_path) + +- except Exception, e: +- print e ++ except Exception as err: ++ print(err) + sys.exit(1) + +- print "Enter text at the prompt (press enter on empty line to exit):" ++ print("Enter text at the prompt (press enter on empty line to exit):") + string = None + buffer = "" + while string != "": +- string = raw_input("> ") ++ string = input("> ") + buffer += string + results = presage_object.get_prediction(buffer, '') + for result in results: +- print str(result) ++ print(str(result)) + presage_object.destroy() +- print "Goodbye" ++ print("Goodbye") + + + if __name__ == '__main__': +- parse_cmd_line_args() +- disclaimer() +- main() ++ parse_cmd_line_args() ++ disclaimer() ++ main() +Index: presage-0.9.1/apps/dbus/presage_dbus_service.py +=================================================================== +--- presage-0.9.1.orig/apps/dbus/presage_dbus_service.py ++++ presage-0.9.1/apps/dbus/presage_dbus_service.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ########## + # Presage, an extensible predictive text entry system +@@ -72,7 +72,7 @@ class PresageObject(dbus.service.Object) + self.callback = DbusPresageCallback().__disown__() + self.prsg = presage.Presage(self.callback, config) + dbus.service.Object.__init__(self, name, self.path) +- print 'Created presage object %s' % self.path ++ print('Created presage object %s' % self.path) + + # def __del__( self ): + # print 'PresageObject destroyed: ', self +@@ -88,7 +88,7 @@ class PresageObject(dbus.service.Object) + @dbus.service.method(dbus_interface = presage_service_interface) + def destroy(self): + self.remove_from_connection() +- print 'Removed presage object ' + self.path ++ print('Removed presage object ' + self.path) + + + class PresageService(dbus.service.Object): +@@ -98,7 +98,7 @@ class PresageService(dbus.service.Object + self.path = presage_service_path + self.loop = loop + dbus.service.Object.__init__(self, self.name, self.path) +- print 'Service %s created, pid %d' % (presage_service_name, os.getpid()) ++ print('Service %s created, pid %d' % (presage_service_name, os.getpid())) + + @dbus.service.method(dbus_interface = presage_service_interface, + in_signature = 's', +@@ -112,11 +112,11 @@ class PresageService(dbus.service.Object + out_signature = '') + def shutdown(self): + self.loop.quit() +- print 'Service %s shutdown' % presage_service_name ++ print('Service %s shutdown' % presage_service_name) + + + def start(): +- print 'Starting ' + presage_service_name + '...' ++ print('Starting ' + presage_service_name + '...') + + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) + loop = gobject.MainLoop() +@@ -124,16 +124,16 @@ def start(): + loop.run() + + def stop(): +- print 'Stopping ' + presage_service_name + '...' ++ print('Stopping ' + presage_service_name + '...') + try: + dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) + bus = dbus.SessionBus() + presage_service_object = bus.get_object(presage_service_name, presage_service_path) + presage_service_object.shutdown() + +- except Exception, e: +- print 'Caught exception while attempting to stop ' + presage_service_name +- print e ++ except Exception as err: ++ print('Caught exception while attempting to stop ' + presage_service_name) ++ print(err) + + if __name__ == '__main__': + start() +Index: presage-0.9.1/apps/python/presagemate/presagemate.py +=================================================================== +--- presage-0.9.1.orig/apps/python/presagemate/presagemate.py ++++ presage-0.9.1/apps/python/presagemate/presagemate.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + ########## + # Presage, an extensible predictive text entry system +@@ -24,8 +24,8 @@ import string + + try: + import presage +-except ImportError, ex: +- print ''' ++except ImportError as ex: ++ print(''' + Error: failed to import module presage. + + Check that presage python binding is properly installed (if +@@ -35,11 +35,11 @@ accordingly). + Check that presage library is properly installed (if installed in a + non-standard location, please set LD_LIBRARY_PATH (PATH, LIBPATH) + accordingly). +-''' ++''') + try: + import pyatspi +-except ImportError, ex: +- print ''' ++except ImportError as ex: ++ print(''' + Error: failed to import module pyatspi. + + Check that pyatspi python binding is properly installed (if +@@ -49,12 +49,14 @@ accordingly). + Check that pyatspi library is properly installed (if installed in a + non-standard location, please set LD_LIBRARY_PATH (PATH, LIBPATH) + accordingly). +-''' ++''') + + try: +- import gtk +-except ImportError, ex: +- print ''' ++ import gi ++ gi.require_version('Gtk', '3.0') ++ from gi.repository import Gtk as gtk, Gdk as gdk ++except ImportError as ex: ++ print(''' + Error: failed to import module gtk. + + Check that gtk python binding is properly installed (if +@@ -64,12 +66,12 @@ accordingly). + Check that gtk library is properly installed (if installed in a + non-standard location, please set LD_LIBRARY_PATH (PATH, LIBPATH) + accordingly). +-''' ++''') + + +-import ConfigParser ++import configparser + import os +-import pango ++from gi.repository import Pango as pango + import atexit + import Xlib + import Xlib.display +@@ -129,11 +131,11 @@ def process_event(event): + + completion = prsg.completion(predicted_word) + +- print 'Prediction: ' + predicted_word +- print 'Completion: ' + completion ++ print('Prediction: ' + predicted_word) ++ print('Completion: ' + completion) + + for ch in completion: +- keyval = gtk.gdk.unicode_to_keyval(ord(ch)) ++ keyval = gdk.unicode_to_keyval(ord(ch)) + reg.generateKeyboardEvent(keyval, None, pyatspi.KEY_SYM) + + callback.buffer += completion +@@ -173,7 +175,7 @@ def delete_event(widget, event, data=Non + + def frame_event(window, event, data=None): + state = event.new_window_state +- if state & gtk.gdk.WINDOW_STATE_ICONIFIED: ++ if state & gdk.WindowState.ICONIFIED: + # re-map F1-10 to F1-10 when the window is iconified + remap_keys(False) + else: +@@ -182,7 +184,7 @@ def frame_event(window, event, data=None + + def get_config(): + writeconfig_flag = False +- config = ConfigParser.SafeConfigParser() ++ config = configparser.ConfigParser() + config.read(os.path.expanduser('~/.pypresagematerc')) + + if config.has_section('Config') == False: +@@ -207,7 +209,7 @@ def get_config(): + writeconfig_flag = True + + if writeconfig_flag == True: +- configfile = open(os.path.expanduser('~/.pypresagematerc'), 'wb') ++ configfile = open(os.path.expanduser('~/.pypresagematerc'), 'w') + try: + config.write(configfile) + finally: +@@ -216,11 +218,11 @@ def get_config(): + return config + + def set_position_config(x, y): +- config = ConfigParser.SafeConfigParser() ++ config = configparser.ConfigParser() + config.read(os.path.expanduser('~/.pypresagematerc')) + config.set('Config', 'window_position_x', str(x)) + config.set('Config', 'window_position_y', str(y)) +- configfile = open(os.path.expanduser('~/.pypresagematerc'), 'wb') ++ configfile = open(os.path.expanduser('~/.pypresagematerc'), 'w') + try: + config.write(configfile) + finally: +@@ -279,15 +281,15 @@ def remap_keys(remap): + + def popup_menu(widget, event): + if event.button == 3: +- menu.popup(None, None, None, event.button, event.time) ++ menu.popup(None, None, None, None, event.button, event.time) + return True + return False + + def apply_preferences(widget): +- print "apply" ++ print("apply") + + def close_preferences(widget): +- print "close" ++ print("close") + + def update_no_selections(widget): + global number_of_suggestions +@@ -297,14 +299,14 @@ def update_no_selections(widget): + remap_keys(True) + + def preferences(widget): +- preferences = gtk.Window(gtk.WINDOW_TOPLEVEL) ++ preferences = gtk.Window(gtk.WindowType.TOPLEVEL) + preferences.set_title("pypresagemate preferences") +- preferences.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG) ++ preferences.set_type_hint(gdk.WindowTypeHint.DIALOG) + + preferences_box = gtk.VBox() + + notebook = gtk.Notebook() +- notebook.set_tab_pos(gtk.POS_TOP) ++ notebook.set_tab_pos(gtk.PositionType.TOP) + + appearance_frame = gtk.Frame() + appearance_tab = gtk.Label("Appearance") +@@ -319,7 +321,8 @@ def preferences(widget): + + presage_placeholder = gtk.Label("\n\nPresage library configuration\n\n") + adj = gtk.Adjustment(float(number_of_suggestions), 3, 10, 1, 0, 0) +- no_of_selections = gtk.SpinButton(adj, 0, 0) ++ no_of_selections = gtk.SpinButton() ++ no_of_selections.configure(adj, 0, 0) + no_of_selections.connect("output", update_no_selections) + presage_frame.add(no_of_selections) + +@@ -366,7 +369,7 @@ with this program; if not, write to the + about.set_website("http://presage.sourceforge.net/") + about.set_comments(comments) + if os.path.isfile("/usr/local/share/presage/presage.png"): +- about.set_logo(gtk.gdk.pixbuf_new_from_file("/usr/local/share/presage/presage.png")) ++ about.set_logo(gdk.pixbuf_new_from_file("/usr/local/share/presage/presage.png")) + about.run() + about.destroy() + +@@ -410,7 +413,7 @@ prediction = prsg.predict() + + reg.registerKeystrokeListener(process_event, mask=pyatspi.allModifiers()) + +-window = gtk.Window(gtk.WINDOW_TOPLEVEL) ++window = gtk.Window(gtk.WindowType.TOPLEVEL) + window.connect("delete-event", delete_event) + window.connect("window-state-event", frame_event) + +@@ -419,17 +422,17 @@ window.set_keep_above(True) + + window.move(window_position_x, window_position_y) + +-window.modify_bg(gtk.STATE_NORMAL, gtk.gdk.color_parse("#c0c0ff")) ++window.modify_bg(gtk.StateType.NORMAL, gdk.color_parse("#c0c0ff")) + + label = gtk.Label("pypresagemate") +-label.set_justify(gtk.JUSTIFY_LEFT) ++label.set_justify(gtk.Justification.LEFT) + label.set_width_chars(20) + + font_desc = pango.FontDescription(pangofont) + label.modify_font(font_desc) + + window.connect("button-press-event", popup_menu) +-window.add_events(gtk.gdk.BUTTON_PRESS_MASK) ++window.add_events(gdk.EventMask.BUTTON_PRESS_MASK) + + menu = gtk.Menu() + menu_item1 = gtk.MenuItem('About') +Index: presage-0.9.1/apps/python/pypresagemate.in +=================================================================== +--- presage-0.9.1.orig/apps/python/pypresagemate.in ++++ presage-0.9.1/apps/python/pypresagemate.in +@@ -1,4 +1,4 @@ +-#!/usr/bin/python ++#!/usr/bin/python3 + + ########## + # Presage, an extensible predictive text entry system +@@ -27,17 +27,17 @@ import os + PROGRAM_NAME = 'pypresagemate' + + def print_version(): +- print """ ++ print(""" + %s (%s) version %s + Copyright (C) 2010 Matteo Vescovi. + Copyright (C) 2010 John Hills. + 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 [options] + + Options: +@@ -54,16 +54,16 @@ keystrokes are typed and displaying pred + prediction is selected, text is sent to the active application. + + Direct your bug reports to: %s +-""" % (PROGRAM_NAME, '@PACKAGE_BUGREPORT@') ++""" % (PROGRAM_NAME, '@PACKAGE_BUGREPORT@')) + + def parse_cmd_line_args(): + short_options = "hv" + long_options = ["help", "version"] + + try: +- opts, args = getopt.getopt(sys.argv[1:], short_options, long_options) +- except getopt.GetoptError, err: +- print str(err) ++ opts, _ = getopt.getopt(sys.argv[1:], short_options, long_options) ++ except getopt.GetoptError as err: ++ print(str(err)) + sys.exit(1) + + for opt, arg in opts: +@@ -80,14 +80,14 @@ if __name__ == "__main__": + + try: + import presagemate.presagemate +- except ImportError, e: +- print ''' ++ except ImportError as err: ++ print(''' + Error: failed to import module presagemate. + + Check that prompter is properly installed (if installed in a + non-standard location, please set PYTHONPATH accordingly). +-''' +- print e ++''') ++ print(err) + else: + if not config: + # try to locate presage.xml config file +@@ -101,4 +101,4 @@ non-standard location, please set PYTHON + conffile = os.path.join(scriptdir, '..', 'etc', 'presage.xml') + if os.path.isfile(conffile): + config = conffile +- print 'Configuration file: ' + str(config) ++ print('Configuration file: ' + str(config)) +Index: presage-0.9.1/apps/dbus/presage_dbus_python_demo +=================================================================== +--- presage-0.9.1.orig/apps/dbus/presage_dbus_python_demo ++++ presage-0.9.1/apps/dbus/presage_dbus_python_demo +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ########## + # Presage, an extensible predictive text entry system +Index: presage-0.9.1/apps/dbus/presage_dbus_service +=================================================================== +--- presage-0.9.1.orig/apps/dbus/presage_dbus_service ++++ presage-0.9.1/apps/dbus/presage_dbus_service +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + + ########## + # Presage, an extensible predictive text entry system diff --git a/presage-0.9.1.tar.gz b/presage-0.9.1.tar.gz new file mode 100644 index 0000000..2ec046a --- /dev/null +++ b/presage-0.9.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5ed567e350402a1d72c9053c78ecec3be710b7e72153a0223c6d19a7fe58a366 +size 2687519 diff --git a/presage-buildcycle.diff b/presage-buildcycle.diff new file mode 100644 index 0000000..3883e01 --- /dev/null +++ b/presage-buildcycle.diff @@ -0,0 +1,47 @@ +From: Jan Engelhardt + +build: always pretend wxpython is available + +Relying on wxpython's presence if it is not even needed for building +is a bad idea, because that causes a build cycle: + +presage (pyprompter) depends on python-wxWidgets +python-wxWidgets depends on wxWidgets +wxWidgets depends on SDL2 +SDL2 depends on fcitx +fcitx depends on presage (libpresage) +--- + configure.ac | 18 ------------------ + 1 file changed, 18 deletions(-) + +Index: presage-0.9.1/configure.ac +=================================================================== +--- presage-0.9.1.orig/configure.ac ++++ presage-0.9.1/configure.ac +@@ -343,26 +343,8 @@ dnl Checks for pyprompter + dnl ===================== + if test "$PYTHON" != : + then +- AC_MSG_CHECKING(for python wx module) +- $PYTHON -c "import wx" 2&>/dev/null +- if test $? -eq 0; +- then + have_python_wx=yes +- else +- have_python_wx=no +- fi +- AC_MSG_RESULT($have_python_wx) +- +- +- AC_MSG_CHECKING(for python wx.stc module) +- $PYTHON -c "import wx.stc" 2&>/dev/null +- if test $? -eq 0; +- then + have_python_wx_stc=yes +- else +- have_python_wx_stc=no +- fi +- AC_MSG_RESULT($have_python_wx_stc) + fi + + if test "$PYTHON" != : -a \ diff --git a/presage.changes b/presage.changes new file mode 100644 index 0000000..a9a3da6 --- /dev/null +++ b/presage.changes @@ -0,0 +1,193 @@ +------------------------------------------------------------------- +Mon May 15 13:57:20 UTC 2023 - Frederic Crozat + +- Update url for website and sources. + +------------------------------------------------------------------- +Wed May 12 12:15:26 UTC 2021 - Martin Liška + +- Fix one more GCC 11 warning. + +------------------------------------------------------------------- +Wed May 5 07:01:28 UTC 2021 - Marguerite Su + +- redo presage-0.9.1-gcc11.patch (boo#1181881) + * use noexcept(false) for "throw PresageException" + +------------------------------------------------------------------- +Mon Mar 1 14:09:26 UTC 2021 - Marguerite Su + +- add presage-0.9.1-gcc11.patch (boo#1181881) + * fix ISO C++17 does not allow dynamic exception specifications + * fix come from github.com/AcademySoftwareFoundation/openexr/pull/280 + +------------------------------------------------------------------- +Sun Feb 9 20:46:18 UTC 2020 - Stefan Brüns + +- Revert change of the source package name for the doc flavor. + Different flavors require distinct package names for _multibuild + to work properly. + +------------------------------------------------------------------- +Sat Feb 8 14:54:29 UTC 2020 - Dominique Leuenberger + +- Update presage-0.9.1-python3.patch: Adjust two more env python to + for python3. + +------------------------------------------------------------------- +Thu Feb 6 08:16:36 UTC 2020 - Tomáš Chvátal + +- Export the include path to fix the build under python 3.8 + +------------------------------------------------------------------- +Thu Jan 23 12:16:38 UTC 2020 - Marguerite Su + +- Add presage-0.9.1-python3.patch, port python binding and apps + to python3 +- Rename subpackages: + * dbus-1-presage -> python3-dbus-presage + * python-presage -> python3-presage + * pyprompter -> python3-pyprompter + * python-presagemate -> python3-presagemate + +------------------------------------------------------------------- +Tue Jul 2 13:26:59 UTC 2019 - Stefan Brüns + +- Add explicit BuildRequires for pkg-config for doc flavor, otherwise + configuration on Leap 15.x / SLE 15 fails. +- Disable build and checks for tools/bindings when building API docs. + +------------------------------------------------------------------- +Thu Jun 27 00:14:16 UTC 2019 - Stefan Brüns + +- Make the package name dependent on the flavor, otherwise OBS can not track + the packages correctly and keeps blocking until all flavors are finished. +- Remove unnneded Requires: presage in devel subpackge + +------------------------------------------------------------------- +Tue Jun 25 11:32:39 UTC 2019 - Stefan Brüns + +- Split out API doc generation using multibuild. graphviz-gd has + become quite heavy as a build dependency. +- Cleanup specfile + * remove defattr, use license macro + * remove conditionals for EOLed distribution versions +- Remove gpresagemate, it depends on the long deprecated XEVIE extension +- Set she-bang for /usr/bin/presage_dbus_* to /usr/bin/python2 + +------------------------------------------------------------------- +Sat Nov 11 01:02:34 UTC 2017 - zaitor@opensuse.org + +- Drop obsolete and unused libgnome-devel BuildRequires: No longer + needed. + +------------------------------------------------------------------- +Fri May 19 14:28:13 UTC 2017 - jengelh@inai.de + +- Add presage-buildcycle.diff to break the build cycle + preemptively. +- Limit fdupes to not cross typical partition boundaries. + +------------------------------------------------------------------- +Sun Jun 19 23:32:21 UTC 2016 - jengelh@inai.de + +- Request wx3 for building so we can move off wx2.8 + +------------------------------------------------------------------- +Sat Jun 18 06:16:52 UTC 2016 - i@marguerite.su + +- add patch: presage-0.9.1-doxygen-no-freesans.patch + * doxygen no longer ships with the FreeSans font + * used to suppress the annoying fontconfig output +- add BuildRequires ghostscript-fonts-std providing Helvetica, + default for doxygen, which is also smaller in size than + texlive-gnu-freefont-fonts that provides FreeSans + +------------------------------------------------------------------- +Fri Jun 17 15:07:19 UTC 2016 - i@marguerite.su + +- add patch: presage-0.9.1-gcc6.patch + * fix boo#985362 + * fix narrowing conversion from int to char inside {} + +------------------------------------------------------------------- +Fri Mar 4 08:32:12 UTC 2016 - bwiedemann@suse.com + +- Add reproducible.patch to make build-compare work + +------------------------------------------------------------------- +Sun Aug 23 13:15:28 UTC 2015 - i@marguerite.su + +- update version 0.9.1 + * see NEWS +- drop: presage-0.9-automake-1.14.patch +- drop: presage-0.9.0-automake_1.12_abuild.patch +- add: presage-0.9.1-automake-1.12.patch +- add: presage-0.9.1-automake-1.14.patch +- drop: presage-swig-3.0.patch,upstreamed + +------------------------------------------------------------------- +Mon Jan 26 13:35:56 UTC 2015 - dimstar@opensuse.org + +- Add presage-swig-3.0.patch: Fix build with SWIG 3.0. + +------------------------------------------------------------------- +Mon Oct 27 09:07:27 UTC 2014 - i@marguerite.su + +- fix build for factory + * add patch: presage-0.9-automake-1.14.patch + * automake 1.14 starts to check subdir-objects. + +------------------------------------------------------------------- +Tue Jun 10 16:31:45 UTC 2014 - i@marguerite.su + +- update version 0.9.beta20140216 + * see ChangeLog file +- drop patch: presage-0.8.9-automake_1.12_abuild.patch +- add patch: presage-0.9.0-automake_1.12_abuild.patch + +------------------------------------------------------------------- +Tue Sep 24 09:48:34 UTC 2013 - i@marguerite.su + +- update version 0.8.9 + * a minor bugfix release + * see Changelog and News for details + +------------------------------------------------------------------- +Wed Jul 3 02:23:36 UTC 2013 - i@marguerite.su + +- update version 0.8.9.beta20130208 + * see ChangeLog for details + +------------------------------------------------------------------- +Thu Sep 20 15:44:53 UTC 2012 - i@marguerite.su + +- fix build after autoreconf -fi using automake 1.12 + * presage_automake_1.12.abuild.patch + +------------------------------------------------------------------- +Wed Sep 19 04:39:01 UTC 2012 - i@marguerite.su + +- fix cmuclmtk command in arpa. + * patch1: presage_cmuclmtk.patch + * port old CMU-Statistical Language Modelling tools to its + successor CMU-Cambridge Statistical Language Modeling Toolkit v2 + (cmuclmtk) + +------------------------------------------------------------------- +Tue Sep 18 08:01:46 UTC 2012 - jzheng@suse.com + +- fix ncurses check flag +- fix fedora flag in spec and remove unnecessary if + +------------------------------------------------------------------- +Thu Sep 13 22:15:43 UTC 2012 - i@marguerite.su + +- support fedora builds. + +------------------------------------------------------------------- +Sun Jun 3 16:08:04 UTC 2012 - i@marguerite.su + +- initial version 0.8.8 + * see ChangeLog and News for details. + diff --git a/presage.spec b/presage.spec new file mode 100644 index 0000000..194ea01 --- /dev/null +++ b/presage.spec @@ -0,0 +1,375 @@ +# +# spec file +# +# Copyright (c) 2023 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%global sname presage +%if "%{flavor}" != "" +%global pname %{sname}-%{flavor} +%else +%global pname %{sname} +%endif + +Name: %{pname} +Version: 0.9.1 +Release: 0 +Summary: Intelligent predictive text entry platform (tools and demos) +License: GPL-2.0-only +Group: Productivity/Text/Utilities +URL: https://presage.sourceforge.net +Source: https://master.dl.sourceforge.net/project/%{sname}/%{sname}/%{version}/%{sname}-%{version}.tar.gz +# PATCH-FIX-UPSTREAM jzheng@suse.com - fix ncurese builds in openSUSE +Patch0: presage-0.8.9-ncurses_flag.patch +# PATCH-FIX-UPSTREAM i@marguerite.su - port to cmuclmtk +Patch1: presage-0.8.9-port_cmuclmtk.patch +# PATCH-FIX-UPSTREAM i@marguerite.su automake 1.12 abuild patch +Patch2: presage-0.9.1-automake-1.12.patch +# PATCH-FIX-UPSTREAM automake 1.14 starts to check subdir-objects +Patch3: presage-0.9.1-automake-1.14.patch +Patch4: reproducible.patch +# PATCH-FIX-UPSTREAM narrowing conversion from int to char inside {} +Patch5: presage-0.9.1-gcc6.patch +# PATCH-FIX-UPSTREAM doxygen no longer ships with the FreeSans font +Patch6: presage-0.9.1-doxygen-no-freesans.patch +Patch7: presage-buildcycle.diff +# PATCH-FIX-UPSTREAM port python binding to python3 +Patch8: presage-0.9.1-python3.patch +# PATCH-FIX-UPSTREAM fix ISO C++17 does not allow dynamic exception specifications +Patch9: presage-0.9.1-gcc11.patch +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: fdupes +BuildRequires: gcc-c++ +BuildRequires: libtool +%if "%{flavor}" == "doc" +# Documentation Start +BuildRequires: doxygen +BuildRequires: ghostscript-fonts-std +BuildRequires: graphviz +BuildRequires: graphviz-gd +BuildRequires: pkgconfig +# Documentation End +%else +BuildRequires: gtk2-devel +BuildRequires: gtk3-devel +BuildRequires: help2man +BuildRequires: libcmuclmtk-devel +BuildRequires: libtool +BuildRequires: ncurses-devel +BuildRequires: python3-atspi +BuildRequires: python3-devel +BuildRequires: python3-gobject-devel +BuildRequires: python3-xlib +BuildRequires: swig +%if 0%{?suse_version} +BuildRequires: dbus-1-glib-devel +BuildRequires: libcppunit-devel +BuildRequires: python3-dbus-python +BuildRequires: sqlite3-devel +BuildRequires: update-desktop-files +%else +BuildRequires: cppunit-devel +BuildRequires: dbus-glib-devel +BuildRequires: dbus-python-devel +BuildRequires: desktop-file-utils +BuildRequires: sqlite-devel +%endif +%endif + +%description +Presage is an intelligent predictive text entry platform. + +This package contains the tools required to generate custom statistical data used by the presage predictive text engine to generate predictions. + +This package also contains simple demonstration programs and simulator. + +%if "%{flavor}" == "" +%package -n libpresage-devel +Summary: Intelligent predictive text entry platform (development files) +Group: Development/Libraries/C and C++ +Requires: libpresage1 = %{version} + +%description -n libpresage-devel +Presage is an intelligent predictive text entry platform. + +This package contains development files. + +This package contains the header files needed to compile applications or shared objects that use libpresage. + +%package -n libpresage1 +Summary: Intelligent predictive text entry platform (shared library) +Group: System/Libraries +Requires: presage-data + +%description -n libpresage1 +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 shared library. + +%package -n presage-data +Summary: Intelligent predictive text entry platform (data files) +Group: System/Libraries +Provides: libpresage-data = %{version} +Obsoletes: libpresage-data < %{version} + +%description -n presage-data +Presage is an intelligent predictive text entry platform. + +This package contains the sample statistical data files and abbreviation files needed by presage. + +%package -n python3-presage +Summary: Intelligent predictive text entry platform (Python binding) +Group: Development/Languages/Python +Provides: python-presage = %{version}-%{release} +Obsoletes: python-presage < %{version}-%{release} + +%description -n python3-presage +Presage is an intelligent predictive text entry platform. + +This package provides the Python binding for libpresage. + +This package contains the Python extension module for libpresage. + +%package -n python3-dbus-presage +Summary: Intelligent predictive text entry platform (dbus service) +Group: Development/Languages/Python +Requires: python3-dbus-python +Requires: python3-presage +Provides: dbus-1-presage = %{version}-%{release} +Obsoletes: dbus-1-presage < %{version}-%{release} + +%description -n python3-dbus-presage +Presage is an intelligent predictive text entry platform. + +This package contains the presage D-Bus service. + +This package also contains a simple demonstration program that uses the D-Bus service. + +%package -n python3-presagemate +Summary: Universial predictive text companion +Group: Productivity/Text/Utilities +Requires: python3-atspi +Requires: python3-gobject +Requires: python3-presage +Requires: python3-xlib +Provides: python-presagemate = %{version}-%{release} +Obsoletes: python-presagemate < %{version}-%{release} +BuildArch: noarch + +%description -n python3-presagemate +Pypresagemate is a universal predictive text companion. Pypresagemate works alongside any AT-SPI aware application. The Assistive Technology Service Provider Interface (AT-SPI) is a toolkit-neutral way of providing accessibility facilities in applications. Pypresagemate works in the background by tracking what keystrokes are typed and displaying predictions in its window. When a prediction is selected, text is sent to the active application. + +%package -n gprompter +Summary: Intelligent predictive GTK+ text editor +Group: Productivity/Text/Editors + +%description -n gprompter +gprompter is a cross-platform predictive text editor, based on presage, the intelligent predictive text entry platform. + +gprompter displays predictions in a contextual pop-up box as each letter is typed. Predictions can be easily selected and inserted in the document. + +%package -n python3-pyprompter +Summary: Intelligent predictive wxPython text editor +Group: Productivity/Text/Editors +Requires: python3-presage +Requires: python3-wxPython +Provides: pyprompter = %{version}-%{release} +Obsoletes: pyprompter < %{version}-%{release} +BuildArch: noarch + +%description -n python3-pyprompter +This package contains the wxPython predictive text editor pyprompter. + +pyprompter is a cross-platform predictive text editor. + +pyprompter displays predictions in a contextual pop-up box as each letter is typed. Predictions can be easily selected and inserted in the document. + +%else + +%package -n libpresage-doc +Summary: Intelligent predictive text entry platform (documentation) +Group: Documentation/HTML +BuildArch: noarch + +%description -n libpresage-doc +Presage is an intelligent predictive text entry platform. + +This package contains the libpresage API Documentation in HTML format. +%endif + +%prep +%setup -q -n %{sname}-%{version} +find . -type f -exec sed -i 's/\r//g' "{}" \; +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 +%patch4 -p1 +%patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 +%patch9 -p1 +echo "[D-BUS Service]" > apps/dbus/org.gnome.presage.service.in +echo "Name=org.gnome.presage.beta" >> apps/dbus/org.gnome.presage.service.in +echo "Exec={bindir}/presage_dbus_service --start" >> apps/dbus/org.gnome.presage.service.in +echo "User=root" >> apps/dbus/org.gnome.presage.service.in + +%build +autoreconf -fi +%if "%{flavor}" == "doc" +# nl -ba ./configure +%configure --disable-sqlite --disable-gprompter --disable-gpresagemate --disable-python-binding +make -C doc %{?_smp_mflags} +%else +export LIBS+="-lm -lgmodule-2.0" +export PYTHON="/usr/bin/python3" +export CFLAGS="%{optflags} $(python3-config --includes)" +export CXXFLAGS="%{optflags} $(python3-config --includes)" +%configure +make %{?_smp_mflags} +%endif + +%install +%if "%{flavor}" == "doc" +make -C doc %{?_smp_mflags} DESTDIR=%{buildroot} install +%fdupes %{buildroot}/%{_datadir} + +%else +make %{?_smp_mflags} DESTDIR=%{buildroot} install + +rm -rf %{buildroot}%{_libdir}/*.a +find %{buildroot} -type f -name "*.la" -delete -print + +%if 0%{?suse_version} + +pushd %{buildroot}%{python3_sitelib}/prompter/ +%py3_compile -O . +popd +pushd %{buildroot}%{python3_sitearch}/ +%py3_compile -O . +popd + +sed -i -e '1 s#/usr/bin/env.*python#/usr/bin/python3#' %{buildroot}%{_bindir}/presage_dbus_* + +%suse_update_desktop_file gprompter Utility DesktopUtility +%suse_update_desktop_file pyprompter Utility DesktopUtility + +%fdupes %{buildroot}/%{_prefix} + +%else + +desktop-file-install --add-category="Utility" --delete-original --dir=%{buildroot}%{_datadir}/applications \ +%{buildroot}/%{_datadir}/applications/gprompter.desktop +desktop-file-install --add-category="Utility" --delete-original --dir=%{buildroot}%{_datadir}/applications \ +%{buildroot}/%{_datadir}/applications/pyprompter.desktop + +fdupes -n -q -r %{buildroot} + +%endif +%endif + +%if "%{flavor}" == "" +%post -n libpresage1 -p /sbin/ldconfig +%postun -n libpresage1 -p /sbin/ldconfig + +%files +%license COPYING +%doc AUTHORS ChangeLog NEWS README THANKS TODO +%{_bindir}/presage_demo +%{_bindir}/presage_demo_text +%{_mandir}/man1/presage_demo.1%{ext_man} +%{_bindir}/presage_simulator +%{_bindir}/text2ngram +%{_mandir}/man1/presage_demo_text.1%{ext_man} +%{_mandir}/man1/presage_simulator.1%{ext_man} +%{_mandir}/man1/text2ngram.1%{ext_man} + +%files -n python3-dbus-presage +%dir %{python3_sitelib}/__pycache__/ +%{_bindir}/presage_dbus_python_demo +%{_bindir}/presage_dbus_service +%{python3_sitelib}/presage_dbus_service.py +%{python3_sitelib}/__pycache__/presage_dbus_service.*.pyc +#%{python3_sitelib}/__pycache__/presage_dbus_service.*.pyo +%{_datadir}/dbus-1/services/org.gnome.presage.service +%{_mandir}/man1/presage_dbus_python_demo.1%{ext_man} +%{_mandir}/man1/presage_dbus_service.1%{ext_man} + +%files -n libpresage1 +%{_libdir}/libpresage.so.1 +%{_libdir}/libpresage.so.1.1.1 + +%files -n presage-data +%config %{_sysconfdir}/presage.xml +%{_datadir}/presage +#%exclude %{_datadir}/presage/html +%exclude %{_datadir}/presage/getting_started.txt +%exclude %{_datadir}/presage/python_binding.txt + +%files -n python3-presagemate +%{_bindir}/pypresagemate +%{python3_sitelib}/presagemate + +%files -n libpresage-devel +%{_includedir}/presageCallback.h +%{_includedir}/presageException.h +%{_includedir}/presage.h +%{_libdir}/libpresage.so + +%files -n python3-presage +%dir %{python3_sitearch}/__pycache__/ +%{_bindir}/presage_python_demo +%{python3_sitearch}/_presage*.so +%{python3_sitearch}/presage.py +%{python3_sitearch}/__pycache__/presage.*.pyc +%if 0%{?fedora} +%{python3_sitearch}/__pycache__/presage.*.pyo +%endif +%{_mandir}/man1/presage_python_demo.1%{ext_man} +%{python3_sitearch}/python_presage-0.9.1-py%{py3_ver}.egg-info + +%files -n python3-pyprompter +%{_bindir}/pyprompter +%{python3_sitelib}/prompter +%{python3_sitelib}/pyprompter-0.9.1-py%{py3_ver}.egg-info +%{_datadir}/applications/pyprompter.desktop +%{_datadir}/icons/hicolor/scalable/apps/pyprompter.svg +%{_mandir}/man1/pyprompter.1%{ext_man} +%{_datadir}/pixmaps/pyprompter.* + +%files -n gprompter +%{_bindir}/gprompter +%{_datadir}/applications/gprompter.desktop +%{_datadir}/icons/hicolor/scalable/apps/gprompter.svg +%{_mandir}/man1/gprompter.1%{ext_man} +%{_datadir}/pixmaps/gprompter.* + +%else + +%files -n libpresage-doc +%dir %{_datadir}/presage +%{_datadir}/presage/html/ +%{_datadir}/presage/getting_started.txt +%{_datadir}/presage/python_binding.txt +%endif + +%changelog diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..976e31f --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,13 @@ +Index: presage-0.9.1/doc/Doxyfile.in +=================================================================== +--- presage-0.9.1.orig/doc/Doxyfile.in ++++ presage-0.9.1/doc/Doxyfile.in +@@ -940,7 +940,7 @@ HTML_COLORSTYLE_GAMMA = 80 + # page will contain the date and time when the page was generated. Setting + # this to NO can help when comparing the output of multiple runs. + +-HTML_TIMESTAMP = YES ++HTML_TIMESTAMP = NO + + # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML + # documentation will contain sections that can be hidden and shown after the