Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 29 May 2003 11:58:37 -0600
From:      Greg Lewis <glewis@misty.eyesbeyond.com>
To:        Herve Quiroz <herve.quiroz@esil.univ-mrs.fr>
Cc:        freebsd-java@freebsd.org
Subject:   Re: bsd.java.mk 2.0
Message-ID:  <20030529175837.GA31122@misty.eyesbeyond.com>
In-Reply-To: <20030523140852.H81713@puget.esil.univ-mrs.fr>
References:  <20030514.125107.74756915.haro@kgt.co.jp> <20030520181421.GB28600@misty.eyesbeyond.com> <20030523072854.GA61661@misty.eyesbeyond.com> <20030523140852.H81713@puget.esil.univ-mrs.fr>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 23, 2003 at 02:31:29PM +0200, Herve Quiroz wrote:
> Hi Greg,
> 
> On Fri, 23 May 2003, Greg Lewis wrote:
> 
> > > > This may need extending to cope with ports that need a JDK at run time
> > > > (any examples?).
> > >
> > > devel/jakarta-ant ?
> >
> > Good call.  How about:
> >
> > USE_JAVA = [ BUILD-RUN ]
> >
> > Where BUILD and RUN may take the values jdk or jre.  I think this should
> > be clear, but the BUILD portion adds a build depends and the RUN portion
> > adds a run depends.  The most common case will be jdk-jre, meaning the
> > port requires the JDK to build but only the jre to run.
> >
> > This kinda feels a little clunky, so as an alternative maybe:
> >
> > USE_JAVA = yes
> > JAVA_BUILD = jdk
> > JAVA_RUN = jre
> >
> > Comments?
> 
> At first, I would have said I prefer the second. But I don't know really.
> Maybe with an example I can figure what you mean exactly. Tell me f I
> understand correctly:
> 
> For most of the ports (libs):
> USE_JAVA= BUILD=jdk RUN=jre

If the two variants I proposed this would be done as:

USE_JAVA = jdk-jre

or

USE_JAVA = yes
JAVA_BUILD = jdk
JAVA_RUN = jre

> Which means build dependency for the chosen JDK and run dependency for the
> chosen JRE
> 
> For devel/jakarta-ant:
> USE_JAVA= RUN=JDK

USE_JAVA = -jdk

(no build required)

or

USE_JAVA = yes
JAVA_RUN = jdk

This example makes me want to choose the second version :).

> Which means it builds without anything (JDK related I mean) as ant is
> "install only" and need a JDK to run.
> 
[snip]
> > > I think we've got something here: use space separated preferences (in the
> > > right order) for all JDK/JRE properties. So no more "+" (e.g. "1.3+") but
> > > instead an explicit list of versions...
> >
> > I like the space separation :).  However, I think the "+" sign is still
> > useful as a short hand for 1.x 1.y ... 1.current.  It also means we don't
> > have to do a sweep when a new Java version comes out and add (for example)
> > 1.5 to the list.  I think for maximum flexibility and to preserve the
> > usefulness of the "+" we should allow both a "+" and a space separated
> > list.  If the version is written with a "+" it must be the only version,
> > i.e. you can't have "1.1 1.3+" as a list.
> 
> That's a good point. The "+" is still greatly needed. And may be overriden
> by the bsd.java.mk:
> 
> .if ${USE_JAVA_VERSION} == "1.3+"
> USE_JAVA_VERSION= 1.3 1.2 1.1
> .endif
>
> So we need to update only bsd.java.mk when a new version of Java comes
> out.

Yes, exactly.

-- 
Greg Lewis                          Email   : glewis@eyesbeyond.com
Eyes Beyond                         Web     : http://www.eyesbeyond.com
Information Technology              FreeBSD : glewis@FreeBSD.org



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