From owner-freebsd-java Fri Nov 16 2:42:16 2001 Delivered-To: freebsd-java@freebsd.org Received: from zaphod.euronet.nl (zaphod.euronet.nl [194.134.128.241]) by hub.freebsd.org (Postfix) with ESMTP id 0E16637B419; Fri, 16 Nov 2001 02:42:08 -0800 (PST) Received: (from ernst@localhost) by zaphod.euronet.nl (8.11.6/8.11.6) id fAGAg8V55897; Fri, 16 Nov 2001 11:42:08 +0100 (CET) (envelope-from ernst) Message-Id: <200111161042.fAGAg8V55897@zaphod.euronet.nl> Content-Type: text/plain; charset="iso-8859-1" From: Ernst de Haan To: John Merryweather Cooper , freebsd-java@freebsd.org Subject: Re: A Modest Proposal for Java(tm) dependency selection among ports Date: Fri, 16 Nov 2001 11:42:08 +0100 X-Mailer: KMail [version 1.3] Cc: freebsd-ports@freebsd.org References: <20011115130202.E33074@johncoop.MSHOME> In-Reply-To: <20011115130202.E33074@johncoop.MSHOME> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org John, The problem you are addressing is one that has been discussed a few times before. But up until now, no solution was implemented. Now that I'm a member of the FreeBSD Project, I'm determined to find a solution for this. :-) > bsd.port.mk (probably through a bsd.java.mk) would provide the > following knobs: So far this sounds good. > USE_JAVA=[yes|no] knob will succeed on any of JDK's 1.3.1, > 1.2.2, or 1.1.8 IN THAT ORDER (latest > version first) > USE_JAVA2=[yes|no] knob will succeed on either JDK 1.3.1 or > 1.2.2 IN THAT ORDER > USE_JAVA11=[yes|no] knob will succeed on ONLY JDK 1.1.8 I'm suggestion a solution that's a bit different: If a port wants to use Java, then it should set either of the following flags: [ Note that a JDK is a JRE plus development tools ] USE_JAVA=[yes|no] --> This port needs any JRE/JDK, version 1.1 or higher. If a JRE/JDK is installed, then this port will succeed. If not, then any JRE will be installed. The preference order for a JRE/JDK to be installed is stored somewhere in /usr/ports/Mk and it should be possible to override this setting in some config file, similar to the way the order for GNOME download sites can be tweaked. Preferrably the order should take the following rules into account: [1] A JRE/JDK with a higher version number is preferred over one with a lower version number [2] A native FreeBSD JDK/JRE is preferred over a non-native JDK [3] A JRE/JDK that has no dependencies on other JDKs is preferred over a JDK that does [4] A JRE/JDK that can be installed without fetching any files manually is preferred over one that fails with a message like "You must manually fetch the JDK from , place it in /usr/ports/distfiles and then run make again" [5] A JRE is preferred over a JDK USE_JAVA_1_1=[yes|no] --> This is synonymous to USE_JAVA USE_JAVA_1_2=[yes|no] --> This port needs any JRE/JDK (1.2+). If a JRE/JDK 1.2 port is installed, then this port will install, otherwise it will fail, *or* (preferrably!!!!) install a JRE/JDK, using the rules layed out above USE_JAVA_1_3=[yes|no] --> Similar to USE_JAVA_1_2, but then 1.3 i.s.o. 1.2 USE_JAVA_1_4=[yes|no] --> Similar to USE_JAVA_1_3, but for 1.4 i.s.o. 1.3 USE_JDK=[yes|no] --> Similar for USE_JAVA, but now mandates a JDK, just a JRE won't do USE_JDK_11=[yes|no] --> Synonym for USE_JDK USE_JDK_12=[yes|no] --> See USE_JDK_11, but for 1.2 i.s.o. 1.1 USE_JDK_13=[yes|no] --> See USE_JDK_12, but for 1.3 i.s.o. 1.2 USE_JDK_14=[yes|no] --> See USE_JDK_13, but for 1.4 i.s.o. 1.3 > WANT_LINUX_JAVA=[yes|no] > same as above except Linux version Java's > are used and USE_JAVA11 will abort build. I suggest not introducing this flag in the first phase. We can discuss it's usefullness later. > WANT_JRE_ONLY=[yes|no] > same as above except a JRE will be used > instead of a JDK, if available See above proposed solution. > JAVA_VER reports Java(tm) detected or built by > USE_JAVA* Hmm, what *exactly* would you like this variable to return as its value? Ernst -- Ernst de Haan EuroNet Internet B.V. "Come to me all who are weary and burdened and I will give you rest" -- Jesus Christ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message