1 |
How many packages would benefit from this? |
2 |
|
3 |
Some ways to improve it... maybe have two variables, ie |
4 |
EANT_BUILD_TARGET, EANT_DOC_TARGET, which could be set and respected by |
5 |
src_compile, ie: |
6 |
|
7 |
java-pkg-2_src_compile() { |
8 |
local antflags="${EANT_BUILD_TARGET:=jar}" |
9 |
hasq doc ${IUSE} && antflags="${antflags} $(use_doc ${EANT_DOC_TARGET})" |
10 |
eant ${antflags} |
11 |
} |
12 |
|
13 |
By adding that, I think more ebuilds would be able to take advantage of it. |
14 |
|
15 |
One other thing... should definately check for the existence of a |
16 |
build.xml... and additionally, could have a variable to specify where |
17 |
the build file lives. |
18 |
|
19 |
Petteri Räty wrote: |
20 |
> I was looking at the output of qgrep eant to see how our ebuilds usually |
21 |
> call eant and came up with the attached src_compile. |
22 |
> |
23 |
> Regards, |
24 |
> Petteri |
25 |
> |
26 |
> ------------------------------------------------------------------------ |
27 |
> |
28 |
> Index: java-pkg-2.eclass |
29 |
> =================================================================== |
30 |
> RCS file: /var/cvsroot/gentoo-x86/eclass/java-pkg-2.eclass,v |
31 |
> retrieving revision 1.5 |
32 |
> diff -u -r1.5 java-pkg-2.eclass |
33 |
> --- java-pkg-2.eclass 8 Dec 2006 12:12:04 -0000 1.5 |
34 |
> +++ java-pkg-2.eclass 9 Dec 2006 12:16:15 -0000 |
35 |
> @@ -33,7 +33,7 @@ |
36 |
> # ------------------------------------------------------------------------------ |
37 |
> RDEPEND="${DEPEND}" |
38 |
> |
39 |
> -EXPORT_FUNCTIONS pkg_setup |
40 |
> +EXPORT_FUNCTIONS pkg_setup src_compile |
41 |
> |
42 |
> # ------------------------------------------------------------------------------ |
43 |
> # @eclass-pkg_setup |
44 |
> @@ -46,6 +46,17 @@ |
45 |
> } |
46 |
> |
47 |
> # ------------------------------------------------------------------------------ |
48 |
> +# @eclass-src_compile |
49 |
> +# |
50 |
> +# Default src_compile for java packages |
51 |
> +# ------------------------------------------------------------------------------ |
52 |
> +java-pkg-2_src_compile() { |
53 |
> + local antflags="jar" |
54 |
> + hasq doc ${IUSE} && antflags="${antflags} $(use_doc)" |
55 |
> + eant ${antflags} |
56 |
> +} |
57 |
> + |
58 |
> +# ------------------------------------------------------------------------------ |
59 |
> # @note |
60 |
> # |
61 |
> # We need to initialize the environment in every function because Portage |
62 |
> |
63 |
|
64 |
|
65 |
-- |
66 |
Joshua Nichols |
67 |
Gentoo/Java Project Lead |
68 |
-- |
69 |
gentoo-java@g.o mailing list |