$NetBSD: patch-GNUmakefile,v 1.5 2025/02/13 18:18:54 adam Exp $

On Darwin, use absolute path to avoid conflict with devel/libtool.
Fix dylib name.

--- GNUmakefile.orig	2023-10-01 16:38:21.000000000 +0000
+++ GNUmakefile
@@ -33,7 +33,7 @@ CHMOD ?= chmod
 MKDIR ?= mkdir -p
 
 LN ?= ln -sf
-LDCONF ?= /sbin/ldconfig -n
+LDCONF ?= true
 
 # Solaris provides a non-Posix sed and grep at /usr/bin
 # Solaris 10 is missing AR in /usr/bin
@@ -87,7 +87,7 @@ INTEL_COMPILER := $(shell $(CXX) --versi
 
 # Enable shared object versioning for Linux and Solaris
 HAS_SOLIB_VERSION ?= 0
-ifneq ($(IS_LINUX)$(IS_HURD)$(IS_SUN),000)
+ifeq ($(IS_DARWIN),0)
   HAS_SOLIB_VERSION := 1
 endif
 
@@ -1148,9 +1148,9 @@ ifeq ($(HAS_SOLIB_VERSION),1)
 # Different patchlevels and minors are compatible since 6.1
 SOLIB_COMPAT_SUFFIX=.$(LIB_MAJOR)
 # Linux uses -Wl,-soname
-ifneq ($(IS_LINUX)$(IS_HURD),00)
+ifneq ($(IS_LINUX)$(IS_HURD)$(IS_NETBSD),00)
 # Linux uses full version suffix for shared library
-SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR).$(LIB_PATCH)
+SOLIB_VERSION_SUFFIX=.$(LIB_MAJOR).$(LIB_MINOR)
 SOLIB_FLAGS=-Wl,-soname,libcryptopp.so$(SOLIB_COMPAT_SUFFIX)
 endif
 # Solaris uses -Wl,-h
@@ -1448,7 +1448,7 @@ ifneq ($(wildcard libcryptopp.dylib),)
 	@-$(MKDIR) $(DESTDIR)$(LIBDIR)
 	$(CP) libcryptopp.dylib $(DESTDIR)$(LIBDIR)
 	$(CHMOD) u=rwx,go=rx $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
-	-install_name_tool -id $(DESTDIR)$(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
+	-install_name_tool -id $(LIBDIR)/libcryptopp.dylib $(DESTDIR)$(LIBDIR)/libcryptopp.dylib
 endif
 ifneq ($(wildcard libcryptopp.so$(SOLIB_VERSION_SUFFIX)),)
 	@-$(MKDIR) $(DESTDIR)$(LIBDIR)
