0d46aa
diff -uap subversion-1.7.0/build.conf.rpath subversion-1.7.0/build.conf
0d46aa
--- subversion-1.7.0/build.conf.rpath	2011-08-04 21:18:50.000000000 +0100
0d46aa
+++ subversion-1.7.0/build.conf	2011-10-12 09:23:43.844525530 +0100
0d46aa
@@ -478,7 +478,7 @@ type = swig_lib
0d46aa
 lang = python
0d46aa
 path = subversion/bindings/swig/python/libsvn_swig_py
0d46aa
 libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr
0d46aa
-link-cmd = $(LINK)
0d46aa
+link-cmd = $(LINK_LIB)
0d46aa
 install = swig-py-lib
0d46aa
 # need special build rule to include -DSWIGPYTHON
0d46aa
 compile-cmd = $(COMPILE_SWIG_PY)
0d46aa
@@ -501,7 +501,7 @@ type = swig_lib
0d46aa
 lang = ruby
0d46aa
 path = subversion/bindings/swig/ruby/libsvn_swig_ruby
0d46aa
 libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr
0d46aa
-link-cmd = $(LINK) $(SWIG_RB_LIBS)
0d46aa
+link-cmd = $(LINK_LIB) $(SWIG_RB_LIBS)
0d46aa
 install = swig-rb-lib
0d46aa
 # need special build rule to include
0d46aa
 compile-cmd = $(COMPILE_SWIG_RB)
0d46aa
diff -uap subversion-1.7.0/build/generator/gen_base.py.rpath subversion-1.7.0/build/generator/gen_base.py
0d46aa
--- subversion-1.7.0/build/generator/gen_base.py.rpath	2011-06-22 17:44:54.000000000 +0100
0d46aa
+++ subversion-1.7.0/build/generator/gen_base.py	2011-10-12 09:23:15.368649375 +0100
0d46aa
@@ -506,6 +506,10 @@ class TargetLib(TargetLinked):
0d46aa
     self.msvc_fake = options.get('msvc-fake') == 'yes' # has fake target
0d46aa
     self.msvc_export = options.get('msvc-export', '').split()
0d46aa
 
0d46aa
+    ### hmm. this is Makefile-specific
0d46aa
+    if self.link_cmd == '$(LINK)':
0d46aa
+      self.link_cmd = '$(LINK_LIB)'
0d46aa
+
0d46aa
 class TargetApacheMod(TargetLib):
0d46aa
 
0d46aa
   def __init__(self, name, options, gen_obj):
0d46aa
diff -uap subversion-1.7.0/Makefile.in.rpath subversion-1.7.0/Makefile.in
0d46aa
--- subversion-1.7.0/Makefile.in.rpath	2011-07-16 12:50:53.000000000 +0100
0d46aa
+++ subversion-1.7.0/Makefile.in	2011-10-12 09:24:36.165524732 +0100
0d46aa
@@ -203,8 +203,8 @@ COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXF
0d46aa
 COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
0d46aa
 COMPILE_JAVAHL_JAVAH = $(JAVAH)
0d46aa
 
0d46aa
-LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
0d46aa
-LINK_LIB = $(LINK) $(LT_SO_VERSION)
0d46aa
+LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS)
0d46aa
+LINK_LIB = $(LINK) $(LT_SO_VERSION) -rpath $(libdir)
0d46aa
 LINK_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=link $(CXX) $(LT_LDFLAGS) $(CXXFLAGS) $(LDFLAGS) -rpath $(libdir)
0d46aa
 LINK_CXX_LIB = $(LINK_CXX) $(LT_SO_VERSION)
0d46aa