aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiwi <miwi@FreeBSD.org>2007-01-18 04:47:29 +0800
committermiwi <miwi@FreeBSD.org>2007-01-18 04:47:29 +0800
commitb955d03e1799365832193c929cbb0d3d17254123 (patch)
treeea8008236fae25744a4ad188e712e3ed275e9305
parentd20e6e79bdd079f9262d66cf294c4b5966c4de0c (diff)
downloadfreebsd-ports-graphics-b955d03e1799365832193c929cbb0d3d17254123.tar.gz
freebsd-ports-graphics-b955d03e1799365832193c929cbb0d3d17254123.tar.zst
freebsd-ports-graphics-b955d03e1799365832193c929cbb0d3d17254123.zip
diStorm is a binary stream disassembler. It's capable of disassembling
80x86 instructions in 64 bits (AMD64, X86-64) and both in 16 and 32 bits. In addition, it disassembles FPU, MMX, SSE, SSE2, SSE3, SSE4, 3DNow! (w/ extensions), new x86-64 instruction sets, VMX, and AMD's SVM! diStorm was written to decode quickly every instruction as accurately as possible. Robust decoding, while taking special care for valid or unused prefixes, is what makes this disassembler powerful, especially for research. Another benefit that might come in handy is that the module was written as multi-threaded, which means you could disassemble several streams or more simultaneously. WWW: http://www.ragestorm.net/distorm/ PR: ports/107977 Submitted by: Lutz Boehne <lboehne at damogran.de>
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-distorm/Makefile47
-rw-r--r--devel/py-distorm/distinfo3
-rw-r--r--devel/py-distorm/files/patch-Makefile22
-rw-r--r--devel/py-distorm/pkg-descr12
-rw-r--r--devel/py-distorm/pkg-plist6
6 files changed, 91 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 36c1d44f029..748a6652eb3 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -1725,6 +1725,7 @@
SUBDIR += py-dateutil
SUBDIR += py-dbus
SUBDIR += py-dialog
+ SUBDIR += py-distorm
SUBDIR += py-durus
SUBDIR += py-elementtree
SUBDIR += py-epsilon
diff --git a/devel/py-distorm/Makefile b/devel/py-distorm/Makefile
new file mode 100644
index 00000000000..bbbccc3fe3a
--- /dev/null
+++ b/devel/py-distorm/Makefile
@@ -0,0 +1,47 @@
+# New ports collection makefile for: py-distorm
+# Date created: 1 December 2006
+# Whom: Lutz Boehne <lboehne@damogran.de>
+#
+# $FreeBSD$
+#
+
+PORTNAME= distorm
+PORTVERSION= 1.5.17
+CATEGORIES= devel python
+MASTER_SITES= http://www.ragestorm.net/distorm/ \
+ http://www.damogran.de/ports/distorm/
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= ${PORTNAME}-pkg${PORTVERSION}
+
+MAINTAINER= lboehne@damogran.de
+COMMENT= Fast x86 and x86-64 disassembler library for python
+
+USE_BZIP2= yes
+USE_PYTHON= yes
+
+WRKSRC= ${WRKDIR}/distorm/build/linux
+
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+BROKEN= Does not build on 4.x
+.endif
+
+.if !defined(NOPORTDOCS)
+DOCSDIR= ${PREFIX}/share/doc/py-distorm
+DOCS= distorm.html qa.txt vol1.html vol2.html
+.endif
+
+post-patch:
+ ${REINPLACE_CMD} -e s,XXPYTHON_LIBDIRXX,${PYTHON_LIBDIR}, ${WRKDIR}/distorm/build/linux/Makefile
+ ${REINPLACE_CMD} -e s,python2.4,${PYTHON_VERSION}, ${WRKDIR}/distorm/src/pydistorm.h
+
+.if !defined(NOPORTDOCS)
+pre-install:
+ ${MKDIR} ${DOCSDIR}
+.for f in ${DOCS}
+ ${INSTALL_DATA} ${WRKDIR}/distorm/doc/${f} ${DOCSDIR}
+.endfor
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-distorm/distinfo b/devel/py-distorm/distinfo
new file mode 100644
index 00000000000..9342f88a437
--- /dev/null
+++ b/devel/py-distorm/distinfo
@@ -0,0 +1,3 @@
+MD5 (distorm-pkg1.5.17.tar.bz2) = 2d54713a335490755ffa2368b3c4ff98
+SHA256 (distorm-pkg1.5.17.tar.bz2) = 6d1f89fdf402b53d65c178010fca795c1780b02cd1979f85abacd67168c92fa9
+SIZE (distorm-pkg1.5.17.tar.bz2) = 82093
diff --git a/devel/py-distorm/files/patch-Makefile b/devel/py-distorm/files/patch-Makefile
new file mode 100644
index 00000000000..851c2a237bc
--- /dev/null
+++ b/devel/py-distorm/files/patch-Makefile
@@ -0,0 +1,22 @@
+--- Makefile.orig Sat Jun 3 19:24:48 2006
++++ Makefile Wed Jan 10 12:45:23 2007
+@@ -5,8 +5,7 @@
+ TARGET = libdistorm64.so
+ COBJS = ../../src/x86defs.o ../../src/wstring.o ../../src/textdefs.o ../../src/prefix.o ../../src/operands.o ../../src/insts.o ../../src/instructions.o ../../src/distorm.o ../../src/decoder.o
+ PYOBJS = ../../src/x86defs.o ../../src/wstring.o ../../src/textdefs.o ../../src/pydistorm.o ../../src/prefix.o ../../src/operands.o ../../src/insts.o ../../src/instructions.o ../../src/decoder.o
+-CC = gcc
+-CFLAGS = -O2 -Wall -fPIC
++CFLAGS+= -fPIC -I${LOCALBASE}/include
+
+ all: clib py
+
+@@ -21,8 +20,7 @@
+ ${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET}
+
+ install: libdistorm64.so
+- install -s ${TARGET} /usr/local/lib
+- @echo "... running ldconfig might be smart ..."
++ ${INSTALL} -s libdistorm64.so XXPYTHON_LIBDIRXX/lib-dynload/distorm.so
+
+ .c.o:
+ ${CC} ${CFLAGS} ${VERSION} -c $< -o $@
diff --git a/devel/py-distorm/pkg-descr b/devel/py-distorm/pkg-descr
new file mode 100644
index 00000000000..13c3cbaf003
--- /dev/null
+++ b/devel/py-distorm/pkg-descr
@@ -0,0 +1,12 @@
+diStorm is a binary stream disassembler. It's capable of disassembling
+80x86 instructions in 64 bits (AMD64, X86-64) and both in 16 and 32 bits.
+In addition, it disassembles FPU, MMX, SSE, SSE2, SSE3, SSE4, 3DNow! (w/
+extensions), new x86-64 instruction sets, VMX, and AMD's SVM! diStorm was
+written to decode quickly every instruction as accurately as possible.
+Robust decoding, while taking special care for valid or unused prefixes,
+is what makes this disassembler powerful, especially for research.
+Another benefit that might come in handy is that the module was written
+as multi-threaded, which means you could disassemble several streams or
+more simultaneously.
+
+WWW: http://www.ragestorm.net/distorm/
diff --git a/devel/py-distorm/pkg-plist b/devel/py-distorm/pkg-plist
new file mode 100644
index 00000000000..a0c8263fe33
--- /dev/null
+++ b/devel/py-distorm/pkg-plist
@@ -0,0 +1,6 @@
+%%PYTHON_LIBDIR%%/lib-dynload/distorm.so
+%%PORTDOCS%%%%DOCSDIR%%/distorm.html
+%%PORTDOCS%%%%DOCSDIR%%/qa.txt
+%%PORTDOCS%%%%DOCSDIR%%/vol1.html
+%%PORTDOCS%%%%DOCSDIR%%/vol2.html
+%%PORTDOCS%%@dirrm %%DOCSDIR%%