git: cb604c256040 - main - lang/seed7: update to 05_20230529

From: Pietro Cerutti <gahr_at_FreeBSD.org>
Date: Thu, 01 Jun 2023 13:59:31 UTC
The branch main has been updated by gahr:

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

commit cb604c2560409515ec7de5c155a5a94daec629f2
Author:     Pietro Cerutti <gahr@FreeBSD.org>
AuthorDate: 2023-06-01 13:33:41 +0000
Commit:     Pietro Cerutti <gahr@FreeBSD.org>
CommitDate: 2023-06-01 13:59:29 +0000

    lang/seed7: update to 05_20230529
    
    20230529:
    - The FAQ concerning break and continue has been improved.
    - Chapters about assignment and constants have been added to the
      tutorial, which is part of the manual. A description of the function
      fraction() has been added to the chapter about predefined types.
    - The new library archive_base.s7i has been added. This library
      defines common functions for file archives. It currently defines the
      function readDir() which is used by the archive libraries ar.s7i,
      cpio.s7i, rpm.s7i, tar.s7i and zip.s7i.
    - In the zip.s7i library the function readDir() has been improved to
      work for absolute paths (by calling readDir() from archive_base.s7i).
    - Several improvements have been made in the rpm.s7i library:
      - The signature section digests are checked when the RPM file is
        opened.
      - The payload digests are only checked if the payload is used.
      - Provided and required dependencies are read when the RPM file is
        opened.
    - The compiler (s7c.sd7) has been improved:
      - It recognizes if an array index access would always raise
        INDEX_ERROR. This is done for a constant array and with the range
        of possible index values.
      - The optimization of the floating point power operator with an
        integer exponent has been improved. There are cases where the base
        is constant, and the range of possible exponents allows a
        simplification.
      - The optimization of the floating point left and right shift
        operators has been improved. It considers cases where the number
        that needs to be shifted is constant and cases where nothing is
        constant. In both situations the range of possible shift amounts
        allows simplifications.
      - The optimization of A * B ** C with A and B float and C integer,
        has been improved. This considers cases where B is a power of two
        and the range of possible exponents C allows a simplification.
      - It is recognized if the integer left shift operator would always
        raise OVERFLOW_ERROR. Depending on the range of possible values
        for the shift amount and the value to be shifted, this optimization
        is made.
      - The number of checks for OVERFLOW_ERROR and NUMERIC_ERROR of the
        integer power operator has been reduced. Depending on the range of
        possible values for base and exponent, some checks can be omitted.
      - Now the range of possible integer values is determined for the
        expression ord(aBigInteger mod 2_ ** n).
      - Now the range of possible integer values is determined for the
        length of a sub-string.
      - The generated code for 'elsif FALSE then end if' as been fixed.
      - String index checks are optimized away if the range of possible
        index values always remains inside a constant string.
      - Computing the length of a fixLen substring has been optimized
        (e.g.: length(aString[A fixLen B]) will always return B).
      - The optimization of the string length function has been changed to
        sum up the length of the components as integers.
    - The test suite has been improved to increase the code coverage of the
      compiler.
    - Tests for array assignment, array length and array index access have
      been added to chkarr.sd7.
    - Tests of the optimization of expressions like ord((A + B) mod C)
      (the modulus of a bigInteger sum converted to an integer) have been
      added.
    - Several tests have been added to chkflt.sd7:
      - Tests for float left shift (<<).
      - Tests for float right shift (>>).
      - Tests for float ** integer.
      - Tests for the A * B ** C optimization.
      - Tests for float ** float.
      - The tests for decompose() have been improved.
      - Tests for ceil(), floor() and trigonometric functions have been
        added.
    - Tests for the power operator (**) and for the integer >>:= operator
      have been added to chkint.sd7.
    - Tests for the overflow of shift left (<<) and for the power operator
      (**) have been added to chkovf.sd7.
    - Tests for string head have been added to chkidx.sd7.
    - Tests for empty if-, while- and repeat-statements have been added to
      chkprc.sd7.
    - Tests for card(), rand() and assignment have been added to
      chkset.sd7.
    - Several tests have been added to chkstr.sd7:
      - Tests for string length.
      - Tests for string index access.
      - Tests for the string head function.
      - Tests for string concatenation.
      - Tests for string assignment.
    - The phrase "works correct" has been replaced with "works correctly"
      in the files chk_all.sd7, chkarr.sd7, chkbig.sd7, chkbin.sd7,
      chkbigdata.sd7, chkbool.sd7, chkbst.sd7, chkchr.sd7, chkcmd.sd7,
      chkexc.sd7, chkfil.sd7, chkflt.sd7, chkhsh.sd7, chkidx.sd7,
      chkint.sd7, chkovf.sd7, chkprc.sd7, chkset.sd7 and chkstr.sd7.
    - The value STMT_BLOCK_IN_PARENTHESES_OK has been added to confval.sd7.
    - The initialization of local variables and constants with a single
      local value has been fixed (in dcllib.c).
    - In flt_rtl.c the function fltLdexp() has been improved to work
      correctly for infinity, even if ldexp() does not.
    - The program chkccomp.c has been improved to determine
      LDEXP_OF_INFINITY_OKAY (which defines if ldexp() works for infinity).
    - Documentation comments have been improved in null_file.s7i.
    
    20230422:
    - The compiler option -S to specify the stack size has been added.
      Many thanks to Bruce Axtens for pointing out problems with the
      Ackermann function at RosettaCode. This triggered the -S improvement.
    - Many thanks to Bruce Axtens for adding Seed7 to the Exercism project.
      Discussions about that resulted in several improvements:
      - Now call-by-name parameters can be specified with 'in' and 'ref'.
      - Support for syntax statements without $ (dollar) has been added.
      - The error message for an unspecified kind of in-parameter has been
        improved.
    - Many thanks to Gary Chike for pointing out problems:
      - The RosettaCode example "Convert decimal number to rational" did
        not work correct. To fix that, the function fraction(), which gets
        a fraction as string (e.g. "1/3"), has been added to bigrat.s7i and
        rational.s7i.
      - Mac OS 13.2.1 had permission problems when installing Seed7. The
        copying of manual pages failed. In mk_osx.mak and mk_osxcl.mak, the
        copying of the s7 and s7c manual pages to /usr/share/man/man1 has
        been changed to allow a failure.
      - On some computers, vim syntax highlighting is turned off by
        default. The FAQ has been improved to describe the steps for
        enabling vim syntax highlighting.
    - Explanations about design principles, compiler options, syntax
      highlighting, forward declarations, function overloading, function
      declarations and declaring break/continue statements have been
      added or improved in the FAQ.
    - Chapters about function declarations and overloading have been
      added to the tutorial (part of the manual).
    - In the manual the chapters about types, parameters and expressions
      have been improved.
    - In seed7_05.s7i the function literal() has been defined for
      enumeration types.
    - The files panic.sd7, wiz.sd7, savehd7.sd7, cards.s7i, sql_base.s7i
      and boolean.s7i have been changed to use the new function literal().
    - Support for the ternary operator ?: has been added for enumerations
      and for the types 'type' and 'category'.
    - The compiler (s7c.sd7) has been improved:
      - At several places the function integerLiteral() is used instead of
        str() to create integer literals.
      - Assignments to temp variables in inline functions have been fixed.
        This allows: float parse ("0." & "0" mult 307 & "1")
      - If-statements are used in overflow checks for the operators +:=,
        -:=, *:=, <<:= and >>:=.
      - Generated temporary variables have been renamed in int_act.s7i.
      - The code of the factorial function has been optimized.
      - Support for the action ENU_LIT has been added.
      - The action ENU_LIT has been added to the list of special actions.
      - Allocated result data of inlined special actions is now freed.
      - Now integer comparisons are checked with -oc3 if they can be
        computed at compile time. With -w2, a warning is written if this
        is the case.
      - The compiler option -S to specify the stack size has been added.
    - In zip.s7i the function fileMode() has been fixed to work for short
      file names.
    - The test program chkflt.sd7 has been improved to have detailed error
      messages. Tests for converting between floats to strings in both
      directions have been added as well.
    - Definitions of LINKER_OPT_STACK_SIZE and DEFAULT_STACK_SIZE have been
      added to cc_conf.s7i. The file cmd_rtl.c and the program confval.sd7
      have been adjusted accordingly.
    - The interpreter has been improved to support the actions DCL_SYNTAX,
      ENU_LIT and PRC_BEGIN_NOOP.
    - Support for empty func ... end func constructs has been added.
    - The error messages "Syntax declared twice", "Associativity expected",
      "Dot expression expected" and "Integer literal expected" have been
      improved in error.c.
    - The functions err_expr_type() and err_expr_obj_stri() have been added
      to error.c.
    - In fil_rtl.c the function filClose() has been improved to work
      correctly if fclose() fails after a previous error.
    - In flt_rtl.c the function fltParse() has been improved to consider
      STRTOD_ACCEPTS_INF, STRTOD_ACCEPTS_INFINITY, STRTOD_ACCEPTS_NAN and
      STRTOD_ACCEPTS_SIGN_WITHOUT_DIGITS.
    - In gkb_win.c definitions of XBUTTON1, XBUTTON2, WM_MOUSEWHEEL,
      GET_WHEEL_DELTA_WPARAM, VK_OEM_PLUS, VK_OEM_MINUS and VK_OEM_1 to
      VK_OEM_8 are added if they are not present in the include files.
    - In heaputl.c the function setupStack() has been improved to have the
      requested stack size as a parameter.
    - In os_decls.h the definition of safe_fileno() has been improved to
      use os_fileno() instead of fileno().
    - Functions for X11 selection (cut and paste) have been added to
      fwd_x11.c and x11_x.h.
    - In pcs_unx.c and pcs_win.c the function pcsPipe2() has been improved
      to leave *childStdin and *childStdout unchanged if the corresponding
      call of os_fdopen() fails.
    - The function prc_begin_noop() has been added to prclib.c.
    - In soc_rtl.c the functions socInetAddr(), socInetLocalAddr() and
      socInetServAddr() have been improved to set 'result' to NULL if
      ai_addrlen is negative.
    - The function prot_dot_expr() has been added to traceutl.c. This
      function is used to write the error message SYNTAX_DECLARED_TWICE.
    - The program chkccomp.c has been improved to determine
      STRTOD_ACCEPTS_SIGN_WITHOUT_DIGITS, STRTOD_ACCEPTS_INF,
      STRTOD_ACCEPTS_INFINITY, STRTOD_ACCEPTS_NAN,
      OS_GETCWD_INCLUDE_DIRECT_H, OS_OPENDIR_INCLUDE_DIRECT_H and
      FCLOSE_FAILS_AFTER_PREVIOUS_ERROR. The computation of
      FLOAT_NAN_COMPARISON_OKAY has been improved.
    - In chkccomp.c recent PostgreSQL versions are considered now.
    - In cmd_rtl.c and dir_drv.h the file direct.h is now conditionally
      included depending on OS_GETCWD_INCLUDE_DIRECT_H respectivily
      OS_OPENDIR_INCLUDE_DIRECT_H.
    - Includes of stdlib.h have been added to literal.c, sql_rtl.c,
      syvarutl.c and tim_rtl.c.
    - The makefiles mk_bcc32.mak, mk_bccv5.mak, mk_clangw.mak, mk_cygw.mak,
      mk_mingc.mak, mk_mingw.mak, mk_msvc.mak, mk_msys.mak, mk_nmake.mak
      and mk_tcc_w.mak have been improved to define DEFAULT_STACK_SIZE and
      LINKER_OPT_STACK_SIZE.
    - Documentation comments have been added to float.s7i and rational.s7i.
