Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package cg3 for openSUSE:Factory checked in 
at 2023-11-01 22:10:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cg3 (Old)
 and      /work/SRC/openSUSE:Factory/.cg3.new.17445 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cg3"

Wed Nov  1 22:10:38 2023 rev:6 rq:1121596 version:1.4.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/cg3/cg3.changes  2023-07-14 16:53:51.205581969 
+0200
+++ /work/SRC/openSUSE:Factory/.cg3.new.17445/cg3.changes       2023-11-01 
22:11:15.798518734 +0100
@@ -1,0 +2,6 @@
+Fri Aug  4 12:05:17 UTC 2023 - Jan Engelhardt <[email protected]>
+
+- Update to release 1.4.6
+  * Use FindPython instead of FindPythonInterp for CMake >= 3.12.0
+
+-------------------------------------------------------------------

Old:
----
  cg3-1.4.5.tar.bz2

New:
----
  cg3-1.4.6.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cg3.spec ++++++
--- /var/tmp/diff_new_pack.o0UaV4/_old  2023-11-01 22:11:16.202533701 +0100
+++ /var/tmp/diff_new_pack.o0UaV4/_new  2023-11-01 22:11:16.202533701 +0100
@@ -18,7 +18,7 @@
 
 Name:           cg3
 %define lname  libcg3-1
-Version:        1.4.5
+Version:        1.4.6
 Release:        0
 Summary:        VISL Constraint Grammar implementation
 License:        BSD-3-Clause AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT

++++++ cg3-1.4.5.tar.bz2 -> cg3-1.4.6.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cg3-1.4.5/manual/rules.xml 
new/cg3-1.4.6/manual/rules.xml
--- old/cg3-1.4.5/manual/rules.xml      2023-06-01 13:57:35.000000000 +0200
+++ new/cg3-1.4.6/manual/rules.xml      2023-08-04 12:35:23.000000000 +0200
@@ -643,7 +643,7 @@
       SETPARENT (det def) TO (1* (n)) ;
     </screen>
     <para>
-      Additionally, WITH creates magic sets _C1_ through _C9_ referring to the 
cohorts matched by the outer contextual tests. If _MARK_ is set, it will also 
be accessible to the inner rules. These sets are also accessible with the jump 
contextual positions jC1 through jC9 and jM.
+      Additionally, WITH creates magic sets _C1_ through _C9_ referring to the 
cohorts matched by the outer contextual tests. If _MARK_ is set, it will also 
be accessible to the inner rules. These sets are also accessible with the jump 
contextual positions jC1 through jC9 and jM. When using linked tests, the 
values of these magic sets can be controled with <link 
linkend="test-mark-with">the w contextual specifier</link>.
     </para>
     <screen>
       # the following input
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cg3-1.4.5/python/CMakeLists.txt 
new/cg3-1.4.6/python/CMakeLists.txt
--- old/cg3-1.4.5/python/CMakeLists.txt 2023-06-01 13:57:35.000000000 +0200
+++ new/cg3-1.4.6/python/CMakeLists.txt 2023-08-04 12:35:23.000000000 +0200
@@ -1,5 +1,10 @@
 find_package(SWIG 3.0 REQUIRED)
-find_package(PythonInterp 3.5 REQUIRED)
+if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.12.0")
+       find_package(Python 3.5 REQUIRED)
+       set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
+else()
+       find_package(PythonInterp 3.5 REQUIRED)
+endif()
 
 set(PYTHON_FILE "constraint_grammar.py")
 set(CPP_WRAP_FILE "constraint_grammar_wrap.cpp")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cg3-1.4.5/src/GrammarApplicator_runRules.cpp 
new/cg3-1.4.6/src/GrammarApplicator_runRules.cpp
--- old/cg3-1.4.5/src/GrammarApplicator_runRules.cpp    2023-06-01 
13:57:35.000000000 +0200
+++ new/cg3-1.4.6/src/GrammarApplicator_runRules.cpp    2023-08-04 
12:35:23.000000000 +0200
@@ -910,7 +910,7 @@
                        }
                };
 
