office-gobmx/external/rhino/UnpackedTarball_rhino.mk
Michael Stahl bb58293296 rhino: unbreak build on Fedora 34
Sometime during the Fedora 34 lifecycle, ant started to put
/usr/share/java/rhino.jar on the classpath used to invoke javac,
which results in:

    [javac] workdir/UnpackedTarball/rhino/src/org/mozilla/javascript/optimizer/Codegen.java:202: error: reference to Hashtable is ambiguous
    [javac]         Hashtable possibleDirectCalls = null;
    [javac]         ^
    [javac]   both class java.util.Hashtable in java.util and class org.mozilla.javascript.Hashtable in org.mozilla.javascript match

Indeed /usr/share/java/rhino.jar contains a class
org.mozilla.javascript.Hashtable, while it doesn't exist yet in the
older rhino1_5R5.zip that is bundled.

The problem is that the package ant-apache-bsf contains the file
/etc/ant.d/apache-bsf which references the system rhino jar.

It turns out that reading the /etc/ant.d/* files in the shell script
/usr/bin/ant can be suppressed by setting the variable OPT_JAR_LIST to a
non-empty value, which is documented as "A user should
request optional jars and their dependencies via the OPT_JAR_LIST
variable", but which is sadly ignored if set to an empty value.

Another way to fix the problem is to patch the property
build.sysclasspath to "ignore" in build.xml.

http://ant.apache.org/manual/sysclasspath.html

Change-Id: I6d82eb226e5d01d094ebe044dbdada85b8687814
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124934
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-11-12 11:29:26 +01:00

25 lines
927 B
Makefile

# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
$(eval $(call gb_UnpackedTarball_UnpackedTarball,rhino))
$(eval $(call gb_UnpackedTarball_set_tarball,rhino,$(RHINO_TARBALL),,rhino))
$(eval $(call gb_UnpackedTarball_set_patchlevel,rhino,2))
$(eval $(call gb_UnpackedTarball_add_patches,rhino,\
external/rhino/rhino1_5R5.patch \
external/rhino/rhino1_5R5-find_swing.patch \
external/rhino/rhino1_5R5-updateToolTip.patch \
external/rhino/rhino-classpath.patch.1 \
))
$(eval $(call gb_UnpackedTarball_add_file,rhino,toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java,external/rhino/OfficeScriptInfo.java))
# vim: set noet sw=4 ts=4: