Skip to content

Commit

Permalink
port FreeBSD commit over
Browse files Browse the repository at this point in the history
  • Loading branch information
opntr authored and aquynh committed Mar 24, 2014
1 parent f01fb5b commit f784b26
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions packages/freebsd/ports/devel/capstone/files/patch-Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,41 +10,3 @@ diff -ru /Makefile /Makefile

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

+LIBDATADIR = $(LIBDIR)
+UNAME_S := $(shell uname -s)
+ifeq ($(UNAME_S), FreeBSD)
+LIBDATADIR = $(DESTDIR)$(PREFIX)/libdata
+else
+LIBDATADIR = $(LIBDIR)
+endif
+
INSTALL_BIN ?= install
INSTALL_DATA ?= $(INSTALL_BIN) -m0644
-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)
@@ -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)

0 comments on commit f784b26

Please sign in to comment.