Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/py-tsk/Makefile,v
diff -u -r1.24 Makefile
--- Makefile	8 Feb 2026 12:22:41 -0000	1.24
+++ Makefile	12 Feb 2026 09:16:56 -0000
@@ -1,39 +1,45 @@
 COMMENT =	Python bindings for The Sleuth Kit (libtsk)
 
-MODPY_DISTV =	20200117
+MODPY_DISTV =	20250801
 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 <sebastia@openbsd.org>
 
 # Apache v2
 PERMIT_PACKAGE =	Yes
 
 MODULES =		lang/python
-# 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 talloc
 
 # 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
+BUILD_DEPENDS =	sysutils/sleuthkit:configure
+LIB_DEPENDS =	devel/libtalloc
 
-LIB_DEPENDS =	sysutils/sleuthkit \
-		devel/libtalloc
-TEST_DEPENDS =	sysutils/py-tsk=${MODPY_DISTV}
+post-extract:
+	rm -rf ${WRKSRC}/sleuthkit ${WRKSRC}/talloc
+	ln -s ${WRKDIR}/sysutils/sleuthkit/sleuthkit-*/ ${WRKSRC}/sleuthkit
+	mv ${WRKDIR}/pytsk-${MODPY_DISTV}/tests/* ${WRKSRC}/tests/
+
+pre-configure:
+	${SUBST_DATA} ${WRKSRC}/setup.py ${WRKSRC}/setup.py.new
+	mv ${WRKSRC}/setup.py.new ${WRKSRC}/setup.py
 
 # it needs test_data/* in the Github repository
 do-test:
-	cd ${WRKSRC} && ${MODPY_BIN} run_tests.py
+	cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${MODPY_BIN} run_tests.py
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/sysutils/py-tsk/distinfo,v
diff -u -r1.7 distinfo
--- distinfo	17 Mar 2020 20:42:46 -0000	1.7
+++ distinfo	12 Feb 2026 09:16:56 -0000
@@ -1,2 +1,4 @@
-SHA256 (pytsk3-20200117.tar.gz) = VhdxZKNY6YuqJYKWqi6aUJME3I2rBTq6w0dDWgl42WI=
-SIZE (pytsk3-20200117.tar.gz) = 3060827
+SHA256 (py4n6-pytsk-20250801.tar.gz) = EnI+QkAoSxOpChb1EXgxmynM+Gp1NTstKfXjmKsuT9o=
+SHA256 (pytsk3-20250801.tar.gz) = asypmY1GEMRv231jeULcNU3KWLIn2M7jZi7Jm0qKor0=
+SIZE (py4n6-pytsk-20250801.tar.gz) = 100734
+SIZE (pytsk3-20250801.tar.gz) = 3327891
Index: patches/patch-setup_py
===================================================================
RCS file: patches/patch-setup_py
diff -N patches/patch-setup_py
--- patches/patch-setup_py	11 Mar 2022 19:57:54 -0000	1.3
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -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"
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/sysutils/py-tsk/pkg/PLIST,v
diff -u -r1.7 PLIST
--- pkg/PLIST	29 Apr 2025 10:40:03 -0000	1.7
+++ pkg/PLIST	12 Feb 2026 09:16:56 -0000
@@ -3,7 +3,5 @@
 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
