From owner-freebsd-ports Wed Nov 1 11:11:40 2000 Delivered-To: freebsd-ports@freebsd.org Received: from toyland.drapple.com (toyland.drapple.com [204.200.26.114]) by hub.freebsd.org (Postfix) with ESMTP id 908DF37B4CF for ; Wed, 1 Nov 2000 11:11:36 -0800 (PST) Received: from freebsd.org (bet-su5-23.itg.discovery.com [198.147.13.23]) by toyland.drapple.com (8.9.3/8.9.3) with ESMTP id LAA66121; Wed, 1 Nov 2000 11:11:33 -0800 (PST) (envelope-from patrick@freebsd.org) Message-ID: <3A006AE4.9CE47FF2@freebsd.org> Date: Wed, 01 Nov 2000 19:11:32 +0000 From: Patrick Gardella Organization: FreeBSD X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: andrea@webcom.it Cc: freebsd-ports@freebsd.org Subject: Re: Using specific JDK from ports References: <20001101181752.42552.qmail@webcom.it> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org andrea@webcom.it wrote: > > Hi! > > I recently submitted a PR for a new port (Enhydra 3.1 beta application server), > and am about to do some more work in this area. Enhydra requires (well, almost) > a JDK v. 1.2; lot of other stuff also requires specific JDK's. At this moment > we have different JDK versions in the ports (and I gather IBM 1.3 support is > upcoming), with options wrt to JIT, compilers, etc. all installing in > different places. Yes, but they are all in specific locations: /usr/local/jdk1.1.8 /usr/local/jdk1.2.2 /usr/local/linux-jdk1.2.2 > This would make it very hard to require a particular version in a port. I had a > look at javawmwrapper, but it doesn't look very useful, that is, feature > complete. I disagree. Pick *one* (I'd suggest our native 1.2.2), and then use it in the port, as a RUN_DEPENDS, and have it look for the java executable in a specific location. Don't give the user too many options. Take a look at the Makefile in the tya ports for an idea on this. > What I'd like to see is some kind of software, like apxs for Apache or > glib12-config, which could be called upon in a port's Makefile to determine > (at least): > > - whether there is at least one JDK of required version installed > - the path to the compiler > - the path to jre > - maybe even options to pass > > Note that probably most of this stuff could be solved by appropriate symlinks > (for my setup, /usr/local/jdk1.2 -> /usr/local/linux-jdk1.2.2 would suffice), > but I would be uncomfortable with updating such symlinks at port installation. > Instead, each port which installs a new compiler / jre could just update some > sort of repository (a file in /etc/jdk, for instance) to let the wrapper know > it is there. It would still be the user responsibility to determine which one > to use in case there are multiple equivalent. > > Please comment. If people are interested, I would probably get down and define > requirements to send for comments again, and then I should also have time to > actually implement this. I like this idea. A similar idea is the Oracle oraenv command where you tell it what SID you are going use, and then it configures the environmental variables (In the java case, JAVA_COMPILER, JAVA_HOME, etc) It would take setting up a file somewhere that would list the items for each of the possible configuations. Do you need to define what compiler you will be using in an Enhydra config file? Otherwise, you can have the user set that up in the startup script for Enhydra. The more options you present, the more opportunities for mistakes. Like when I tried to use a jit compiled for 1.1.8 in 1.2.2 (it doesn't work). Patrick To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message