mirror of
https://git.freebsd.org/ports.git
synced 2025-07-17 17:29:23 -04:00
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>
This commit is contained in:
parent
5eb6358b46
commit
e03e64c721
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=469947
6 changed files with 116 additions and 0 deletions
|
@ -4132,6 +4132,7 @@
|
|||
SUBDIR += pkg-info.el
|
||||
SUBDIR += pkgconf
|
||||
SUBDIR += plan9port
|
||||
SUBDIR += plasma
|
||||
SUBDIR += plasma5-khotkeys
|
||||
SUBDIR += plasma5-kwrited
|
||||
SUBDIR += plasma5-plasma-sdk
|
||||
|
|
46
devel/plasma/Makefile
Normal file
46
devel/plasma/Makefile
Normal file
|
@ -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>
|
3
devel/plasma/distinfo
Normal file
3
devel/plasma/distinfo
Normal file
|
@ -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
|
45
devel/plasma/files/patch-setup.py
Normal file
45
devel/plasma/files/patch-setup.py
Normal file
|
@ -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'])
|
||||
|
||||
|
10
devel/plasma/pkg-descr
Normal file
10
devel/plasma/pkg-descr
Normal file
|
@ -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
|
11
devel/plasma/pkg-message
Normal file
11
devel/plasma/pkg-message
Normal file
|
@ -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
|
||||
|
||||
==============================================================================
|
Loading…
Add table
Reference in a new issue