name=ncurses revision=1 from_source=ncurses imagedeps="build-essential" hostdeps="xgcc xbinutils libstdc++-v3 pkgconfig libtool" deps="base" configure() { ${source_dir}/configure --host=x86_64-astral --prefix=${prefix} --with-shared --without-normal --with-termlib --enable-pc-files --enable-widec } build() { make -j${parallelism} } package() { # ncurses hardcodes a bare `install -s` (INSTALL_OPT_S), which would strip the # x86_64 target binaries with the host's native strip and fail on non-x86_64 # hosts. Point install at the cross strip so the binaries are still stripped. make install DESTDIR="${dest_dir}" INSTALL_PROG='$(INSTALL) -s --strip-program=x86_64-astral-strip' echo "INPUT(-lncursesw)" > ${dest_dir}${prefix}/lib/libncurses.so echo "INPUT(-ltinfow)" > ${dest_dir}${prefix}/lib/libtinfo.so echo "INPUT(-lmenuw)" > ${dest_dir}${prefix}/lib/libmenu.so echo "INPUT(-lformw)" > ${dest_dir}${prefix}/lib/libform.so echo "INPUT(-lpanelw)" > ${dest_dir}${prefix}/lib/libpanel.so echo "INPUT(-lncursesw)" > ${dest_dir}${prefix}/lib/libcursesw.so cp ${dest_dir}${prefix}/lib/libncurses.so ${dest_dir}${prefix}/lib/libcurses.so }