From nobody Sun Dec 10 06:22:50 2023 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Snvty5qgqz53C9T; Sun, 10 Dec 2023 06:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Snvty536nz3W8g; Sun, 10 Dec 2023 06:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702189370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R0826E3PiwEeYuOQIA1df8xPsZSUwDHQAeXqck6JsbY=; b=IwB5lpeu8/6BP4pOXTXdxXGJwofRmAS9XI0Qn9yQcrdCSZd1PfJuS/EK+/fmXXw7OwPlG/ Q58m8fUPcpuuzCHO3W4LBJY8HIiF2jAYdUi5mZHzN5NgQteapavkdm1InyIfAYhx+JleHQ egEpGTGZkV4UpMgupcE1JMk0ziglxH3+xvxAp8A7sl/6/IAvSYuGtPBz2PC+UlMqq3+SKJ diJ6f8/4kGfvrK9QDS1A9j3IlXaffGdh/eddzIsCw21WQxYYgHysTcyOo2d5WTS1gzq6QF x84aVzb1kDEIXVMD9jE4IkGEq0ImDKwCyh1J9BQhZstOrE1fWtnXGNv/XwDO2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1702189370; a=rsa-sha256; cv=none; b=cBBmsH+WV9FVTUlJHHeotIndKdjeo2cXqhJqzT7GzRcdkaq+OBKQCGXjz3Rtb0PXM1nqXI 3yWAvD7I7BxL87OGxwknPeqzwvL5kD94ydi5SkNs2e69e9YlhJlIYgFa9qyxj1LEOdI2jV BSrVCKV6celnmZ7OaxtuA+RV87m2tleYBCtNqs6bFLfStTB0Uli5uaBEJE8UhLhG9vWX4W 26eU0f7MqAuKpTqQNbe7/9qrMwq6Bh/JYzfY/KrE8sm5FY2MbXhBXs0tEoi1RYQPojlJ0A Jh91tuURhYJlcYB+p93X2/PR2hjTkL/h7vEva1WPI5hncB9yJtGrPcBhpg0q5w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1702189370; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R0826E3PiwEeYuOQIA1df8xPsZSUwDHQAeXqck6JsbY=; b=RY6tgURmHrC9h17s+/ORQUj3Yp+QUloae2NIUtxI9foi5Pc7o4rnMxSCvW1eKZsAf0ynZu //OsBRI7yymeVq8c/Twavv1YiQVm+aZ85c30jXQdHBSfhUi/8+z+UzUPkZgg8lU7W5gIoB BMaUWaeFzd/6cJaYe2i631V1jhpWdogCg6Cl6mdmnJ+pjg3VdDcLU1epZsRCdZdfWumCx3 NjDSiH9VunP/LyabJd99kKCft9x/YdmB7kxG5SYJtOTKyj3yA0iD4WhaSBwTZrFf2r/5D1 +svxN0h3Tcb3lMzlqbCMTPwq/hIZwThm/QviJC5P9pCavEwagKqP17fFPnnkXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Snvty46KWzd9h; Sun, 10 Dec 2023 06:22:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3BA6Mo4R070318; Sun, 10 Dec 2023 06:22:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3BA6MolU070315; Sun, 10 Dec 2023 06:22:50 GMT (envelope-from git) Date: Sun, 10 Dec 2023 06:22:50 GMT Message-Id: <202312100622.3BA6MolU070315@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: "Jason E. Hale" Subject: git: a7e4468b0854 - main - devel/py-sip: Fix regressions in code generator List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhale X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7e4468b0854d2f6108c7a7868bd3a5bfe4472cb Auto-Submitted: auto-generated The branch main has been updated by jhale: URL: https://cgit.FreeBSD.org/ports/commit/?id=a7e4468b0854d2f6108c7a7868bd3a5bfe4472cb commit a7e4468b0854d2f6108c7a7868bd3a5bfe4472cb Author: Jason E. Hale AuthorDate: 2023-12-10 05:44:51 +0000 Commit: Jason E. Hale CommitDate: 2023-12-10 06:20:51 +0000 devel/py-sip: Fix regressions in code generator The code generator was ported from C to Python for version 6.8.0 and there were a few typos and bugs in it causing build failure of some ports like graphics/qgis. Reported by: rhurlin --- .../files/patch-sipbuild_generator_outputs_code.py | 73 ++++++++++++++++++++++ devel/py-sip/files/patch-sipbuild_project.py | 6 +- 2 files changed, 76 insertions(+), 3 deletions(-) diff --git a/devel/py-sip/files/patch-sipbuild_generator_outputs_code.py b/devel/py-sip/files/patch-sipbuild_generator_outputs_code.py new file mode 100644 index 000000000000..c0fbf4765ab7 --- /dev/null +++ b/devel/py-sip/files/patch-sipbuild_generator_outputs_code.py @@ -0,0 +1,73 @@ +Fix several regressions in the new code generator that was re-written in +Python. + +Includes upstream fixes: +https://www.riverbankcomputing.com/hg/sip/rev/67e0294b505c +https://www.riverbankcomputing.com/hg/sip/rev/4b98e8e43a1e +https://www.riverbankcomputing.com/hg/sip/rev/0d6692e9c295 +https://www.riverbankcomputing.com/hg/sip/rev/10b05deedee7 +https://www.riverbankcomputing.com/hg/sip/rev/2d6fa85ae3de +https://www.riverbankcomputing.com/hg/sip/rev/fc6f81078cc4 + +plus a missed space in a function declaration (first hunk). + +--- sipbuild/generator/outputs/code.py.orig 2023-11-30 12:14:32 UTC ++++ sipbuild/generator/outputs/code.py +@@ -521,7 +521,7 @@ f''' + sf.write( + f''' + +-void sipVEH_{module_name}_{virtual_error_handler.name}(sipSimpleWrapper *{self_name}, sip_gilstate_t{state_name}) ++void sipVEH_{module_name}_{virtual_error_handler.name}(sipSimpleWrapper *{self_name}, sip_gilstate_t {state_name}) + {{ + ''') + +@@ -4251,7 +4251,7 @@ def _call_default_ctor(spec, ctor): + + # Do what we can to provide type information to the compiler. + if arg.type is ArgumentType.CLASS and len(arg.derefs) > 0 and not arg.is_reference: +- class_type = fmt_argument_as_cpp_type(spec, arg.definition) ++ class_type = fmt_argument_as_cpp_type(spec, arg) + arg_s = f'static_cast<{class_type}>(0)' + elif arg.type is ArgumentType.ENUM: + enum_type = fmt_enum_as_cpp_type(arg.definition) +@@ -6177,7 +6177,7 @@ def _catch_block(sf, spec, exception, py_signature=Non + # with older versions of SIP. + exception_cpp_stripped = exception_fq_cpp_name.cpp_stripped(STRIP_GLOBAL) + +- sip_exception_ref = 'sipExceptionRef' if exception.class_exception is not None or _is_used_in_code(exception.raise_code) else '' ++ sip_exception_ref = 'sipExceptionRef' if exception.class_exception is not None or _is_used_in_code(exception.raise_code, 'sipExceptionRef') else '' + + sf.write( + f''' catch ({exception_cpp_stripped} &{sip_exception_ref}) +@@ -7593,10 +7593,10 @@ def _arg_parser(sf, spec, scope, py_signature, ctor=No + operator = '!=' + sip_value = 'sipValue' + +- parser_function = f'sipValue {operator} SIP_NULLPTR && sipParsePair(' ++ parser_function = f'sipValue {operator} SIP_NULLPTR && sipParsePair' + args.append('&sipParseErr') + args.append('sipName') +- args.append('sipValue') ++ args.append(sip_value) + + elif (overload is not None and overload.common.allow_keyword_args) or ctor is not None: + # We handle keywords if we might have been passed some (because one of +@@ -8013,7 +8013,7 @@ def _delete_temporaries(sf, spec, py_signature): + if spec.c_bindings or not arg.is_const: + sf.write(f' sipFree({arg_name});\n') + else: +- sf.write(f' sipFree(const_cast({arg_nr}));\n') ++ sf.write(f' sipFree(const_cast({arg_name}));\n') + + else: + convert_to_type_code = _get_convert_to_type_code(arg) +@@ -8408,7 +8408,7 @@ def _class_docstring(sf, spec, bindings, klass): + else: + is_first = True + +- if klass.docstring is None or klass.docstring.signature is not SocstringSignature.DISCARDED: ++ if klass.docstring is None or klass.docstring.signature is not DocstringSignature.DISCARDED: + for ctor in klass.ctors: + if ctor.access_specifier is AccessSpecifier.PRIVATE: + continue diff --git a/devel/py-sip/files/patch-sipbuild_project.py b/devel/py-sip/files/patch-sipbuild_project.py index 9af6252a0842..766224e23c2b 100644 --- a/devel/py-sip/files/patch-sipbuild_project.py +++ b/devel/py-sip/files/patch-sipbuild_project.py @@ -1,7 +1,7 @@ ---- sipbuild/project.py.orig 2021-02-25 12:33:48 UTC +--- sipbuild/project.py.orig 2023-11-30 12:14:32 UTC +++ sipbuild/project.py -@@ -335,9 +335,9 @@ class Project(AbstractProject, Configurable): - generator=None, wheel_tag=None): +@@ -387,9 +387,9 @@ class Project(AbstractProject, Configurable): + generator=None, wheel_tag=None, generator_version=None): """ Return a sequence of command line arguments to invoke sip-distinfo. """ -