<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Guenael,<div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Aug 31, 2018, at 8:32 PM, Guenael Strutt <<a href="mailto:macports@guenael.com" class="">macports@guenael.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><span style="color:rgb(33,33,33);font-size:13px" class="">To build lang/processing, one needs a specific version of the JDK (as specified in </span><a href="https://github.com/processing/processing/blob/master/build/build.xml" target="_blank" style="font-size:13px" class="">https://github.com/processing/processing/blob/master/build/build.xml</a><span style="color:rgb(33,33,33);font-size:13px" class="">). Question: how does one create a dependency in the Portfile to determine whether this version is present? The purpose is to 1) provide a better error message to the user and 2) prevent builds from failing </span><a href="https://travis-ci.org/macports/macports-ports/builds/423195489" target="_blank" style="font-size:13px" class="">https://travis-ci.org/macports/macports-ports/builds/423195489</a><span style="color:rgb(33,33,33);font-size:13px" class=""> at every update. I tried checking for the existence of this folder: `/Library/Java/</span><span style="color:rgb(33,33,33);font-size:13px" class="">JavaVirtualMachines/jdk1.8.0_</span><span style="color:rgb(33,33,33);font-size:13px" class="">181.jdk/` but didn't get anywhere. Thanks!</span><br class=""></div>
</div></blockquote></div><br class=""></div><div class="">Have you looked at the java-1.0 portgroup?</div><div class=""><br class=""></div><div class="">It is pretty simple and determines if the user has java installed and can set the JAVA_HOME directory in the environment variables. </div><div class=""><br class=""></div><div class="">It probably could be enhanced to determine the actual version and type (JRE vs. JDK) of java installed. </div><div class=""><br class=""></div><div class="">Otherwise, since Java is 3rd party, we cannot have a dependency on it and expect that it will be installed by Macports. We can only check if it is installed or not. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Cheers!</div><div class="">Frank</div><div class=""><br class=""></div></body></html>