[BACK]Return to patch-Makefile CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / pkgsrc / devel / capstone / patches

File: [cvs.NetBSD.org] / pkgsrc / devel / capstone / patches / Attic / patch-Makefile (download)

Revision 1.2, Sat Feb 20 11:40:30 2016 UTC (4 years, 7 months ago) by jperkin
Branch: MAIN
CVS Tags: pkgsrc-2017Q4-base, pkgsrc-2017Q4, pkgsrc-2017Q3-base, pkgsrc-2017Q3, pkgsrc-2017Q2-base, pkgsrc-2017Q2, pkgsrc-2017Q1-base, pkgsrc-2017Q1, pkgsrc-2016Q4-base, pkgsrc-2016Q4, pkgsrc-2016Q3-base, pkgsrc-2016Q3, pkgsrc-2016Q2-base, pkgsrc-2016Q2, pkgsrc-2016Q1-base, pkgsrc-2016Q1
Changes since 1.1: +12 -1 lines

Fix install_name on Darwin.  Bump PKGREVISION.

$NetBSD: patch-Makefile,v 1.2 2016/02/20 11:40:30 jperkin Exp $

Unbreak build on FreeBSD and DragonflyBSD.

Patch accepted upstream:
https://github.com/aquynh/capstone/commit/453b41a29ed7f02f8319329cc86853d394b85a1e

Fix install_name on Darwin.

--- Makefile.orig	2015-07-15 07:44:42.000000000 +0000
+++ Makefile
@@ -70,12 +70,18 @@ LIBDIRARCH ?= lib
 LIBDIR = $(DESTDIR)$(PREFIX)/$(LIBDIRARCH)
 
 LIBDATADIR = $(LIBDIR)
+
+# Don't redefine $LIBDATADIR when global environment variable
+# USE_GENERIC_LIBDATADIR is set. This is used by the pkgsrc framework.
+
+ifndef USE_GENERIC_LIBDATADIR
 ifeq ($(UNAME_S), FreeBSD)
 LIBDATADIR = $(DESTDIR)$(PREFIX)/libdata
 endif
 ifeq ($(UNAME_S), DragonFly)
 LIBDATADIR = $(DESTDIR)$(PREFIX)/libdata
 endif
+endif
 
 INSTALL_BIN ?= install
 INSTALL_DATA ?= $(INSTALL_BIN) -m0644
@@ -248,7 +254,7 @@ IS_APPLE := $(shell $(CC) -dM -E - < /de
 ifeq ($(IS_APPLE),1)
 EXT = dylib
 VERSION_EXT = $(API_MAJOR).$(EXT)
-$(LIBNAME)_LDFLAGS += -dynamiclib -install_name lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
+$(LIBNAME)_LDFLAGS += -dynamiclib -install_name ${LIBDIR}/lib$(LIBNAME).$(VERSION_EXT) -current_version $(PKG_MAJOR).$(PKG_MINOR).$(PKG_EXTRA) -compatibility_version $(PKG_MAJOR).$(PKG_MINOR)
 AR_EXT = a
 # Homebrew wants to make sure its formula does not disable FORTIFY_SOURCE
 # However, this is not really necessary because 'CAPSTONE_USE_SYS_DYN_MEM=yes' by default
@@ -463,4 +469,3 @@ define generate-pkgcfg
 	echo 'Libs: -L$${libdir} -lcapstone' >> $(PKGCFGF)
 	echo 'Cflags: -I$${includedir}' >> $(PKGCFGF)
 endef
-