000-relocatable.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. --- a/bin/quilt.in
  2. +++ b/bin/quilt.in
  3. @@ -15,9 +15,15 @@
  4. unset GREP_OPTIONS
  5. export TEXTDOMAIN=quilt
  6. -export TEXTDOMAINDIR=@LOCALEDIR@
  7. -: ${QUILT_DIR=@QUILT_DIR@}
  8. +if test -n "$STAGING_DIR"; then
  9. + export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
  10. + : ${QUILT_DIR=$STAGING_DIR/../host/share/quilt} ${QUILT_LIB=$STAGING_DIR/../host/lib/quilt}
  11. +else
  12. + export TEXTDOMAINDIR=@LOCALEDIR@
  13. + : ${QUILT_DIR=@QUILT_DIR@}
  14. +fi
  15. +
  16. export QUILT_DIR
  17. if [ -z "$QUILTRC" ]
  18. --- a/quilt/scripts/edmail.in
  19. +++ b/quilt/scripts/edmail.in
  20. @@ -29,7 +29,7 @@ BEGIN {
  21. }
  22. setlocale(LC_MESSAGES, "");
  23. -bindtextdomain("quilt", "@LOCALEDIR@");
  24. +bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@");
  25. textdomain("quilt");
  26. sub _($) {
  27. --- a/quilt/scripts/inspect.in
  28. +++ b/quilt/scripts/inspect.in
  29. @@ -6,7 +6,11 @@
  30. #
  31. # See the COPYING and AUTHORS files for more details.
  32. -: ${QUILT_DIR=@QUILT_DIR@}
  33. +if test -n "$STAGING_DIR"; then
  34. + : ${QUILT_DIR="$STAGING_DIR/../host/share/quilt"}
  35. +else
  36. + : ${QUILT_DIR=@QUILT_DIR@}
  37. +fi
  38. if ! [ -r $QUILT_DIR/scripts/patchfns ]
  39. then
  40. --- a/quilt/scripts/patchfns.in
  41. +++ b/quilt/scripts/patchfns.in
  42. @@ -8,7 +8,11 @@
  43. # See the COPYING and AUTHORS files for more details.
  44. export TEXTDOMAIN=quilt
  45. -export TEXTDOMAINDIR=@LOCALEDIR@
  46. +if [ -n "$STAGING_DIR" ]; then
  47. + export TEXTDOMAINDIR="$STAGING_DIR/../host/share/locale"
  48. +else
  49. + export TEXTDOMAINDIR=@LOCALEDIR@
  50. +fi
  51. : ${LC_CTYPE:=$LANG}
  52. : ${LC_MESSAGES:=$LANG}
  53. --- a/quilt/scripts/remove-trailing-ws.in
  54. +++ b/quilt/scripts/remove-trailing-ws.in
  55. @@ -31,7 +31,7 @@ BEGIN {
  56. }
  57. setlocale(LC_MESSAGES, "");
  58. -bindtextdomain("quilt", "@LOCALEDIR@");
  59. +bindtextdomain("quilt", $ENV{'STAGING_DIR'} ? $ENV{'STAGING_DIR'} . '/../host/share/locale' : "@LOCALEDIR@");
  60. textdomain("quilt");
  61. sub _($) {