-               auto add_cohort = [&](Cohort* cohort) {
+               auto add_cohort = [&](Cohort* cohort, int& spacesInAddedWf) {
                        Cohort* cCohort = alloc_cohort(&current);
                        cCohort->global_number = gWindow->cohort_counter++;
 
@@ -920,6 +920,10 @@
                        getTagList(*rule->maplist, theTags);
 
                        for (auto tter : *theTags) {
+                               if(tter->type & T_WORDFORM) {
+                                       spacesInAddedWf = 
std::count_if(tter->tag.begin(), tter->tag.end(),
+                                                                      
[](unsigned char c){ return c == ' '; });
+                                }
                                VARSTRINGIFY(tter);
                                if (tter->type & T_WORDFORM) {
                                        cCohort->wordform = tter;
@@ -1382,7 +1386,8 @@
                                index_ruleCohort_no.clear();
                                TRACE;
 
-                               auto cCohort = 
add_cohort(get_apply_to().cohort);
+                               int spacesInAddedWf = 0; // not used here
+                               auto cCohort = 
add_cohort(get_apply_to().cohort, spacesInAddedWf);
 
                                // If the new cohort is now the last cohort, 
add <<< to it and remove <<< from previous last cohort
                                if (current.cohorts.back() == cCohort) {
@@ -2045,13 +2050,20 @@
                                        }
                                }
 
-                               context_stack.back().target.cohort = 
add_cohort(merge_at);
+                               int spacesInAddedWf = 0;
+                               context_stack.back().target.cohort = 
add_cohort(merge_at, spacesInAddedWf);
 
                                for (auto c : withs) {
                                        if (!c->ignored_cohorts.empty()) {
                                                
get_apply_to().cohort->ignored_cohorts.insert(get_apply_to().cohort->ignored_cohorts.end(),
 c->ignored_cohorts.begin(), c->ignored_cohorts.end());
                                                c->ignored_cohorts.clear();
                                        }
+                                       size_t foundSpace = 
c->text.find_first_of(' ');
+                                       while(spacesInAddedWf && foundSpace != 
std::string::npos) {
+                                               c->text.erase(foundSpace, 1);
+                                               foundSpace = 
c->text.find_first_of(' ');
+                                               spacesInAddedWf--;
+                                       }
                                        rem_cohort(c);
                                }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cg3-1.4.5/src/version.hpp 
new/cg3-1.4.6/src/version.hpp
--- old/cg3-1.4.5/src/version.hpp       2023-06-01 13:57:35.000000000 +0200
+++ new/cg3-1.4.6/src/version.hpp       2023-08-04 12:35:23.000000000 +0200
@@ -27,7 +27,7 @@
 
 constexpr uint32_t CG3_VERSION_MAJOR = 1;
 constexpr uint32_t CG3_VERSION_MINOR = 4;
-constexpr uint32_t CG3_VERSION_PATCH = 5;
+constexpr uint32_t CG3_VERSION_PATCH = 6;
 constexpr uint32_t CG3_REVISION = 13897;
 constexpr uint32_t CG3_FEATURE_REV = 13897;
 constexpr uint32_t CG3_TOO_OLD = 10373;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cg3-1.4.5/test/Apertium/T_MergeCohorts/expected.txt 
new/cg3-1.4.6/test/Apertium/T_MergeCohorts/expected.txt
--- old/cg3-1.4.5/test/Apertium/T_MergeCohorts/expected.txt     1970-01-01 
01:00:00.000000000 +0100
+++ new/cg3-1.4.6/test/Apertium/T_MergeCohorts/expected.txt     2023-08-04 
12:35:23.000000000 +0200
@@ -0,0 +1 @@
+^Aa Bb/Aa Bb<cgguess><np><ant>$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cg3-1.4.5/test/Apertium/T_MergeCohorts/grammar.cg3 
new/cg3-1.4.6/test/Apertium/T_MergeCohorts/grammar.cg3
--- old/cg3-1.4.5/test/Apertium/T_MergeCohorts/grammar.cg3      1970-01-01 
01:00:00.000000000 +0100
+++ new/cg3-1.4.6/test/Apertium/T_MergeCohorts/grammar.cg3      2023-08-04 
12:35:23.000000000 +0200
@@ -0,0 +1,14 @@
+DELIMITERS = "." ;
+
+LIST wf = "<(\\p{Lu}\\p{L}+)>"r ;
+LIST bf = "(\\p{Lu}\\p{L}+)"r ;
+LIST ln = (np cog) ;
+LIST mn = (np ant) (np cog) ;
+
+AFTER-SECTIONS                  # only run once
+
+MERGECOHORTS ("<$1 $3>"v "$2 $4"v cgguess *)
+                     wf + bf + mn
+          WITH
+                  (1 wf + bf + ln)
+;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cg3-1.4.5/test/Apertium/T_MergeCohorts/input.txt 
new/cg3-1.4.6/test/Apertium/T_MergeCohorts/input.txt
--- old/cg3-1.4.5/test/Apertium/T_MergeCohorts/input.txt        1970-01-01 
01:00:00.000000000 +0100
+++ new/cg3-1.4.6/test/Apertium/T_MergeCohorts/input.txt        2023-08-04 
12:35:23.000000000 +0200
@@ -0,0 +1 @@
+^Aa/Aa<np><ant>$ ^Bb/Bb<np><cog><Aa><@app>$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cg3-1.4.5/test/Apertium/T_MergeCohorts/run.pl 
new/cg3-1.4.6/test/Apertium/T_MergeCohorts/run.pl
--- old/cg3-1.4.5/test/Apertium/T_MergeCohorts/run.pl   1970-01-01 
01:00:00.000000000 +0100
+++ new/cg3-1.4.6/test/Apertium/T_MergeCohorts/run.pl   2023-08-04 
12:35:23.000000000 +0200
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+use strict;
+use warnings;
+use Cwd qw(realpath);
+
+my ($bindir, $sep) = $0 =~ /^(.*)(\\|\/).*/;
+$bindir = realpath $bindir;
+chdir $bindir or die("Error: Could not change directory to $bindir !");
+
+my $bpath = $ARGV[0];
+my $binary = $bpath."cg-proc";
+my $compiler = $bpath."cg-comp";
+
+`"$compiler" grammar.cg3 grammar.bin  >stdout.txt 2>stderr.txt`;
+`"$binary" -d grammar.bin  input.txt output.txt >>stdout.txt 2>>stderr.txt`;
+`diff -B expected.txt output.txt >diff.txt`;
+
+if (-s "diff.txt") {
+       print STDERR "Fail\n";
+} else {
+       print STDERR "Success\n";
+}

Reply via email to