From: James McCoy <jamessan@debian.org>
Date: Wed, 1 Aug 2018 20:44:36 -0400
Subject: rpath

Prevent the linker from adding an rpath to shared libraries.  Original
patch by David Kimdon <dwhedon@debian.org>.  The basic theory is:

- Use libtool instead of apxs to install the apache modules.
  libtool relinks without rpath in this case, apxs obviously doesn't.
---
 build.conf                  | 4 ++--
 build/generator/gen_base.py | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/build.conf b/build.conf
index a478214..d1d09cd 100644
--- a/build.conf
+++ b/build.conf
@@ -573,7 +573,7 @@ lang = python
 path = subversion/bindings/swig/python/libsvn_swig_py
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
        apriconv apr python swig
-link-cmd = $(LINK)
+link-cmd = $(LINK_LIB)
 install = swig-py-lib
 # need special build rule to include -DSWIGPYTHON
 compile-cmd = $(COMPILE_SWIG_PY)
@@ -599,7 +599,7 @@ type = swig_lib
 lang = ruby
 path = subversion/bindings/swig/ruby/libsvn_swig_ruby
 libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig
-link-cmd = $(LINK) $(SWIG_RB_LIBS)
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
 install = swig-rb-lib
 # need special build rule to include
 compile-cmd = $(COMPILE_SWIG_RB)
diff --git a/build/generator/gen_base.py b/build/generator/gen_base.py
index 4a3f178..e439519 100644
--- a/build/generator/gen_base.py
+++ b/build/generator/gen_base.py
@@ -600,7 +600,7 @@ class TargetLinked(Target):
     self.install = options.get('install')
     self.compile_cmd = options.get('compile-cmd')
     self.sources = options.get('sources', '*.c *.cpp')
-    self.link_cmd = options.get('link-cmd', '$(LINK)')
+    self.link_cmd = options.get('link-cmd', '$(LINK_LIB)')
 
     self.external_lib = options.get('external-lib')
     self.external_project = options.get('external-project')
@@ -654,6 +654,7 @@ class TargetExe(TargetLinked):
       extmap = self.gen_obj._extension_map
       self.objext = extmap['exe', 'object']
       self.filename = build_path_join(self.path, name + extmap['exe', 'target'])
+      self.link_cmd = '$(LINK)'
 
     self.manpages = options.get('manpages', '')
     self.testing = options.get('testing')
