[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: gcj-only build



On Fri, Dec 13, 2002 at 05:25:34PM -0500, Jack Howarth wrote:
>    Has anyone looked at the current rawhide srpms for openoffice 
> 1.0.1? They are using a little hackery to allow openoffice to use
> gcj instead of a real JDK. This would be worth implementing in our
> debian openoffice packages since it would break the dependency on
> JDK and allow it to be moved from contrib into main.

Yes, I've looked at it and decided it was too ugly to be worth spending the
time on.

The hack works by generating shell to pretend to be a Blackdown JDK - stuff
like this:

	# Build fake JDK
	mkdir -p fakejdk/bin fakejdk/include
	cp -a %{SOURCE12} fakejdk/bin/xmlparse
	sed "s~@@~`pwd`~" > fakejdk/bin/java <<"EOF"
	#!/bin/sh
	if [ "$1" = "-version" ]; then
	  echo 'java version "1.3.1_03"' 1>&2
	  exit 0
	fi
	if [ "$4" = org.openoffice.configuration.XMLDefaultGenerator ]; then
	  exec @@/fakejdk/bin/xmlparse "$@"
	fi
	echo "FIXME: Emulate java runtime using gcj here"
	exit 1
	EOF

This hack is no help in fixing the problem upstream.  It is equally possible
to rework upstream's autoconfig script to recognise gcj directly and only
compile the parts that work with gcj without resorting to JDK emulation.
That would benefit everyone and IMO be much a much better use of the time
than trying to port this hack to our package.  Upstream are not against the
use of a free JDK and have said on several occasions that the only reason
why there is no free JDK support is because no-one has submitted any
patches.  It doesn't even need a complete port of all the Java - there are
only a small number of essential parts that need support, and the rest is
optional and could be turned off initially.  And I think it is probably the
optional projects that use APIs that aren't implemented in free JDKs,
although I haven't checked that.

If anyone would like to look at doing this, I'd be happy to share the
information I have about this but I can't commit to working on it myself
until the open bugreports are fixed and the source package has been split.

Chris

Attachment: pgpNilOZPrKFJ.pgp
Description: PGP signature


Reply to: