version = "6.5" revision = 2 description = "Terminal control library with wide-character support" license = "MIT" url = "https://invisible-island.net/ncurses/" source = tarball( url=f"https://invisible-mirror.net/archives/ncurses/ncurses-{version}.tar.gz", sha256="136d91bc269a9a5785e5f9e980bc76ab57428f604ce3e5a5a90cebc767971cc6", ) host_deps = ["autoconf", "automake", "binutils", "gcc"] deps = [profile["libc"], "libstdc++"] configure, build, _ = autotools( configure_args=[ "--with-shared", "--without-debug", "--without-ada", "--enable-pc-files", "--enable-widec", "--with-termlib", "--with-cxx-binding", "--with-cxx-shared", "--with-pkg-config-libdir=/usr/lib/pkgconfig", "--with-tic-path=/usr/bin/tic", "--with-infocmp-path=/usr/bin/infocmp", "--mandir=/usr/share/man", ], configure_env={ # Conflicts with GCC 16 headers. "cf_cv_type_of_bool": "bool", "cf_cv_cc_bool_type": "1", "cf_cv_builtin_bool": "1", "ac_cv_header_stdbool_h": "yes", }, ) def install(self): autotools_install(self, [f"DESTDIR={self.dest_dir}"]) libdir = self.dest_dir / "usr/lib" pcdir = libdir / "pkgconfig" for name in ("ncurses", "curses"): self.run("ln", "-sf", "libncursesw.so", libdir / f"lib{name}.so") self.run("ln", "-sf", "libncursesw.a", libdir / f"lib{name}.a") self.run("ln", "-sf", "libtinfow.so", libdir / "libtinfo.so") self.run("ln", "-sf", "libtinfow.a", libdir / "libtinfo.a") self.run("ln", "-sf", "ncursesw.pc", pcdir / "ncurses.pc") self.run("ln", "-sf", "tinfow.pc", pcdir / "tinfo.pc")