From owner-freebsd-ports Fri Nov 16 3:17:16 2001 Delivered-To: freebsd-ports@freebsd.org Received: from zaphod.euronet.nl (zaphod.euronet.nl [194.134.128.241]) by hub.freebsd.org (Postfix) with ESMTP id 653CE37B405; Fri, 16 Nov 2001 03:17:04 -0800 (PST) Received: (from ernst@localhost) by zaphod.euronet.nl (8.11.6/8.11.6) id fAGBH1B00795; Fri, 16 Nov 2001 12:17:01 +0100 (CET) (envelope-from ernst) Message-Id: <200111161117.fAGBH1B00795@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 12:17:01 +0100 X-Mailer: KMail [version 1.3] Cc: freebsd-ports@freebsd.org References: <20011115130202.E33074@johncoop.MSHOME> <200111161042.fAGAg8V55897@zaphod.euronet.nl> In-Reply-To: <200111161042.fAGAg8V55897@zaphod.euronet.nl> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org After a little extra thought, here's an addition: The USE_JAVA* and USE_JDK* flags are used in the Makefile by the port writer to specify what the port needs. After the bsd.port.pre is included, the port writer gets some flags in return that specify what the JRE/JDK is that is selected by the system. For this I propose the following: JAVA_VER_MAJOR=1 <-- Currently always 1 JAVA_VER_MEDIOR=[1|2|3|4] <-- For JDK 1.1, 1.2, 1.3, 1.4 JAVA_MINOR=[1..x] <-- Is 0 for JDK 1.3.0 or 1.4.0, is 1 for 1.3.1, etc. JAVA_MANUFACTURER <-- Currently either Sun, Blackdown, IBM, or FreeBSD JAVA_VERSION <-- Complete version, (1.1.8, 1.2.2b10, 1.3.1, 1.4.0b3, etc.) JAVA_PLATFORM=[linux|freebsd] <-- The target platform JAVA_JRE=[yes|no] <-- no for a JDK, yes for a JRE JAVA_JDK=[yes|no] <-- yes for a JDK, no for a JRE JRE_HOME <-- Points to the JRE base dir, like /usr/local/jdk1.3.1/jre JDK_HOME <-- Only for JDKs: For example /usr/local/linux-jdk1.3.1 Any other suggestions or comments? Ernst On Friday 16 November 2001 11:42, Ernst de Haan wrote: > 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-ports" in the body of the message