From ebc581c0da903321416238368f901551b79f35e0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net>
Date: Thu, 16 Jan 2025 00:17:54 -0500
Subject: [PATCH] For NetBSD, add $ORIGIN and $ORIGIN/../$(LIBODIR) to the
 RPATH

---
 src/sbbs3/GNUmakefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/sbbs3/GNUmakefile b/src/sbbs3/GNUmakefile
index 95dceec552..59b60c91fe 100644
--- a/src/sbbs3/GNUmakefile
+++ b/src/sbbs3/GNUmakefile
@@ -166,6 +166,9 @@ endif
 ifeq ($(os),darwin)
  LIB_RPATH := -Wl,$(RPATH),@executable_path,$(RPATH),@executable_path/../$(LIBODIR)
 endif
+ifeq ($(os), netbsd)
+ LIB_RPATH := '-Wl,-rpath,$$ORIGIN,-rpath,$$ORIGIN/../$(LIBODIR),-z,origin'
+endif
 
 CFLAGS	+=	$(JS_CFLAGS) $(CRYPT_CFLAGS) $(UIFC-MT_CFLAGS) $(XPDEV-MT_CFLAGS) $(SMBLIB_CFLAGS) $(CIOLIB-MT_CFLAGS) $(ENCODE_CFLAGS) $(HASH_CFLAGS)
 CFLAGS	+=	-I../comio
-- 
GitLab