git: 509b5d8644a7 - main - security/py-xmlsec: unbreak build with xmlsec1-1.3.2 (+)

From: Dima Panov <fluffy_at_FreeBSD.org>
Date: Tue, 13 Feb 2024 15:50:54 UTC
The branch main has been updated by fluffy:

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

commit 509b5d8644a76b8b872b74f9a946e61d9d92f90e
Author:     Dima Panov <fluffy@FreeBSD.org>
AuthorDate: 2024-02-13 15:39:27 +0000
Commit:     Dima Panov <fluffy@FreeBSD.org>
CommitDate: 2024-02-13 15:39:27 +0000

    security/py-xmlsec: unbreak build with xmlsec1-1.3.2 (+)
    
    With hat:       office
---
 security/py-xmlsec/Makefile                             |  2 +-
 security/py-xmlsec/files/patch-src_constants.c          | 11 +++++++++++
 security/py-xmlsec/files/patch-src_enc.c                | 14 ++++++++++++++
 security/py-xmlsec/files/patch-src_xmlsec_constants.pyi | 11 +++++++++++
 4 files changed, 37 insertions(+), 1 deletion(-)

diff --git a/security/py-xmlsec/Makefile b/security/py-xmlsec/Makefile
index 2c03a2c72c82..14e68043b4ce 100644
--- a/security/py-xmlsec/Makefile
+++ b/security/py-xmlsec/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xmlsec
 DISTVERSION=	1.3.13
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security python
 MASTER_SITES=	PYPI
 PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
diff --git a/security/py-xmlsec/files/patch-src_constants.c b/security/py-xmlsec/files/patch-src_constants.c
new file mode 100644
index 000000000000..9acf7084e1ac
--- /dev/null
+++ b/security/py-xmlsec/files/patch-src_constants.c
@@ -0,0 +1,11 @@
+--- src/constants.c.orig	2022-08-20 20:42:41 UTC
++++ src/constants.c
+@@ -316,8 +316,6 @@ int PyXmlSec_ConstantsModule_Init(PyObject* package) {
+     PYXMLSEC_ADD_NS_CONSTANT(XPathNs, "XPATH");
+     PYXMLSEC_ADD_NS_CONSTANT(XPath2Ns, "XPATH2");
+     PYXMLSEC_ADD_NS_CONSTANT(XPointerNs, "XPOINTER");
+-    PYXMLSEC_ADD_NS_CONSTANT(Soap11Ns, "SOAP11");
+-    PYXMLSEC_ADD_NS_CONSTANT(Soap12Ns, "SOAP12");
+     PYXMLSEC_ADD_NS_CONSTANT(NsExcC14N, "EXC_C14N");
+     PYXMLSEC_ADD_NS_CONSTANT(NsExcC14NWithComments, "EXC_C14N_WITH_COMMENT");
+ 
diff --git a/security/py-xmlsec/files/patch-src_enc.c b/security/py-xmlsec/files/patch-src_enc.c
new file mode 100644
index 000000000000..b0efb44c9329
--- /dev/null
+++ b/security/py-xmlsec/files/patch-src_enc.c
@@ -0,0 +1,14 @@
+--- src/enc.c.orig	2023-12-13 20:01:11 UTC
++++ src/enc.c
+@@ -17,6 +17,11 @@
+ #include <xmlsec/xmlenc.h>
+ #include <xmlsec/xmltree.h>
+ 
++// Backwards compatibility with xmlsec 1.2
++#ifndef XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH
++#define XMLSEC_KEYINFO_FLAGS_LAX_KEY_SEARCH 0x00008000
++#endif
++
+ typedef struct {
+     PyObject_HEAD
+     xmlSecEncCtxPtr handle;
diff --git a/security/py-xmlsec/files/patch-src_xmlsec_constants.pyi b/security/py-xmlsec/files/patch-src_xmlsec_constants.pyi
new file mode 100644
index 000000000000..ad8f4f06a8f4
--- /dev/null
+++ b/security/py-xmlsec/files/patch-src_xmlsec_constants.pyi
@@ -0,0 +1,11 @@
+--- src/xmlsec/constants.pyi.orig	2022-08-20 20:42:41 UTC
++++ src/xmlsec/constants.pyi
+@@ -85,8 +85,6 @@ NsExcC14NWithComments: Final[str]
+ Ns: Final[str]
+ NsExcC14N: Final[str]
+ NsExcC14NWithComments: Final[str]
+-Soap11Ns: Final[str]
+-Soap12Ns: Final[str]
+ TransformAes128Cbc: Final[__Transform]
+ TransformAes128Gcm: Final[__Transform]
+ TransformAes192Cbc: Final[__Transform]