From a3bb28551df94028000fb72308a9e9baa01458b0 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Mon, 3 Jun 2024 00:07:26 +0100 Subject: gentoo auto-resync : 03:06:2024 - 00:07:25 --- dev-python/tlsh/Manifest | 3 +++ dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch | 25 +++++++++++++++++++++ dev-python/tlsh/tlsh-4.8.2-r1.ebuild | 30 +++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch create mode 100644 dev-python/tlsh/tlsh-4.8.2-r1.ebuild (limited to 'dev-python/tlsh') diff --git a/dev-python/tlsh/Manifest b/dev-python/tlsh/Manifest index 3671de15f029..6fa60bc1b845 100644 --- a/dev-python/tlsh/Manifest +++ b/dev-python/tlsh/Manifest @@ -1,4 +1,7 @@ +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.gh.tar.gz 3345458 BLAKE2B 27d5eece16bb36225b9ae8b3d3a9d055a0f214fffae08a58c39211c3d918dd842497315a62237b291ee1055dfadad78826bbd24f7b9d88f510e9a31f74654039 SHA512 5355c7734f5356a3a7a31ccc078254835871fc0369f1889a34131a0f810735201c68f674eb18e975b6a03a32e5c284899ca9ffdc1f583e42192188c172d2aad0 DIST tlsh-4.8.2.tar.gz 3345458 BLAKE2B 27d5eece16bb36225b9ae8b3d3a9d055a0f214fffae08a58c39211c3d918dd842497315a62237b291ee1055dfadad78826bbd24f7b9d88f510e9a31f74654039 SHA512 5355c7734f5356a3a7a31ccc078254835871fc0369f1889a34131a0f810735201c68f674eb18e975b6a03a32e5c284899ca9ffdc1f583e42192188c172d2aad0 +EBUILD tlsh-4.8.2-r1.ebuild 740 BLAKE2B ae7a53b61fffbf7a8b27df9adca68c728c81bbb84f95a311c14c58c8ce91ce7a64e1c563c863a65014323f264b46443abc2f2595509af8858fbc05fb55316925 SHA512 d6bf9dded0002408716b6370ec00e6ef233573ec4af5c9a8c4d1a7b6aa29bdc51aa1755961e781bd994eb68992cb05a641a094beb162d1856f675a0f9895c322 EBUILD tlsh-4.8.2.ebuild 824 BLAKE2B 7ae8ebc9d5e93ff68a4cb6e2e3098528877f158155f194c67aa2b478dd55ed91efdbbcd4123cdfe6ce98408c51d077c26ef0f56dbf852f9b07a18d95a580476e SHA512 6579172dbc43d0e8e20a692582b99ed22a422474fc081c6cedfe03e6e1e7dab76159c9c63018bef0f7ca0cfd1fadc4b681c7c753663acb5b9dea9bb1f555ca2d 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 + #include + #include +-#include "tlsh.h" ++#include + + // 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-r1.ebuild b/dev-python/tlsh/tlsh-4.8.2-r1.ebuild new file mode 100644 index 000000000000..94ebb2d03eab --- /dev/null +++ b/dev-python/tlsh/tlsh-4.8.2-r1.ebuild @@ -0,0 +1,30 @@ +# 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} ) +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}.gh.tar.gz" +S=${WORKDIR}/${P}/py_ext + +LICENSE="|| ( Apache-2.0 BSD )" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~ppc64 ~x86" + +DEPEND="dev-libs/tlsh" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-setup-sources.patch + "${FILESDIR}"/${P}-r1-py312.patch +) + +python_test() { + "${EPYTHON}" test.py test.py test.py &> /dev/null || die +} -- cgit v1.2.3