From owner-freebsd-java Thu Aug 22 1:43:25 2002 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 1B9D637B400 for ; Thu, 22 Aug 2002 01:43:21 -0700 (PDT) Received: from pintail.mail.pas.earthlink.net (pintail.mail.pas.earthlink.net [207.217.120.122]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F89343E72 for ; Thu, 22 Aug 2002 01:43:20 -0700 (PDT) (envelope-from absinthe@pobox.com) Received: from dhcp068-64-151-24.nt01-c4.cpe.charter-ne.com ([24.151.64.68] helo=laredo.retrovertigo.com) by pintail.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17hnYk-0001wk-00; Thu, 22 Aug 2002 01:43:18 -0700 Content-Type: text/plain; charset="iso-8859-1" From: Dylan Carlson Reply-To: absinthe@pobox.com To: Calvin Varney Subject: Port/package guidelines (WAS: Please review: new Java Project docs) Date: Thu, 22 Aug 2002 04:43:18 -0400 User-Agent: KMail/1.4.2 Cc: freebsd-java@FreeBSD.ORG References: <200208170958.14422.absinthe@pobox.com> <200208190506.44212.absinthe@pobox.com> <86it25uka2.fsf@ubana.varney2.org> In-Reply-To: <86it25uka2.fsf@ubana.varney2.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200208220443.18447.absinthe@pobox.com> Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Tuesday 20 August 2002 08:29pm, Calvin Varney wrote: As a prelude to continuing this conversation, I believe we probably should start figuring out how to use Ant in all the Java ports to resolve dependencies, build jars, do versioning and so on. I would like Ernst to comment on this, since he does the majority of the Java-related ports (including Ant). It's definitely a more sane way of building and packaging Java (particularly generating javadocs from code that has it) ... but I also think it would be an improved way of doing version checking and upgrades. Take a lot of the work out of the Makefile and into the build.xml's. My $.02... > > I would have thought the latest minor version of a library > libname.majorver.minorver linked to libname.majorver Thats assuming > library interfaces don't change between minor versions. (how safe is > that?) In theory, there shouldn't be an interface change on a library on a minor release, but... anyway it's probably safe to do it that way for now. I think long-term we need to pursue something more evolved with a tool like Ant. That way we won't have to deal with filenames, we deal with internal version numbers of JARs and classes. FYI, the standard bsd.port.mk/java.mk files don't deal with major/minor versioning. All you get is ${PORTVERSION}. Most developers I know have a canned development directory tree somewhere (not in ${PREFIX). I don't think the target audience for a java library port is a developer... it's probably just to resolve a dependency for an application. By that reasoning think it's probably a good idea to write wrapper scripts for applications to set the CLASSPATH as needed, where it has not already been done. > Ok, the SDK API docs must remain a separate port. I was concerned > about the API documentation produced by javadoc for other ports > (libraries and applications) ending up somewhere other than $DOCSDIR. > No, I agree about that. $DOCSDIR is good by me. > Great, for consistency ${PREFIX}/lib/java has my vote. Interesting to > note the likes of perl and php libraries aren't located under > ${PREFIX}/share as architecture-independent files though. Agree. > > Agree with third, and I'd like to suggest that the proposal gets amended > > to require that libraries with multiple classes get built into a JAR file > > at install time. That's a good idea, because we can do a lot more with > > versioning if all the classes are wrapped up in a JAR. I'm not sure that > > any of the Makefiles do JAR version checking but if not we should > > probably work in that direction. > > I'd support this. *nod* OK, so I want some next steps on revising the proposal, final comments and whatever. To to be clear where we're currently at... I have just tried to phrase this a little differently than we discussed but basically keeping the final results the same. VARIABLES: remove ${JAVAPREFIX} ${JAVALIBDIR} = ${PREFIX}/lib/java ${JAVAPORTNAME} = %portname%-%majorversion% ${PORTNAME} = %portname%-%fullversion% (as usual) LIBRARIES: 1. preferably in .JAR format: ${JAVALIBDIR}/${JAVAPORTNAME}.jar 2. or in a subdirectory: ${JAVALIBDIR}/${JAVAPORTNAME}/ no symlinks DOCS, including Javadoc generated: ${DOCSDIR}/${JAVAPORTNAME} EXAMPLES: ${EXAMPLESDIR}/java/${JAVAPORTNAME} > > Would also like to here form those with more porting experience. I've > just started trying to port a couple of java apps and have found it > tough going trying to nut out what goes where and how to handle common > libraries. > Ernst is The Man. He can probably answer all of those questions. Being that he has his name on most of the ports at present (correct me if I'm wrong about this), I think he's got the the most weight on this final proposal. What has been discussed here is reasonable I think, unless Ernst has some rationale for things we've overlooked or just plain don't understand. Folks, let me know what your final thoughts are on the above and maybe we can get something codified. Cheers, -- Dylan Carlson [absinthe@pobox.com] To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message