Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Feb 2009 10:25:32 -0800
From:      Brian Gardner <brian@experts-exchange.com>
To:        Peter Ulrich Kruppa <ulrich@pukruppa.net>
Cc:        artemciy@gmail.com, SAITOU Toshihide <toshi@ruby.ocn.ne.jp>, freebsd-java@freebsd.org
Subject:   Re: openjdk6 port complete and ready for testing
Message-ID:  <49A6DE9C.9090102@experts-exchange.com>
In-Reply-To: <49A68DBD.6060106@pukruppa.net>
References:  <20090225.204541.48442950.chat95@mac.com>	<fa034155299f8f710ad9a9ce0ee83cb1.squirrel@wettoast.dyndns.org>	<loom.20090226T101900-897@post.gmane.org>	<20090226.211029.264452332.toshi@ruby.ocn.ne.jp> <49A68DBD.6060106@pukruppa.net>

next in thread | previous in thread | raw e-mail | index | archive | help
It seems like this logic should be built into 
/usr/ports/Mk/bsd.java.mk.  I don't know much about how these files are 
maintained but this is my suggestion:
Before including /usr/ports/Mk/bsd.java.mk you could include variables
  BUILD_REQUIRES_JAVA_<JAVA_VERSION>
  BUILD_REQUIRES_JAVA_<JAVA_VERSION>
bsd.java.mk would look for any suitable (from a hard coded list per java 
version) ports are installed.  If no suitable port was installed, create 
the dependency for the default (hard coded per java version).    If a 
suitable port was found then FREEBSD_JAVA_HOME_<JAVA_VERSION> which any 
java port would then be able to utilize.

This would work in conjunction with a java-select tool built into the 
java<version>vmwrapper that would allow multiple ports that have the 
same JAVA_VERSION to be installed and allow the client to choose which 
one is active.

This method would allow any java dependant port to easially declare its 
dependancy to a java version vs a specific port, and  would also allow 
any port to require a specific java version.  This is the fundemental 
idea however the implementation would need to be more complex to support:
*) java dependant ports may work multiple java versions (java 5 or java 
6), so maybe it could specify (BUILD_REQUIRES_JAVA_5_OR_6)
*) dependencies involving javavmwrapper may get a bit tricky and should 
be thought through before proceeding.
*) it would be nice to be able to specify a list of suitable JAVA_PORTS 
(BUILD_REQUIRES_JAVA_PORTS - comma seperated list of ports) in the case 
that a java dependant port works with java/diablo-jdk6 and java/openjdk6 
but doesn't work with java/jdk6.
*) I'm sure there are other caveats that I'm not thinking about.


Brian



Peter Ulrich Kruppa wrote:
> SAITOU Toshihide schrieb:
>> In message: <loom.20090226T101900-897@post.gmane.org>
>>             ArtemGr <artemciy@gmail.com> writes:
>>> Mike Jakubik <mikej <at> rogers.com> writes:
>>>> Good news, the port compiled and installed OK for me!. Now is someone
>>>> could tell me how to us the javavmwrapper to switch to this i would be
>>>> very thankful, as i can't find any documentation on this.
>>> export JAVA_HOME=/usr/local/openjdk6
>>
>> /usr/local/etc/javavm_opts.conf is also functional.
>> Add this line:
>>
>>    #JAVA_HOME=/usr/local/diablo-jdk1.6.0/
>>    JAVA_HOME=/usr/local/openjdk6/
> Please do excuse if I missed something:
> There are JAVA dependent ports which don't allow JAVA_HOME to be set - 
> for example openjdk6 itself.
> How or better: can I build these with openjdk6?
>
>
> Greetings
>
> Peter
> _______________________________________________
> freebsd-java@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-java
> To unsubscribe, send any mail to "freebsd-java-unsubscribe@freebsd.org"
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49A6DE9C.9090102>