View | Details | Raw Unified | Return to bug 123627
Collapse All | Expand All

(-)py-distorm/Makefile (-8 / +19 lines)
Lines 6-39 Link Here
6
#
6
#
7
7
8
PORTNAME=	distorm
8
PORTNAME=	distorm
9
PORTVERSION=	1.7.23
9
PORTVERSION=	1.7.29
10
CATEGORIES=	devel python
10
CATEGORIES=	devel python
11
MASTER_SITES=	http://www.ragestorm.net/distorm/ \
11
MASTER_SITES=	http://www.ragestorm.net/distorm/ \
12
		http://www.damogran.de/ports/distorm/
12
		http://www.damogran.de/ports/distorm/
13
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
13
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
14
DISTNAME=	${PORTNAME}-pkg${PORTVERSION}
14
DISTFILES=	${PORTNAME}64-pkg${PORTVERSION}.tar.bz2 \
15
		diSlib64.py
16
EXTRACT_ONLY=	${PORTNAME}64-pkg${PORTVERSION}.tar.bz2
15
17
16
MAINTAINER=	lboehne@damogran.de
18
MAINTAINER=	lboehne@damogran.de
17
COMMENT=	Fast x86 and x86-64 disassembler library for python
19
COMMENT=	Fast x86 and x86-64 disassembler library with Python interface
18
20
19
USE_BZIP2=	yes
21
USE_BZIP2=	yes
20
USE_PYTHON=	yes
22
USE_PYTHON=	yes
21
23
24
MAKE_ENV+=	CC=${CC}
22
WRKSRC=		${WRKDIR}/distorm/build/linux
25
WRKSRC=		${WRKDIR}/distorm/build/linux
26
ALL_TARGET=	py
27
PLIST_FILES=	%%PYTHON_SITELIBDIR%%/distorm.so \
28
		bin/diSlib64.py
23
29
24
.if !defined(NOPORTDOCS)
30
.if !defined(NOPORTDOCS)
25
DOCSDIR=	${PREFIX}/share/doc/py-distorm
31
DOCSDIR=	${PREFIX}/share/doc/py-distorm
26
DOCS=		distorm.html qa.txt vol1.html vol2.html
32
PORTDOCS=	distorm.html qa.txt vol1.html vol2.html
27
.endif
33
.endif
28
34
29
post-patch:
35
post-patch:
30
	${REINPLACE_CMD} -e s,XXPYTHON_LIBDIRXX,${PYTHON_LIBDIR}, ${WRKDIR}/distorm/build/linux/Makefile
36
	${REINPLACE_CMD} -e 's,python2.4,${PYTHON_VERSION},' ${WRKDIR}/distorm/src/pydistorm.h
31
	${REINPLACE_CMD} -e s,python2.4,${PYTHON_VERSION}, ${WRKDIR}/distorm/src/pydistorm.h
37
38
do-install:
39
	${INSTALL_PROGRAM} ${WRKSRC}/distorm.so ${PYTHON_SITELIBDIR}
40
	${ECHO_CMD} '#!'${PYTHON_CMD} | ${CAT} - ${DISTDIR}/diSlib64.py \
41
	> ${WRKDIR}/diSlib64.py
42
	${INSTALL_SCRIPT} ${WRKDIR}/diSlib64.py ${PREFIX}/bin
32
43
33
.if !defined(NOPORTDOCS)
44
.if !defined(NOPORTDOCS)
34
pre-install:
45
post-install:
35
	${MKDIR} ${DOCSDIR}
46
	${MKDIR} ${DOCSDIR}
36
.for f in ${DOCS}
47
.for f in ${PORTDOCS}
37
	${INSTALL_DATA} ${WRKDIR}/distorm/doc/${f} ${DOCSDIR}
48
	${INSTALL_DATA} ${WRKDIR}/distorm/doc/${f} ${DOCSDIR}
