Commit 13388a66 authored by Jon Hermansen's avatar Jon Hermansen
Browse files

ncurses: disable C++ bindings for static FreeBSD cross builds

The static FreeBSD cross stdenv has libc++ headers searched after C
library headers, causing libc++'s `#include_next` mechanism to fail.
libc++'s <cstdlib> includes <stdlib.h> expecting its own wrapper, but
finds the C library's header directly and errors out.

The C++ bindings (libncurses++) are optional and not needed by any
current consumers of ncurses-static (readline, bash-interactive).
parent d2691aff
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -8,7 +8,11 @@
  pkg-config,
  abiVersion ? "6",
  enableStatic ? stdenv.hostPlatform.isStatic,
  withCxx ? !stdenv.hostPlatform.useAndroidPrebuilt,
  # Disabled for static FreeBSD: libc++ headers come after C library headers,
  # breaking C++ compilation. No current consumers need the C++ bindings.
  withCxx ?
    !stdenv.hostPlatform.useAndroidPrebuilt
    && !(stdenv.hostPlatform.isFreeBSD && stdenv.hostPlatform.isStatic),
  mouseSupport ? false,
  gpm,
  withTermlib ? false,