Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/aquynh/capstone
Browse files Browse the repository at this point in the history
  • Loading branch information
aquynh committed Mar 17, 2014
2 parents 6427712 + 017f184 commit 21402b1
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 37 deletions.
10 changes: 4 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,10 @@ CFLAGS := $(CFLAGS:-fPIC=)
# On Windows we need the shared library to be executable
else
# Linux, *BSD
EXT = so
AR_EXT = a
API_MAJOR=$(shell echo `grep -e CS_API_MAJOR include/capstone.h | grep -v = | awk '{print $$3}'` | awk '{print $$1}')

LDFLAGS += -Wl,-soname,lib$(LIBNAME)$(API_MAJOR)
EXT = so.$(API_MAJOR)
AR_EXT = a
LDFLAGS += -Wl,-soname,lib$(LIBNAME).$(EXT)
endif
endif
endif
Expand Down Expand Up @@ -253,8 +252,7 @@ install: $(PKGCFGF) $(ARCHIVE) $(LIBRARY)

uninstall:
rm -rf $(INCDIR)/$(LIBNAME)
rm -f $(LIBDIR)/lib$(LIBNAME).$(EXT)
rm -f $(LIBDIR)/lib$(LIBNAME).$(AR_EXT)
rm -f $(LIBDIR)/lib$(LIBNAME).*
rm -f $(PKGCFCGDIR)/$(LIBNAME).pc

clean:
Expand Down
7 changes: 4 additions & 3 deletions packages/freebsd/ports/devel/capstone/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# $FreeBSD$

PORTNAME= capstone
PORTVERSION= 2.0
PORTVERSION= 2.1.1
CATEGORIES= devel
MASTER_SITES= http://capstone-engine.org/download/2.0/
MASTER_SITES= http://capstone-engine.org/download/2.1/

MAINTAINER= [email protected]
COMMENT= Multi-platform, multi-architecture disassembly framework
Expand All @@ -13,7 +13,8 @@ LICENSE= BSD3CLAUSE
USES= gmake
USE_LDCONFIG= yes

MAKE_ENV= INSTALL_LIBRARY="${INSTALL_LIB}"
MAKE_ENV+= INSTALL_LIB="${INSTALL_LIB}" \
INSTALL_DATA="${INSTALL_DATA}"

post-build:
# The pkgconfig file is generated and points to stagedir
Expand Down
4 changes: 2 additions & 2 deletions packages/freebsd/ports/devel/capstone/distinfo
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SHA256 (capstone-2.0.tar.gz) = 5d871b1e52047d1b2882bbcc6f049205ba6acc8d55d746937d22af5d0b33fa9e
SIZE (capstone-2.0.tar.gz) = 1731759
SHA256 (capstone-2.1.1.tar.gz) = 8af3c0a0f439d516277f308938935003d072f34a34fcf2e8dcf07dd415b1ca65
SIZE (capstone-2.1.1.tar.gz) = 1353194
42 changes: 20 additions & 22 deletions packages/freebsd/ports/devel/capstone/files/patch-Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--- Makefile.orig 2014-01-22 11:33:35.000000000 +0100
+++ Makefile 2014-01-25 19:13:32.000000000 +0100
@@ -15,7 +15,7 @@
diff -ru /Makefile /Makefile
--- Makefile 2014-03-14 17:24:44.000000000 +0100
+++ Makefile 2014-03-14 17:35:33.000000000 +0100
@@ -16,7 +16,7 @@
STRIP = $(CROSS)strip
endif

Expand All @@ -9,7 +10,7 @@

ifeq ($(USE_SYS_DYN_MEM),yes)
CFLAGS += -DUSE_SYS_DYN_MEM
@@ -38,6 +38,14 @@
@@ -39,9 +39,17 @@
endif
endif

Expand All @@ -23,30 +24,27 @@
+
INSTALL_BIN ?= install
INSTALL_DATA ?= $(INSTALL_BIN) -m0644
INSTALL_LIBRARY ?= $(INSTALL_BIN) -m0755
@@ -88,7 +96,6 @@
-INSTALL_LIBRARY ?= $(INSTALL_BIN) -m0755
+INSTALL_LIB ?= $(INSTALL_BIN) -m0755

LIBNAME = capstone

@@ -138,8 +146,7 @@
LIBOBJ += MCInst.o


-UNAME_S := $(shell uname -s)
-PKGCFCGDIR = $(LIBDIR)/pkgconfig
+PKGCFCGDIR = $(LIBDATADIR)/pkgconfig

# OSX?
ifeq ($(UNAME_S),Darwin)
EXT = dylib
@@ -156,14 +163,14 @@
@@ -244,7 +251,7 @@

install: $(PKGCFGF) $(ARCHIVE) $(LIBRARY)
mkdir -p $(LIBDIR)
- $(INSTALL_LIBRARY) lib$(LIBNAME).$(EXT) $(LIBDIR)
+ $(INSTALL_LIB) lib$(LIBNAME).$(EXT) $(LIBDIR)
$(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 $(LIBDATADIR)/pkgconfig
+ $(INSTALL_DATA) $(PKGCFGF) $(LIBDATADIR)/pkgconfig/

uninstall:
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 $(LIBDATADIR)/pkgconfig/$(LIBNAME).pc

clean:
rm -f $(LIBOBJ) lib$(LIBNAME).*
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
--- tests/Makefile.orig 2014-01-25 19:14:03.000000000 +0100
+++ tests/Makefile 2014-01-25 19:14:24.000000000 +0100
@@ -11,7 +11,7 @@
diff -ru work.orig/capstone-2.1.1/tests/Makefile work/capstone-2.1.1/tests/Makefile
--- tests/Makefile 2014-03-14 17:24:44.000000000 +0100
+++ tests/Makefile 2014-03-14 17:52:47.000000000 +0100
@@ -13,7 +13,7 @@
endif


Expand All @@ -9,7 +10,7 @@

LIBNAME = capstone

@@ -48,8 +48,8 @@
@@ -66,8 +66,8 @@
$(BINARY): $(OBJS)

%$(BIN_EXT): %.o
Expand Down

0 comments on commit 21402b1

Please sign in to comment.