ncurses-5.9-gcc-5.patch 1.4 KB

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