From owner-freebsd-java@FreeBSD.ORG Tue May 20 11:09:34 2003 Return-Path: Delivered-To: freebsd-java@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D5B7637B404 for ; Tue, 20 May 2003 11:09:34 -0700 (PDT) Received: from mgr2.xmission.com (mgr2.xmission.com [198.60.22.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id D045A43F85 for ; Tue, 20 May 2003 11:09:33 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: from mail by mgr2.xmission.com with spam-scanned (Exim 3.35 #1) id 19IBYL-0006Ia-02 for freebsd-java@freebsd.org; Tue, 20 May 2003 12:09:33 -0600 Received: from [207.135.128.145] (helo=misty.eyesbeyond.com) by mgr2.xmission.com with esmtp (Exim 3.35 #1) id 19IBYF-0006F8-02; Tue, 20 May 2003 12:09:28 -0600 Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) by misty.eyesbeyond.com (8.12.9/8.12.9) with ESMTP id h4KIEOMP028729; Tue, 20 May 2003 12:14:24 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.12.9/8.12.9/Submit) id h4KIEMrQ028728; Tue, 20 May 2003 12:14:22 -0600 (MDT) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Tue, 20 May 2003 12:14:21 -0600 From: Greg Lewis To: Herve Quiroz Message-ID: <20030520181421.GB28600@misty.eyesbeyond.com> References: <20030514.125107.74756915.haro@kgt.co.jp> <200305150858.53470.ernst.dehaan@nl.wanadoo.com> <20030515212719.GA18091@misty.eyesbeyond.com> <20030519151246.I68227@puget.esil.univ-mrs.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030519151246.I68227@puget.esil.univ-mrs.fr> User-Agent: Mutt/1.4.1i X-Spam-Status: No, hits=-9.9 required=8.0 tests=BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,QUOTED_EMAIL_TEXT, REFERENCES,REPLY_WITH_QUOTES,USER_AGENT_MUTT,X_AUTH_WARNING version=2.54 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.54 (1.174.2.17-2003-05-11-exp) cc: freebsd-java@freebsd.org Subject: Re: bsd.java.mk 2.0 X-BeenThere: freebsd-java@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting Java to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 May 2003 18:09:35 -0000 Hi Herve, On Mon, May 19, 2003 at 03:33:11PM +0200, Herve Quiroz wrote: > Here are my ideas for the next major version of bsd.java.mk... > > First there are two variable called NO_BUILD_DEPENDS and NO_RUN_DEPENDS. I > propose we only use one: USE_JAVA= [run | build | both] I'm not sure we need "both" since if you need a JDK to build a port then presumably that port contains some Java code that needs to run. As an alternative suggestion I would propose: USE_JAVA = [ jre | jdk ] Where "jre" indicates that we just need a RUN_DEPENDS which can be satisfied by a JRE (or JDK). The "jdk" value would indicate a BUILD_DEPENDS on a JDK with a RUN_DEPENDS on a JRE (or JDK). This may need extending to cope with ports that need a JDK at run time (any examples?). We're obviously breaking backward compatibility here, but I think thats pretty much unavoidable to get the features we want. > USE_JAVA was previously used to specify the JDK version number the port > depends on. But as it has been said, it does not allow enough flexibility > nor it does not allow to specify a particular JDK to use. So what about > having three other variables ? > > USE_JAVA_VENDOR= [sun | ibm | blackdown]... > USE_JAVA_VERSION= [1.1[+] | 1.2[+] | 1.3[+] | 1.4[+]] > USE_JAVA_OS= [linux | native] Hmmm, I can't see a way to do something like USE_JAVA_VERSION = 1.1 - 1.3 which is something I'd like the next version to be able to cope with. There also doesn't seem to be a way to prefer one version over the other, which is another thing I'd like to see. For example, a port may build and work with 1.2, but may provide more functionality if built and run with 1.3. In that case, how do I specify 1.2+ but with a preference for using 1.3 if its available? > Each of which may be empty or undefined if the choice is not important. > USE_JAVA_VENDOR may contain a list of vendors. Space separated? Are they in order of preference? If so maybe we can do the same with USE_JAVA_VERSION and USE_JAVA_OS to satisfy my preference example above, e.g. USE_JAVA_VERSION = 1.3 1.2 This would also satisfy the need for a range or list of versions. Also, if I prefer the native version over the Linux version I could do USE_JAVA_OS = native linux > Then if the porter wants a specific JDK, he may use the following: > > USE_JAVA_PORT > > Where he specifies the directory of the JDK to use (e.g. java/jdk13) > > [Optional: USE_JAVA_PORT could also contain several ports...] We could do the same as above, space separate in order of preference? > Internally, the bsd.java.mk file manages the dependencies by taking user > preferences into account: > > USE_JAVA_PORT contains a list of JDK ports to use ordered by preference. Ok, that ties in well with the above. > USE_JAVA_1_{1|2|3|4}_PORTS contains a list of JDK ports to use when a > particular version is required, again ordered by preference. > > Then bsd.java.mk build a list of the JDK specified by the port. Amongst > these ports, it chooses preferably one that is part of the user choices. > And amongst these resulting ports, it chooses preferably a port that is > already installed. > > IMHO it should lessen considerably the complexity and maintenance of > bsd.java.mk as the maintainer needs only to have a generic Makefile and > store JDK ports with variables. > > What are your opinions ? I would also suggest that USE_JAVA_{VENDOR,VERSION,OS,PORT} become simply JAVA_{VENDOR,VERSION,OS,PORT} as that is more in line with the other language makefiles (e.g. bsd.python.mk). -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org