Date: Mon, 3 Oct 2005 11:23:21 +0300 From: "\"Panagiotis Astithas\" <Panagiotis Astithas" <past@ebs.gr> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/86860: [patch] Align java/eclipse invocation with javavmwrapper Message-ID: <1128327801.0@ajax.ebs.gr> Resent-Message-ID: <200510030830.j938UDen048527@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 86860 >Category: ports >Synopsis: [patch] Align java/eclipse invocation with javavmwrapper >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Oct 03 08:30:13 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Panagiotis Astithas >Release: FreeBSD 6.0-BETA5 i386 >Organization: EBS Ltd. >Environment: System: FreeBSD 6.0-BETA5 #6: Fri Sep 30 22:09:56 EEST 2005 past@ajax.ebs.gr:/usr/obj/usr/src/sys/GENERIC >Description: The eclipse startup script that launches the Eclipse IDE has a hardcoded default JAVA_HOME directory to that of java/jdk14. This can be overridden by the user's setting of JAVA_HOME. However, this is not the recommended way to override the default jdk. Both javavmwrapper (a dependency of the jdk ports) and bsd.java.mk recommend the use of variables like JAVA_VERSION, JAVA_PREFERRED_PORTS, etc. One known case where the current script fails to override the default jdk, is when one has both jdk14 and jdk15 and tries to select jdk15 using JAVA_PREFERRED_PORTS. The attached patch make the default JAVA_HOME directory correspond to javavmwrapper's symlinks, in /usr/local/bin. >How-To-Repeat: Install java/jdk14, java/jdk15 and eclipse. Set JAVA_PREFERRED_PORTS to JAVA_PORT_NATIVE_BSDJAVA_JDK_1_5. Try to launch eclipse. Verify in Help->About->Configuration Details that it starts with jdk14. >Fix: --- eclipse.patch begins here --- diff -ruN /usr/ports/java/eclipse/Makefile eclipse/Makefile --- /usr/ports/java/eclipse/Makefile Wed Sep 28 15:19:50 2005 +++ eclipse/Makefile Mon Oct 3 00:25:27 2005 @@ -120,7 +120,7 @@ @${TAR} -xzf ${WRKSRC}/result/*.tar.gz -C ${PREFIX} @${SED} \ -e "s+%%ECLIPSE_HOME%%+${PORTDESTDIR}+g" \ - -e "s+%%JAVA_HOME%%+${JAVA_HOME}+g" \ + -e "s+%%PREFIX%%+${PREFIX}+g" \ -e "s+%%X11BASE%%+${X11BASE}+g" \ -e "s+%%BROWSER%%+${BROWSER}+g" \ ${FILESDIR}/eclipse.in > ${WRKSRC}/eclipse.tmp diff -ruN /usr/ports/java/eclipse/files/eclipse.in eclipse/files/eclipse.in --- /usr/ports/java/eclipse/files/eclipse.in Sun Aug 28 10:26:40 2005 +++ eclipse/files/eclipse.in Mon Oct 3 00:25:36 2005 @@ -7,7 +7,7 @@ # $FreeBSD: ports/java/eclipse/files/eclipse.in,v 1.4 2005/08/28 07:26:40 nork Exp $ # -DEFAULT_JAVA_HOME=%%JAVA_HOME%% +DEFAULT_JAVA_HOME=%%PREFIX%% ECLIPSE_HOME=%%ECLIPSE_HOME%% DEFAULT_JAVA_CMD=java export MOZILLA_FIVE_HOME=%%X11BASE%%/lib/%%BROWSER%% --- eclipse.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1128327801.0>