---
 lang/seed7/Makefile            |  2 +-
 lang/seed7/distinfo            |  6 +++---
 lang/seed7/files/patch-9654fd6 | 35 +++++++++++++++++++++++++++++++++++
 lang/seed7/pkg-plist           |  1 +
 4 files changed, 40 insertions(+), 4 deletions(-)

diff --git a/lang/seed7/Makefile b/lang/seed7/Makefile
index 6218f1fa22b1..121483d6e57d 100644
--- a/lang/seed7/Makefile
+++ b/lang/seed7/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	seed7
-DISTVERSION=	05_20230305
+DISTVERSION=	05_20230529
 PORTREVISION=	0
 CATEGORIES=	lang
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${DISTNAME}/
diff --git a/lang/seed7/distinfo b/lang/seed7/distinfo
index 5c035ea2a7de..f14e36baa1f5 100644
--- a/lang/seed7/distinfo
+++ b/lang/seed7/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1680168651
-SHA256 (seed7_05_20230305.tgz) = 429af725ca54ce98a8c56a04e30c93e1620996ff5c8293ab1d4a6d72f955f299
-SIZE (seed7_05_20230305.tgz) = 3907256
+TIMESTAMP = 1685534550
+SHA256 (seed7_05_20230529.tgz) = 09ba3604bde9b1cbc06fbafa9917269fe1bcf927479f21ee789c26471a982ed1
+SIZE (seed7_05_20230529.tgz) = 3966570
diff --git a/lang/seed7/files/patch-9654fd6 b/lang/seed7/files/patch-9654fd6
new file mode 100644
index 000000000000..1138575a9cc1
--- /dev/null
+++ b/lang/seed7/files/patch-9654fd6
@@ -0,0 +1,35 @@
+From 9654fd670035297f239284013f38a3032e5a392c Mon Sep 17 00:00:00 2001
+From: Thomas Mertes <thomas.mertes@gmx.at>
+Date: Thu, 1 Jun 2023 12:46:17 +0200
+Subject: [PATCH] Fix issue with clang compiling chkarr
+
+---
+ ../lib/comp/arr_act.s7i | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git ../lib/comp/arr_act.s7i.orig ../lib/comp/arr_act.s7i
+index b393c9c2..206e4a0d 100644
+--- ../lib/comp/arr_act.s7i.orig
++++ ../lib/comp/arr_act.s7i
+@@ -448,7 +448,9 @@ const proc: process_const_arr_idx (in reference: function, in reference: anArray
+       index_value := getValue(evaluatedParam, integer);
+       if index_value < arrayMinIdx(anArray) or index_value > arrayMaxIdx(anArray) then
+         warning(DOES_RAISE, "INDEX_ERROR", c_expr);
+-        c_expr.expr &:= intRaiseError("INDEX_ERROR");
++        c_expr.expr &:= "(";
++        c_expr.expr &:= type_name(resultType(getType(function)));
++        c_expr.expr &:= ")(raiseError(INDEX_ERROR), 0)";
+       else
+         c_expr.expr &:= "arr[";
+         c_expr.expr &:= str(const_table[anArray]);
+@@ -462,7 +464,9 @@ const proc: process_const_arr_idx (in reference: function, in reference: anArray
+       if indexRange.maxValue < arrayMinIdx(anArray) or
+           indexRange.minValue > arrayMaxIdx(anArray) then
+         warning(DOES_RAISE, "INDEX_ERROR", c_expr);
+-        c_expr.expr &:= intRaiseError("INDEX_ERROR");
++        c_expr.expr &:= "(";
++        c_expr.expr &:= type_name(resultType(getType(function)));
++        c_expr.expr &:= ")(raiseError(INDEX_ERROR), 0)";
+       else
+         c_expr.expr &:= "arr[";
+         c_expr.expr &:= str(const_table[anArray]);
diff --git a/lang/seed7/pkg-plist b/lang/seed7/pkg-plist
index 286beb7cad8e..023eaf42b3d5 100644
--- a/lang/seed7/pkg-plist
+++ b/lang/seed7/pkg-plist
@@ -11,6 +11,7 @@ lib/seed7/bin/seed7_05.a
 lib/seed7/lib/aes.s7i
 lib/seed7/lib/ar.s7i
 lib/seed7/lib/arc4.s7i
+lib/seed7/lib/archive_base.s7i
 lib/seed7/lib/array.s7i
 lib/seed7/lib/asn1.s7i
 lib/seed7/lib/bigfile.s7i