--- serf-1.3.9/SConstruct.~1~	2015-09-17 15:46:24.000000000 +0000
+++ serf-1.3.9/SConstruct	2018-01-31 10:47:06.019650324 +0000
@@ -224,8 +224,7 @@
 else:
   LIBNAMESTATIC = 'serf-${MAJOR}'
 
-env.Append(RPATH=libdir,
-           PDB='${TARGET.filebase}.pdb')
+env.Append(PDB='${TARGET.filebase}.pdb')
 
 if sys.platform == 'darwin':
 #  linkflags.append('-Wl,-install_name,@executable_path/%s.dylib' % (LIBNAME,))
@@ -371,7 +370,7 @@
     apu_libs = ''
 
   env.Append(CPPPATH=['$OPENSSL/include'])
-  env.Append(LIBPATH=['$OPENSSL/lib'])
+#  env.Append(LIBPATH=['$OPENSSL/lib'])
 
 
 # If build with gssapi, get its information and define SERF_HAVE_GSSAPI
@@ -389,7 +388,12 @@
 # RPATH flags. We'll manually map all directories in LIBPATH into new
 # flags to set RPATH values.
 for d in env['LIBPATH']:
-  env.Append(RPATH=':'+d)
+  if d not in ['/lib', '/lib/64',
+    '/lib/amd64', '/lib/sparcv9',
+    '/usr/lib', '/usr/lib/64',
+    '/usr/lib/amd64', '/usr/lib/sparcv9' ]:
+    print('Appending %s to RPATH' % (d))
+    env.Append(RPATH=':'+d)
 
 # Set up the construction of serf-*.pc
 pkgconfig = env.Textfile('serf-%d.pc' % (MAJOR,),