Subject: pkg/17989: openoffice pkg uses user environment variable JAVA_HOME
To: None <>
From: Jaromir Dolecek <>
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
>Originator:     Jaromir Dolecek
>Release:        NetBSD 1.6F
System: NetBSD 1.6F NetBSD 1.6F (SARUMAN) #237: Sat Aug 17 09:53:47 CEST 2002 i386
Architecture: i386
Machine: i386
	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). 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.
	export JAVA_HOME=/nonexistant
	cd /usr/pkgsrc/misc/openoffice && make
	watch if fail on start of do-build target
	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 unconditionally; this might
	be the 'right' thing to do even, since some packages might
	use value of $JAVA_HOME internally during build/configure.