aboutsummaryrefslogtreecommitdiff
path: root/devel/py-distorm
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2007-01-17 20:47:29 +0000
committerMartin Wilke <miwi@FreeBSD.org>2007-01-17 20:47:29 +0000
commit6db9080ca3108a9dd2482aba4d26f9e465ff2569 (patch)
treee5b0119d0920b2c3c2514308d6943ca0bb6059a8 /devel/py-distorm
parentff02ac080222e4310518830816d6a43d046ad027 (diff)
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>
Notes
Notes: svn path=/head/; revision=182667
Diffstat (limited to 'devel/py-distorm')
-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
5 files changed, 90 insertions, 0 deletions
diff --git a/devel/py-distorm/Makefile b/devel/py-distorm/Makefile
new file mode 100644
index 000000000000..bbbccc3fe3a8
--- /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 000000000000..9342f88a4374
--- /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 000000000000..851c2a237bc6
--- /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 000000000000..13c3cbaf003d
--- /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 000000000000..a0c8263fe334
--- /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%%