<pre style='margin:0'>
Christopher Nielsen (mascguy) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/bac3c7da5dbd8c4d055bfb85f5da1848e2b6d882">https://github.com/macports/macports-ports/commit/bac3c7da5dbd8c4d055bfb85f5da1848e2b6d882</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit bac3c7da5dbd8c4d055bfb85f5da1848e2b6d882
</span>Author: Kirill A. Korinsky <kirill@korins.ky>
AuthorDate: Sun Aug 20 21:04:05 2023 +0200
<span style='display:block; white-space:pre;color:#404040;'> java PG: allow port to enforce fallback JVM
</span>---
_resources/port1.0/group/java-1.0.tcl | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/java-1.0.tcl b/_resources/port1.0/group/java-1.0.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 8e5112b6f6d..05ef778644d 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/java-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/java-1.0.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -17,13 +17,17 @@
</span> # - "+" and "*" wildcards are supported
#
# If the required Java cannot be found, an error will be thrown at pre-fetch.
<span style='display:block; white-space:pre;background:#e0ffe0;'>+#
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Sometimes a port hard code inside produces scripts and other files used JVM,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# then its true use java.enforce to enforce dependency.
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>-options java.version java.home java.fallback java.deptypes
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+options java.version java.home java.fallback java.deptypes java.enforce
</span>
default java.version {}
default java.home {}
default java.fallback {[java::java_get_default_fallback]}
default java.deptypes lib
<span style='display:block; white-space:pre;background:#e0ffe0;'>+default java.enforce no
</span>
# allow PortGroup to be used inside a variant (e.g. octave)
global java_version_not_found
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -124,7 +128,7 @@ namespace eval java {
</span> }
# Add dependency if required
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if { ${java_version_not_found} && ${java.fallback} ne "" } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { (${java_version_not_found} || [option java.enforce]) && ${java.fallback} ne "" } {
</span> ui_debug "Adding dependency on JDK fallback ${java.fallback}"
foreach deptype [option java.deptypes] {
depends_${deptype}-append port:${java.fallback}
</pre><pre style='margin:0'>
</pre>