Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 May 2016 17:23:11 +0000 (UTC)
From:      Antoine Brodin <antoine@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r414413 - in head/sysutils/py-pytsk: . files
Message-ID:  <201605011723.u41HNBC1035898@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: antoine
Date: Sun May  1 17:23:11 2016
New Revision: 414413
URL: https://svnweb.freebsd.org/changeset/ports/414413

Log:
  Update to 20160325

Added:
  head/sysutils/py-pytsk/files/
  head/sysutils/py-pytsk/files/patch-setup.py   (contents, props changed)
Modified:
  head/sysutils/py-pytsk/Makefile
  head/sysutils/py-pytsk/distinfo

Modified: head/sysutils/py-pytsk/Makefile
==============================================================================
--- head/sysutils/py-pytsk/Makefile	Sun May  1 15:33:57 2016	(r414412)
+++ head/sysutils/py-pytsk/Makefile	Sun May  1 17:23:11 2016	(r414413)
@@ -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 <bsd.port.mk>

Modified: head/sysutils/py-pytsk/distinfo
==============================================================================
--- head/sysutils/py-pytsk/distinfo	Sun May  1 15:33:57 2016	(r414412)
+++ head/sysutils/py-pytsk/distinfo	Sun May  1 17:23:11 2016	(r414413)
@@ -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

Added: head/sysutils/py-pytsk/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sysutils/py-pytsk/files/patch-setup.py	Sun May  1 17:23:11 2016	(r414413)
@@ -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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605011723.u41HNBC1035898>