diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2024-11-14 06:45:35 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2024-11-14 06:45:35 +0000 |
| commit | 5abae9e973fe596f28f78b4d83209ffab108e2cd (patch) | |
| tree | 477f80d561268dec5e074e3883e85c62ef94861f /dev-python/python-tlsh/files | |
| parent | a6cbb3d12ad6754a4197f1ef2917998b377a081c (diff) | |
| download | baldeagleos-repo-5abae9e973fe596f28f78b4d83209ffab108e2cd.tar.gz baldeagleos-repo-5abae9e973fe596f28f78b4d83209ffab108e2cd.tar.xz baldeagleos-repo-5abae9e973fe596f28f78b4d83209ffab108e2cd.zip | |
Adding metadata
Diffstat (limited to 'dev-python/python-tlsh/files')
| -rw-r--r-- | dev-python/python-tlsh/files/python-tlsh-4.8.2-r1-py312.patch | 25 | ||||
| -rw-r--r-- | dev-python/python-tlsh/files/python-tlsh-4.8.2-setup-sources.patch | 30 |
2 files changed, 55 insertions, 0 deletions
diff --git a/dev-python/python-tlsh/files/python-tlsh-4.8.2-r1-py312.patch b/dev-python/python-tlsh/files/python-tlsh-4.8.2-r1-py312.patch new file mode 100644 index 000000000000..56c4766bd711 --- /dev/null +++ b/dev-python/python-tlsh/files/python-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/python-tlsh/files/python-tlsh-4.8.2-setup-sources.patch b/dev-python/python-tlsh/files/python-tlsh-4.8.2-setup-sources.patch new file mode 100644 index 000000000000..4cdb0f864b5b --- /dev/null +++ b/dev-python/python-tlsh/files/python-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) |
