summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch')
-rw-r--r--sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch69
1 files changed, 69 insertions, 0 deletions
diff --git a/sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch b/sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch
new file mode 100644
index 000000000000..c509e2d29968
--- /dev/null
+++ b/sci-geosciences/gpsd/files/gpsd-3.4-chrpath.patch
@@ -0,0 +1,69 @@
+From 63a44d0cb5494ed1078de411b55cb1c9a8307cec Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 18 Nov 2011 19:09:27 -0500
+Subject: [PATCH] make chrpath optional
+
+There's no reason to require chrpath for distributions who only want to
+compile locally and then install elsewhere for packaging. So allow them
+to specify CHRPATH='' via the env to disable this requirement.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ SConstruct | 27 ++++++++++++++-------------
+ 1 files changed, 14 insertions(+), 13 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index ccaca7d..68bf367 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -270,7 +270,7 @@ def installdir(dir, add_destdir=True):
+
+ # Honor the specified installation prefix in link paths.
+ env.Prepend(LIBPATH=[installdir('libdir')])
+-if env["shared"]:
++if env["shared"] and env['CHRPATH']:
+ env.Prepend(RPATH=[installdir('libdir')])
+
+ # Give deheader a way to set compiler flags
+@@ -390,17 +390,18 @@ config = Configure(env, custom_tests = { 'CheckPKG' : CheckPKG,
+ 'CheckXsltproc' : CheckXsltproc})
+
+ env.Prepend(LIBPATH=[os.path.realpath(os.curdir)])
+-if config.CheckExecutable('$CHRPATH -v', 'chrpath'):
+- # Tell generated binaries to look in the current directory for
+- # shared libraries so we can run tests without hassle. Should be
+- # handled sanely by scons on all systems. Not good to use '.' or
+- # a relative path here; it's a security risk. At install time we
+- # use chrpath to edit this out of RPATH.
+- if env["shared"]:
+- env.Prepend(RPATH=[os.path.realpath(os.curdir)])
+-else:
+- print "chrpath is not available, forcing static linking."
+- env["shared"] = False
++if env['CHRPATH']:
++ if config.CheckExecutable('$CHRPATH -v', 'chrpath'):
++ # Tell generated binaries to look in the current directory for
++ # shared libraries so we can run tests without hassle. Should be
++ # handled sanely by scons on all systems. Not good to use '.' or
++ # a relative path here; it's a security risk. At install time we
++ # use chrpath to edit this out of RPATH.
++ if env["shared"]:
++ env.Prepend(RPATH=[os.path.realpath(os.curdir)])
++ else:
++ print "chrpath is not available, forcing static linking."
++ env["shared"] = False
+
+ confdefs = ["/* gpsd_config.h. Generated by scons, do not hand-hack. */\n"]
+
+@@ -1140,7 +1141,7 @@ if qt_env:
+ binaryinstall.append(LibraryInstall(qt_env, installdir('libdir'), compiled_qgpsmmlib))
+
+ # We don't use installdir here in order to avoid having DESTDIR affect the rpath
+-if env["shared"]:
++if env['CHRPATH']:
+ env.AddPostAction(binaryinstall, '$CHRPATH -r "%s" "$TARGET"' \
+ % (installdir('libdir', False), ))
+
+--
+1.7.8.3
+