102-ncurses-5.9-gcc-5.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. https://bugs.gentoo.org/545114
  2. extracted from the upstream change (which had many unrelated commits in one)
  3. From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001
  4. From: "Thomas E. Dickey" <dickey@invisible-island.net>
  5. Date: Sun, 7 Dec 2014 03:10:09 +0000
  6. Subject: [PATCH] ncurses 5.9 - patch 20141206
  7. + modify MKlib_gen.sh to work around change in development version of
  8. gcc introduced here:
  9. https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
  10. https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
  11. (reports by Marcus Shawcroft, Maohui Lei).
  12. --- a/ncurses/base/MKlib_gen.sh
  13. +++ b/ncurses/base/MKlib_gen.sh
  14. @@ -491,11 +491,22 @@ sed -n -f $ED1 \
  15. -e 's/gen_$//' \
  16. -e 's/ / /g' >>$TMP
  17. +cat >$ED1 <<EOF
  18. +s/ / /g
  19. +s/^ //
  20. +s/ $//
  21. +s/P_NCURSES_BOOL/NCURSES_BOOL/g
  22. +EOF
  23. +
  24. +# A patch discussed here:
  25. +# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
  26. +# introduces spurious #line markers. Work around that by ignoring the system's
  27. +# attempt to define "bool" and using our own symbol here.
  28. +sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
  29. +cat $ED2 >$TMP
  30. +
  31. $preprocessor $TMP 2>/dev/null \
  32. -| sed \
  33. - -e 's/ / /g' \
  34. - -e 's/^ //' \
  35. - -e 's/_Bool/NCURSES_BOOL/g' \
  36. +| sed -f $ED1 \
  37. | $AWK -f $AW2 \
  38. | sed -f $ED3 \
  39. | sed \