Skip to content

Commit

Permalink
package: simplify freebsd ports package
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Pinter <[email protected]>
  • Loading branch information
opntr committed Mar 23, 2014
1 parent c5ecae5 commit aec4fa2
Showing 1 changed file with 4 additions and 44 deletions.
48 changes: 4 additions & 44 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,44 +10,3 @@

ifeq ($(USE_SYS_DYN_MEM),yes)
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).*

0 comments on commit aec4fa2

Please sign in to comment.