[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


From: "Ian F. Darwin" <ian_(_at_)_darwinsys_(_dot_)_com>
> Steve Shockley wrote:
> > Ian F. Darwin wrote:
> >> Now that 1.4 is here I imagine the volume of Java-based ports will grow.
> >> Would it be good to make a Java module and a USE_JAVA= entry in a
> >> port's Makefile?  E.g.,
> >> USE_JAVA=   1.3+   # works with 1.3 or 1.4
> >> USE_JAVA=   1.4      # requires 1.4
> >
> > Assuming that (in theory) apps that work on 1.3 will work on 1.4, then 
> > specifying a minimum version might make more sense.
> Close to 100% of 1.3 apps compile and run on 1.4.
> So yes, just specifying a minimum version is enough; any program that 
> doesn't run on a later version than it was written for is probably 
> broken and should be patched. So it simplifies to
> USE_JAVA=   1.3   # works with 1.3 or 1.4
> USE_JAVA=   1.4   # requires 1.4
> USE_JAVA=   1.5   # (when we get there)

I'm assuming USE_JAVA only controls RUN_DEPENDS for the port.
Some java ports don't need any jdk to build them like tomcat. Others like
eclipse will require a specific version so that the package maintains 
compatibility with it. Meaning eclipse should be built with 1.4 and only 1.4
so that the package maintains compatibility with 1.4 when 1.5 is available
to use with it too (unless we want to get into using -target 1.4).

There is another issue related to this that I haven't a solution for right
now. By way of example, when tomcat is installed it would be great if it
could find out which jdk satisfied the run depend, so that JAVA_HOME
could be defaulted correctly in /etc/tomcat/tomcat.rc. A while back I tried
to hack the pkg/INSTALL script to figure this out, but didn't find a solution.
Right now this is a post install step. Other java ports will have this issue
too. Is that something that can be done now, or will it require some
enhancement of pkg tools?