From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 495841581D3 for ; Sun, 2 Jun 2024 00:41:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 838D5E2A98; Sun, 2 Jun 2024 00:41:42 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 5E81FE2A98 for ; Sun, 2 Jun 2024 00:41:42 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8FFBC335D63 for ; Sun, 2 Jun 2024 00:41:41 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id F042B1A44 for ; Sun, 2 Jun 2024 00:41:39 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1717288710.0831a84172d0ee0499070a8c1212ef9780197b1f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/tlsh/, dev-python/tlsh/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/tlsh/Manifest dev-python/tlsh/files/tlsh-4.8.2-r1-py312.patch dev-python/tlsh/tlsh-4.8.2-r1.ebuild X-VCS-Directories: dev-python/tlsh/files/ dev-python/tlsh/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 0831a84172d0ee0499070a8c1212ef9780197b1f X-VCS-Branch: master Date: Sun, 2 Jun 2024 00:41:39 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 42d5fe17-3f47-413d-a093-e14656299d6a X-Archives-Hash: 1e7cdb02654a9b2dd4f6432e3ae17d18 commit: 0831a84172d0ee0499070a8c1212ef9780197b1f Author: Thomas Bracht Laumann Jespersen laumann xyz> AuthorDate: Fri Apr 19 10:18:15 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jun 2 00:38:30 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0831a841 dev-python/tlsh: fix build for python 3.12 + musl Closes: https://bugs.gentoo.org/927058 Signed-off-by: Thomas Bracht Laumann Jespersen laumann.xyz> Closes: https://github.com/gentoo/gentoo/pull/36321 Signed-off-by: Sam James gentoo.org> dev-python/tlsh/Manifest | 1 + 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, 56 insertions(+) diff --git a/dev-python/tlsh/Manifest b/dev-python/tlsh/Manifest index 2425a1db29ee..7f54384d66a4 100644 --- a/dev-python/tlsh/Manifest +++ b/dev-python/tlsh/Manifest @@ -1 +1,2 @@ +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 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 +}