ports/106093: New port: deve/py-distorm

Lutz Boehne lboehne at damogran.de
Thu Nov 30 23:20:33 UTC 2006


>Number:         106093
>Category:       ports
>Synopsis:       New port: deve/py-distorm
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 30 23:20:14 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Lutz Boehne
>Release:        RELENG_6
>Organization:
>Environment:
>Description:
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/
>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       py-distorm
#       py-distorm/Makefile
#       py-distorm/distinfo
#       py-distorm/pkg-plist
#       py-distorm/pkg-descr
#       py-distorm/files
#       py-distorm/files/patch-build-freebsd
#
echo c - py-distorm
mkdir -p py-distorm > /dev/null 2>&1
echo x - py-distorm/Makefile
sed 's/^X//' >py-distorm/Makefile << 'END-of-py-distorm/Makefile'
X# New ports collection makefile for:   py-distorm
X# Date created:                                1 December 2006
X# Whom:                                        Lutz Boehne <lboehne at damogran.de>
X#
X# $FreeBSD$
X#
X
XPORTNAME=      distorm
XPORTVERSION=   1.5.16
XCATEGORIES=    devel python
XMASTER_SITES=  http://www.ragestorm.net/distorm/ \
X               http://www.damogran.de/ports/distorm/
XPKGNAMEPREFIX=  ${PYTHON_PKGNAMEPREFIX}
XDISTNAME=      distorm-pkg${PORTVERSION}
X
XMAINTAINER=    lboehne at damogran.de
XCOMMENT=       Fast BSD licensed Python disassembler library
X
XUSE_PYTHON=    yes
XUSE_BZIP2=     yes
X
XWRKSRC=                ${WRKDIR}/distorm/build/freebsd
XPATCH_WRKSRC=  ${WRKDIR}
X
Xdo-install:
X       ${INSTALL} -s ${WRKDIR}/distorm/build/freebsd/libdistorm64.so ${PYTHON_LIBDIR}/lib-dynload/distorm.so
X
X.include <bsd.port.pre.mk>
X
X.if ${PYTHON_REL} < 240 || ${PYTHON_REL} >= 250
XIGNORE=                requires Python version 2.4
X.endif
X
X.include <bsd.port.post.mk>
END-of-py-distorm/Makefile
echo x - py-distorm/distinfo
sed 's/^X//' >py-distorm/distinfo << 'END-of-py-distorm/distinfo'
XMD5 (distorm-pkg1.5.16.tar.bz2) = 5132a470dfc2731288e840717edce7f8
XSHA256 (distorm-pkg1.5.16.tar.bz2) = 2106f92b0ce1bc54393dbb7e4f64e9fa833c1e9a88af70dcdd8a637d0621f8ce
XSIZE (distorm-pkg1.5.16.tar.bz2) = 88172
END-of-py-distorm/distinfo
echo x - py-distorm/pkg-plist
sed 's/^X//' >py-distorm/pkg-plist << 'END-of-py-distorm/pkg-plist'
X%%PYTHON_LIBDIR%%/lib-dynload/distorm.so
END-of-py-distorm/pkg-plist
echo x - py-distorm/pkg-descr
sed 's/^X//' >py-distorm/pkg-descr << 'END-of-py-distorm/pkg-descr'
XdiStorm is a binary stream disassembler. It's capable of disassembling
X80x86 instructions in 64 bits (AMD64, X86-64) and both in 16 and 32 bits.
XIn addition, it disassembles FPU, MMX, SSE, SSE2, SSE3, SSE4, 3DNow! (w/
Xextensions), new x86-64 instruction sets, VMX, and AMD's SVM! diStorm was
Xwritten to decode quickly every instruction as accurately as possible.
XRobust decoding, while taking special care for valid or unused prefixes,
Xis what makes this disassembler powerful, especially for research.
XAnother benefit that might come in handy is that the module was written
Xas multi-threaded, which means you could disassemble several streams or
Xmore simultaneously.
X
XWWW: http://www.ragestorm.net/distorm/
END-of-py-distorm/pkg-descr
echo c - py-distorm/files
mkdir -p py-distorm/files > /dev/null 2>&1
echo x - py-distorm/files/patch-build-freebsd
sed 's/^X//' >py-distorm/files/patch-build-freebsd << 'END-of-py-distorm/files/patch-build-freebsd'
Xdiff -ruN distorm/build/freebsd/Makefile distorm.freebsd/build/freebsd/Makefile
X--- distorm/build/freebsd/Makefile     Thu Jan  1 01:00:00 1970
X+++ distorm.freebsd/build/freebsd/Makefile     Thu Nov 30 23:35:00 2006
X@@ -0,0 +1,25 @@
X+#
X+# diStorm64 (Linux Port)
X+#
X+
X+TARGET        = libdistorm64.so
X+COBJS = ../../src/x86defs.o ../../src/wstring.o ../../src/textdefs.o ../../src/prefix.o ../../src/operands.o ../../src/insts.o ../../src/instr
uctions.o ../../src/distorm.o ../../src/decoder.o
X+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
X+CC    = gcc
X+CFLAGS        = -O2 -Wall -fPIC -I/usr/local/include
X+
X+all: clib py
X+
X+clean:
X+      /bin/rm -rf ../../src/*.o ${TARGET} ../../distorm64.a
X+
X+clib: ${COBJS}
X+      ${CC} ${CFLAGS} ${VERSION} ${COBJS} -fPIC -shared -o ${TARGET}
X+      ar rs ../../distorm64.a ${COBJS}
X+
X+py: ${PYOBJS}
X+      ${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET}
X+
X+.c.o:
X+      ${CC} ${CFLAGS} ${VERSION} -c $< -o $@
X+
END-of-py-distorm/files/patch-build-freebsd
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list