38
.endfor
49
.endfor
39
.endif
50
.endif
(-)py-distorm/distinfo (-3 / +6 lines)
Lines 1-3 Link Here
1
MD5 (distorm-pkg1.7.23.tar.bz2) = e7c258c4456943cec010d302aca845b7
1
MD5 (distorm64-pkg1.7.29.tar.bz2) = 47f13753cd335463aea6011d76ea1660
2
SHA256 (distorm-pkg1.7.23.tar.bz2) = 205200b74e4051e125a2175a7cd5c54b76c454419a6b7e276e9d0ca353d22b33
2
SHA256 (distorm64-pkg1.7.29.tar.bz2) = 6f29b6ada8d0bfbc3945b3aa594db389da18861824a9a42846bbc02bc4a091bc
3
SIZE (distorm-pkg1.7.23.tar.bz2) = 88050
3
SIZE (distorm64-pkg1.7.29.tar.bz2) = 90049
4
MD5 (diSlib64.py) = 57df7ae3c8e74723e1e172b46743d789
5
SHA256 (diSlib64.py) = 7efe5b6e4e4070cdb0bfe63fa07ba0578f4299dc520d3b1bd48759297373f06a
6
SIZE (diSlib64.py) = 27349
(-)py-distorm/files/patch-Makefile (-12 / +11 lines)
Lines 1-22 Link Here
1
--- Makefile.orig	Sat Jun  3 19:24:48 2006
1
--- Makefile.orig	2008-05-12 02:39:48.081089220 -0400
2
+++ Makefile	Wed Jan 10 12:45:23 2007
2
+++ Makefile	2008-05-13 03:58:39.453527116 -0400
3
@@ -5,8 +5,7 @@
3
@@ -5,8 +5,7 @@
4
 TARGET	= libdistorm64.so
4
 TARGET	= libdistorm64.so
5
 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
5
 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
6
 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
6
 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
7
-CC	= gcc
7
-CC	= gcc
8
-CFLAGS	= -O2 -Wall -fPIC
8
-CFLAGS	= -O2 -Wall -fPIC -DSUPPORT_64BIT_OFFSET -D_DLL
9
+CFLAGS+= -fPIC -I${LOCALBASE}/include
9
+CFLAGS	+= -fPIC -DSUPPORT_64BIT_OFFSET -D_DLL -I${LOCALBASE}/include
10
 
10
 
11
 all: clib py
11
 all: clib py
12
 
12
 
13
@@ -21,8 +20,7 @@
13
@@ -18,7 +17,7 @@
14
 	${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET}
14
 	ar rs ../../distorm64.a ${COBJS}
15
 
15
 
16
 install: libdistorm64.so
16
 py: ${PYOBJS}
17
-	install -s ${TARGET} /usr/local/lib
17
-	${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET}
18
-	@echo "... running ldconfig might be smart ..."
18
+	${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o distorm.so
19
+	${INSTALL} -s libdistorm64.so XXPYTHON_LIBDIRXX/lib-dynload/distorm.so
20
 
19
 
21
 .c.o:
20
 install: libdistorm64.so
22
 	${CC} ${CFLAGS} ${VERSION} -c $< -o $@
21
 	install -s ${TARGET} /usr/local/lib
(-)py-distorm/pkg-descr (-9 / +7 lines)
Lines 1-12 Link Here
1
diStorm is a binary stream disassembler. It's capable of disassembling
1
diStorm is a binary stream disassembler. It's capable of disassembling
2
80x86 instructions in 64 bits (AMD64, X86-64) and both in 16 and 32 bits.
2
80x86 instructions in 16, 32, and 64 bits (AMD64, X86-64). In
3
In addition, it disassembles FPU, MMX, SSE, SSE2, SSE3, SSE4, 3DNow! (w/
3
addition, it disassembles FPU, MMX, SSE, SSE2, SSE3, SSE4, 3DNow!
4
extensions), new x86-64 instruction sets, VMX, and AMD's SVM! diStorm was
4
(with extensions), new x86-64 instruction sets, VMX, and AMD's SVM! 
5
written to decode quickly every instruction as accurately as possible.
5
diStorm was written to decode every instruction quickly and accurately,
6
Robust decoding, while taking special care for valid or unused prefixes,
6
with robust handling of valid and unused prefixes. It supports
7
is what makes this disassembler powerful, especially for research.
7
multi-threading, which means you can disassemble several streams 
8
Another benefit that might come in handy is that the module was written
8
simultaneously. Also included is a Python PE parser, diSlib64.py.
9
as multi-threaded, which means you could disassemble several streams or
10
more simultaneously.
11
9
12
WWW: http://www.ragestorm.net/distorm/
10
WWW: http://www.ragestorm.net/distorm/
(-)py-distorm/pkg-plist (-6 lines)
Lines 1-6 Link Here
1
%%PYTHON_LIBDIR%%/lib-dynload/distorm.so
2
%%PORTDOCS%%%%DOCSDIR%%/distorm.html
3
%%PORTDOCS%%%%DOCSDIR%%/qa.txt
4
%%PORTDOCS%%%%DOCSDIR%%/vol1.html
5
%%PORTDOCS%%%%DOCSDIR%%/vol2.html
6
%%PORTDOCS%%@dirrm %%DOCSDIR%%

Return to bug 123627