I noticed, that the current ebuild for dev-java/libreadline-java does only build the readline-part, but editline or plain-getline-modes are available too. They are handy when one wants to circumvent the GPL of readline or don't want to use a special library at all. I'm going to attach a patch to the current ebuild, an extended patch for the termcap-bug (which should work with current ebuild too) and a new patch to change the editline-path. Please note, that a ~version of libedit is required, so this should be keyword-masked too.
Created attachment 142275 [details, diff] libreadline-java-0.8.0.ebuild.patch
Created attachment 142277 [details, diff] editline-to-libedit.patch
Created attachment 142280 [details, diff] New version of termcap-to-ncurses.patch
Please submit your patches to upstream bug tracker http://sourceforge.net/projects/java-readline/ and link the urls back here.
These patches are Gentoo-specific IMHO. One is because of a different path (editline-to-libedit.patch). Because this may be different on other systems too, it's not an upstream-bug. And the other is only another version of an already existant patch (termcap-to-ncurses.patch), which switches from the legacy termcap to ncurses. Both should be useable, so it's not a bug either.
Created attachment 280669 [details] libreadline-java-0.8.0-r4.ebuild As this bug is rather old, there are a few things that didn't work anymore: * the editline-to-libedit.patch is obsolete as the location in Gentoo is the expected one now * the getline-mode is not compiling with a current system. I removed it * there was a new official ebuild, which I merged I also removed the extra check if at least one of the USE-flags is set, in favor of an EAPI4/REQUIRED_USE solution. readline is still the default.
Created attachment 280671 [details, diff] libreadline-java-0.8.0-getline.patch The bug with the getline-lib is easy. As getline is now part of POSIX the name is already in use. I simply renamed the method (see attached patch) The upstream bug for this can be found at: https://sourceforge.net/tracker/?func=detail&aid=3375796&group_id=48669&atid=453820
Created attachment 280673 [details, diff] libreadline-java-0.8.0-getline.patch
Created attachment 280675 [details] libreadline-java-0.8.0-r4.ebuild The ebuild that supports USE=getline again. Sorry for the multiple uploads.
We have jline in the tree already: https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-java/jline It's been used by fairly popular open source java projects such as Groovy [1] and Jython [2] whereas nothing depends on libreadline and apparently, it doesn't seem to be much maintained. Let's not add it. [1]: http://www.groovy-lang.org/groovysh.html [2]: https://wiki.python.org/jython/ConsoleChoices#JLineConsole