Apache have finally made a released from the new FOP trunk. This is quite a major rewrite and defiantly unstable but it would be nice to have an ebuild. As a starting point I will attache an ebuild diff that can build and install the new version. This is dependent on dev-java/commons-io-1.1 which I have submited a seperate request for [Bug 113585]. The new build does not like having a previous version of Batik in my classpath, and I get out of memory errors if I try and build the documentation. Reproducible: Always Steps to Reproduce:
Created attachment 73614 [details, diff] Mainly updated dependencies for the new version
From the announcemnt of the new version: This release is the first after a big redesign effort on the whole FOP codebase. This release is to be considered ALPHA quality and it is intended as a preview release encouraging people to take a look at the new version and to provide feedback to the developers. Please not only report to us problems you might experience but also tell us if it works for you. If you find out that this version works fine for you, you're welcome to use it but please test it thoroughly as we don't consider this release ready for every production environment. Because it is alpha, this is going to get a real low priority. Additionally, if it does get added to the tree, it would probably be hard-masked until it is out of the alphas. A few comments on the diff: * java-pkg_dojar build/fop.jar should be changed to java-pkg_dojar build/${PN}.jar I know the old ebuild was like this, but it is worth noting that you should reuse P, PN, and PV whenever possible. * Don't need to use newbin when the filename is the same as what will be installed. Use dobin instead. * Use >=dev-java/xerces-2.6.2 in depend. 2.7.0 is in portage now, and in the same slot.
Created attachment 75091 [details, diff] Corrected some mistakes in first diff. Corrected some mistakes in first diff. Here is an updated patch with you changes. Thanks for the help, still very new to editing ebuilds. It also implements the important licence change I missed first time around. I agree that the new version should be hard masked (especial as all the previous versions are marked unstable). However I do think it is worth including as FOP are not releasing bug fixes for the 0.20.5 branch, and the new version is much more standards compliant. One outstanding bug is no PDF generation under Java 1.5. (Though the is a patch I haven't tried: http://issues.apache.org/bugzilla/show_bug.cgi?id=37108; should we add this to the current ebuild?)
Created attachment 75092 [details, diff] Opps, should have used ${PN} for the dobin to I assume
Created attachment 75093 [details, diff] Opps, should have used ${PN} for the dobin to I assume
0.91_beta was released yesterday.
The beta seems to just be an SVN tag, for now the ebuild will still have to use the alpha release.
Created attachment 75869 [details, diff] Updated ebuild for new beta release Sorry - didn't look hard enough. They have changed the location of thier releases and have forgoten to updated the link to the source from their website. The new patch is just for the change of SRC_URI and HOMEPAGE, the build still seems to work the same.
(In reply to comment #8) > Created an attachment (id=75869) [edit] > Updated ebuild for new beta release > > Sorry - didn't look hard enough. They have changed the location of thier > releases and have forgoten to updated the link to the source from their > website. > > The new patch is just for the change of SRC_URI and HOMEPAGE, the build still > seems to work the same. > Can you add (optional?) ebuild support for the MathML extension that is in the fop 0.91beta archive's examples directory? It requires jeuclid.jar to be added to the examples/mathml/lib directory. I was able to download and compile the jeuclid install from sourceforge, but there is no ebuild for jeuclid :/ I still wasn't able to get the mathml extension to build though :[
Created attachment 79025 [details, diff] Added optional mathml support Created an initial ebuild for JEculid in bug [121822] and updated this ebuild to optionally depend on it. To run FOP with MathML support you need to ensure that JEculid is in your classpath. To get usable results you also need to install the required fonts.
http://bugs.gentoo.org/show_bug.cgi?id=121822
Created attachment 79037 [details] an example fo document that causes my fop 0.91 beta to fail I'm getting this error on all fo documents I compile, no matter whether I use the MathML enabled ebuild or not. The command executes successfully using fop 0.20 /usr/bin/fop ../path/to/index.fo -pdf ../path/to/index.pdf Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/cli/Main My use flags from make.conf: USE="unicode apache2 jimi jai mathml" BTW, much thanks for making the MathML enabled install, bware! Dependencies (not quite sure why this command was able to also eliminate the 3rd and lower level deps, but whatever - it worked) equery g dev-java/fop | grep -v '^ `*' dev-java/fop-0.91_beta: `-- dev-java/fop-0.91_beta `-- dev-java/blackdown-jre-1.4.2.03 (virtual/jre-1.4) `-- dev-java/sun-jai-bin-1.1.2.01-r1 [ jai ] `-- dev-java/sun-jimi-1.0-r1 [ jimi ] `-- dev-java/avalon-framework-4.2.0 `-- dev-java/batik-1.6 `-- dev-java/xalan-2.7.0-r1 `-- dev-java/commons-io-1.1 `-- dev-java/commons-logging-1.0.4-r1 `-- dev-java/servletapi-2.2-r2 `-- dev-java/jeuclid-2.0 [ mathml ] `-- dev-java/ant-1.6.2-r6
This is because FOP isn't in your class path. Currently we are still using the fop launch script strait from the distribution, this probably needs patching to be more Gentoo. In the mean time either make sure that FOP (any any other stuff you need like JEuclid, and Batik) are in you class path using: java-config -A fop,jeuclid,batik-1.6,commons-io-1,avalon-framework-4.2,commons-logging && /usr/sbin/env-update && source /etc/profile
Created attachment 79040 [details] Updated example Note, FOP has also dropped the proprietary fox:outline in favour of the standard fo:bookmark, you will need to change this before your example will work.
(In reply to comment #13) > This is because FOP isn't in your class path. Currently we are still using the > fop launch script strait from the distribution, this probably needs patching to > be more Gentoo. > > In the mean time either make sure that FOP (any any other stuff you need like > JEuclid, and Batik) are in you class path using: > > java-config -A > fop,jeuclid,batik-1.6,commons-io-1,avalon-framework-4.2,commons-logging > && > /usr/sbin/env-update > && > source /etc/profile > Adding things to the system classpath can cause unexpected problems when emerging things. This usually happens when you have something slotted, like bati-1.6, and you emerge something that wants batik-1.5. The package would likely fail with batik-1.6 on the classpath before batik-1.5, because 1.6 has a different api than 1.5. Instead, it is preferable to patch the launcher script to add these to its classpath.
working on it ;-)
Created attachment 79046 [details, diff] Startup script patch so we don't need to modify classpath
Created attachment 79047 [details, diff] Updated ebuild to apply state script patch
Created attachment 79048 [details, diff] Updated state script patch (had included batik twice?)
Created attachment 79084 [details] fo file with mathml that causes the no layout maker error I patched the fop script as per the last post, but when processing a document with math ml, I recieved the following error. xsltproc --output ../live/chris.chiasson.name/Engineering_Optimization/Engineering_Optimization.fo --xinclude /home/chris/sites/source/xsl/alpha/fo.xsl ../live/chris.chiasson.name/Engineering_Optimization/Engineering_Optimization.chunkbook Making portrait pages on USletter paper (8.5inx11in) /usr/bin/fop ../live/chris.chiasson.name/Engineering_Optimization/Engineering_Optimization.fo -pdf ../live/chris.chiasson.name/Engineering_Optimization/Engineering_Optimization.pdf Couldn't find hyphenation pattern en No LayoutManager maker for class class org.apache.fop.mathml.MathMLElement I figure the output of this command might be usefull (I didn't include batik-1.6 because it is so verbose). java-config -p 'commons-io-1,commons-logging,avalon-framework-4.2,jeuclid,fop' /usr/share/commons-io-1/lib/commons-io.jar:/usr/share/commons-logging/lib/commons-logging.jar:/usr/share/commons-logging/lib/commons-logging-api.jar:/usr/share/avalon-framework-4.2/lib/avalon-framework.jar:/usr/share/jeuclid/lib/jeuclid.jar:/usr/share/fop/lib/mathml-fop.jar:/usr/share/fop/lib/fop.jar
I am afraid I am not a expert on the new version of FOP, it is a BETA release and you may have more luck asking on the FOP mailing lists. Can you render the MathML example: fop /usr/share/doc/fop-0.91_beta/examples/examples/mathml/docs/mathml.fo test.pdf I get the external MathML shown correctly, but the inline examples are skiped. As far as I can tell this isn't gentoo related, does anyone now if inline mathml is ment to work in this release of FOP?
Hi, I have tryed your ebuild and I have found this problems: 1) If are some errors in FOP compilation, but the compilation is on the end SUCCESFULL, then I recomended to remove '|| die "complie faild"' in the ebuild. 2) If you do not add mathml USE flag, then in /usr/bin/fop is jeuclid and FOP report error on the begin of running. 3) I would like to use my owen userconfig.xml, so what if you add USE flag userconfig and insert the default config from fop.jar for example to the /etc/fop/conf and add it into /usr/bin/fop like default config by parameter -c? Bwt. it is good job this your ebuild! Thank you! Jiri
The fop-0.92 was released. Can you make new ebuild? I have also problems with MathML. It doesn't works at all. It give me only this message: fop -fo /usr/share/doc/fop-0.91_beta/examples/examples/mathml/docs/mathml.fo ./mathml.pdf Base URL set to: file:///tmp Source resolution set to: 72.0dpi (px2mm=0.35277778) Target resolution set to: 72.0dpi (px2mm=0.35277778) Default page-height set to: 11in Default page-width set to: 8.26in Warning element mpadded is not implemented Warning element mpadded is not implemented Some XML content will be ignored. No handler defined for XML: http://www.w3.org/1998/Math/MathML
With 0.92_beta out, 0.91 has been deleted from mirrors :( I can't build 0.92 (havent tried 91) as startscript.patch fail; if proceed without patching, build fails with [javac] /mnt/pordisk/portage/tmp/portage/fop-0.92_beta/work/fop-0.92beta/src/java/org/apache/fop/image/XmlGraphicsCommonsImage.java:73: cannot resolve symbol [javac] symbol : class MemoryCacheSeekableStream [javac] location: class org.apache.fop.image.XmlGraphicsCommonsImage [javac] seekableInput = new MemoryCacheSeekableStream(inputStream); [javac] ^ [javac] /mnt/pordisk/portage/tmp/portage/fop-0.92_beta/work/fop-0.92beta/src/java/org/apache/fop/layoutmgr/table/TableCellLayoutManager.java:340: warning: addBorders(org.apache.fop.area.Area,org.apache.fop.fo.properties.CommonBorderPaddingBackground,org.apache.fop.datatypes.PercentBaseContext) in org.apache.fop.layoutmgr.TraitSetter has been deprecated [javac] TraitSetter.addBorders(curBlockArea, [javac] ^ [javac] 100 errors [javac] 9 warnings (few hundred lines stripped) Pretty please, could someone more skilled provide a patch? Thanks...
Created attachment 86704 [details] Updated ebuild for .92 Beta *** Warning I am now using sun-jdk-1.5.0.06 on an amd64 and have not had time to try these on anything else *** Currently I can't get Baltik1.6 building under Java 1.5 and the is no email for the xmlgraphics commons so I have let FOP use the copies included in it's distribution (this works but is not the Gentoo way)
Created attachment 86705 [details] Patch the start script so fop can find it's dependencies
(In reply to comment #25) > *** Warning I am now using sun-jdk-1.5.0.06 on an amd64 and have not had time > to try these on anything else *** It works good for me. I have blackdown-jdk-1.4.2.03 and pentium-m. Thank for the ebuild. Btw. ebuild for the FOP trunk version is not possible to make? It is much better then this 0.92 beta version.
Created attachment 87061 [details] dev-java/fop/fop-1.0_beta.ebuild Here is ebuild for fop_trunk from SVN. I have added also xmlunit support. Enjoy...
Created attachment 87062 [details, diff] files/1.0_beta-startscript.patch Patch for the fop start script. It's the same like for fop-0.92_beta.
FOP-0.93 that is considered production quality by upstream, has been released so we should start thinking about putting this to the main tree.
Created attachment 106183 [details] fop-0.93_beta.ebuild Ebuild for FOP 0.93.
Created attachment 107587 [details] fop-0.93.ebuild and startscript patch fixed existing fop-0.93_beta.ebuild (0.93 is a svn tag not a branch) and added and adopted startscript patch from earlier efforts of this thread, else you'll get the 'Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/fop/cli/Main' errormessage. fop 0.93 runs fine, is considered stable (and I use it in production) - therefore I agree with Petteri Räty that it should be added to the main tree.
(In reply to comment #32) Maybe you should upload the ebuild and the startup script separately and not in tar.gz file. Otherwise thanks for thous files. PS: Are you missing the MathML implementation in FOP? I missing that very much! I would appreciate to somebody implement the Jeuclid into the FOP ;o)
(In reply to comment #33) > (In reply to comment #32) > > Maybe you should upload the ebuild and the startup script separately and not in > tar.gz file. Otherwise thanks for thous files. > > PS: Are you missing the MathML implementation in FOP? I missing that very much! > I would appreciate to somebody implement the Jeuclid into the FOP ;o) > SVGMath is pretty good at transforming presentation MathML into SVG. It accepts a .fo file containing embedded MathML and outputs a .fo file with embedded SVGs and proper baseline shifts for those SVGs. Does Jeuclid do that (I've never tried it)?
Created attachment 107788 [details] fop-0.93_beta.ebuild Correction of RDEPEND for dev-java/commons-io.
Created attachment 107790 [details, diff] 0.93_beta-startscript.patch Plain text version of the start script.
(In reply to comment #34) > SVGMath is pretty good at transforming presentation MathML into SVG. It accepts > a .fo file containing embedded MathML and outputs a .fo file with embedded SVGs > and proper baseline shifts for those SVGs. Does Jeuclid do that (I've never > tried it)? > It doesn't works very well, but it could be better then nothing ;o) I just tried the MathML to SVG and GIF. The quality is not the best, but it is better then nothing. I don't know if there is implemented the baseline shifting, you can try it ;o)
(In reply to comment #36) > Created an attachment (id=107790) [edit] > 0.93_beta-startscript.patch > > Plain text version of the start script. > Startup scripts should be done using java-pkg_dolauncher. Check the eclass (java-utils-2.eclass) for documentation.
(In reply to comment #32) > fixed existing fop-0.93_beta.ebuild (0.93 is a svn tag not a branch) I just tried to compile fop 0.93 with the new SVN path and it doesn't work for me: >>> Unpacking source... !!! ERROR: dev-java/fop-0.93_beta failed. Call stack: ebuild.sh, line 1546: Called dyn_unpack ebuild.sh, line 708: Called src_unpack fop-0.93_beta.ebuild, line 36: Called subversion_src_unpack subversion.eclass, line 274: Called subversion_fetch subversion.eclass, line 183: Called die !!! subversion.eclass: ESVN_REPO_URI (or specified URI) and working copy's URL are not matched. !!! If you need support, post the topmost build error, and the call stack if relevant. !!! 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.10" JAVACFLAGS="-source 1.5 -target 1.5" COMPILER="" and of course, the output of emerge --info !!! This ebuild is from an overlay: '/usr/local/portage'
(In reply to comment #32) > fixed existing fop-0.93_beta.ebuild Is it really beta? At this page (http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/) it is not marked like beta.
(In reply to comment #40) > (In reply to comment #32) > > fixed existing fop-0.93_beta.ebuild > > Is it really beta? At this page > (http://svn.apache.org/repos/asf/xmlgraphics/fop/tags/) it is not marked like > beta. > I did notice that, I mentioned it in my post that fop is considered stable now. Just wanted to get the new fop running that's why i didn't rename the ebuild. Feel free to do so. Sorry for posting a tar.gz btw. About the mathml support - just install jeuclid and add its .jar to the classpath of the fop startscript, then it should work. Never used MathML, I always exported from TeX so far ;)
Im going to to preempt this. but I am planning (and currently working on) getting this ebuild into the migrated-java-experimental overlay. Ill also reiterate that fob-0.93 has been released and this ebuild will not pull the source from subversion. I'll post the url once its up. Thanks for the work your done so far
Just to update, a WIP ebuild is in the overlay here https://overlays.gentoo.org/svn/proj/java/migrated-java-experimental-overlay/dev-java/fop/ the following TODO's remain 1) cleanup 2) all the optional dependencies 3) the launcher script 4) get JAVADOC's to generate :(
Nice :) Only prob I had was that the /usr/bin/fop startup script doesn't use slots, so was looking at my old FOP install. Changing the LOCALCLASSPATH line to: LOCALCLASSPATH="`java-config -d --classpath=fop-0.93`" And it plays nice.
(In reply to comment #44) > Nice :) > > Only prob I had was that the /usr/bin/fop startup script doesn't use slots, so > was looking at my old FOP install. Changing the LOCALCLASSPATH line to: > > LOCALCLASSPATH="`java-config -d --classpath=fop-0.93`" > > And it plays nice. > Thank you, I corrected that in overlay.
Commited to main tree in the same slot, not new. So the launcher is fop. There's no MathML support (we don't have jeuclid) and no hyphenation because there are no hyphenation xml files in the sources, weird. Launcher is using dolauncher without extra features that the upstream launcher had, they didn't seem worth. If anything of this, or some other problem makes you unhappy, please open new bug, this one is long enough :)
(In reply to comment #46) > There's no MathML support (we don't have jeuclid) There exists ebuild for jeuclid (http://bugs.gentoo.org/show_bug.cgi?id=121822). > no hyphenation because there are no hyphenation xml files in the sources Hyphenation could be included from this page: http://offo.sourceforge.net/hyphenation/
Created attachment 118438 [details] fop-1.0_beta.ebuild Updated ebuild for SVN version of FOP. I use it in production and it works very good for me. May be you could add it into main portage tree as a fop-1.0_beta or fop-1.0_alpha and mask it hardly (~M).
This bug should really be left alone finally, too many comments and attachments to scroll :) new bugs please, I commited this fop mainly for freemind which took enough pain on its own to be concerned also with jeuclid and stuff. Not trying to be bureaucratic, it just helps manageability. (In reply to comment #47) > (In reply to comment #46) > > There's no MathML support (we don't have jeuclid) > There exists ebuild for jeuclid > (http://bugs.gentoo.org/show_bug.cgi?id=121822). open a bug blocking 121822 then if you want mathml > > no hyphenation because there are no hyphenation xml files in the sources > Hyphenation could be included from this page: > http://offo.sourceforge.net/hyphenation/ another bug, preferably with patch and USEflag (extra dep) if you want that, seems your 1.0beta doesn't even have it? (In reply to comment #48) > Created an attachment (id=118438) [edit] > fop-1.0_beta.ebuild > > Updated ebuild for SVN version of FOP. I use it in production and it works very > good for me. May be you could add it into main portage tree as a fop-1.0_beta > or fop-1.0_alpha and mask it hardly (~M). Hmm live svn ebuild for trunk, definitely should have different naming. Another bug please :) should be useful to more than one person to be in tree.
Created attachment 132386 [details] fop-0.94.ebuild Ebuild for dev-java/fop-0.94. Included MathML support with jeuclid-fop plugin.
Created attachment 132532 [details] fop-1.0_beta.ebuild Ebuild for dev-java/fop-1.0_beta with jeuclid-fop-3.0.1 plug-in support for MathML. Use this version if fop-0.94 gives you this error: Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/xml/utils/URI$MalformedURIException reported here: http://issues.apache.org/bugzilla/show_bug.cgi?id=43542 which is already corrected in trunk version: http://svn.apache.org/viewvc?rev=581806&view=rev