Gentoo Archives: gentoo-dev

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 0/2] eclass/java-{utils-2,pkg-simple}.eclass: features and enhancements
Date: Sun, 30 Aug 2020 16:40:23
Message-Id: 11488afe-247b-55db-cc61-f5cad308b92f@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 0/2] eclass/java-{utils-2,pkg-simple}.eclass: features and enhancements by "Miroslav Šulc"
1 hi all,
2
3 it's committed now:
4
5 commit a4d773b4c2f433438b00010bbf0981c81e123d1b (HEAD -> master,
6 origin/master, origin/HEAD)
7 Author: Zhang Zongyu <zzy2529420793@×××××.com>
8 Date:   Wed Aug 26 00:30:10 2020 +0800
9
10     patching ebuild files to support new java-pkg-simple
11
12     Signed-off-by: Zhang Zongyu <zzy2529420793@×××××.com>
13     Signed-off-by: Miroslav ©ulc <fordfrog@g.o>
14
15 commit faa407032918b43fafe7d4e1de85dde4d30ba4f2
16 Author: Zhang Zongyu <zzy2529420793@×××××.com>
17 Date:   Wed Aug 26 00:30:09 2020 +0800
18
19     java-pkg-simple.eclass and java-utils-2.eclass: features and
20 enhancements
21
22     1) support java resources
23     2) support java main class and launcher
24     3) enable java-pkg-simple_src_test()
25     4) support binary jars (both for resolve circular deps and for
26 pkgdiff test)
27
28     Signed-off-by: Zhang Zongyu <zzy2529420793@×××××.com>
29     Signed-off-by: Miroslav ©ulc <fordfrog@g.o>
30
31 regards.
32
33 fordfrog
34
35
36 Dne 28. 08. 20 v 19:25 Miroslav ©ulc napsal(a):
37 > hi all,
38 >
39 > jfyi, i'm going to commit these changes to the main tree at the end of
40 > the weekend if there are no objections. (i've been mentoring this
41 > project.) we have some other work that depends on these patches so i'd
42 > like to see it in the main tree as soon as possible.
43 >
44 > regards.
45 >
46 > fordfrog
47 >
48 >
49 > Dne 25. 08. 20 v 17:46 zongyu napsal(a):
50 >> Dear all,
51 >>
52 >>       I am one of the students who attend Gentoo's Google Summer of Code
53 >>       program [1] this year. And this email is attempting to trigger a
54 >>       review for a patch for eclass/java-{utils-2,pkg-simple}.eclass.
55 >>
56 >>       Java-pkg-simple.eclass is widely used by java packages that do not
57 >>       provide a build.xml for building with java-ant-2.eclass. Although
58 >>       java-pkg-simple.eclass works well right now, it still lacks some
59 >>       features [2], such as installing java resources and providing
60 >>       src_test() function.
61 >>
62 >>       The patch below is trying to enable some missing features of
63 >>       java-pkg-simple.eclass, including:
64 >>       1. Since some java packages (e.g. dev-java/commons-io) has java
65 >>          resources bundled in jar files, java-pkg-simple.eclass now
66 >> has a
67 >>          function java-pkg-simple_prepend_resources() to recognize and
68 >>          install those java resource files;
69 >>       2. Some java packages have a "main class" so that we can execute
70 >>          the jar file from command line. With "JAVA_MAIN_CLASS" and
71 >>          "JAVA_LAUNCHER_FILENAME", the eclass can deal with the
72 >> situation
73 >>          properly;
74 >>       3. Enabling src_test() function with multiple testing frameworks
75 >>          like junit, testng, pkgdiff and so on;
76 >>       4. Pkgdiff test will compare natively compiled jar file and
77 >> upstream
78 >>          provided binary jar file, to support the feature the eclass
79 >> will
80 >>          fetch pre-compiled java jars and accept
81 >> "JAVA_BINJAR_FILENAME" to
82 >>          identify it.
83 >>          Besides, installing binjar will help resolve circular
84 >>          dependencies, so the eclass also accepts USE="binary" and
85 >>          installs the binary jars now.
86 >>
87 >>       And for java-utils-2.eclass:
88 >>       1. To support java-pkg-simple_src_test(), there is a new function
89 >>          etestng() to launch java tests with dev-java/testng.
90 >>
91 >>       Finally, there is a breaking change to java-pkg-simple. Instead of
92 >>       treating "JAVA_SRC_DIR" as a string of directories separated by
93 >>       spaces, currently the eclass will treat it as an array. A few
94 >>       packages will be affected and fail to build, and the second patch
95 >>       will solve the problem.
96 >>
97 >>       P.S.
98 >>       This is the first time for me to write a patch for such a huge
99 >>       project and send such an email. I hope this email will meet your
100 >>       requirements, and I would appreciate your every response.
101 >>
102 >>       Regards,
103 >>       Zhang Zongyu
104 >>
105 >>       [1] the GSoC program
106 >> https://summerofcode.withgoogle.com/projects/#4994566568017920
107 >>       [2] a related bug
108 >>       https://bugs.gentoo.org/564158
109 >>
110 >> zongyu (2):
111 >>    java-pkg-simple.eclass and java-utils-2.eclass: features and
112 >>      enhancements
113 >>    patching ebuild files to support new java-pkg-simple
114 >>
115 >>   dev-java/juel/juel-2.1.0-r2.ebuild            |   2 +-
116 >>   dev-java/piccolo2d/piccolo2d-3.0-r1.ebuild    |   2 +-
117 >>   .../swingx-ws-1.0_p20110515-r1.ebuild         |   4 +-
118 >>   .../xml-commons/xml-commons-1.4.01.ebuild     |   2 +-
119 >>   dev-java/xsdlib/xsdlib-20090415.ebuild        |   4 +-
120 >>   eclass/java-pkg-simple.eclass                 | 379 ++++++++++++++++--
121 >>   eclass/java-utils-2.eclass                    |  38 ++
122 >>   7 files changed, 395 insertions(+), 36 deletions(-)
123 >>
124 >