diff options
author | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2022-06-29 12:04:12 +0100 |
commit | 0f558761aa2dee1017b4751e4017205e015a9560 (patch) | |
tree | 037df795519468a25d9362b4e95cdaeb84eb1cf9 /dev-python/tlsh | |
parent | 752d6256e5204b958b0ef7905675a940b5e9172f (diff) |
gentoo resync : 29.12.2022
Diffstat (limited to 'dev-python/tlsh')
-rw-r--r-- | dev-python/tlsh/Manifest | 4 | ||||
-rw-r--r-- | dev-python/tlsh/files/tlsh-4.8.2-setup-sources.patch | 30 | ||||
-rw-r--r-- | dev-python/tlsh/metadata.xml | 16 | ||||
-rw-r--r-- | dev-python/tlsh/tlsh-4.8.2.ebuild | 33 |
4 files changed, 83 insertions, 0 deletions
diff --git a/dev-python/tlsh/Manifest b/dev-python/tlsh/Manifest new file mode 100644 index 000000000000..e9ecc06b743e --- /dev/null +++ b/dev-python/tlsh/Manifest @@ -0,0 +1,4 @@ +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 791 BLAKE2B 10bfc9448a9641bfe125ec08161b51159117c48c279ac65134e920a3f01ea09efbbecd04fabeca919ec60c38a5390235732b6f69580987e06b9fd2292b0ad048 SHA512 aa962f6b2850cc64bdc6477dea1b9a06331116c75a7d97c0224934438ddb776c4bb68d3580680a581f9c188e042b764e65fbdd03cf2bd66aef99b25834de8f45 +MISC metadata.xml 520 BLAKE2B 97d64e94859345f4537e1a95dac94190cf54cf608cc851a8cdf24f5f4b71c0821c778d24f99fb076ed08247a085270d4c36aaa66583916c0a420733b7b8543be SHA512 95dc94ca2c08d71246453ccee139901e675ec84b2c4af224b90057270f4bf5494ffb761e2d3b4dff25cfcac47185d4f7d2f4b3080182f8c9526b746e99519211 diff --git a/dev-python/tlsh/files/tlsh-4.8.2-setup-sources.patch b/dev-python/tlsh/files/tlsh-4.8.2-setup-sources.patch new file mode 100644 index 000000000000..4cdb0f864b5b --- /dev/null +++ b/dev-python/tlsh/files/tlsh-4.8.2-setup-sources.patch @@ -0,0 +1,30 @@ +--- a/setup.py ++++ b/setup.py +@@ -21,26 +21,7 @@ with open(join(realpath('..'), 'CMakeLists.txt'), 'r') as f: + if m: + tlsh_3b = '' + +-if os.name == 'nt': +- tlsh_module = Extension('tlsh', \ +- sources = ['tlshmodule.cpp', \ +- join(realpath('..'), 'src', 'tlsh.cpp'), \ +- join(realpath('..'), 'src', 'tlsh_impl.cpp'), \ +- join(realpath('..'), 'src', 'tlsh_util.cpp') \ +- ], \ +- include_dirs = [join(realpath('..'), 'include'), +- join(realpath('..'), 'Windows')],\ +- define_macros = [('WINDOWS', None),], \ +- ) +-else: +- tlsh_module = Extension('tlsh', \ +- sources = ['tlshmodule.cpp', \ +- join(realpath('..'), 'src', 'tlsh.cpp'), \ +- join(realpath('..'), 'src', 'tlsh_impl.cpp'), \ +- join(realpath('..'), 'src', 'tlsh_util.cpp') \ +- ], \ +- include_dirs = [join(realpath('..'), 'include')], +- ) ++tlsh_module = Extension('tlsh', sources=['tlshmodule.cpp'], libraries=['tlsh']) + + if tlsh_256 != '': + tlsh_module.extra_compile_args.append(tlsh_256) diff --git a/dev-python/tlsh/metadata.xml b/dev-python/tlsh/metadata.xml new file mode 100644 index 000000000000..1bb03887e81b --- /dev/null +++ b/dev-python/tlsh/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>t@laumann.xyz</email> + <name>Thomas Bracht Laumann Jespersen</name> + </maintainer> + <maintainer type="person" proxied="proxy"> + <email>sam@gentoo.org</email> + <name>Sam James</name> + </maintainer> + <upstream> + <remote-id type="github">trendmicro/tlsh</remote-id> + <remote-id type="pypi">python-tlsh</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-python/tlsh/tlsh-4.8.2.ebuild b/dev-python/tlsh/tlsh-4.8.2.ebuild new file mode 100644 index 000000000000..a9f0bf677081 --- /dev/null +++ b/dev-python/tlsh/tlsh-4.8.2.ebuild @@ -0,0 +1,33 @@ +# Copyright 2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=setuptools +PYTHON_COMPAT=( python3_{8..10} ) +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" +S=${WORKDIR}/${P}/py_ext + +LICENSE="|| ( Apache-2.0 BSD )" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~x86" + +DEPEND="dev-libs/tlsh" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/${P}-setup-sources.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 +} |