From fc3a9c5ebff98664ab50c9a8ff4e136bea9bd0db Mon Sep 17 00:00:00 2001 From: "Marty E. Plummer" Date: Wed, 20 Sep 2017 04:09:33 -0500 Subject: [PATCH] sys-libs/ncurses: fix mingw-w64 build and runtime *.dll.a files are required for linking on mingw-w64 targets, only delete normal static libraries. --enable-term-driver is required on mingw-w64, otherwise you get a host of undefined reference to `_nc_*' errors, and possibly other windows platforms/runtimes/toolchains. Bug: https://bugs.gentoo.org/631468 Bug: https://bugs.gentoo.org/639670 Package-Manager: Portage-2.3.10, Repoman-2.3.3 Signed-off-by: Marty E. Plummer Closes: https://github.com/gentoo/gentoo/pull/5734 --- sys-libs/ncurses/ncurses-6.0-r2.ebuild | 8 +++++++- sys-libs/ncurses/ncurses-6.1-r2.ebuild | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/sys-libs/ncurses/ncurses-6.0-r2.ebuild b/sys-libs/ncurses/ncurses-6.0-r2.ebuild index 15d435938bc3..6587f1b72a6f 100644 --- a/sys-libs/ncurses/ncurses-6.0-r2.ebuild +++ b/sys-libs/ncurses/ncurses-6.0-r2.ebuild @@ -135,6 +135,9 @@ do_configure() { # The configure script uses ldd to parse the linked output which # is flaky for cross-compiling/multilib/ldd versions/etc... $(use_with gpm gpm libgpm.so.1) + # Required for building on mingw-w64, and possibly other windows + # platforms, bug #639670 + $(use_enable kernel_Winnt term-driver) --disable-termcap --enable-symlinks --with-rcs-ids @@ -240,7 +243,10 @@ multilib_src_install() { # Provide a link for -lcurses. ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die fi - use static-libs || find "${ED}"/usr/ -name '*.a' -delete + # don't delete '*.dll.a', needed for linking #631468 + if ! use static-libs; then + find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die + fi # Build fails to create this ... dosym ../share/terminfo /usr/$(get_libdir)/terminfo diff --git a/sys-libs/ncurses/ncurses-6.1-r2.ebuild b/sys-libs/ncurses/ncurses-6.1-r2.ebuild index 5ddb88667515..de2e22150675 100644 --- a/sys-libs/ncurses/ncurses-6.1-r2.ebuild +++ b/sys-libs/ncurses/ncurses-6.1-r2.ebuild @@ -132,6 +132,9 @@ do_configure() { # The configure script uses ldd to parse the linked output which # is flaky for cross-compiling/multilib/ldd versions/etc... $(use_with gpm gpm libgpm.so.1) + # Required for building on mingw-w64, and possibly other windows + # platforms, bug #639670 + $(use_enable kernel_Winnt term-driver) --disable-termcap --enable-symlinks --with-rcs-ids @@ -238,7 +241,10 @@ multilib_src_install() { # Provide a link for -lcurses. ln -sf libncurses$(get_libname) "${ED}"/usr/$(get_libdir)/libcurses$(get_libname) || die fi - use static-libs || find "${ED}"/usr/ -name '*.a' -delete + # don't delete '*.dll.a', needed for linking #631468 + if ! use static-libs; then + find "${ED}"/usr/ -name '*.a' ! -name '*.dll.a' -delete || die + fi # Build fails to create this ... dosym ../share/terminfo /usr/$(get_libdir)/terminfo -- 2.26.2