I have two issues with dev-java/fop-2.0: (1) If building with USE=jai, it will fail on resolving classpath: * ERROR: dev-java/fop-2.0::gentoo failed (compile phase): * java-config --classpath=,sun-jai-bin failed * * Call stack: * ebuild.sh, line 93: Called src_compile * environment, line 3941: Called java-pkg-2_src_compile * environment, line 1861: Called eant 'package' '-f' 'build.xml' '-Djce.present=true' '-Djai.present=true' '-Dhyphenation.present=true' '-Duser.hyph.dir=/usr/share/offo-hyphenation/hyph/' * environment, line 645: Called java-pkg_getjars ',sun-jai-bin' * environment, line 2571: Called die * The specific snippet of code: * [[ $? != 0 ]] && die "java-config --classpath=${pkgs} failed"; I think this is because EANT_GENTOO_CLASSPATH should be space-delimited list and the ebuild file does: EANT_GENTOO_CLASSPATH=" ant-core batik-1.8 fontbox-1.7 commons-io-1 commons-logging servlet-api-3.0 avalon-framework-4.2 xmlgraphics-commons-2 xml-commons-external-1.3 " [...] use jai && EANT_EXTRA_ARGS+=" -Djai.present=true" && EANT_GENTOO_CLASSPATH+=",sun-jai-bin" Replacing the comma with a space fixes the issue for me. (2) If dev-java/fop-1.1:0 is installed, updating the fop will fail because dev-java/fop-1.1 and dev-java/fop-2.0 have different slot, but not all of their files have unique names: * Detected file collision(s): * * /usr/bin/fop * /usr/share/fop/hyph/readme * /usr/share/fop/hyph/hyphenation.dtd * * Searching all installed packages for file collisions... * * Press Ctrl-C to Stop * * dev-java/fop-1.1:0::gentoo * /usr/bin/fop * /usr/share/fop/hyph/hyphenation.dtd * /usr/share/fop/hyph/readme * * Package 'dev-java/fop-2.0' NOT merged due to file collisions. Either the three files should be renamed, or the two ebuilds should conflict.
Created attachment 405826 [details, diff] Proposed fixes to dev-java/fop-2.0.ebuild
(In reply to Petr Pisar from comment #0) > * Package 'dev-java/fop-2.0' NOT merged due to file collisions. > > Either the three files should be renamed, or the two ebuilds should conflict. Or 2.0 should be in the same SLOT.
Thanks for nailing down the problem Petr. @jer: It can't be in the same slot cause it has a different API. I've come up with a better fix to work around the issue instead of setting a blocker on fop:0. - if use hyphenation ; then + if use hyphenation; then java-pkg_dojar build/fop-hyph.jar - insinto /usr/share/${PN}/ + insinto /usr/share/${P}/ doins -r hyph fi # Doesn't support everything upstream launcher does... - java-pkg_dolauncher ${PN} --main org.apache.fop.cli.Main + java-pkg_dolauncher ${P} --main org.apache.fop.cli.Main I've also included your patch wrt sun-jai-bin. + 27 Jun 2015; Patrice Clement <monsieurp@gentoo.org> fop-2.0.ebuild: + Make use of ${P} where we can in order to avoid clashing with other SLOTs. Fix + bug 553392. + Give it another try and let us know.
${PN}-${SLOT} would be tidier, this is what the Java eclasses already use and having something like /usr/bin/fop-2.1.3 would be weird.
Index: fop-2.0.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/dev-java/fop/fop-2.0.ebuild,v retrieving revision 1.5 diff -u -B -r1.5 fop-2.0.ebuild --- fop-2.0.ebuild 27 Jun 2015 17:53:42 -0000 1.5 +++ fop-2.0.ebuild 27 Jun 2015 18:44:58 -0000 @@ -22,6 +22,8 @@ LICENSE="Apache-2.0" SLOT="2" +MY_P="${PN}-${SLOT}" + # Doesn't work with java.awt.headless, requires Mockito. RESTRICT="test" @@ -108,12 +110,12 @@ if use hyphenation; then java-pkg_dojar build/fop-hyph.jar - insinto /usr/share/${P}/ + insinto /usr/share/${MY_P}/ doins -r hyph fi # Doesn't support everything upstream launcher does... - java-pkg_dolauncher ${P} --main org.apache.fop.cli.Main + java-pkg_dolauncher ${MY_P} --main org.apache.fop.cli.Main + 27 Jun 2015; Patrice Clement <monsieurp@gentoo.org> fop-2.0.ebuild: + Use a combination of ${PN}-${SLOT} instead of ${P} courtesy of James Le Cuirot + <chewi@gentoo.org>. Fix bug 553392. + Thanks for the heads up.
Thanks. It works for me.