Skip to content
Permalink
Browse files

capstone: update to 2.1 (https://trac.macports.org/ticket/42724)

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@117652 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
ryandesign committed Mar 7, 2014
1 parent 58878de commit ce94d34769b724eaf224f1994e32a67a0d999ee8
Showing with 30 additions and 16 deletions.
  1. +3 −4 devel/capstone/Portfile
  2. +27 −12 devel/capstone/files/patch-Makefile.diff
@@ -4,8 +4,7 @@
PortSystem 1.0

name capstone
version 2.0
revision 1
version 2.1
categories devel
platforms darwin
maintainers gmail.com:aquynh
@@ -19,8 +18,8 @@ homepage http://www.capstone-engine.org/
master_sites ${homepage}download/${version}/
extract.suffix .tgz

checksums sha256 5d871b1e52047d1b2882bbcc6f049205ba6acc8d55d746937d22af5d0b33fa9e \
rmd160 bb7551404e203fa99240b5e33c3d30ca8555830f
checksums sha256 5ebc168212a159218a4454c72d0c060b8a8af78605b93b214b3d6c5e2a124896 \
rmd160 47b9a1949b7c82ec235dcb96a81d456f3b18eae6

patchfiles patch-Makefile.diff

@@ -1,6 +1,6 @@
--- Makefile.orig 2014-01-22 04:33:35.000000000 -0600
+++ Makefile 2014-02-14 18:38:48.000000000 -0600
@@ -21,20 +21,23 @@
--- Makefile.org 2014-03-04 18:18:25.000000000 -0800
+++ Makefile 2014-03-04 18:27:48.000000000 -0800
@@ -21,20 +21,24 @@
CFLAGS += -DUSE_SYS_DYN_MEM
endif

@@ -10,15 +10,16 @@
DESTDIR ?=
-INCDIR = $(DESTDIR)$(PREFIX)/include
+INCDIR = $(PREFIX)/include
+

-LIBDIR = $(DESTDIR)$(PREFIX)/lib
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S),Darwin)
+LDFLAGS += -dynamiclib -install_name $(LIBDIR)/$(LIBRARY)
+else
+LDFLAGS += -shared
+endif

-LIBDIR = $(DESTDIR)$(PREFIX)/lib
+
+
+LIBDIR = $(PREFIX)/lib
# on x86_64, we might have /usr/lib64 directory instead of /usr/lib
-MACHINE := $(shell uname -m)
@@ -33,15 +34,29 @@
endif
endif

@@ -88,7 +91,6 @@

@@ -136,21 +140,10 @@
LIBOBJ += $(LIBOBJ_ARM) $(LIBOBJ_ARM64) $(LIBOBJ_MIPS) $(LIBOBJ_PPC) $(LIBOBJ_X86)
LIBOBJ += MCInst.o

-
-UNAME_S := $(shell uname -s)
-PKGCFCGDIR = $(LIBDIR)/pkgconfig
-
# OSX?
ifeq ($(UNAME_S),Darwin)
EXT = dylib
@@ -145,25 +147,25 @@
AR_EXT = a
-# By default, suppose that Brew is installed & use Brew path for pkgconfig file
-PKGCFCGDIR = /usr/local/lib/pkgconfig
-# is Macport installed instead?
-ifneq (,$(wildcard /opt/local/bin/port))
-# then correct the path for pkgconfig file
-PKGCFCGDIR = /opt/local/lib/pkgconfig
-endif
else
# Cygwin?
IS_CYGWIN := $(shell $(CC) -dumpmachine | grep -i cygwin | wc -l)
@@ -228,25 +221,25 @@
echo 'Description: Capstone disassembler engine' >> $(PKGCFGF)
echo 'Version: $(VERSION)' >> $(PKGCFGF)
echo 'libdir=$(LIBDIR)' >> $(PKGCFGF)
@@ -57,8 +72,8 @@
- $(INSTALL_DATA) lib$(LIBNAME).$(AR_EXT) $(LIBDIR)
- mkdir -p $(INCDIR)/$(LIBNAME)
- $(INSTALL_DATA) include/*.h $(INCDIR)/$(LIBNAME)
- mkdir -p $(LIBDIR)/pkgconfig
- $(INSTALL_DATA) $(PKGCFGF) $(LIBDIR)/pkgconfig/
- mkdir -p $(PKGCFCGDIR)
- $(INSTALL_DATA) $(PKGCFGF) $(PKGCFCGDIR)/
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ $(INSTALL_LIBRARY) lib$(LIBNAME).$(EXT) $(DESTDIR)$(LIBDIR)
+ $(INSTALL_DATA) lib$(LIBNAME).$(AR_EXT) $(DESTDIR)$(LIBDIR)
@@ -71,7 +86,7 @@
- rm -rf $(INCDIR)/$(LIBNAME)
- rm -f $(LIBDIR)/lib$(LIBNAME).$(EXT)
- rm -f $(LIBDIR)/lib$(LIBNAME).$(AR_EXT)
- rm -f $(LIBDIR)/pkgconfig/$(LIBNAME).pc
- rm -f $(PKGCFCGDIR)/$(LIBNAME).pc
+ rm -rf $(DESTDIR)$(INCDIR)/$(LIBNAME)
+ rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).$(EXT)
+ rm -f $(DESTDIR)$(LIBDIR)/lib$(LIBNAME).$(AR_EXT)

0 comments on commit ce94d34

Please sign in to comment.
You can’t perform that action at this time.