Gentoo Archives: gentoo-java

From: Alistair Bush <alistair.bush@×××××.com>
To: gentoo-java@l.g.o
Subject: [gentoo-java] eclipse-sdk jar files
Date: Fri, 28 Dec 2007 11:31:48
Message-Id: 4774DE5F.5030907@gmail.com
1 As I know of at least one package that has a dependency on eclipse-sdk I
2 am about to commit a new revision of the eclipse-sdk ebuild (in
3 java-exp) that records the eclipse jar's within its package.env file.
4
5 Now the main problem is that the eclipse jar files are versioned (eg
6 org.eclipse.compare_3.3.1.r33x_20070906.jar ) so just calling regjar is
7 pointless. I also attempted to install the jar files to
8 /usr/share/eclipse-sdk-3.3/lib and link them to
9 /usr/lib/eclipse-3.3/plugins/ but eclipse did not run (and seemed to
10 then view it's home dir as /usr/share/eclipse-sdk-3.3/lib).
11
12 So my solution is to create links in /usr/share/eclipse-sdk-3.3/lib with
13 non-versioned jars and regjar those.
14
15 This is the function to do this...
16
17 register_eclipse_jars() {
18 pushd "${D}" > /dev/null
19 dodir "/usr/share/${PN}-${SLOT}/lib"
20 while read line; do
21 local newfile="$(basename "$line")"
22 local file="/usr/share/${PN}-${SLOT}/lib/${newfile/_*/.jar}"
23 dosym "${line/./}" "${file}"
24 java-pkg_regjar "${file}"
25 done < <(find . -type f -name '*.jar')
26 popd > /dev/null
27 }
28
29
30 Currently this solution has some issues mainly being around the way
31 names are formed
32 ( e.g. universal.jar ->
33 /usr/lib/eclipse-3.3/plugins/org.eclipse.ui.intro.universal_3.2.100.v20070530A/universal.jar
34 )
35 this issue only applies to jars within a subdirectory of the eclipse
36 plugins directory and it will be fixed with time.
37
38 Basically I'm after feedback on this. Does anyone have any better ideas?
39 --
40 gentoo-java@g.o mailing list