Line
Link Here
|
0 |
-- a/eclass/java-pkg-simple.eclass |
0 |
++ b/eclass/java-pkg-simple.eclass |
Lines 26-33
_JAVA_PKG_SIMPLE_ECLASS=1
Link Here
|
26 |
|
26 |
|
27 |
inherit java-utils-2 |
27 |
inherit java-utils-2 |
28 |
|
28 |
|
29 |
if ! has java-pkg-2 ${INHERITED}; then |
29 |
if has java-pkg-2 ${INHERITED}; then |
30 |
eerror "java-pkg-simple eclass can only be inherited AFTER java-pkg-2" |
30 |
JAVA_PKG_OPT=0 |
|
|
31 |
elif has java-pkg-opt-2 ${INHERITED}; then |
32 |
JAVA_PKG_OPT=1 |
33 |
else |
34 |
eerror "java-pkg-simple eclass can only be inherited AFTER java-pkg-2 or java-pkg-opt-2" |
31 |
fi |
35 |
fi |
32 |
|
36 |
|
33 |
# We are only interested in finding all java source files, wherever they may be. |
37 |
# We are only interested in finding all java source files, wherever they may be. |
Lines 50-56
if has test ${JAVA_PKG_IUSE}; then
Link Here
|
50 |
test_deps+=" dev-java/testng:0";; |
54 |
test_deps+=" dev-java/testng:0";; |
51 |
esac |
55 |
esac |
52 |
done |
56 |
done |
53 |
[[ ${test_deps} ]] && DEPEND="test? ( ${test_deps} )" |
57 |
if [[ ${JAVA_PKG_OPT} ]]; then |
|
|
58 |
[[ ${test_deps} ]] && DEPEND="test? ( ${JAVA_PKG_OPT_USE}? ( ${test_deps} ) )" |
59 |
else |
60 |
[[ ${test_deps} ]] && DEPEND="test? ( ${test_deps} )" |
61 |
fi |
62 |
|
54 |
unset test_deps |
63 |
unset test_deps |
55 |
fi |
64 |
fi |
56 |
|
65 |
|
Lines 347-352
java-pkg-simple_prepend_resources() {
Link Here
|
347 |
# If USE FLAG 'binary' exists and is set, it will just copy |
356 |
# If USE FLAG 'binary' exists and is set, it will just copy |
348 |
# ${JAVA_BINJAR_FILENAME} to ${S} and skip the rest of src_compile. |
357 |
# ${JAVA_BINJAR_FILENAME} to ${S} and skip the rest of src_compile. |
349 |
java-pkg-simple_src_compile() { |
358 |
java-pkg-simple_src_compile() { |
|
|
359 |
[[ ${JAVA_PKG_OPT} ]] && ! use ${JAVA_PKG_OPT_USE} && return |
350 |
local sources=sources.lst classes=target/classes apidoc=target/api moduleinfo |
360 |
local sources=sources.lst classes=target/classes apidoc=target/api moduleinfo |
351 |
|
361 |
|
352 |
# do not compile if we decide to install binary jar |
362 |
# do not compile if we decide to install binary jar |
Lines 461-466
java-pkg-simple_src_compile() {
Link Here
|
461 |
# ${JAVA_JAR_FILENAME}. It will also install a launcher if |
471 |
# ${JAVA_JAR_FILENAME}. It will also install a launcher if |
462 |
# ${JAVA_MAIN_CLASS} is set. Also invokes einstalldocs. |
472 |
# ${JAVA_MAIN_CLASS} is set. Also invokes einstalldocs. |
463 |
java-pkg-simple_src_install() { |
473 |
java-pkg-simple_src_install() { |
|
|
474 |
[[ ${JAVA_PKG_OPT} ]] && ! use ${JAVA_PKG_OPT_USE} && return |
464 |
local sources=sources.lst classes=target/classes apidoc=target/api |
475 |
local sources=sources.lst classes=target/classes apidoc=target/api |
465 |
|
476 |
|
466 |
# install the jar file that we need |
477 |
# install the jar file that we need |
Lines 503-508
java-pkg-simple_src_install() {
Link Here
|
503 |
# in the "generated-test" directory as content of this directory is preserved, |
514 |
# in the "generated-test" directory as content of this directory is preserved, |
504 |
# whereas content of target/test-classes is removed. |
515 |
# whereas content of target/test-classes is removed. |
505 |
java-pkg-simple_src_test() { |
516 |
java-pkg-simple_src_test() { |
|
|
517 |
[[ ${JAVA_PKG_OPT} ]] && ! use ${JAVA_PKG_OPT_USE} && return |
506 |
local test_sources=test_sources.lst classes=target/test-classes moduleinfo |
518 |
local test_sources=test_sources.lst classes=target/test-classes moduleinfo |
507 |
local tests_to_run classpath |
519 |
local tests_to_run classpath |
508 |
|
520 |
|