1 |
Dear all, |
2 |
|
3 |
I am one of the students who attend Gentoo's Google Summer of Code |
4 |
program [1] this year. And this email is attempting to trigger a |
5 |
review for a patch for eclass/java-{utils-2,pkg-simple}.eclass. |
6 |
|
7 |
Java-pkg-simple.eclass is widely used by java packages that do not |
8 |
provide a build.xml for building with java-ant-2.eclass. Although |
9 |
java-pkg-simple.eclass works well right now, it still lacks some |
10 |
features [2], such as installing java resources and providing |
11 |
src_test() function. |
12 |
|
13 |
The patch below is trying to enable some missing features of |
14 |
java-pkg-simple.eclass, including: |
15 |
1. Since some java packages (e.g. dev-java/commons-io) has java |
16 |
resources bundled in jar files, java-pkg-simple.eclass now has a |
17 |
function java-pkg-simple_prepend_resources() to recognize and |
18 |
install those java resource files; |
19 |
2. Some java packages have a "main class" so that we can execute |
20 |
the jar file from command line. With "JAVA_MAIN_CLASS" and |
21 |
"JAVA_LAUNCHER_FILENAME", the eclass can deal with the situation |
22 |
properly; |
23 |
3. Enabling src_test() function with multiple testing frameworks |
24 |
like junit, testng, pkgdiff and so on; |
25 |
4. Pkgdiff test will compare natively compiled jar file and upstream |
26 |
provided binary jar file, to support the feature the eclass will |
27 |
fetch pre-compiled java jars and accept "JAVA_BINJAR_FILENAME" to |
28 |
identify it. |
29 |
Besides, installing binjar will help resolve circular |
30 |
dependencies, so the eclass also accepts USE="binary" and |
31 |
installs the binary jars now. |
32 |
|
33 |
And for java-utils-2.eclass: |
34 |
1. To support java-pkg-simple_src_test(), there is a new function |
35 |
etestng() to launch java tests with dev-java/testng. |
36 |
|
37 |
Finally, there is a breaking change to java-pkg-simple. Instead of |
38 |
treating "JAVA_SRC_DIR" as a string of directories separated by |
39 |
spaces, currently the eclass will treat it as an array. A few |
40 |
packages will be affected and fail to build, and the second patch |
41 |
will solve the problem. |
42 |
|
43 |
P.S. |
44 |
This is the first time for me to write a patch for such a huge |
45 |
project and send such an email. I hope this email will meet your |
46 |
requirements, and I would appreciate your every response. |
47 |
|
48 |
Regards, |
49 |
Zhang Zongyu |
50 |
|
51 |
[1] the GSoC program |
52 |
https://summerofcode.withgoogle.com/projects/#4994566568017920 |
53 |
[2] a related bug |
54 |
https://bugs.gentoo.org/564158 |
55 |
|
56 |
zongyu (2): |
57 |
java-pkg-simple.eclass and java-utils-2.eclass: features and |
58 |
enhancements |
59 |
patching ebuild files to support new java-pkg-simple |
60 |
|
61 |
dev-java/juel/juel-2.1.0-r2.ebuild | 2 +- |
62 |
dev-java/piccolo2d/piccolo2d-3.0-r1.ebuild | 2 +- |
63 |
.../swingx-ws-1.0_p20110515-r1.ebuild | 4 +- |
64 |
.../xml-commons/xml-commons-1.4.01.ebuild | 2 +- |
65 |
dev-java/xsdlib/xsdlib-20090415.ebuild | 4 +- |
66 |
eclass/java-pkg-simple.eclass | 379 ++++++++++++++++-- |
67 |
eclass/java-utils-2.eclass | 38 ++ |
68 |
7 files changed, 395 insertions(+), 36 deletions(-) |
69 |
|
70 |
-- |
71 |
2.26.2 |