Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 May 2018 18:43:01 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r469947 - in head/devel: . plasma plasma/files
Message-ID:  <201805141843.w4EIh1WX091384@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Mon May 14 18:43:01 2018
New Revision: 469947
URL: https://svnweb.freebsd.org/changeset/ports/469947

Log:
  devel/plasma: create port
  
  PLASMA is an interactive disassembler. It can generate a more readable assembly
   (pseudo code) with a colored syntax. One can write scripts with the available
   Python API.
  
  It supports :
  
  * Architectures : x86{64}, ARM, MIPS{64} (partially for ARM and MIPS)
  * Formats : ELF, PE, RAW
  
  WWW: https://www.github.com/plasma-disassembler/plasma
  
  PR:		225669
  Submitted by:	Kai <freebsd_ports@k-worx.org>

Added:
  head/devel/plasma/
  head/devel/plasma/Makefile   (contents, props changed)
  head/devel/plasma/distinfo   (contents, props changed)
  head/devel/plasma/files/
  head/devel/plasma/files/patch-setup.py   (contents, props changed)
  head/devel/plasma/pkg-descr   (contents, props changed)
  head/devel/plasma/pkg-message   (contents, props changed)
Modified:
  head/devel/Makefile   (contents, props changed)

Modified: head/devel/Makefile
==============================================================================
--- head/devel/Makefile	Mon May 14 18:30:08 2018	(r469946)
+++ head/devel/Makefile	Mon May 14 18:43:01 2018	(r469947)
@@ -4132,6 +4132,7 @@
     SUBDIR += pkg-info.el
     SUBDIR += pkgconf
     SUBDIR += plan9port
+    SUBDIR += plasma
     SUBDIR += plasma5-khotkeys
     SUBDIR += plasma5-kwrited
     SUBDIR += plasma5-plasma-sdk

Added: head/devel/plasma/Makefile
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/plasma/Makefile	Mon May 14 18:43:01 2018	(r469947)
@@ -0,0 +1,46 @@
+# $FreeBSD$
+
+PORTNAME=	plasma
+DISTVERSION=	g20171121
+CATEGORIES=	devel python
+
+MAINTAINER=	freebsd_ports@k-worx.org
+COMMENT=	Interactive disassembler for x86/ARM/MIPS
+
+LICENSE=	GPLv3
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	bash:shells/bash \
+		binutils>=2:devel/binutils \
+		capstone>=3:devel/capstone3
+RUN_DEPENDS=	binutils>=2:devel/binutils \
+		${PYTHON_PKGNAMEPREFIX}capstone>=3:devel/py-capstone@${FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}future>=0:devel/py-future@${FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}keystone-engine>=:devel/py-keystone-engine@${FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}msgpack>=0:devel/py-msgpack@${FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}nose>=0:devel/py-nose@${FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pefile>=0:devel/py-pefile@${FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}pyelftools>=0:devel/py-pyelftools@${FLAVOR}
+
+USES=		python:3.4+ shebangfix
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	plasma-disassembler
+GH_PROJECT=	plasma
+GH_TAGNAME=	8ec3bb7
+
+USE_PYTHON=	distutils flavors autoplist
+SHEBANG_FILES=	tests/analyzer/run.sh
+SHEBANG_GLOB=	*.py
+
+OPTIONS_DEFINE=		MEMMAP
+OPTIONS_DEFAULT=	MEMMAP
+MEMMAP_DESC=	View memory maps (pulls in QT4)
+MEMMAP_USES=	pyqt:4
+MEMMAP_USE=	PYQT=gui_run
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' ${WRKSRC}/setup.py
+	@${REINPLACE_CMD} -e 's|python3|${PYTHON_CMD}|g' ${WRKSRC}/Makefile
+
+.include <bsd.port.mk>

Added: head/devel/plasma/distinfo
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/plasma/distinfo	Mon May 14 18:43:01 2018	(r469947)
@@ -0,0 +1,3 @@
+TIMESTAMP = 1517675748
+SHA256 (plasma-disassembler-plasma-g20171121-8ec3bb7_GH0.tar.gz) = 5ae00ef3fa3326000968323bd6843fa293938a1024b2fcb6176b624c99e8c050
+SIZE (plasma-disassembler-plasma-g20171121-8ec3bb7_GH0.tar.gz) = 352158

Added: head/devel/plasma/files/patch-setup.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/plasma/files/patch-setup.py	Mon May 14 18:43:01 2018	(r469947)
@@ -0,0 +1,45 @@
+--- setup.py.orig	2018-04-15 11:48:52 UTC
++++ setup.py
+@@ -6,30 +6,33 @@ except ImportError:
+     from distutils.core import setup
+ 
+ 
+-from pip.req import parse_requirements
++#from pip.req import parse_requirements
+ from distutils.core import Extension
+ import plasma
+ 
+-requirements = parse_requirements('requirements.txt', session=False)
++#requirements = parse_requirements('requirements.txt', session=False)
+ 
+ requires = []
+-for item in requirements:
++#for item in requirements:
+     # we want to handle package names and also repo urls
+-    if getattr(item, 'url', None):  # older pip has url
+-        links.append(str(item.url))
+-    if getattr(item, 'link', None): # newer pip has link
+-        links.append(str(item.link))
+-    if item.req:
+-        requires.append(str(item.req))
++#    if getattr(item, 'url', None):  # older pip has url
++#        links.append(str(item.url))
++#    if getattr(item, 'link', None): # newer pip has link
++#        links.append(str(item.link))
++#    if item.req:
++#        requires.append(str(item.req))
+ 
+ 
+ x86_analyzer = Extension('plasma.lib.arch.x86.analyzer',
++    include_dirs = ['%%PREFIX%%/include'],
+     sources = ['plasma/lib/arch/x86/analyzer.c'])
+ 
+ mips_analyzer = Extension('plasma.lib.arch.mips.analyzer',
++    include_dirs = ['%%PREFIX%%/include'],
+     sources = ['plasma/lib/arch/mips/analyzer.c'])
+ 
+ arm_analyzer = Extension('plasma.lib.arch.arm.analyzer',
++    include_dirs = ['%%PREFIX%%/include'],
+     sources = ['plasma/lib/arch/arm/analyzer.c'])
+ 
+ 

Added: head/devel/plasma/pkg-descr
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/plasma/pkg-descr	Mon May 14 18:43:01 2018	(r469947)
@@ -0,0 +1,10 @@
+PLASMA is an interactive disassembler. It can generate a more readable assembly
+ (pseudo code) with a colored syntax. One can write scripts with the available
+ Python API.
+
+It supports :
+
+* Architectures : x86{64}, ARM, MIPS{64} (partially for ARM and MIPS)
+* Formats : ELF, PE, RAW
+
+WWW: https://www.github.com/plasma-disassembler/plasma

Added: head/devel/plasma/pkg-message
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/plasma/pkg-message	Mon May 14 18:43:01 2018	(r469947)
@@ -0,0 +1,11 @@
+
+==============================================================================
+
+To use the visual mode (command 'v' in the interactive mode) the terminal must
+support 256 colors. 
+
+For xterm this can be enabled by
+
+export TERM=xterm-256color
+
+==============================================================================



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