diff --git a/sysutils/py-pytsk/Makefile b/sysutils/py-pytsk/Makefile index 953be613daf4..489784ffff2d 100644 --- a/sysutils/py-pytsk/Makefile +++ b/sysutils/py-pytsk/Makefile @@ -2,26 +2,28 @@ # $FreeBSD$ PORTNAME= pytsk -PORTVERSION= 20160111 +PORTVERSION= 20160325 CATEGORIES= sysutils security devel python -MASTER_SITES= https://github.com/py4n6/pytsk/releases/download/${PORTVERSION}${EXTRACT_SUFX}/ \ +MASTER_SITES= https://github.com/py4n6/pytsk/releases/download/${PORTVERSION}/ \ LOCAL/antoine PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} +DISTNAME= ${PORTNAME}3-${PORTVERSION} MAINTAINER= antoine@FreeBSD.org COMMENT= Python bindings for the Sleuthkit LICENSE= APACHE20 -LIB_DEPENDS= libtsk.so:sysutils/sleuthkit +LIB_DEPENDS= libtalloc.so:devel/talloc \ + libtsk.so:sysutils/sleuthkit -WRKSRC= ${WRKDIR}/${PORTNAME} - -USES= python tar:tgz +USES= python USE_PYTHON= distutils autoplist +post-extract: + ${RM} ${WRKSRC}/pytsk3.c + post-patch: - ${REINPLACE_CMD} 's|"/", "usr", "local"|"${LOCALBASE}"|' \ - ${WRKSRC}/setup.py + ${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/setup.py .include diff --git a/sysutils/py-pytsk/distinfo b/sysutils/py-pytsk/distinfo index 06768f2935c8..a931caaa7f64 100644 --- a/sysutils/py-pytsk/distinfo +++ b/sysutils/py-pytsk/distinfo @@ -1,2 +1,2 @@ -SHA256 (pytsk-20160111.tgz) = 7f05965b82ccc724a3d56ec31e3cd6e8e6e869add0bd8eff70927640cc01a187 -SIZE (pytsk-20160111.tgz) = 92570 +SHA256 (pytsk3-20160325.tar.gz) = 403b9e364eb65611a5102d808a7916096b2aa3e32d21dea2c706eae2cc29150d +SIZE (pytsk3-20160325.tar.gz) = 2739896 diff --git a/sysutils/py-pytsk/files/patch-setup.py b/sysutils/py-pytsk/files/patch-setup.py new file mode 100644 index 000000000000..5cdfa84bc706 --- /dev/null +++ b/sysutils/py-pytsk/files/patch-setup.py @@ -0,0 +1,44 @@ +# Unbundle sleuthkit and talloc + +--- setup.py.orig 2016-03-25 08:41:14 UTC ++++ setup.py +@@ -169,9 +169,9 @@ class BuildExtCommand(build_ext): + + def run(self): + compiler = new_compiler(compiler=self.compiler) +- self.define = self.configure_source_tree(compiler) ++ self.define = [("HAVE_TSK_LIBTSK_H", "")] + +- libtsk_path = "sleuthkit/tsk" ++ libtsk_path = "%%LOCALBASE%%/include/tsk" + + if not os.access("pytsk3.c", os.R_OK): + # Generate the Python binding code (pytsk3.c). +@@ -322,7 +322,7 @@ class ProjectBuilder(object): + self._argv = argv + + # The path to the "tsk" directory. +- self._libtsk_path = "sleuthkit/tsk" ++ self._libtsk_path = "%%LOCALBASE%%/include/tsk" + + # paths under the tsk/ directory which contain files we need to compile. + self._sub_library_names = "auto base docs fs hashdb img vs".split() +@@ -330,14 +330,14 @@ 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. + self._source_files = ["class.c", "error.c", "tsk3.c", +- "pytsk3.c", "talloc/talloc.c"] ++ "pytsk3.c"] + + # Path to the top of the unpacked sleuthkit sources. + self._sleuthkit_path = "sleuthkit"