update py-tsk to 20170802, and enable python3 flavor.

ok benoit@.
This commit is contained in:
rpointel 2017-11-02 10:06:37 +00:00
parent ac9e5ce02b
commit 145fc4638a
3 changed files with 41 additions and 41 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.3 2017/07/18 09:43:40 rpointel Exp $
# $OpenBSD: Makefile,v 1.4 2017/11/02 10:06:37 rpointel Exp $
COMMENT = Python bindings for The Sleuth Kit (libtsk)
MODPY_EGG_VERSION = 20170508
MODPY_EGG_VERSION = 20170802
DISTNAME = pytsk3-${MODPY_EGG_VERSION}
PKGNAME = py-tsk-${MODPY_EGG_VERSION}
@ -19,6 +19,9 @@ MODULES = lang/python
MODPY_PI = Yes
MODPY_SETUPTOOLS = Yes
FLAVORS = python3
FLAVOR ?=
WANTLIB += pthread talloc tsk ${MODPY_WANTLIB}
pre-configure:

View File

@ -1,2 +1,2 @@
SHA256 (pytsk3-20170508.tar.gz) = I4ZbSDDy0oGQidf7Lm6qHQpZJIFYCzf68OFk5d2ZrFE=
SIZE (pytsk3-20170508.tar.gz) = 3004540
SHA256 (pytsk3-20170802.tar.gz) = MiWUR8mXEEhl7l4J+xBvwUUQGdV6bU/6gsu85Fp7VJU=
SIZE (pytsk3-20170802.tar.gz) = 2934331

View File

@ -1,43 +1,40 @@
$OpenBSD: patch-setup_py,v 1.1.1.1 2017/01/22 08:18:04 rpointel Exp $
--- setup.py.orig Thu Jul 21 21:02:40 2016
+++ setup.py Thu Oct 13 22:33:14 2016
@@ -171,7 +171,7 @@ class BuildExtCommand(build_ext):
compiler = new_compiler(compiler=self.compiler)
self.define = self.configure_source_tree(compiler)
$OpenBSD: patch-setup_py,v 1.2 2017/11/02 10:06:37 rpointel Exp $
Index: setup.py
--- setup.py.orig
+++ setup.py
@@ -180,7 +180,7 @@ class BuildExtCommand(build_ext):
# pylint: disable=attribute-defined-outside-init
self.define = self.configure_source_tree(compiler)
- libtsk_path = "sleuthkit/tsk"
+ libtsk_path = "${LOCALBASE}/include/tsk"
- libtsk_path = os.path.join("sleuthkit", "tsk")
+ libtsk_path = os.path.join("${LOCALBASE}", "include", "tsk")
if not os.access("pytsk3.c", os.R_OK):
# Generate the Python binding code (pytsk3.c).
@@ -286,7 +286,7 @@ class UpdateCommand(Command):
with open("version.txt", "w") as fd:
fd.write(self.version)
if not os.access("pytsk3.c", os.R_OK):
# Generate the Python binding code (pytsk3.c).
@@ -390,7 +390,7 @@ class ProjectBuilder(object):
self._argv = argv
- libtsk_path = "sleuthkit/tsk"
+ libtsk_path = "${LOCALBASE}/include/tsk"
# The path to the sleuthkit/tsk directory.
- self._libtsk_path = os.path.join("sleuthkit", "tsk")
+ self._libtsk_path = os.path.join("${LOCALBASE}", "include", "tsk")
# Generate the Python binding code (pytsk3.c).
libtsk_header_files = [
@@ -325,7 +325,7 @@ class ProjectBuilder(object):
self._argv = argv
# Paths under the sleuthkit/tsk directory which contain files we need
# to compile.
@@ -400,13 +400,13 @@ class ProjectBuilder(object):
# The args for the extension builder.
self.extension_args = {
"define_macros": [],
- "include_dirs": ["talloc", self._libtsk_path, "sleuthkit", "."],
- "library_dirs": [],
- "libraries": []}
+ "include_dirs": [".", os.path.join("${LOCALBASE}", "include")],
+ "library_dirs": [os.path.join("${LOCALBASE}","lib")],
+ "libraries": ["tsk", "talloc"]}
# The path to the "tsk" directory.
- self._libtsk_path = "sleuthkit/tsk"
+ self._libtsk_path = "${LOCALBASE}/include/tsk"
# The sources to build.
self._source_files = [
- "class.c", "error.c", "tsk3.c", "pytsk3.c", "talloc/talloc.c"]
+ "class.c", "error.c", "tsk3.c", "pytsk3.c"]
# paths under the tsk/ directory which contain files we need to compile.
self._sub_library_names = "auto base docs fs hashdb img vs".split()
@@ -333,9 +333,9 @@ class ProjectBuilder(object):
# The args for the extension builder.
self.extension_args = dict(
define_macros=[],
- include_dirs=["talloc", "sleuthkit/tsk", "sleuthkit", "."],
- library_dirs=[],
- libraries=[],
+ include_dirs=[".", "${LOCALBASE}/include"],
+ library_dirs=["${LOCALBASE}/lib"],
+ libraries=["tsk", "talloc"],
)
# The sources to build.
# Path to the top of the unpacked sleuthkit sources.
self._sleuthkit_path = "sleuthkit"