diff --git a/sysutils/py-tsk/Makefile b/sysutils/py-tsk/Makefile index a4f9e4bdc11..8b58cbb3f67 100644 --- a/sysutils/py-tsk/Makefile +++ b/sysutils/py-tsk/Makefile @@ -1,39 +1,39 @@ COMMENT = Python bindings for The Sleuth Kit (libtsk) -MODPY_DISTV = 20200117 +MODPY_DISTV = 20260418 DISTNAME = pytsk3-${MODPY_DISTV} PKGNAME = py-tsk-${MODPY_DISTV} -REVISION = 11 + +# download a copy from github archive as well, to fill in the incomplete +# tests dir from the pypi sdist (this is simpler than fetching the whole +# port from github as it needs a submodule + autoconf scripts generating) +DIST_TUPLE = github py4n6 pytsk ${MODPY_DISTV} . CATEGORIES = sysutils HOMEPAGE = https://github.com/py4n6/pytsk/ +MAINTAINER = Sebastian Reitenbach # Apache v2 PERMIT_PACKAGE = Yes MODULES = lang/python -# so that we get gawk poisoning in the sleuthkit part -MODULES += gnu +## so that we get gawk poisoning in the sleuthkit part +#MODULES += gnu MODPY_PI = Yes MODPY_PYBUILD = setuptools -WANTLIB += talloc tsk ${MODPY_WANTLIB} +WANTLIB += ${COMPILER_LIBCXX} m # C++11 COMPILER= base-clang ports-gcc -pre-configure: - ${SUBST_DATA} ${WRKSRC}/setup.py ${WRKSRC}/setup.py.new - mv ${WRKSRC}/setup.py.new ${WRKSRC}/setup.py +post-extract: + mv ${WRKDIR}/pytsk-${MODPY_DISTV}/tests/* ${WRKSRC}/tests/ -LIB_DEPENDS = sysutils/sleuthkit \ - devel/libtalloc -TEST_DEPENDS = sysutils/py-tsk=${MODPY_DISTV} - -# it needs test_data/* in the Github repository +# Ran 30 tests in 0.094s do-test: - cd ${WRKSRC} && ${MODPY_BIN} run_tests.py + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${MODPY_BIN} run_tests.py .include diff --git a/sysutils/py-tsk/distinfo b/sysutils/py-tsk/distinfo index b721324b210..a1f0fa359fc 100644 --- a/sysutils/py-tsk/distinfo +++ b/sysutils/py-tsk/distinfo @@ -1,2 +1,4 @@ -SHA256 (pytsk3-20200117.tar.gz) = VhdxZKNY6YuqJYKWqi6aUJME3I2rBTq6w0dDWgl42WI= -SIZE (pytsk3-20200117.tar.gz) = 3060827 +SHA256 (py4n6-pytsk-20260418.tar.gz) = iRMbAaV1TqKFyBfECVaixzqD3VsR2mPwgWSr8W9/R3o= +SHA256 (pytsk3-20260418.tar.gz) = ZcXc0fkaXH19fuc8iX2pHBW+MsrXIwFLOXeUa6M7nzU= +SIZE (py4n6-pytsk-20260418.tar.gz) = 100337 +SIZE (pytsk3-20260418.tar.gz) = 3190862 diff --git a/sysutils/py-tsk/patches/patch-setup_py b/sysutils/py-tsk/patches/patch-setup_py index 7ec9533e9ee..e69de29bb2d 100644 --- a/sysutils/py-tsk/patches/patch-setup_py +++ b/sysutils/py-tsk/patches/patch-setup_py @@ -1,39 +0,0 @@ -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 = 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). -@@ -390,7 +390,7 @@ class ProjectBuilder(object): - self._argv = argv - - # The path to the sleuthkit/tsk directory. -- self._libtsk_path = os.path.join("sleuthkit", "tsk") -+ self._libtsk_path = os.path.join("${LOCALBASE}", "include", "tsk") - - # 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 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"] - - # Path to the top of the unpacked sleuthkit sources. - self._sleuthkit_path = "sleuthkit" diff --git a/sysutils/py-tsk/pkg/PLIST b/sysutils/py-tsk/pkg/PLIST index 149fd4d23af..886bcf72e4c 100644 --- a/sysutils/py-tsk/pkg/PLIST +++ b/sysutils/py-tsk/pkg/PLIST @@ -3,7 +3,5 @@ lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/ lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/METADATA lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/RECORD lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/WHEEL -lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/licenses/ -lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/licenses/LICENSE lib/python${MODPY_VERSION}/site-packages/pytsk3-${MODPY_DISTV}.dist-info/top_level.txt @so lib/python${MODPY_VERSION}/site-packages/pytsk3.${MODPY_PYC_MAGIC_TAG}so