Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Nov 2001 12:17:01 +0100
From:      Ernst de Haan <znerd@freebsd.org>
To:        John Merryweather Cooper <john_m_cooper@yahoo.com>, freebsd-java@freebsd.org
Cc:        freebsd-ports@freebsd.org
Subject:   Re: A Modest Proposal for Java(tm) dependency selection among ports
Message-ID:  <200111161117.fAGBH1B00795@zaphod.euronet.nl>
In-Reply-To: <200111161042.fAGAg8V55897@zaphod.euronet.nl>
References:  <20011115130202.E33074@johncoop.MSHOME> <200111161042.fAGAg8V55897@zaphod.euronet.nl>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <MANUFACTURER> JDK from <URL>, 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




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