Codebase list apertium / 0fe56be
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
8 changed file(s) with 94 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
4848 } else {
4949 tagAndPutSentence(out);
5050 if (in.flush_()) {
51 out << '\0';
52 out.flush();
5153 clearBuffers();
5254 } else {
5355 break;
11
22 m4_define([PKG_VERSION_MAJOR], [3])
33 m4_define([PKG_VERSION_MINOR], [8])
4 m4_define([PKG_VERSION_PATCH], [2])
4 m4_define([PKG_VERSION_PATCH], [3])
55
66 # Bump if the ABI (not API) changed in a backwards-incompatible manner
77 m4_define([PKG_VERSION_ABI], [3])
6767
6868 AC_CHECK_FUNCS(strcasecmp)
6969
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")
7171 PKG_CHECK_MODULES(LIBXML2, [libxml-2.0 >= 2.6.17], CPPFLAGS="$CPPFLAGS $LIBXML2_CFLAGS"; LIBS="$LIBS $LIBXML2_LIBS")
7272 PKG_CHECK_MODULES(ICU, [icu-i18n, icu-io, icu-uc], CPPFLAGS="$CPPFLAGS $ICU_CFLAGS"; LIBS="$LIBS $ICU_LIBS")
7373
9090 #AS_IF([test x$version_type = xwindows], [AC_DEFINE(HAVE_GETOPT_LONG,0)], [])
9191
9292 # 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
9494 version_flag="-std=c++${version}"
9595 AX_CHECK_COMPILE_FLAG([${version_flag}], [break], [version_flag=none])
9696 done
9797 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])
9999 ])
100100 CXXFLAGS="$CXXFLAGS ${version_flag}"
101101
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
06 apertium (3.8.2-2) unstable; urgency=medium
17
28 * Upload to unstable.
1313 libutfcpp-dev,
1414 libxml2-dev,
1515 libxml2-utils,
16 lttoolbox-dev (>= 3.6.0),
16 lttoolbox-dev (>= 3.7.1),
1717 pkg-config,
1818 python3-dev,
1919 python3-lxml,
2323 xsltproc,
2424 zip,
2525 zipcmp
26 Standards-Version: 4.6.0.1
26 Standards-Version: 4.6.1
2727 Homepage: https://apertium.org/
2828 Vcs-Git: https://salsa.debian.org/science-team/apertium.git
2929 Vcs-Browser: https://salsa.debian.org/science-team/apertium
3434 Depends: gawk,
3535 libapertium3 (= ${binary:Version}),
3636 libxml2-utils,
37 lttoolbox (>= 3.6.0),
37 lttoolbox (>= 3.7.1),
3838 xsltproc,
3939 ${misc:Depends},
4040 ${shlibs:Depends}
8686 Architecture: any
8787 Depends: apertium (= ${binary:Version}),
8888 libxml2-dev,
89 lttoolbox-dev (>= 3.6.0),
89 lttoolbox-dev (>= 3.7.1),
9090 ${misc:Depends},
9191 ${python3:Depends},
9292 ${shlibs:Depends}
1919 find $(CURDIR) -type f -name '*.pyc' -exec rm -f '{}' \;
2020 find $(CURDIR) -type f -name '*.pyo' -exec rm -f '{}' \;
2121 find $(CURDIR) -type f -name '*.la' -exec rm -f '{}' \;
22
23 override_dh_missing:
24 dh_missing --fail-missing
Binary diff not shown
77 from os.path import join as pjoin
88 from os.path import abspath, dirname
99 from subprocess import check_call, Popen, PIPE, CalledProcessError
10 from sys import stderr
11
12
13 import signal
1014
1115
1216 # Utilities
377381 self.assertEqual('^아/아<noun>$\n', output)
378382 stderr = open(stderrpath, 'r').read().strip()
379383 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