office-gobmx/external/rhino/ExternalProject_rhino.mk
Stephan Bergmann 58c4457a90 Update to latest Rhino 1.7.14
...at the expense of losing, at least for now, the script editor for it (which
had been hacked into the old upstream sources in a hard-to-maintain way).

rhino-1.7.14.zip is taken from
<https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.zip>.
Building it would now use Gradle, but instead just hack together an invocation
of javac and jar in external/rhino/ExternalProject_rhino.mk that effectively
generates the same jar as the upstream-built jar available at
<https://github.com/mozilla/rhino/releases/download/Rhino1_7_14_Release/rhino-1.7.14.jar>.

All the various patches are no longer necessary:
* external/rhino/rhino1_5R5.patch and external/rhino/OfficeScriptInfo.java were
  mostly for the hacked-in script editor, which has been abandoned at least for
  now (see above).
* external/rhino/rhino1_5R5-find_swing.patch (originally from
  0a7f934650 "ause109: #i106296# make build.xml
  aware of TARFILE_LOCATION") appears to be obsolete.
* external/rhino/rhino1_5R5-updateToolTip.patch is covered by
  <ab20a73b16>
  "Fix bug 414869: Rhino debugger fails to launch due to updates in mac os x
  leopard".
* external/rhino/rhino-classpath.patch.1 from
  bb58293296 "rhino: unbreak build on Fedora 34"
  was only relevant when building with Ant.

Change-Id: I5fca5915d785716f7aaf313ff2469a20f55f707a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165190
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-04-02 18:56:13 +02:00

48 lines
2.2 KiB
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_ExternalProject_ExternalProject,rhino))
$(eval $(call gb_ExternalProject_register_targets,rhino,\
build \
))
$(call gb_ExternalProject_get_state_target,rhino,build) :
$(call gb_Trace_StartRange,rhino,EXTERNAL)
$(call gb_ExternalProject_run,build,\
mkdir $(call gb_UnpackedTarball_get_dir,rhino)/build \
&& cd $(call gb_UnpackedTarball_get_dir,rhino) \
&& $(call gb_JavaClassSet_JAVACCOMMAND,$(JAVA_TARGET_VER)) $(gb_JavaClassSet_JAVACDEBUG) \
-d $(call gb_UnpackedTarball_get_dir,rhino)/build/content \
@$(SRCDIR)/external/rhino/filelist.txt \
&& mkdir $(call gb_UnpackedTarball_get_dir,rhino)/build/content/META-INF \
&& cp $(call gb_UnpackedTarball_get_dir,rhino)/LICENSE.txt \
$(call gb_UnpackedTarball_get_dir,rhino)/NOTICE-tools.txt \
$(call gb_UnpackedTarball_get_dir,rhino)/NOTICE.txt \
$(call gb_UnpackedTarball_get_dir,rhino)/build/content/META-INF/ \
&& $(gb_Jar_JARCOMMAND) -cf $(call gb_UnpackedTarball_get_dir,rhino)/build/js.jar \
-C $(call gb_UnpackedTarball_get_dir,rhino)/build/content . \
-C $(call gb_UnpackedTarball_get_dir,rhino)/src \
org/mozilla/javascript/commonjs/module/package.html \
-C $(call gb_UnpackedTarball_get_dir,rhino)/src \
org/mozilla/javascript/commonjs/module/provider/package.html \
-C $(call gb_UnpackedTarball_get_dir,rhino)/src \
org/mozilla/javascript/resources/Messages.properties \
-C $(call gb_UnpackedTarball_get_dir,rhino)/src \
org/mozilla/javascript/resources/Messages_en.properties \
-C $(call gb_UnpackedTarball_get_dir,rhino)/src \
org/mozilla/javascript/resources/Messages_fr.properties \
-C $(call gb_UnpackedTarball_get_dir,rhino)/src \
org/mozilla/javascript/tools/debugger/test.js \
-C $(call gb_UnpackedTarball_get_dir,rhino)/src \
org/mozilla/javascript/tools/resources/Messages.properties \
)
$(call gb_Trace_EndRange,rhino,EXTERNAL)
# vim: set noet sw=4 ts=4: