Commit 6a792622 authored by Boris Kocherov's avatar Boris Kocherov

ncurses: add patch for gcc 5.2

parent bbcb165f
......@@ -11,6 +11,7 @@ md5sum = ee13d052e1ead260d7c28071f46eefb1
patch-options = -p1
patches =
${:_profile_base_location_}/ncurses-5.9-gcc-5.patch#57f4cd0cc0c0a42a5ddb2167f9546d72
${:_profile_base_location_}/work_around_changed_output_of_GNU_cpp_5.x.patch#130537ea8c0b51f7bd1ee2461b734da9
configure-options =
--prefix=${buildout:parts-directory}/${:_buildout_section_name_}
--with-shared
......
Building ncurses with GCC 5 (or more precisely, with its 'cpp') fails with a
syntax error, caused by earlier preprocessing.
(I'm not entirely sure whether it's a GCC bug or rather caused by a new
feature which breaks further processing with 'awk' and 'sed'; I *think*
at least the 'awk' inline script "AW2" simply isn't prepared for the changed
output of 'cpp' w.r.t. line directives [1]. Anyway, the patch fixes the issue.)
[1] https://gcc.gnu.org/gcc-5/porting_to.html
--- ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh 2011-06-04 21:14:08.000000000 +0200
+++ ncurses-5.9.20131221/ncurses/base/MKlib_gen.sh 2015-04-26 00:47:06.911680782 +0200
@@ -62,7 +62,9 @@
if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
if test "${LC_COLLATE+set}" = set; then LC_COLLATE=C; export LC_COLLATE; fi
-preprocessor="$1 -DNCURSES_INTERNALS -I../include"
+# Work around "unexpected" output of GCC 5.x's cpp w.r.t. #line directives
+# by simply suppressing them:
+preprocessor="$1 -P -DNCURSES_INTERNALS -I../include"
AWK="$2"
USE="$3"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment