Please add ebuild for Jambi 4.4.0 version. Reproducible: Always
I modified the ebuild in official portage tree to work with current jambi version 4.3.3. It can be found here: http://koesterreich.de/gentoo/ebuilds/dev-java/qtjambi/ Can anyone review this ebuild, please?
Created attachment 173756 [details] ebuild for qt jambi 4.4.3 (20081129) Also attaching ebuild for your convenience.
Created attachment 173757 [details, diff] Patch for generator using correct QTDIR
Java herd: any comments? Is this good to go? I suggest we co-maintain this package.
Please inherit java-ant-2 and use eant instead of ant. Ant dependency will be handled by it so need to add it explicitly. Installation if JNI libraries should be registered either by installing them by java-pkg_doso or registering them afterwards with java-pkg_regso. These will also make creating launchers with java-pkg_dolauncher easier. Sources should be installed by java-pgg_dosrc sontrolled by "source" USE flag. Just one more thing isn't there an ant target for other steps of src_compile? FYI: We have a Java (Ebuild) Developer Guide located at http://www.gentoo.org/proj/en/java/java-devel.xml Thanks for your work and effort in the ebuild.
Thank you for your review! I will improve the ebuild according to your hints when I am back from vacation on sunday. Yes, of course there are ant-tasks for the other steps in src_compile. The original ebuild did not use ant for these steps and I wanted to modify it as little as possible. But you are right, using ant is much easier :) There is a high probability that a Java developer which wants to use Jambi has ant installed already so this dependency should be no problem. I will use ant for all build steps then. Expect the new version of the ebuild on Monday, 8th December.
Sorry, did not have the time for the ebuild yet. I currently have the problem that build failes because it cannot find classes from ant-core when I use eant instead of ant: "package org.apache.tools.ant does not exist" Am I missing something?
(In reply to comment #7) > Sorry, did not have the time for the ebuild yet. > > I currently have the problem that build failes because it cannot find classes > from ant-core when I use eant instead of ant: > > "package org.apache.tools.ant does not exist" > > Am I missing something? > ok, I had a little play around with the ebuild as it is attached currently and here are my suggestions :) 1) inherit java-pkg-2 java-ant-2 ( as already mentioned ) 2) you don't _currently_ need to depend on dev-java/ant-core [1] 3) instead DEPEND on dev-java/ant-trax and within src_compile change the ant call line to cd ${S} ANT_TASKS="ant-trax" eant generator.xmlmerge [1] Now I also had a look at the build.xml file and seem to notice that it creates some of its own ant-tasks. If they turn out to be required then do the following 1) add dev-java/ant-core to DEPEND 2) within src_unpack run java-ant-rewrite-classpath after all patches. 3) run eant -Dgentoo.classpath="$(java-pkg_getjar --build-only ant-core ant.jar)" <targets> Basically java-ant-rewrite-classpath adds a property "gentoo.classpath" to all javac calls so we can inject dependencies into the build.xml file. This is a rather simplistic explanation tho. -D<property.name> is how you pass properties to ant build.xml's. Anyway hope this is all clear.
Thank you very much, Alistair! Your remarks were all clear and I did manage to improve the ebuild significantly. Although it is not yet perfect :) So, what is currently missing: * Features are not removed from lib when use-flag is unset but dependency is provided. Qt Jambi uses a Java-class to decide whether to build the features and this is only based on looking for the installed libraries (namely sqlite, qt-webkit, qt-phonon, qt-xmlpatterns, qt-webkit). * Designer-plugins are not installed yet * Examples are not packaged correctly and also integrated into the main jar. * The qtjambi-desginer start-script is not generated * debug use-flag And I have another, more important problem: /usr/lib/qtjambi-4/libcom_trolltech_qt_core.so.1.0.0 is not linked to the unversioned /usr/lib/qtjambi-4/libcom_trolltech_qt_core.so - Can you tell me why? The other so-files are linked (e.g. libcom_trolltech_qt_network.so). Currently I do not have the time to search for the reason. I hope I have the time to work on it soon. (Maybe later today..) It is fun, to work on my first ebuild :)
Created attachment 175036 [details] ebuild for qt jambi 4.4.3 (20081212) The new attachment
Created attachment 175038 [details, diff] Patch for configuration class to look correct path for libs
OK. Just recognized that examples seem to be packaged correctly. Although I do not really understand why? But what does not work is the 'jambi' start-script because com/trolltech/launcher/Launcher is not packaged. Also the javadoc is not generated.
(In reply to comment #12) > OK. Just recognized that examples seem to be packaged correctly. Although I do > not really understand why? > > But what does not work is the 'jambi' start-script because > com/trolltech/launcher/Launcher is not packaged. > > Also the javadoc is not generated. > From what I can see, com.trolltech.launcher.Launcher is a part of the examples, not that jar file use install. (see documentation for java -cp qtjambi-4.4.0_01.jar:qtjambi-examples-4.4.0_01.jar com.trolltech.launcher.Launcher ) Also it seems like you will want to also install the qtjambi-ant*.jar as I "think" it would be used within an qtjambi project. Also please add JAVA_PKG_IUSE="doc source" above the inherit eclass line and remove doc and source from the IUSE ( the java eclasses will put them back in, plus add some stuff to DEPEND which you need).
Thanks again for your feedback! Appending a new version of the ebuild. Changes: * Features are now removed from build-process if use-flags are unset. * Start-script 'jambi' is only installed if 'examples' use-flag is set and uses correct library-path. * qtjambi-examples.jar is now installed * Added 'debug' use-flag which activates configuration 'debug' * Moved use-flags 'source' and 'doc' from IUSE to JAVA_PKG_IUSE * qtdir now uses $(get_libdir) * Designer-plugins are now installed * 'jambi-designer' start-script is created * Javadoc is generated > Also it seems like you will want to also install the qtjambi-ant*.jar as I > "think" it would be used within an qtjambi project. As far as I can tell the qtjambi-ant*.jar is only needed for providing special ant-tasks needed by the build-process and is not needed for developing applications using Qt Jambi. Or am I wrong? As you can see I am not an expert in bash-programming. Is there a way to do the extraArgs-construction more elegant? I think I found a bug in java-pkg_doso. If the first passed file is a symlink (like libcom_trolltech_qt_core.so) the target-directory is not created and the file is not copied. See bug #251500.
Created attachment 175749 [details] ebuild for qt jambi 4.4.3 (20081218)
Created attachment 175751 [details, diff] Patch for configuration class to look correct path for libs (20081218)
(In reply to comment #14) > As far as I can tell the qtjambi-ant*.jar is only needed for providing special > ant-tasks needed by the build-process and is not needed for developing > applications using Qt Jambi. Or am I wrong? > You know more about Qt Jambi than I do, so well go with you opinion. > As you can see I am not an expert in bash-programming. Is there a way to do the > extraArgs-construction more elegant? > Im also not a bash expert, but I think its fine. > I think I found a bug in java-pkg_doso. If the first passed file is a symlink > (like libcom_trolltech_qt_core.so) the target-directory is not created and the > file is not copied. See bug #251500. > Yes saw that :) Will get a fix out over the weekend if no-one beats me to it. One more comment creating bin/jambi-designer would be better as ~# bin/jambi-designer <<EOF first line second line third line EOF see http://tldp.org/LDP/abs/html/here-docs.html#HEREDOCREF if you need
Sorry for the bug spam, but it would be nice if I actually gave you correct advice cat > bin/jambi-designer <<EOF line 1 line 2 line 3 EOF
> cat > bin/jambi-designer <<EOF > line 1 > line 2 > line 3 > EOF > I tried that but then parser fails with "line 149: syntax error: unexpected end of file" :( What am I doing wrong?
Created attachment 175850 [details] The broken ebuild
Ok with this EOF thing ( note it doesn't have to be EOF ) you have to have the closing EOF as the first thing on a line if you don't want that, then you can also do cat > bin/jambi-designer <<-EOF 1 2 2 4 EOF (note the space at the beginning of all the lines) I should have explained that the first time, so my apologies. (i'm not really very good at bash)
OK. Got it. Appending the fixed ebuild. Is there anything else which prevents it from going into portage-tree?
Created attachment 175946 [details] ebuild for qt jambi 4.4.3 (20081220)
(In reply to comment #22) > OK. Got it. > > Appending the fixed ebuild. Is there anything else which prevents it from going > into portage-tree? > Does the resulting package work ;) There are a few minor things that need to be updated. I suggest that you use run repoman full within overlays dev-java/qtjambi directory. No need to re-post the ebuild. I will (hopefully today, otherwise before xmas) make the changes mayself and add the ebuild to the tree. Once I have added it, I will give you a diff so you can see what changes I made.
> Does the resulting package work ;) Yes, the package works :) > There are a few minor things that need to be updated. I suggest that you use > run repoman full within overlays dev-java/qtjambi directory. No need to > re-post the ebuild. I will (hopefully today, otherwise before xmas) make the > changes mayself and add the ebuild to the tree. Once I have added it, I will > give you a diff so you can see what changes I made. I already ran 'repoman full' and I tried to correct as many errors as possible. I spared some for you, though ;) Thank you again for your help! I am looking forward to adapt the ebuild to the upcoming Qt Jambi 4.5 !
Fabian. Thank you for all the good work. I look forward to 1) stabilising this and 2) the next bump of this package. Could you please contact upstream and submit the patches you have made to their bug repository. Added to cvs. (and just before xmas). Will create new bug for stabilisation. Added java herd to metadata.xml. package is now co-maintained. *qtjambi-4.4.3 (24 Dec 2008) 24 Dec 2008; Alistair Bush <ali_bush@gentoo.org> metadata.xml, +qtjambi-4.4.3.ebuild: Version Bump qtjambi. Thanks to all the good work done by Fabian Koster <koesterreich@gmx.net>.
Thank you very much for this great christmas present! Wish you Happy Holidays!
I just noticed that the patches (generator-4.4.3.patch, configuration-4.4.3-patch) are not located in the files/ directory of portage.
(In reply to comment #28) > I just noticed that the patches (generator-4.4.3.patch, > configuration-4.4.3-patch) are not located in the files/ directory of portage. > Woops, sorry fixed in CVS. Will hit mirrors within a couple of hours.
I just noticed that the wrong configuration-4.4.3.patch is in portage tree. It is not the latest version I attached here. Is there any reason for this?
(In reply to comment #30) > I just noticed that the wrong configuration-4.4.3.patch is in portage tree. It > is not the latest version I attached here. Is there any reason for this? > No must have stuffed up, how many times is that for this package? 2? Thank god this isn't an eclass. Patch will hit tree in a few hours. I haven't bumped the ebuild as I expect #260803 will result in a bump.