# Record ncurses as needed by the shared libraries (readline leaves the
# terminal library to whoever links it otherwise).
compile() { make SHLIB_LIBS="-lncursesw"; }
# configure finds ncurses through its libtinfo name and writes that into
# readline.pc, but ncurses ships no tinfo.pc.
package() {
	make install DESTDIR="$DESTDIR" SHLIB_LIBS="-lncursesw"
	sed -i 's/^Requires.private: tinfo$/Requires.private: ncursesw/' "$DESTDIR$PREFIX/lib/pkgconfig/readline.pc"
	! grep -q tinfo "$DESTDIR$PREFIX/lib/pkgconfig/readline.pc"
}
