From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
Date: Fri, 15 Sep 2023 00:09:07 +0200
Subject: [PATCH] Force RPATH to be used for the PL/Perl plugin

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

diff --git a/src/pl/plperl/GNUmakefile b/src/pl/plperl/GNUmakefile
index 51f8890d15d9..00d05a5e86a8 100644
--- a/src/pl/plperl/GNUmakefile
+++ b/src/pl/plperl/GNUmakefile
@@ -60,6 +60,9 @@ ifeq ($(PORTNAME), cygwin)
 SHLIB_LINK += -Wl,--export-all-symbols
 endif
 
+# Force rpath to be used even though we disable it everywhere else
+SHLIB_LINK += $(rpath)
+
 REGRESS_OPTS = --dbname=$(PL_TESTDB)
 REGRESS = plperl_setup plperl plperl_lc plperl_trigger plperl_shared \
 	plperl_elog plperl_util plperl_init plperlu plperl_array \
