package: add Macports

This commit is contained in:
me 2014-02-14 07:19:15 -08:00
parent 474425ad9e
commit f529535cb1
3 changed files with 64 additions and 0 deletions

View File

@ -0,0 +1,20 @@
PortSystem 1.0
name capstone
version 2.0
extract.suffix .tgz
revision 1
categories devel
license BSD
maintainers gmail.com:aquynh
description Capstone disassembly engine
long_description Capstone is a multi-arch, multi-platform disassembly framework with advanced features
homepage http://www.capstone-engine.org/
platforms darwin
master_sites http://www.capstone-engine.org/download/2.0/
checksums sha256 5d871b1e52047d1b2882bbcc6f049205ba6acc8d55d746937d22af5d0b33fa9e \
rmd160 bb7551404e203fa99240b5e33c3d30ca8555830f
configure.cmd ./make.sh
destroot.args prefix=${prefix}
patchfiles patch-make.sh.diff patch-Makefile.diff
livecheck.type none

View File

@ -0,0 +1,24 @@
--- Makefile.org 2014-02-14 01:57:37.000000000 -0800
+++ Makefile 2014-02-14 06:48:57.000000000 -0800
@@ -23,20 +23,11 @@
LDFLAGS += -shared
-PREFIX ?= /usr
+PREFIX = $(prefix)
DESTDIR ?=
INCDIR = $(DESTDIR)$(PREFIX)/include
LIBDIR = $(DESTDIR)$(PREFIX)/lib
-# on x86_64, we might have /usr/lib64 directory instead of /usr/lib
-MACHINE := $(shell uname -m)
-ifeq ($(MACHINE), x86_64)
-ifeq (,$(wildcard $(LIBDIR)))
-LIBDIR = $(DESTDIR)$(PREFIX)/lib64
-else
-LIBDIR = $(DESTDIR)$(PREFIX)/lib
-endif
-endif
INSTALL_BIN ?= install
INSTALL_DATA ?= $(INSTALL_BIN) -m0644

View File

@ -0,0 +1,20 @@
--- make.sh.org 2014-02-14 01:14:07.000000000 -0800
+++ make.sh 2014-02-14 01:34:36.000000000 -0800
@@ -42,16 +42,4 @@
export PREFIX=/usr/local
fi
-case "$1" in
- "" ) build;;
- "default" ) build;;
- "install" ) install;;
- "nix32" ) CFLAGS=-m32 LDFLAGS=-m32 build;;
- "cross-win32" ) CROSS=i686-w64-mingw32- build;;
- "cross-win64" ) CROSS=x86_64-w64-mingw32- build;;
- "cygwin-mingw32" ) CROSS=i686-pc-mingw32- build;;
- "cygwin-mingw64" ) CROSS=x86_64-w64-mingw32- build;;
- "clang" ) CC=clang build;;
- "gcc" ) CC=gcc build;;
- * ) echo "Usage: make.sh [nix32|cross-win32|cross-win64|cygwin-mingw32|cygwin-mingw64|clang|gcc]"; exit 1;;
-esac
+build