diff options
Diffstat (limited to 'tools/quilt/patches/000-relocatable.patch')
| -rw-r--r-- | tools/quilt/patches/000-relocatable.patch | 165 |
1 files changed, 126 insertions, 39 deletions
diff --git a/tools/quilt/patches/000-relocatable.patch b/tools/quilt/patches/000-relocatable.patch index f8110236a6d..0e0eb7380ce 100644 --- a/tools/quilt/patches/000-relocatable.patch +++ b/tools/quilt/patches/000-relocatable.patch @@ -1,69 +1,59 @@ --- a/bin/quilt.in +++ b/bin/quilt.in -@@ -7,9 +7,15 @@ - # See the COPYING and AUTHORS files for more details. +@@ -15,14 +15,22 @@ unset POSIXLY_CORRECT + unset GREP_OPTIONS export TEXTDOMAIN=quilt -export TEXTDOMAINDIR=@LOCALEDIR@ --: ${QUILT_DIR=@QUILT_DIR@} ${QUILT_LIB=@QUILT_LIB@} -+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} +-: ${QUILT_DIR=@QUILT_DIR@} ++if test -n "$STAGING_DIR_HOST"; then ++ export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale" ++ : ${QUILT_DIR=$STAGING_DIR_HOST/share/quilt} ${QUILT_LIB=$STAGING_DIR_HOST/lib/quilt} ++ : ${QUILT_ETC=$STAGING_DIR_HOST/etc} +else + export TEXTDOMAINDIR=@LOCALEDIR@ -+ : ${QUILT_DIR=@QUILT_DIR@} ${QUILT_LIB=@QUILT_LIB@} ++ : ${QUILT_DIR=@QUILT_DIR@} ++ : ${QUILT_ETC=@ETCDIR@} +fi + - export QUILT_DIR QUILT_LIB + export QUILT_DIR if [ -z "$QUILTRC" ] + then +- for QUILTRC in $HOME/.quiltrc @ETCDIR@/quilt.quiltrc; do ++ for QUILTRC in $HOME/.quiltrc $QUILT_ETC/quilt.quiltrc; do + [ -e $QUILTRC ] && break + done + export 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"); +@@ -1,4 +1,6 @@ +-#! @PERL@ -w ++#! @PERL@ ++ ++use warnings; - sub _($) { ---- a/quilt/scripts/inspect.in -+++ b/quilt/scripts/inspect.in -@@ -6,7 +6,11 @@ + # RFCs important for this script: # - # 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/parse-patch.in -+++ b/quilt/scripts/parse-patch.in -@@ -34,7 +34,7 @@ BEGIN { +@@ -29,7 +31,7 @@ BEGIN { } setlocale(LC_MESSAGES, ""); -bindtextdomain("quilt", "@LOCALEDIR@"); -+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@"); ++bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/locale' : "@LOCALEDIR@"); textdomain("quilt"); sub _($) { --- a/quilt/scripts/patchfns.in +++ b/quilt/scripts/patchfns.in -@@ -10,7 +10,11 @@ +@@ -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" ++if [ -n "$STAGING_DIR_HOST" ]; then ++ export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale" +else + export TEXTDOMAINDIR=@LOCALEDIR@ +fi @@ -72,12 +62,109 @@ : ${LC_MESSAGES:=$LANG} --- a/quilt/scripts/remove-trailing-ws.in +++ b/quilt/scripts/remove-trailing-ws.in -@@ -31,7 +31,7 @@ BEGIN { +@@ -1,4 +1,6 @@ +-#! @PERL@ -w ++#! @PERL@ ++ ++use warnings; + + # Remove trailing whitespace from modified lines in working files. + # +@@ -31,7 +33,7 @@ BEGIN { } setlocale(LC_MESSAGES, ""); -bindtextdomain("quilt", "@LOCALEDIR@"); -+bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@"); ++bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/locale' : "@LOCALEDIR@"); textdomain("quilt"); sub _($) { +--- a/Makefile.in ++++ b/Makefile.in +@@ -21,8 +21,8 @@ COLUMN := @COLUMN@ + GETOPT := @GETOPT@ + CP := @CP@ + DATE := @DATE@ +-PERL := @PERL@ +-BASH := @BASH@ ++PERL := /usr/bin/env perl ++BASH := /usr/bin/env bash + SHELL:= @BASH@ # It does not work if dash is used as a shell, for example + GREP := @GREP@ + TAIL := @TAIL@ +@@ -32,7 +32,7 @@ AWK := @AWK@ + FIND := @FIND@ + XARGS := @XARGS@ + DIFF := @DIFF@ +-PATCH := @PATCH@ ++PATCH := /usr/bin/env patch + MKTEMP := @MKTEMP@ + MSGMERGE := @MSGMERGE@ + MSGFMT := @MSGFMT@ +@@ -48,8 +48,8 @@ USE_NLS := @USE_NLS@ + STAT_HARDLINK := @STAT_HARDLINK@ + PATCH_WRAPPER := @PATCH_WRAPPER@ + +-COMPAT_SYMLINKS := @COMPAT_SYMLINKS@ +-COMPAT_PROGRAMS := @COMPAT_PROGRAMS@ ++COMPAT_SYMLINKS := ++COMPAT_PROGRAMS := + + default: all + +--- a/quilt/scripts/backup-files.in ++++ b/quilt/scripts/backup-files.in +@@ -53,7 +53,12 @@ usage () + " + } + +-: ${QUILT_DIR=@QUILT_DIR@} ++if test -n "$STAGING_DIR_HOST"; then ++ : ${QUILT_DIR="$STAGING_DIR_HOST/share/quilt"} ++else ++ : ${QUILT_DIR=@QUILT_DIR@} ++fi ++ + . $QUILT_DIR/scripts/utilfns + + ensure_nolinks() +--- a/bin/guards.in ++++ b/bin/guards.in +@@ -1,4 +1,6 @@ +-#!@PERL@ -w ++#!@PERL@ ++ ++use warnings; + + # This script is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License version 2 as +--- a/compat/date.in ++++ b/compat/date.in +@@ -1,4 +1,6 @@ +-#! @PERL@ -w ++#! @PERL@ ++ ++use warnings; + + # This script is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License version 2 as +--- a/compat/getopt.in ++++ b/compat/getopt.in +@@ -1,4 +1,6 @@ +-#! @PERL@ -w ++#! @PERL@ ++ ++use warnings; + + # This script is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License version 2 as +--- a/quilt/scripts/dependency-graph.in ++++ b/quilt/scripts/dependency-graph.in +@@ -1,4 +1,6 @@ +-#!@PERL@ -w ++#!@PERL@ ++ ++use warnings; + + # This script is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License version 2 as |
