From owner-freebsd-java@FreeBSD.ORG Fri Apr 9 16:20:06 2004 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 2CC5616A4CE for ; Fri, 9 Apr 2004 16:20:06 -0700 (PDT) Received: from mgr2.xmission.com (mgr2.xmission.com [198.60.22.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id EBF3D43D58 for ; Fri, 9 Apr 2004 16:20:05 -0700 (PDT) (envelope-from glewis@eyesbeyond.com) Received: from [198.60.22.207] (helo=mgr7.xmission.com) by mgr2.xmission.com with esmtp (Exim 3.35 #1) id 1BC5I5-0004zp-02; Fri, 09 Apr 2004 17:20:05 -0600 Received: from [166.70.56.15] (helo=misty.eyesbeyond.com) by mgr7.xmission.com with esmtp (Exim 4.30) id 1BC5I4-0003tt-SW; Fri, 09 Apr 2004 17:20:04 -0600 Received: from misty.eyesbeyond.com (localhost.eyesbeyond.com [127.0.0.1]) i39NK35G016936; Fri, 9 Apr 2004 17:20:03 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) Received: (from glewis@localhost) by misty.eyesbeyond.com (8.12.10/8.12.10/Submit) id i39NK2eh016935; Fri, 9 Apr 2004 17:20:02 -0600 (MDT) (envelope-from glewis@eyesbeyond.com) X-Authentication-Warning: misty.eyesbeyond.com: glewis set sender to glewis@eyesbeyond.com using -f Date: Fri, 9 Apr 2004 17:20:02 -0600 From: Greg Lewis To: java@FreeBSD.org Message-ID: <20040409232002.GG8348@misty.eyesbeyond.com> References: <20040409005028.GX42056@xor.obsecurity.org> <20040409095112.GA91905@arabica.esil.univ-mrs.fr> <20040409142510.GA94278@arabica.esil.univ-mrs.fr> Mime-Version: 1.0 Content-Disposition: inline In-Reply-To: <20040409142510.GA94278@arabica.esil.univ-mrs.fr> User-Agent: Mutt/1.4.2.1i Content-Type: text/plain; charset=us-ascii X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on mgr7.xmission.com X-Spam-Level: X-Spam-Status: No, hits=0.0 required=8.0 tests=none autolearn=no version=2.63 X-SA-Exim-Mail-From: glewis@eyesbeyond.com X-SA-Exim-Version: 3.1 (built Mon Jan 26 13:00:24 MST 2004) X-SA-Exim-Scanned: Yes cc: Herve Quiroz Subject: Re: Ant support in bsd.java.mk (was Re: [ports-i386@bento ...]) 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: Fri, 09 Apr 2004 23:20:06 -0000 On Fri, Apr 09, 2004 at 04:25:10PM +0200, Herve Quiroz wrote: > Previous attempts failed because of complexity. So we should stay > minimalist this time. > > That gives: > > Variables that a port may define: > > - USE_ANT: when set, it means that Ant should be part of the > dependencies of the port. > - ANT_BUILD: when set, it means that Ant should be part of > BUILD_DEPENDS. > - ANT_RUN: when set, it means that Ant should be part of RUN_DEPENDS. But ant is a build tool. I don't know of anything that uses it to run. If we're staying minimalist then maybe this should be left out. Maybe all we need of these three is USE_ANT which sets a BUILD_DEPENDS on ant. That will mean the theoretical port that needs ant to run will have to define an explicit RUN_DEPENDS, but I think that is fine since I think the number of such ports will approach zero. > - ANT_INCLUDE_SHARED_JARS: when set, it means that JARs from JAVAVARDIR > should be added to the classpath. Yay! > Variables/macros provided by bsd.java.mk in return: > > - ANT_CMD: the 'ant' executable Or could just be ANT. There are plenty of utilities which don't have _CMD in them (e.g. ${MAKE}, which is a close equivalent). Also I think a number of ports already use ${ANT}, so for them it would be easier to port. I don't know of any which use ${ANT_CMD}. > - ANT: the command-line for running Ant. This will setenv JAVA_HOME > according to the JDK set for this port build, and possibly setenv > ANT_INCLUDE_SHARED_JARS=YES according to the Make variable of the same > name (see above). How about ${ANT_ENV}, ${ANT} and ${ANT_FLAGS} as per make? Just trying to stick to something similar for a similar tool :). > NOTE: the ANT_BUILD/ANT_RUN variables may seem a bit odd. Actually, they > mimic the JAVA_RUN/JAVA_BUILD from bsd.java.mk. Still we have to be able > to differenciate build and run dependencies. Indeed, although most > applications will use Ant at build stage, some ports (devel/maven for > instance) use Ant to run. Furthermore, devel/maven does not even require > Ant at build stage (it's a binary port). Another method would be: Argh, ok, you shot down my comments above by finding a port that uses ant to run. Thats ok, I can live with that :). However, I think adding a variable to a central part of the build system for one port isn't a good option when it forces an extra burden on the other ports which would have to define ANT_BUILD as well as USE_ANT. I think maven can just do an explicit RUN_DEPENDS on ant. Are there other ports that use ant at run time? > Variables that a port may define: > > - USE_ANT: same as above > - ANT_INCLUDE_SHARED_JARS: same as above > > Variable provided by bsd.java.mk in return: > > - ANT_CMD: same as above > - ANT: same as above > - ANT_DEPENDS: the *_DEPENDS value regarding Ant only. This means the > Makefile may contain: No. Just please have bsd.java.mk add the depends itself, I don't see any need for it to define the dependency, nor can I think of anything else in the ports system that does this (although I'm sure you can prove me wrong again :). Thats my 2c worth. -- Greg Lewis Email : glewis@eyesbeyond.com Eyes Beyond Web : http://www.eyesbeyond.com Information Technology FreeBSD : glewis@FreeBSD.org