Subject: Re: Java in pkgsrc on Solaris
To: None <pkgsrc-users@netbsd.org>
From: Klaus Heinz <k.heinz.aug.sechs@kh-22.de>
List: pkgsrc-users
Date: 08/29/2006 00:32:51
Mehul Sanghvi wrote:

>    I'm trying to install jakarta-tomcat5 on my Solaris 9 system where
> I am using pkgsrc.  It seems to always want to try and build kaffe,
> which is not what I want it to do.  Java already
> exists in /usr/java and that is what I want pkgsrc to use.  How do I
> go about doing that ?

As far as I can see, there is no direct support for that on Solaris,
yet, although the infrastructure is in place and is used for
Darwin/MacOS X which also provides native Java.

Pkgsrc can use certain native software from the host OS instead of a
pkgsrc package if there is a file "builtin.mk" in the package directory
and builtin.mk is able to recognise this native software. As an example,
we use this mechanism to use native zlib instead of devel/zlib, if
available.

For Java, the files lang/sun-j(dk|re)*/builtin.mk need to be taught to 
recognise the respective Java version.
Then you would be able to set USE_JAVA2=1.5 in your mk.conf and pkgsrc
would require sun-jdk15 and if builtin.mk saw there already was Java 1.5
available on your Solaris system, it would set appropriate variables for
pkgsrc to use the native Java version.

You could try to adapt the existing builtin.mk files to support Solaris.

ciao
     Klaus