dev-java/jnr-netdb-1.0 won't compile against sun-jdk-1.5, as it makes use of the java.lang.String.isEmpty method which is new in Java 6. Working around this via a langth()==0 check would be easy, so I'd prefer a backwards compatibility patch instead of forcing a dependency of Java 6. -do-compile: [mkdir] Created dir: /var/tmp/portage/dev-java/jnr-netdb-1.0/work/jnr-netdb-1.0/build/empty [javac] Compiling 15 source files to /var/tmp/portage/dev-java/jnr-netdb-1.0/work/jnr-netdb-1.0/build/classes [javac] /var/tmp/portage/dev-java/jnr-netdb-1.0/work/jnr-netdb-1.0/src/jnr/netdb/NetDBIterator.java:27: cannot find symbol [javac] symbol : method isEmpty() [javac] location: class java.lang.String [javac] if (line.length < 0 || line[0].isEmpty()) { [javac] ^ [javac] 1 error BUILD FAILED /var/tmp/portage/dev-java/jnr-netdb-1.0/work/jnr-netdb-1.0/nbproject/build-impl.xml:445: The following error occurred while executing this line: /var/tmp/portage/dev-java/jnr-netdb-1.0/work/jnr-netdb-1.0/nbproject/build-impl.xml:224: Compile failed; see the compiler error output for details. Total time: 2 seconds * ERROR: dev-java/jnr-netdb-1.0 failed: * eant failed * * Call stack: * ebuild.sh, line 48: Called src_compile * environment, line 4424: Called java-pkg-2_src_compile * environment, line 2439: Called eant 'jar' '-f' 'build.xml' '-Dreference.jaffl.jar=lib/jaffl.jar' '-Dproject.jaffl="/var/tmp/portage/dev-java/jnr-netdb-1.0/work/jnr-netdb-1.0"' '-D"already.built./var/tmp/portage/dev-java/jnr-netdb-1.0/work/jnr-netdb-1.0"=true' * environment, line 967: Called die * The specific snippet of code: * ant ${antflags} "${@}" || die "eant failed" * * If you need support, post the output of 'emerge --info =dev-java/jnr-netdb-1.0', * the complete build log and the output of 'emerge -pqv =dev-java/jnr-netdb-1.0'. !!! When you file a bug report, please include the following information: GENTOO_VM=sun-jdk-1.5 CLASSPATH="" JAVA_HOME="/opt/sun-jdk-1.5.0.22" JAVACFLAGS="-source 1.5 -target 1.5" COMPILER="javac" and of course, the output of emerge --info * The complete build log is located at '/var/log/portage/dev-java:jnr-netdb-1.0:20100622-084632.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-java/jnr-netdb-1.0/temp/environment'. * S: '/var/tmp/portage/dev-java/jnr-netdb-1.0/work/jnr-netdb-1.0'
Created attachment 236257 [details, diff] Java 1.5 compat This patch uses String.length() == 0 instead of String.isEmpty(), thereby restoring compatibility with Java 1.5 API. Works for me. The patch also changes a obviously broken "array.length < 0" check, as an array never has negative length, and as accessing the first element of a length-zero array is an error. Therefore I assume that "line.length <= 0" is intended. Haven't found an upstream bug tracker, but will write an email to the upstream developer, Wayne Meissner, pointing him to this bug report here.
Upstream fixed this in their 1.0.1 tag. Be careful when bumping the ebuild, as it currently has 1.0 hardcoded into the SRC_URI, instead of using ${PV}.
Bumped to 1.0.1.