Date: Sat, 25 Jan 2014 18:39:41 GMT From: Oliver Pinter <oliver.pntr@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/186102: add devel/capstone port Message-ID: <201401251839.s0PIdf8h078247@oldred.freebsd.org> Resent-Message-ID: <201401251840.s0PIe19r092420@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 186102 >Category: ports >Synopsis: add devel/capstone 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: Sat Jan 25 18:40:01 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Oliver Pinter >Release: 10-STABLE >Organization: Ukatemi >Environment: >Description: Capstone is a lightweight multi-platform, multi-architecture disassembly framework. Our target is to make Capstone the ultimate disassembly engine for binary analysis and reversing in the security community. >How-To-Repeat: >Fix: Patch attached with submission follows: # 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: # # devel/capstone/ # devel/capstone/Makefile # devel/capstone/pkg-descr # devel/capstone/files # devel/capstone/files/patch-Makefile # devel/capstone/files/patch-tests_Makefile # devel/capstone/distinfo # devel/capstone/pkg-plist # echo c - devel/capstone/ mkdir -p devel/capstone/ > /dev/null 2>&1 echo x - devel/capstone/Makefile sed 's/^X//' >devel/capstone/Makefile << 'eb923420b6ee5de6983a578dde37a05b' X# $FreeBSD$ X XPORTNAME= capstone XPORTVERSION= 2.0 XCATEGORIES= devel XMASTER_SITES= http://capstone-engine.org/download/2.0/ X XMAINTAINER= oliver.pntr@gmail.com XCOMMENT= multi-platform, multi-architecture disassembly framework X XLICENSE= BSD X XUSES= gmake X XMAKE_ENV= INSTALL_DATA="${INSTALL_DATA}" XMAKE_ENV+= INSTALL_LIBRARY="${INSTALL_DATA}" X Xpre-install: X @${REINPLACE_CMD} -e '/libdir/s|/usr/ports/devel/capstone/work/stage||g' ${WRKSRC}/capstone.pc X X.include <bsd.port.mk> X eb923420b6ee5de6983a578dde37a05b echo x - devel/capstone/pkg-descr sed 's/^X//' >devel/capstone/pkg-descr << '24d703243c963978da49c5412a55e8ca' XCapstone is a lightweight multi-platform, multi-architecture disassembly framework. X XFeatures: X * Support hardware architectures: ARM, ARM64 (aka ARMv8), Mips, PowerPC & X86. X * Clean/simple/lightweight/intuitive architecture-neutral API. X * Provide details on disassembled instruction (called "decomposer" by others). X * Provide some semantics of the disassembled instruction, such as list of X implicit registers read & written. X * Implemented in pure C language, with bindings for Python, Ruby, C#, Java, X GO, OCaml & Vala available. X * Native support for Windows & *nix (including MacOSX, Linux, *BSD & Solaris X platforms). X * Thread-safe by design. X * Distributed under the open source BSD license. X Xhttp://capstone-engine.org/ 24d703243c963978da49c5412a55e8ca echo c - devel/capstone/files mkdir -p devel/capstone/files > /dev/null 2>&1 echo x - devel/capstone/files/patch-Makefile sed 's/^X//' >devel/capstone/files/patch-Makefile << '4d57b0d83fd4b7908946b8e1edd55333' X--- Makefile.orig 2014-01-22 11:33:35.000000000 +0100 X+++ Makefile 2014-01-25 19:13:32.000000000 +0100 X@@ -15,7 +15,7 @@ X STRIP = $(CROSS)strip X endif X X-CFLAGS += -fPIC -O3 -Wall -Iinclude X+CFLAGS += -fPIC -Wall -Iinclude X X ifeq ($(USE_SYS_DYN_MEM),yes) X CFLAGS += -DUSE_SYS_DYN_MEM X@@ -38,6 +38,14 @@ X endif X endif X X+LIBDATADIR = $(LIBDIR) X+UNAME_S := $(shell uname -s) X+ifeq ($(UNAME_S), FreeBSD) X+LIBDATADIR = $(DESTDIR)$(PREFIX)/libdata X+else X+LIBDATADIR = $(LIBDIR) X+endif X+ X INSTALL_BIN ?= install X INSTALL_DATA ?= $(INSTALL_BIN) -m0644 X INSTALL_LIBRARY ?= $(INSTALL_BIN) -m0755 X@@ -88,7 +96,6 @@ X X LIBOBJ += MCInst.o X X-UNAME_S := $(shell uname -s) X # OSX? X ifeq ($(UNAME_S),Darwin) X EXT = dylib X@@ -156,14 +163,14 @@ X $(INSTALL_DATA) lib$(LIBNAME).$(AR_EXT) $(LIBDIR) X mkdir -p $(INCDIR)/$(LIBNAME) X $(INSTALL_DATA) include/*.h $(INCDIR)/$(LIBNAME) X- mkdir -p $(LIBDIR)/pkgconfig X- $(INSTALL_DATA) $(PKGCFGF) $(LIBDIR)/pkgconfig/ X+ mkdir -p $(LIBDATADIR)/pkgconfig X+ $(INSTALL_DATA) $(PKGCFGF) $(LIBDATADIR)/pkgconfig/ X X uninstall: X rm -rf $(INCDIR)/$(LIBNAME) X rm -f $(LIBDIR)/lib$(LIBNAME).$(EXT) X rm -f $(LIBDIR)/lib$(LIBNAME).$(AR_EXT) X- rm -f $(LIBDIR)/pkgconfig/$(LIBNAME).pc X+ rm -f $(LIBDATADIR)/pkgconfig/$(LIBNAME).pc X X clean: X rm -f $(LIBOBJ) lib$(LIBNAME).* 4d57b0d83fd4b7908946b8e1edd55333 echo x - devel/capstone/files/patch-tests_Makefile sed 's/^X//' >devel/capstone/files/patch-tests_Makefile << '96dd9a5a7164bba339efb6f879f5d89b' X--- tests/Makefile.orig 2014-01-25 19:14:03.000000000 +0100 X+++ tests/Makefile 2014-01-25 19:14:24.000000000 +0100 X@@ -11,7 +11,7 @@ X endif X X X-CFLAGS += -fPIC -O3 -Wall -I$(INCDIR) -L$(LIBDIR) X+CFLAGS += -fPIC -Wall -I$(INCDIR) -L$(LIBDIR) X X LIBNAME = capstone X X@@ -48,8 +48,8 @@ X $(BINARY): $(OBJS) X X %$(BIN_EXT): %.o X- ${CC} $(CFLAGS) $(LDFLAGS) $< -O3 -Wall -l$(LIBNAME) -o $@ X- ${CC} $(CFLAGS) $(LDFLAGS) $< -O3 -Wall ../lib$(LIBNAME).$(AR_EXT) -o $(subst $(BIN_EXT),,$@).static$(BIN_EXT) X+ ${CC} $(CFLAGS) $(LDFLAGS) $< -Wall -l$(LIBNAME) -o $@ X+ ${CC} $(CFLAGS) $(LDFLAGS) $< -Wall ../lib$(LIBNAME).$(AR_EXT) -o $(subst $(BIN_EXT),,$@).static$(BIN_EXT) X X %.o: %.c X ${CC} ${CFLAGS} -c $< -o $@ 96dd9a5a7164bba339efb6f879f5d89b echo x - devel/capstone/distinfo sed 's/^X//' >devel/capstone/distinfo << 'fe9d0ab735c25aa703cfeff373bb4d0d' XSHA256 (capstone-2.0.tar.gz) = 5d871b1e52047d1b2882bbcc6f049205ba6acc8d55d746937d22af5d0b33fa9e XSIZE (capstone-2.0.tar.gz) = 1731759 fe9d0ab735c25aa703cfeff373bb4d0d echo x - devel/capstone/pkg-plist sed 's/^X//' >devel/capstone/pkg-plist << '3163f3a81e98d4f80f6173734395927a' Xinclude/capstone/arm.h Xinclude/capstone/arm64.h Xinclude/capstone/capstone.h Xinclude/capstone/mips.h Xinclude/capstone/ppc.h Xinclude/capstone/x86.h Xlib/libcapstone.a Xlib/libcapstone.so Xlibdata/pkgconfig/capstone.pc X@dirrmtry include/capstone 3163f3a81e98d4f80f6173734395927a exit >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401251839.s0PIdf8h078247>