From owner-freebsd-java Fri Jan 19 2:19:10 2001 Delivered-To: freebsd-java@freebsd.org Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187]) by hub.freebsd.org (Postfix) with ESMTP id 25B6437B400; Fri, 19 Jan 2001 02:18:49 -0800 (PST) Received: (from ernst@localhost) by heinz.jollem.com (8.11.1/8.11.1) id f0JAHRD15917; Fri, 19 Jan 2001 11:17:27 +0100 (CET) (envelope-from ernst) Date: Fri, 19 Jan 2001 11:17:27 +0100 From: Ernst de Haan To: ports@freebsd.org Cc: java@freebsd.org Subject: [port-writing] Optional dependencies: How ? Message-ID: <20010119111727.A15893@c187104187.telekabel.chello.nl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Heya, After writing a few ports, I would really like to know a few things that I can't find information about. Any hints/pointers/comments would be greatly appreciated: [1] How I can use different distfiles, choosing the one that is available. For the java/bugseeker port, for instance, there can be 2 distfiles, something like "bugseeker2ee-1_0_2.tar.gz" and "bugseeker2pe-1_0_2.tar.gz". These are the "Enterprise" and "Personal" edition. The only difference between the 2 distributions is the license.txt file, I think. The rest of the files is the same. So I would like my java/bugseeker port to use the "ee" version if available, and otherwise the "pe" version. [2] How can I make a port depend on _either_ of 2 ports. The "java/openjit" port needs either java/jdk *or* java/jdk12-beta. If either one is installed, then I would like my port to install. [3] How can I make set an environment variable in my Makefile, depending on the installed port (see [2]). For example, for java/openjit I would like to have my port use java/jdk12-beta if available, or java/jdk if not. Specically I would like to have: JAVADIR= ${LOCALBASE}/jdk1.1.8 if only java/jdk is installed, but: JAVADIR= ${LOCALBASE}/jdk1.2.2 if java/jdk12-beta is installed. Should I use an ".if" construct for this? -- Ernst To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message