On Sep 4, 2018, at 10:50 AM, [email protected] wrote: >> On Aug 31, 2018, at 8:32 PM, Guenael Strutt <[email protected]> wrote: >> To build lang/processing, one needs a specific version of the JDK (as >> specified in >> https://github.com/processing/processing/blob/master/build/build.xml). >> 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 >> https://travis-ci.org/macports/macports-ports/builds/423195489 at every >> update. I tried checking for the existence of this folder: >> `/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/` but didn't get >> anywhere. Thanks! > > Have you looked at the java-1.0 portgroup? > > It is pretty simple and determines if the user has java installed and can set > the JAVA_HOME directory in the environment variables. > > It probably could be enhanced to determine the actual version and type (JRE > vs. JDK) of java installed.
+1 It would be nice if it also installed a 'good' JRE/JDK or at least gave the user instructions on how/where to get it. > 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. I haven't looked at the oracle license recently, but if it allows it, we should be providing install via port so that the normal dependency resolution stuff can work. -- Daniel J. Luke
