2
0

000-relocatable.patch 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. --- a/bin/quilt.in
  2. +++ b/bin/quilt.in
  3. @@ -15,14 +15,22 @@ unset POSIXLY_CORRECT
  4. unset GREP_OPTIONS
  5. export TEXTDOMAIN=quilt
  6. -export TEXTDOMAINDIR=@LOCALEDIR@
  7. -: ${QUILT_DIR=@QUILT_DIR@}
  8. +if test -n "$STAGING_DIR_HOST"; 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. + : ${QUILT_ETC=$STAGING_DIR_HOST/etc}
  12. +else
  13. + export TEXTDOMAINDIR=@LOCALEDIR@
  14. + : ${QUILT_DIR=@QUILT_DIR@}
  15. + : ${QUILT_ETC=@ETCDIR@}
  16. +fi
  17. +
  18. export QUILT_DIR
  19. if [ -z "$QUILTRC" ]
  20. then
  21. - for QUILTRC in $HOME/.quiltrc @ETCDIR@/quilt.quiltrc; do
  22. + for QUILTRC in $HOME/.quiltrc $QUILT_ETC/quilt.quiltrc; do
  23. [ -e $QUILTRC ] && break
  24. done
  25. export QUILTRC
  26. --- a/quilt/scripts/edmail.in
  27. +++ b/quilt/scripts/edmail.in
  28. @@ -1,4 +1,6 @@
  29. -#! @PERL@ -w
  30. +#! @PERL@
  31. +
  32. +use warnings;
  33. # RFCs important for this script:
  34. #
  35. @@ -29,7 +31,7 @@ BEGIN {
  36. }
  37. setlocale(LC_MESSAGES, "");
  38. -bindtextdomain("quilt", "@LOCALEDIR@");
  39. +bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/locale' : "@LOCALEDIR@");
  40. textdomain("quilt");
  41. sub _($) {
  42. --- a/quilt/scripts/patchfns.in
  43. +++ b/quilt/scripts/patchfns.in
  44. @@ -8,7 +8,11 @@
  45. # See the COPYING and AUTHORS files for more details.
  46. export TEXTDOMAIN=quilt
  47. -export TEXTDOMAINDIR=@LOCALEDIR@
  48. +if [ -n "$STAGING_DIR_HOST" ]; then
  49. + export TEXTDOMAINDIR="$STAGING_DIR_HOST/share/locale"
  50. +else
  51. + export TEXTDOMAINDIR=@LOCALEDIR@
  52. +fi
  53. : ${LC_CTYPE:=$LANG}
  54. : ${LC_MESSAGES:=$LANG}
  55. --- a/quilt/scripts/remove-trailing-ws.in
  56. +++ b/quilt/scripts/remove-trailing-ws.in
  57. @@ -1,4 +1,6 @@
  58. -#! @PERL@ -w
  59. +#! @PERL@
  60. +
  61. +use warnings;
  62. # Remove trailing whitespace from modified lines in working files.
  63. #
  64. @@ -31,7 +33,7 @@ BEGIN {
  65. }
  66. setlocale(LC_MESSAGES, "");
  67. -bindtextdomain("quilt", "@LOCALEDIR@");
  68. +bindtextdomain("quilt", $ENV{'STAGING_DIR_HOST'} ? $ENV{'STAGING_DIR_HOST'} . '/share/locale' : "@LOCALEDIR@");
  69. textdomain("quilt");
  70. sub _($) {
  71. --- a/Makefile.in
  72. +++ b/Makefile.in
  73. @@ -21,8 +21,8 @@ COLUMN := @COLUMN@
  74. GETOPT := @GETOPT@
  75. CP := @CP@
  76. DATE := @DATE@
  77. -PERL := @PERL@
  78. -BASH := @BASH@
  79. +PERL := /usr/bin/env perl
  80. +BASH := /usr/bin/env bash
  81. SHELL:= @BASH@ # It does not work if dash is used as a shell, for example
  82. GREP := @GREP@
  83. TAIL := @TAIL@
  84. @@ -32,7 +32,7 @@ AWK := @AWK@
  85. FIND := @FIND@
  86. XARGS := @XARGS@
  87. DIFF := @DIFF@
  88. -PATCH := @PATCH@
  89. +PATCH := /usr/bin/env patch
  90. MKTEMP := @MKTEMP@
  91. MSGMERGE := @MSGMERGE@
  92. MSGFMT := @MSGFMT@
  93. @@ -48,8 +48,8 @@ USE_NLS := @USE_NLS@
  94. STAT_HARDLINK := @STAT_HARDLINK@
  95. PATCH_WRAPPER := @PATCH_WRAPPER@
  96. -COMPAT_SYMLINKS := @COMPAT_SYMLINKS@
  97. -COMPAT_PROGRAMS := @COMPAT_PROGRAMS@
  98. +COMPAT_SYMLINKS :=
  99. +COMPAT_PROGRAMS :=
  100. default: all
  101. --- a/quilt/scripts/backup-files.in
  102. +++ b/quilt/scripts/backup-files.in
  103. @@ -53,7 +53,12 @@ usage ()
  104. "
  105. }
  106. -: ${QUILT_DIR=@QUILT_DIR@}
  107. +if test -n "$STAGING_DIR_HOST"; then
  108. + : ${QUILT_DIR="$STAGING_DIR_HOST/share/quilt"}
  109. +else
  110. + : ${QUILT_DIR=@QUILT_DIR@}
  111. +fi
  112. +
  113. . $QUILT_DIR/scripts/utilfns
  114. ensure_nolinks()
  115. --- a/bin/guards.in
  116. +++ b/bin/guards.in
  117. @@ -1,4 +1,6 @@
  118. -#!@PERL@ -w
  119. +#!@PERL@
  120. +
  121. +use warnings;
  122. # This script is free software; you can redistribute it and/or modify
  123. # it under the terms of the GNU General Public License version 2 as
  124. --- a/compat/date.in
  125. +++ b/compat/date.in
  126. @@ -1,4 +1,6 @@
  127. -#! @PERL@ -w
  128. +#! @PERL@
  129. +
  130. +use warnings;
  131. # This script is free software; you can redistribute it and/or modify
  132. # it under the terms of the GNU General Public License version 2 as
  133. --- a/compat/getopt.in
  134. +++ b/compat/getopt.in
  135. @@ -1,4 +1,6 @@
  136. -#! @PERL@ -w
  137. +#! @PERL@
  138. +
  139. +use warnings;
  140. # This script is free software; you can redistribute it and/or modify
  141. # it under the terms of the GNU General Public License version 2 as
  142. --- a/quilt/scripts/dependency-graph.in
  143. +++ b/quilt/scripts/dependency-graph.in
  144. @@ -1,4 +1,6 @@
  145. -#!@PERL@ -w
  146. +#!@PERL@
  147. +
  148. +use warnings;
  149. # This script is free software; you can redistribute it and/or modify
  150. # it under the terms of the GNU General Public License version 2 as