sys-libs/ncurses-compat/files/ncurses-6.0-cppflags-cross.patch
changeset 22 9803496ddf72
equal deleted inserted replaced
21:aebbdf937322 22:9803496ddf72
       
     1 https://bugs.gentoo.org/601426
       
     2 https://lists.gnu.org/archive/html/bug-ncurses/2015-02/msg00012.html
       
     3 
       
     4 From: John Vogel
       
     5 Subject: [PATCH] c++ binding missed when cross compiling
       
     6 Date: Mon, 16 Feb 2015 01:01:48 -0500
       
     7 
       
     8 The configure script hard codes the include dir to the prefix'ed include dir,
       
     9 when checking if c++ compiler works. This breaks the compiler's built-in search
       
    10 path. I've included two patches. The first works on the configure.in file, which
       
    11 requires your autoconf stuff to test and I'm not ready to meddle with at the
       
    12 moment. The other works directly on the configure file. I've tested the second
       
    13 one; it should mirror what the first patch tries to achieve and works for me.
       
    14 
       
    15 --- a/configure
       
    16 +++ b/configure
       
    17 @@ -2938,10 +2938,6 @@
       
    18  		echo "$as_me:2938: checking if $CXX works" >&5
       
    19  echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
       
    20  
       
    21 -		save_CPPFLAGS="$CPPFLAGS"
       
    22 -		eval cf_includedir=${includedir}
       
    23 -		CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
       
    24 -
       
    25  cat >conftest.$ac_ext <<_ACEOF
       
    26  #line 2946 "configure"
       
    27  #include "confdefs.h"
       
    28 @@ -2978,7 +2974,6 @@
       
    29  cf_cxx_works=no
       
    30  fi
       
    31  rm -f conftest.$ac_objext conftest.$ac_ext
       
    32 -		CPPFLAGS="$save_CPPFLAGS"
       
    33  
       
    34  		echo "$as_me:2983: result: $cf_cxx_works" >&5
       
    35  echo "${ECHO_T}$cf_cxx_works" >&6