def METHOD_NAME(self, env):
    # on macOS, emacs' config does search hard enough for ncurses'
    # termlib `-ltinfo` lib, which results in linker errors
    if "+termlib" in self.spec["ncurses"]:
        env.append_flags("LDFLAGS", "-ltinfo")