Subject: pkg/17989: openoffice pkg uses user environment variable JAVA_HOME
To: None <gnats-bugs@gnats.netbsd.org>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: netbsd-bugs
Date: 08/19/2002 15:55:59
>Number:         17989
>Category:       pkg
>Synopsis:       openoffice pkg uses user environment variable JAVA_HOME
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 19 06:57:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jaromir Dolecek
>Release:        NetBSD 1.6F
>Organization:
	
>Environment:
System: NetBSD s102-n054.tele2.cz 1.6F NetBSD 1.6F (SARUMAN) #237: Sat Aug 17 09:53:47 CEST 2002 dolecek@s102-n054.tele2.cz:/usr/home/dolecek/soft/netbsd/sys/arch/i386/compile/SARUMAN i386
Architecture: i386
Machine: i386
>Description:
	OpenOffice pkg build uses configure arg --with-jdk-home=${JAVA_HOME}
	to tell openoffice configure script where is root of selected
	JDK (openoffice requires sun-jdk13). bsd.pkg.mk puts the root
	to internal variable ${_JAVA_HOME}; if ${JAVA_HOME} is unset,
	it also sets ${JAVA_HOME} the same way.

	If user has JAVA_HOME set for use of different jdk, or incorrect
	altogether, the OpenOffice build fails.
>How-To-Repeat:
	export JAVA_HOME=/nonexistant
	cd /usr/pkgsrc/misc/openoffice && make
	watch if fail on start of do-build target
>Fix:
	Probably either use ${_JAVA_HOME} for --with-jdk-home= arg, or
	export the selected JDK root via some other variable
	(PKG_JAVA_HOME? - proposed on tech-pkg@). Another option
	is to set JAVA_HOME in bsd.pkg.mk unconditionally; this might
	be the 'right' thing to do even, since some packages might
	use value of $JAVA_HOME internally during build/configure.
>Release-Note:
>Audit-Trail:
>Unformatted: