3 @@ -15,14 +15,22 @@ unset POSIXLY_CORRECT
6 export TEXTDOMAIN=quilt
7 -export TEXTDOMAINDIR=@LOCALEDIR@
9 -: ${QUILT_DIR=@QUILT_DIR@}
10 +if test -n "$STAGING_DIR"; then
11 + export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
12 + : ${QUILT_DIR=$STAGING_DIR/../host/share/quilt} ${QUILT_LIB=$STAGING_DIR/../host/lib/quilt}
13 + : ${QUILT_ETC=$STAGING_DIR/../host/etc}
15 + export TEXTDOMAINDIR=@LOCALEDIR@
16 + : ${QUILT_DIR=@QUILT_DIR@}
17 + : ${QUILT_ETC=@ETCDIR@}
24 - for QUILTRC in $HOME/.quiltrc @ETCDIR@/quilt.quiltrc; do
25 + for QUILTRC in $HOME/.quiltrc $QUILT_ETC/quilt.quiltrc; do
26 [ -e $QUILTRC ] && break
29 --- a/quilt/scripts/edmail.in
30 +++ b/quilt/scripts/edmail.in
37 # RFCs important for this script:
39 @@ -29,7 +31,7 @@ BEGIN {
42 setlocale(LC_MESSAGES, "");
43 -bindtextdomain("quilt", "@LOCALEDIR@");
44 +bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@");
48 --- a/quilt/scripts/inspect.in
49 +++ b/quilt/scripts/inspect.in
52 # See the COPYING and AUTHORS files for more details.
54 -: ${QUILT_DIR=@QUILT_DIR@}
55 +if test -n "$STAGING_DIR"; then
56 + : ${QUILT_DIR="$STAGING_DIR/../host/share/quilt"}
58 + : ${QUILT_DIR=@QUILT_DIR@}
61 if ! [ -r $QUILT_DIR/scripts/patchfns ]
63 --- a/quilt/scripts/patchfns.in
64 +++ b/quilt/scripts/patchfns.in
66 # See the COPYING and AUTHORS files for more details.
68 export TEXTDOMAIN=quilt
69 -export TEXTDOMAINDIR=@LOCALEDIR@
70 +if [ -n "$STAGING_DIR" ]; then
71 + export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
73 + export TEXTDOMAINDIR=@LOCALEDIR@
77 : ${LC_MESSAGES:=$LANG}
78 --- a/quilt/scripts/remove-trailing-ws.in
79 +++ b/quilt/scripts/remove-trailing-ws.in
86 # Remove trailing whitespace from modified lines in working files.
88 @@ -31,7 +33,7 @@ BEGIN {
91 setlocale(LC_MESSAGES, "");
92 -bindtextdomain("quilt", "@LOCALEDIR@");
93 +bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@");
99 @@ -21,8 +21,8 @@ COLUMN := @COLUMN@
105 +PERL := /usr/bin/env perl
106 +BASH := /usr/bin/env bash
107 SHELL:= @BASH@ # It does not work if dash is used as a shell, for example
110 @@ -32,7 +32,7 @@ AWK := @AWK@
115 +PATCH := /usr/bin/env patch
117 MSGMERGE := @MSGMERGE@
119 @@ -49,8 +49,8 @@ USE_NLS := @USE_NLS@
120 STAT_HARDLINK := @STAT_HARDLINK@
121 PATCH_WRAPPER := @PATCH_WRAPPER@
123 -COMPAT_SYMLINKS := @COMPAT_SYMLINKS@
124 -COMPAT_PROGRAMS := @COMPAT_PROGRAMS@
130 --- a/quilt/scripts/backup-files.in
131 +++ b/quilt/scripts/backup-files.in
132 @@ -53,7 +53,12 @@ usage ()
136 -: ${QUILT_DIR=@QUILT_DIR@}
137 +if test -n "$STAGING_DIR"; then
138 + : ${QUILT_DIR="$STAGING_DIR/../host/share/quilt"}
140 + : ${QUILT_DIR=@QUILT_DIR@}
143 . $QUILT_DIR/scripts/utilfns
154 # This script is free software; you can redistribute it and/or modify
155 # it under the terms of the GNU General Public License version 2 as
164 # This script is free software; you can redistribute it and/or modify
165 # it under the terms of the GNU General Public License version 2 as
166 --- a/compat/getopt.in
167 +++ b/compat/getopt.in
174 # This script is free software; you can redistribute it and/or modify
175 # it under the terms of the GNU General Public License version 2 as
176 --- a/quilt/scripts/dependency-graph.in
177 +++ b/quilt/scripts/dependency-graph.in
184 # This script is free software; you can redistribute it and/or modify
185 # it under the terms of the GNU General Public License version 2 as