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,31 +1,31 @@ PORTNAME= xmlsec DISTVERSION= 1.3.13 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} MAINTAINER= bofh@FreeBSD.org COMMENT= Python bindings for XML Security Library WWW= https://github.com/mehcode/python-xmlsec/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}lxml>=3.8.0:devel/py-lxml@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pkgconfig>=0:devel/py-pkgconfig@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}setuptools_scm>0:devel/py-setuptools_scm@${PY_FLAVOR} LIB_DEPENDS= libltdl.so:devel/libltdl \ libxmlsec1-openssl.so:security/xmlsec1 TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}hypothesis>0:devel/py-hypothesis@${PY_FLAVOR} USES= gnome pkgconfig pytest python USE_GNOME= libxml2 libxslt USE_PYTHON= autoplist distutils flavors INSTALL_TARGET= install-strip post-install: @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/xmlsec*.so .include 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 + #include + ++// 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]