v2
Nguyen Anh Quynh 11 years ago
commit 3b94ec8345
  1. 17
      Makefile
  2. 48
      packages/freebsd/ports/devel/capstone/files/patch-Makefile

@ -34,14 +34,21 @@ UNAME_M := $(shell uname -m)
ifeq ($(UNAME_M), x86_64) ifeq ($(UNAME_M), x86_64)
ifeq (,$(wildcard $(LIBDIR))) ifeq (,$(wildcard $(LIBDIR)))
LIBDIR = $(DESTDIR)$(PREFIX)/lib64 LIBDIR = $(DESTDIR)$(PREFIX)/lib64
else
LIBDIR = $(DESTDIR)$(PREFIX)/lib
endif endif
endif endif
LIBDATADIR = $(LIBDIR)
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), FreeBSD)
LIBDATADIR = $(DESTDIR)$(PREFIX)/libdata
endif
ifeq ($(UNAME_S), DragonFly)
LIBDATADIR = $(DESTDIR)$(PREFIX)/libdata
endif
INSTALL_BIN ?= install INSTALL_BIN ?= install
INSTALL_DATA ?= $(INSTALL_BIN) -m0644 INSTALL_DATA ?= $(INSTALL_BIN) -m0644
INSTALL_LIBRARY ?= $(INSTALL_BIN) -m0755 INSTALL_LIB ?= $(INSTALL_BIN) -m0755
LIBNAME = capstone LIBNAME = capstone
@ -174,7 +181,7 @@ LIBOBJ += MCInst.o
UNAME_S := $(shell uname -s) UNAME_S := $(shell uname -s)
PKGCFCGDIR = $(LIBDIR)/pkgconfig PKGCFCGDIR = $(LIBDATADIR)/pkgconfig
VERSION_EXT = VERSION_EXT =
# OSX? # OSX?
@ -284,7 +291,7 @@ install: $(PKGCFGF) $(ARCHIVE) $(LIBRARY)
mkdir -p $(LIBDIR) mkdir -p $(LIBDIR)
# remove potential broken old libs # remove potential broken old libs
rm -f $(LIBDIR)/lib$(LIBNAME).* rm -f $(LIBDIR)/lib$(LIBNAME).*
$(INSTALL_LIBRARY) lib$(LIBNAME).$(EXT) $(LIBDIR) $(INSTALL_LIB) lib$(LIBNAME).$(EXT) $(LIBDIR)
ifneq ($(VERSION_EXT),) ifneq ($(VERSION_EXT),)
ln -s $(LIBDIR)/lib$(LIBNAME).$(EXT) $(LIBDIR)/lib$(LIBNAME).$(VERSION_EXT) ln -s $(LIBDIR)/lib$(LIBNAME).$(EXT) $(LIBDIR)/lib$(LIBNAME).$(VERSION_EXT)
endif endif

@ -1,6 +1,7 @@
--- Makefile.orig 2014-01-22 11:33:35.000000000 +0100 diff -ru /Makefile /Makefile
+++ Makefile 2014-01-25 19:13:32.000000000 +0100 --- Makefile 2014-03-14 17:24:44.000000000 +0100
@@ -15,7 +15,7 @@ +++ Makefile 2014-03-14 17:35:33.000000000 +0100
@@ -16,7 +16,7 @@
STRIP = $(CROSS)strip STRIP = $(CROSS)strip
endif endif
@ -9,44 +10,3 @@
ifeq ($(USE_SYS_DYN_MEM),yes) ifeq ($(USE_SYS_DYN_MEM),yes)
CFLAGS += -DUSE_SYS_DYN_MEM CFLAGS += -DUSE_SYS_DYN_MEM
@@ -38,6 +38,14 @@
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
@@ -88,7 +96,6 @@
LIBOBJ += MCInst.o
-UNAME_S := $(shell uname -s)
# OSX?
ifeq ($(UNAME_S),Darwin)
EXT = dylib
@@ -156,14 +163,14 @@
$(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).*

Loading…
Cancel
Save