Date: Tue, 13 May 2008 10:11:40 GMT From: bf <bf2006a@yahoo.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/123627: [PATCH]devel/py-distorm: update to 1.7.29 and rework port Message-ID: <200805131011.m4DABeSq022567@www.freebsd.org> Resent-Message-ID: <200805131020.m4DAK1sS086381@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 123627 >Category: ports >Synopsis: [PATCH]devel/py-distorm: update to 1.7.29 and rework port >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Tue May 13 10:20:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: bf >Release: 7-STABLE i386 >Organization: - >Environment: >Description: distorm64 contains two independent libraries, one Python/C, and one pure C, so split it into two ports, py-distorm (Python/C, attached patch) and distorm (C, shar to be included in a second message). Fix stilted pkg-descr. Bundle PE parser diSlib64.py with py-distorm. Move Python library into PYTHON_SITELIBDIR. Install simple bundled disassembler, disasm, as part of distorm. The new version includes numerous new features and bugfixes. See the changelogs and homepage for details. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN py-distorm.orig/Makefile py-distorm/Makefile --- py-distorm.orig/Makefile 2007-06-20 10:20:08.000000000 -0400 +++ py-distorm/Makefile 2008-05-13 05:19:21.058806279 -0400 @@ -6,34 +6,45 @@ # PORTNAME= distorm -PORTVERSION= 1.7.23 +PORTVERSION= 1.7.29 CATEGORIES= devel python MASTER_SITES= http://www.ragestorm.net/distorm/ \ http://www.damogran.de/ports/distorm/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} -DISTNAME= ${PORTNAME}-pkg${PORTVERSION} +DISTFILES= ${PORTNAME}64-pkg${PORTVERSION}.tar.bz2 \ + diSlib64.py +EXTRACT_ONLY= ${PORTNAME}64-pkg${PORTVERSION}.tar.bz2 MAINTAINER= lboehne@damogran.de -COMMENT= Fast x86 and x86-64 disassembler library for python +COMMENT= Fast x86 and x86-64 disassembler library with Python interface USE_BZIP2= yes USE_PYTHON= yes +MAKE_ENV+= CC=${CC} WRKSRC= ${WRKDIR}/distorm/build/linux +ALL_TARGET= py +PLIST_FILES= %%PYTHON_SITELIBDIR%%/distorm.so \ + bin/diSlib64.py .if !defined(NOPORTDOCS) DOCSDIR= ${PREFIX}/share/doc/py-distorm -DOCS= distorm.html qa.txt vol1.html vol2.html +PORTDOCS= 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 + ${REINPLACE_CMD} -e 's,python2.4,${PYTHON_VERSION},' ${WRKDIR}/distorm/src/pydistorm.h + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/distorm.so ${PYTHON_SITELIBDIR} + ${ECHO_CMD} '#!'${PYTHON_CMD} | ${CAT} - ${DISTDIR}/diSlib64.py \ + > ${WRKDIR}/diSlib64.py + ${INSTALL_SCRIPT} ${WRKDIR}/diSlib64.py ${PREFIX}/bin .if !defined(NOPORTDOCS) -pre-install: +post-install: ${MKDIR} ${DOCSDIR} -.for f in ${DOCS} +.for f in ${PORTDOCS} ${INSTALL_DATA} ${WRKDIR}/distorm/doc/${f} ${DOCSDIR} .endfor .endif diff -ruN py-distorm.orig/distinfo py-distorm/distinfo --- py-distorm.orig/distinfo 2007-06-20 10:20:08.000000000 -0400 +++ py-distorm/distinfo 2008-05-13 05:19:21.058806279 -0400 @@ -1,3 +1,6 @@ -MD5 (distorm-pkg1.7.23.tar.bz2) = e7c258c4456943cec010d302aca845b7 -SHA256 (distorm-pkg1.7.23.tar.bz2) = 205200b74e4051e125a2175a7cd5c54b76c454419a6b7e276e9d0ca353d22b33 -SIZE (distorm-pkg1.7.23.tar.bz2) = 88050 +MD5 (distorm64-pkg1.7.29.tar.bz2) = 47f13753cd335463aea6011d76ea1660 +SHA256 (distorm64-pkg1.7.29.tar.bz2) = 6f29b6ada8d0bfbc3945b3aa594db389da18861824a9a42846bbc02bc4a091bc +SIZE (distorm64-pkg1.7.29.tar.bz2) = 90049 +MD5 (diSlib64.py) = 57df7ae3c8e74723e1e172b46743d789 +SHA256 (diSlib64.py) = 7efe5b6e4e4070cdb0bfe63fa07ba0578f4299dc520d3b1bd48759297373f06a +SIZE (diSlib64.py) = 27349 diff -ruN py-distorm.orig/files/patch-Makefile py-distorm/files/patch-Makefile --- py-distorm.orig/files/patch-Makefile 2007-01-17 15:47:29.000000000 -0500 +++ py-distorm/files/patch-Makefile 2008-05-13 05:19:21.058806279 -0400 @@ -1,22 +1,21 @@ ---- Makefile.orig Sat Jun 3 19:24:48 2006 -+++ Makefile Wed Jan 10 12:45:23 2007 +--- Makefile.orig 2008-05-12 02:39:48.081089220 -0400 ++++ Makefile 2008-05-13 03:58:39.453527116 -0400 @@ -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 +-CFLAGS = -O2 -Wall -fPIC -DSUPPORT_64BIT_OFFSET -D_DLL ++CFLAGS += -fPIC -DSUPPORT_64BIT_OFFSET -D_DLL -I${LOCALBASE}/include all: clib py -@@ -21,8 +20,7 @@ - ${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET} +@@ -18,7 +17,7 @@ + ar rs ../../distorm64.a ${COBJS} - 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 + py: ${PYOBJS} +- ${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o ${TARGET} ++ ${CC} ${CFLAGS} ${VERSION} ${PYOBJS} -fPIC -shared -o distorm.so - .c.o: - ${CC} ${CFLAGS} ${VERSION} -c $< -o $@ + install: libdistorm64.so + install -s ${TARGET} /usr/local/lib diff -ruN py-distorm.orig/pkg-descr py-distorm/pkg-descr --- py-distorm.orig/pkg-descr 2007-01-17 15:47:29.000000000 -0500 +++ py-distorm/pkg-descr 2008-05-13 05:24:20.111923365 -0400 @@ -1,12 +1,10 @@ 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. +80x86 instructions in 16, 32, and 64 bits (AMD64, X86-64). In +addition, it disassembles FPU, MMX, SSE, SSE2, SSE3, SSE4, 3DNow! +(with extensions), new x86-64 instruction sets, VMX, and AMD's SVM! +diStorm was written to decode every instruction quickly and accurately, +with robust handling of valid and unused prefixes. It supports +multi-threading, which means you can disassemble several streams +simultaneously. Also included is a Python PE parser, diSlib64.py. WWW: http://www.ragestorm.net/distorm/ diff -ruN py-distorm.orig/pkg-plist py-distorm/pkg-plist --- py-distorm.orig/pkg-plist 2007-01-17 15:47:29.000000000 -0500 +++ py-distorm/pkg-plist 1969-12-31 19:00:00.000000000 -0500 @@ -1,6 +0,0 @@ -%%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%% >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200805131011.m4DABeSq022567>