diff options
Diffstat (limited to 'dev-python/tlsh')
-rw-r--r-- | dev-python/tlsh/Manifest | 5 | ||||
-rw-r--r-- | dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch | 25 | ||||
-rw-r--r-- | dev-python/tlsh/tlsh-4.8.2-r1.ebuild (renamed from dev-python/tlsh/tlsh-4.8.2.ebuild) | 16 |
3 files changed, 34 insertions, 12 deletions
diff --git a/dev-python/tlsh/Manifest b/dev-python/tlsh/Manifest index 3671de15f029..c6b4b20c0401 100644 --- a/dev-python/tlsh/Manifest +++ b/dev-python/tlsh/Manifest @@ -1,4 +1,5 @@ +AUX tlsh-4.8.2-r1-py312.patch 776 BLAKE2B c5189ed9d7b902a2c6a88fd1fac1b1da2b9c8997acb7dbfbff550e66b16f969fcc7b39e370d6ed5cdb6d15515ba290fadbe30f52b2723fae9d0aee79c163d1d0 SHA512 ba1f37449a2a8a007bc1a83c2b4d1d0061c7a109207cac4220ab44c732690bb0bce0faf55b452e5c210eb621a5b3d6423f233d6d0716cf81df03de38ffeea513 AUX tlsh-4.8.2-setup-sources.patch 1029 BLAKE2B 6b1a252693940df0856361aa38553a6a684566c4ab80ac4e01b7151a611b5d27bd9065c5560e958931108399b9b860405ab4119615f8f6ab6f8d05e8ce2f4c89 SHA512 04fce865f3a7e73a9a6814596255f86eb1d24086372479ed993b7faa362973808d2d45f4d81506c1bf87bfc534caa410a0c8758250ccb3fa4337c0952610be5e -DIST tlsh-4.8.2.tar.gz 3345458 BLAKE2B 27d5eece16bb36225b9ae8b3d3a9d055a0f214fffae08a58c39211c3d918dd842497315a62237b291ee1055dfadad78826bbd24f7b9d88f510e9a31f74654039 SHA512 5355c7734f5356a3a7a31ccc078254835871fc0369f1889a34131a0f810735201c68f674eb18e975b6a03a32e5c284899ca9ffdc1f583e42192188c172d2aad0 -EBUILD tlsh-4.8.2.ebuild 824 BLAKE2B 7ae8ebc9d5e93ff68a4cb6e2e3098528877f158155f194c67aa2b478dd55ed91efdbbcd4123cdfe6ce98408c51d077c26ef0f56dbf852f9b07a18d95a580476e SHA512 6579172dbc43d0e8e20a692582b99ed22a422474fc081c6cedfe03e6e1e7dab76159c9c63018bef0f7ca0cfd1fadc4b681c7c753663acb5b9dea9bb1f555ca2d +DIST tlsh-4.8.2.gh.tar.gz 3345458 BLAKE2B 27d5eece16bb36225b9ae8b3d3a9d055a0f214fffae08a58c39211c3d918dd842497315a62237b291ee1055dfadad78826bbd24f7b9d88f510e9a31f74654039 SHA512 5355c7734f5356a3a7a31ccc078254835871fc0369f1889a34131a0f810735201c68f674eb18e975b6a03a32e5c284899ca9ffdc1f583e42192188c172d2aad0 +EBUILD tlsh-4.8.2-r1.ebuild 721 BLAKE2B 6497a990a9400c0ff5d55f833d6068b2270ec5ac0c3a5e51e78a576d20c3e248634844c44de585b31a0a8c57280963d0ab380e7fd5c69a2bb5532923772294ee SHA512 9e6f51226b2a7cf67ab6a78f79754bda98815e9da0c092f97b901df1130dfb1c50c1a9cca8ddaf172bef8772ece0a98e08e27560548d65075bca9b3708b4db4e MISC metadata.xml 520 BLAKE2B 97d64e94859345f4537e1a95dac94190cf54cf608cc851a8cdf24f5f4b71c0821c778d24f99fb076ed08247a085270d4c36aaa66583916c0a420733b7b8543be SHA512 95dc94ca2c08d71246453ccee139901e675ec84b2c4af224b90057270f4bf5494ffb761e2d3b4dff25cfcac47185d4f7d2f4b3080182f8c9526b746e99519211 diff --git a/dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch b/dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch new file mode 100644 index 000000000000..56c4766bd711 --- /dev/null +++ b/dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch @@ -0,0 +1,25 @@ +Use PyVarObject_HEAD_INIT instead PyObject_HEAD_INIT + +--- a/tlshmodule.cpp ++++ b/tlshmodule.cpp +@@ -59,7 +59,7 @@ + #include <Python.h> + #include <new> + #include <bytesobject.h> +-#include "tlsh.h" ++#include <tlsh/tlsh.h> + + // to generate the "T1" hashes introduced in TLSH 4.0.0 + // see 4.0.0 from 26/Mar/2020 at https://github.com/trendmicro/tlsh/blob/master/Change_History.md +@@ -286,10 +286,7 @@ static PyGetSetDef Tlsh_getsetters[] = { + }; + + static PyTypeObject tlsh_TlshType = { +- PyObject_HEAD_INIT(NULL) +-#if PY_MAJOR_VERSION < 3 +- 0, /* ob_size */ +-#endif ++ PyVarObject_HEAD_INIT(NULL, 0) + "tlsh.Tlsh", /* tp_name */ + sizeof(tlsh_TlshObject), /* tp_basicsize */ + 0, /* tp_itemsize */ diff --git a/dev-python/tlsh/tlsh-4.8.2.ebuild b/dev-python/tlsh/tlsh-4.8.2-r1.ebuild index 0973a0cbb0a7..1215717df97d 100644 --- a/dev-python/tlsh/tlsh-4.8.2.ebuild +++ b/dev-python/tlsh/tlsh-4.8.2-r1.ebuild @@ -1,34 +1,30 @@ -# Copyright 2022-2023 Gentoo Authors +# Copyright 2022-2024 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 DISTUTILS_USE_PEP517=setuptools -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) DISTUTILS_EXT=1 inherit distutils-r1 DESCRIPTION="Fuzzy matching library - C++ extension for Python" HOMEPAGE="https://pypi.org/project/python-tlsh/" -SRC_URI="https://github.com/trendmicro/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +SRC_URI="https://github.com/trendmicro/${PN}/archive/${PV}.tar.gz -> ${P}.gh.tar.gz" S=${WORKDIR}/${P}/py_ext LICENSE="|| ( Apache-2.0 BSD )" SLOT="0" -KEYWORDS="amd64 ~arm ~arm64 ~ia64 ~ppc64 x86" +KEYWORDS="amd64 ~arm ~arm64 ~ppc64 x86" DEPEND="dev-libs/tlsh" RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}"/${P}-setup-sources.patch + "${FILESDIR}"/${P}-r1-py312.patch ) -src_prepare() { - distutils-r1_src_prepare - sed -i -e 's:#include "tlsh.h":#include <tlsh/tlsh.h>:' tlshmodule.cpp || die -} - python_test() { - "${EPYTHON}" test.py test.py test.py &> /dev/null || die + ../Testing/python_test.sh "${EPYTHON}" || die } |