Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 233840 - dev-java/qtjambi 4.4.0
Summary: dev-java/qtjambi 4.4.0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Qt Bug Alias
URL: http://trolltech.com/developer/downlo...
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2008-08-03 20:00 UTC by Vladimir Kulev
Modified: 2009-03-04 09:43 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
ebuild for qt jambi 4.4.3 (20081129) (qtjambi-4.4.3.ebuild,3.21 KB, text/plain)
2008-11-29 14:30 UTC, Fabian Köster
Details
Patch for generator using correct QTDIR (generator-4.4.3.patch,435 bytes, patch)
2008-11-29 14:31 UTC, Fabian Köster
Details | Diff
ebuild for qt jambi 4.4.3 (20081212) (qtjambi-4.4.3.ebuild,3.59 KB, text/plain)
2008-12-12 08:32 UTC, Fabian Köster
Details
Patch for configuration class to look correct path for libs (configuration-4.4.3.patch,1.09 KB, patch)
2008-12-12 08:33 UTC, Fabian Köster
Details | Diff
ebuild for qt jambi 4.4.3 (20081218) (qtjambi-4.4.3.ebuild,4.30 KB, text/plain)
2008-12-18 16:42 UTC, Fabian Köster
Details
Patch for configuration class to look correct path for libs (20081218) (configuration-4.4.3.patch,4.64 KB, patch)
2008-12-18 16:43 UTC, Fabian Köster
Details | Diff
The broken ebuild (qtjambi-4.4.3.ebuild,4.08 KB, text/plain)
2008-12-19 11:28 UTC, Fabian Köster
Details
ebuild for qt jambi 4.4.3 (20081220) (qtjambi-4.4.3.ebuild,4.08 KB, text/plain)
2008-12-20 13:47 UTC, Fabian Köster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kulev 2008-08-03 20:00:51 UTC
Please add ebuild for Jambi 4.4.0 version.

Reproducible: Always
Comment 1 Fabian Köster 2008-11-20 17:47:21 UTC
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?
Comment 2 Fabian Köster 2008-11-29 14:30:26 UTC
Created attachment 173756 [details]
ebuild for qt jambi 4.4.3 (20081129)

Also attaching ebuild for your convenience.
Comment 3 Fabian Köster 2008-11-29 14:31:30 UTC
Created attachment 173757 [details, diff]
Patch for generator using correct QTDIR
Comment 4 Ben de Groot (RETIRED) gentoo-dev 2008-12-04 01:19:37 UTC
Java herd: any comments? Is this good to go? I suggest we co-maintain this package.
Comment 5 Serkan Kaba (RETIRED) gentoo-dev 2008-12-04 04:42:54 UTC
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.
Comment 6 Fabian Köster 2008-12-04 09:32:58 UTC
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.
Comment 7 Fabian Köster 2008-12-10 19:23:56 UTC
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?
Comment 8 Alistair Bush (RETIRED) gentoo-dev 2008-12-11 09:09:29 UTC
(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.
Comment 9 Fabian Köster 2008-12-12 08:31:42 UTC
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 :)
Comment 10 Fabian Köster 2008-12-12 08:32:54 UTC
Created attachment 175036 [details]
ebuild for qt jambi 4.4.3 (20081212)

The new attachment
Comment 11 Fabian Köster 2008-12-12 08:33:58 UTC
Created attachment 175038 [details, diff]
Patch for configuration class to look correct path for libs
Comment 12 Fabian Köster 2008-12-12 10:41:31 UTC
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.
Comment 13 Alistair Bush (RETIRED) gentoo-dev 2008-12-12 20:05:43 UTC
(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).
Comment 14 Fabian Köster 2008-12-18 16:41:10 UTC
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.
Comment 15 Fabian Köster 2008-12-18 16:42:39 UTC
Created attachment 175749 [details]
ebuild for qt jambi 4.4.3 (20081218)
Comment 16 Fabian Köster 2008-12-18 16:43:13 UTC
Created attachment 175751 [details, diff]
Patch for configuration class to look correct path for libs (20081218)
Comment 17 Alistair Bush (RETIRED) gentoo-dev 2008-12-18 18:47:32 UTC
(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
Comment 18 Alistair Bush (RETIRED) gentoo-dev 2008-12-18 19:19:05 UTC
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
Comment 19 Fabian Köster 2008-12-19 11:27:38 UTC
> 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?
Comment 20 Fabian Köster 2008-12-19 11:28:19 UTC
Created attachment 175850 [details]
The broken ebuild
Comment 21 Alistair Bush (RETIRED) gentoo-dev 2008-12-19 18:55:28 UTC
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)
Comment 22 Fabian Köster 2008-12-20 13:45:57 UTC
OK. Got it.

Appending the fixed ebuild. Is there anything else which prevents it from going into portage-tree?
Comment 23 Fabian Köster 2008-12-20 13:47:12 UTC
Created attachment 175946 [details]
ebuild for qt jambi 4.4.3 (20081220)
Comment 24 Alistair Bush (RETIRED) gentoo-dev 2008-12-20 20:03:32 UTC
(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.
Comment 25 Fabian Köster 2008-12-21 11:46:49 UTC
> 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 !
Comment 26 Alistair Bush (RETIRED) gentoo-dev 2008-12-24 04:55:10 UTC
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>.
Comment 27 Fabian Köster 2008-12-25 20:34:01 UTC
Thank you very much for this great christmas present!

Wish you Happy Holidays!
Comment 28 Fabian Köster 2008-12-25 22:03:51 UTC
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.
Comment 29 Alistair Bush (RETIRED) gentoo-dev 2008-12-25 22:35:40 UTC
(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.
Comment 30 Fabian Köster 2009-02-25 12:07:12 UTC
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?
Comment 31 Alistair Bush (RETIRED) gentoo-dev 2009-03-04 09:43:57 UTC
(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.