summaryrefslogtreecommitdiff
blob: 8d406b1e32c212690348525cdd125758ac1018ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- spideroak-bin-4.7.9948.ebuild.orig	2012-08-30 18:08:49.333150726 -0700
+++ spideroak-bin-4.7.9948.ebuild	2012-10-11 07:15:24.798099441 -0700
@@ -22,7 +22,7 @@
 
 SSL_SLOT="0.9.8"
 
-DEPEND=""
+DEPEND="dev-util/patchelf"
 RDEPEND="
 	dbus? ( sys-apps/dbus )
 	!headless? (
@@ -113,6 +113,16 @@
 		# Remove bundled python interpreter => dev-lang/python:2.7
 		rm usr/lib/SpiderOak/py || die "rm py failed"
 	fi
+
+	# Set RPATH for preserve-libs handling (bug #400979).
+	cd "${S}/usr/lib/SpiderOak" || die
+	local x
+	for x in * ; do
+		# Use \x7fELF header to separate ELF executables and libraries
+		[[ -f ${x} && $(od -t x1 -N 4 "${x}") == *"7f 45 4c 46"* ]] || continue
+		patchelf --set-rpath '$ORIGIN' "${x}" || \
+			die "patchelf failed on ${x}"
+	done
 }
 
 src_install() {