summaryrefslogtreecommitdiff
path: root/tools/quilt/patches/000-relocatable.patch
blob: 99d7af5771dc6250f5e22f27fe0e02b14443d180 (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
--- a/bin/quilt.in
+++ b/bin/quilt.in
@@ -15,9 +15,15 @@
 unset GREP_OPTIONS
 
 export TEXTDOMAIN=quilt
-export TEXTDOMAINDIR=@LOCALEDIR@
 
-: ${QUILT_DIR=@QUILT_DIR@}
+if test -n "$STAGING_DIR"; then
+	export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
+	: ${QUILT_DIR=$STAGING_DIR/../host/share/quilt} ${QUILT_LIB=$STAGING_DIR/../host/lib/quilt}
+else
+	export TEXTDOMAINDIR=@LOCALEDIR@
+	: ${QUILT_DIR=@QUILT_DIR@}
+fi
+
 export QUILT_DIR
 
 if [ -z "$QUILTRC" ]
--- a/quilt/scripts/edmail.in
+++ b/quilt/scripts/edmail.in
@@ -29,7 +29,7 @@ BEGIN {
 }
 
 setlocale(LC_MESSAGES, "");
-bindtextdomain("quilt", "@LOCALEDIR@");
+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@");
 textdomain("quilt");
 
 sub _($) {
--- a/quilt/scripts/inspect.in
+++ b/quilt/scripts/inspect.in
@@ -6,7 +6,11 @@
 #
 #  See the COPYING and AUTHORS files for more details.
 
-: ${QUILT_DIR=@QUILT_DIR@}
+if test -n "$STAGING_DIR"; then
+	: ${QUILT_DIR="$STAGING_DIR/../host/share/quilt"}
+else
+	: ${QUILT_DIR=@QUILT_DIR@}
+fi
 
 if ! [ -r $QUILT_DIR/scripts/patchfns ]
 then
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -8,7 +8,11 @@
 #  See the COPYING and AUTHORS files for more details.
 
 export TEXTDOMAIN=quilt
-export TEXTDOMAINDIR=@LOCALEDIR@
+if [ -n "$STAGING_DIR" ]; then
+	export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
+else
+	export TEXTDOMAINDIR=@LOCALEDIR@
+fi
 
 : ${LC_CTYPE:=$LANG}
 : ${LC_MESSAGES:=$LANG}
--- a/quilt/scripts/remove-trailing-ws.in
+++ b/quilt/scripts/remove-trailing-ws.in
@@ -31,7 +31,7 @@ BEGIN {
 }
 
 setlocale(LC_MESSAGES, "");
-bindtextdomain("quilt", "@LOCALEDIR@");
+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@");
 textdomain("quilt");
 
 sub _($) {