Import Debian changes 3.8.3-1
apertium (3.8.3-1) unstable; urgency=medium
* Update to latest upstream
Tino Didriksen authored 1 year, 6 months ago
Tino Didriksen committed 1 year, 6 months ago
48 | 48 | } else { |
49 | 49 | tagAndPutSentence(out); |
50 | 50 | if (in.flush_()) { |
51 | out << '\0'; | |
52 | out.flush(); | |
51 | 53 | clearBuffers(); |
52 | 54 | } else { |
53 | 55 | break; |
1 | 1 | |
2 | 2 | m4_define([PKG_VERSION_MAJOR], [3]) |
3 | 3 | m4_define([PKG_VERSION_MINOR], [8]) |
4 | m4_define([PKG_VERSION_PATCH], [2]) | |
4 | m4_define([PKG_VERSION_PATCH], [3]) | |
5 | 5 | |
6 | 6 | # Bump if the ABI (not API) changed in a backwards-incompatible manner |
7 | 7 | m4_define([PKG_VERSION_ABI], [3]) |
67 | 67 | |
68 | 68 | AC_CHECK_FUNCS(strcasecmp) |
69 | 69 | |
70 | PKG_CHECK_MODULES(LTTOOLBOX, [lttoolbox >= 3.6.0], CPPFLAGS="$CPPFLAGS $LTTOOLBOX_CFLAGS"; LIBS="$LIBS $LTTOOLBOX_LIBS") | |
70 | PKG_CHECK_MODULES(LTTOOLBOX, [lttoolbox >= 3.7.1], CPPFLAGS="$CPPFLAGS $LTTOOLBOX_CFLAGS"; LIBS="$LIBS $LTTOOLBOX_LIBS") | |
71 | 71 | PKG_CHECK_MODULES(LIBXML2, [libxml-2.0 >= 2.6.17], CPPFLAGS="$CPPFLAGS $LIBXML2_CFLAGS"; LIBS="$LIBS $LIBXML2_LIBS") |
72 | 72 | PKG_CHECK_MODULES(ICU, [icu-i18n, icu-io, icu-uc], CPPFLAGS="$CPPFLAGS $ICU_CFLAGS"; LIBS="$LIBS $ICU_LIBS") |
73 | 73 | |
90 | 90 | #AS_IF([test x$version_type = xwindows], [AC_DEFINE(HAVE_GETOPT_LONG,0)], []) |
91 | 91 | |
92 | 92 | # Checks for highest supported C++ standard |
93 | for version in 23 2b 20 2a 17 1z 14 1y; do | |
93 | for version in 23 2b 20 2a 17; do | |
94 | 94 | version_flag="-std=c++${version}" |
95 | 95 | AX_CHECK_COMPILE_FLAG([${version_flag}], [break], [version_flag=none]) |
96 | 96 | done |
97 | 97 | AS_IF([test "$version_flag" == none], [ |
98 | AC_MSG_ERROR([Could not enable at least C++1y (C++14) - upgrade your compiler]) | |
98 | AC_MSG_ERROR([Could not enable at least C++17 - upgrade your compiler]) | |
99 | 99 | ]) |
100 | 100 | CXXFLAGS="$CXXFLAGS ${version_flag}" |
101 | 101 |
0 | apertium (3.8.3-1) unstable; urgency=medium | |
1 | ||
2 | * Update to latest upstream | |
3 | ||
4 | -- Tino Didriksen <tino@didriksen.cc> Tue, 01 Nov 2022 09:38:15 +0100 | |
5 | ||
0 | 6 | apertium (3.8.2-2) unstable; urgency=medium |
1 | 7 | |
2 | 8 | * Upload to unstable. |
13 | 13 | libutfcpp-dev, |
14 | 14 | libxml2-dev, |
15 | 15 | libxml2-utils, |
16 | lttoolbox-dev (>= 3.6.0), | |
16 | lttoolbox-dev (>= 3.7.1), | |
17 | 17 | pkg-config, |
18 | 18 | python3-dev, |
19 | 19 | python3-lxml, |
23 | 23 | xsltproc, |
24 | 24 | zip, |
25 | 25 | zipcmp |
26 | Standards-Version: 4.6.0.1 | |
26 | Standards-Version: 4.6.1 | |
27 | 27 | Homepage: https://apertium.org/ |
28 | 28 | Vcs-Git: https://salsa.debian.org/science-team/apertium.git |
29 | 29 | Vcs-Browser: https://salsa.debian.org/science-team/apertium |
34 | 34 | Depends: gawk, |
35 | 35 | libapertium3 (= ${binary:Version}), |
36 | 36 | libxml2-utils, |
37 | lttoolbox (>= 3.6.0), | |
37 | lttoolbox (>= 3.7.1), | |
38 | 38 | xsltproc, |
39 | 39 | ${misc:Depends}, |
40 | 40 | ${shlibs:Depends} |
86 | 86 | Architecture: any |
87 | 87 | Depends: apertium (= ${binary:Version}), |
88 | 88 | libxml2-dev, |
89 | lttoolbox-dev (>= 3.6.0), | |
89 | lttoolbox-dev (>= 3.7.1), | |
90 | 90 | ${misc:Depends}, |
91 | 91 | ${python3:Depends}, |
92 | 92 | ${shlibs:Depends} |
19 | 19 | find $(CURDIR) -type f -name '*.pyc' -exec rm -f '{}' \; |
20 | 20 | find $(CURDIR) -type f -name '*.pyo' -exec rm -f '{}' \; |
21 | 21 | find $(CURDIR) -type f -name '*.la' -exec rm -f '{}' \; |
22 | ||
23 | override_dh_missing: | |
24 | dh_missing --fail-missing |
Binary diff not shown
Binary diff not shown
7 | 7 | from os.path import join as pjoin |
8 | 8 | from os.path import abspath, dirname |
9 | 9 | from subprocess import check_call, Popen, PIPE, CalledProcessError |
10 | from sys import stderr | |
11 | ||
12 | ||
13 | import signal | |
10 | 14 | |
11 | 15 | |
12 | 16 | # Utilities |
377 | 381 | self.assertEqual('^아/아<noun>$\n', output) |
378 | 382 | stderr = open(stderrpath, 'r').read().strip() |
379 | 383 | self.assertEqual('', stderr) |
384 | ||
385 | class Alarm(Exception): | |
386 | pass | |
387 | ||
388 | class PerceptronNullFlushTest(unittest.TestCase): | |
389 | ||
390 | inputs = [ | |
391 | "^this/this<prn><dem><mf><sg>$ ^here/here<adv>$", | |
392 | "^is/be<vbser><pres><p3><sg>$ ^a/a<det><ind><sg>$", | |
393 | "^little/little<adj>/little<adv>$", | |
394 | "^flushing/*flushing$ ^test/test<n><sg>/test<vblex><inf>/test<vblex><pres>/test<vblex><imp>$" | |
395 | ] | |
396 | ||
397 | outputs = [ | |
398 | "^this<prn><dem><mf><sg>$ ^here<adv>$", | |
399 | "^be<vbser><pres><p3><sg>$ ^a<det><ind><sg>$", | |
400 | "^little<adv>$", | |
401 | "^*flushing$ ^test<n><sg>$" | |
402 | ] | |
403 | ||
404 | ||
405 | def alarmHandler(self, signum, frame): | |
406 | raise Alarm | |
407 | ||
408 | def withTimeout(self, seconds, cmd, *args, **kwds): | |
409 | signal.signal(signal.SIGALRM, self.alarmHandler) | |
410 | signal.alarm(seconds) | |
411 | ret = cmd(*args, **kwds) | |
412 | signal.alarm(0) # reset the alarm | |
413 | return ret | |
414 | ||
415 | def communicateFlush(self, string, process): | |
416 | if string: | |
417 | process.stdin.write(string.encode('utf-8')) | |
418 | process.stdin.write(b'\0') | |
419 | process.stdin.flush() | |
420 | ||
421 | output = [] | |
422 | char = None | |
423 | try: | |
424 | char = self.withTimeout(2, process.stdout.read, 1) | |
425 | except Alarm: | |
426 | print("Timeout before reading a single character!", file=stderr) | |
427 | while char and char != b'\0': | |
428 | output.append(char) | |
429 | try: | |
430 | char = self.withTimeout(2, process.stdout.read, 1) | |
431 | except Alarm: | |
432 | print("Timeout before reading %s chars" % len(output), | |
433 | file=stderr) | |
434 | break # send what we got up till now | |
435 | ||
436 | return b"".join(output).decode('utf-8').replace('\r\n', '\n') | |
437 | ||
438 | def test_null_flush(self): | |
439 | try: | |
440 | proc = Popen([APERTIUM_TAGGER, '-xg', '-z', "data/eng.prob"], | |
441 | stdin=PIPE, | |
442 | stdout=PIPE, | |
443 | stderr=PIPE) | |
444 | ||
445 | for inp, exp in zip(self.inputs, self.outputs): | |
446 | output = self.communicateFlush(inp+"[][\n]", proc) | |
447 | self.assertEqual(output, exp+"[][\n]") | |
448 | ||
449 | proc.communicate() # let it terminate | |
450 | proc.stdin.close() | |
451 | proc.stdout.close() | |
452 | proc.stderr.close() | |
453 | retCode = proc.poll() | |
454 | self.assertEqual(retCode, 0) | |
455 | ||
456 | finally: | |
457 | pass |