Kaydet (Commit) ae1f2f6b authored tarafından David Ostrovsky's avatar David Ostrovsky Kaydeden (comit) Michael Stahl

gbuildification of rhino

Default patch level 3 was not working here and must
be overriden with gb_UnpackedTarball_set_patchlevel
function with 2.

New java file OfficeScriptInfo.java was extracted from
rhino1_5R5.patch and added with gb_UnpackedTarball_add_file.

Change-Id: Iba25b2350caffd943af93f59fa2139332b009ef2
Reviewed-on: https://gerrit.libreoffice.org/752Reviewed-by: 's avatarMichael Stahl <mstahl@redhat.com>
Tested-by: 's avatarMichael Stahl <mstahl@redhat.com>
üst 58deab04
...@@ -121,13 +121,14 @@ padmin\ ...@@ -121,13 +121,14 @@ padmin\
psprint_config\ psprint_config\
pyuno\ pyuno\
qadevOOo\ qadevOOo\
rdbmaker\
readlicense_oo\ readlicense_oo\
regexp\ regexp\
registry\ registry\
remotebridges\ remotebridges\
reportbuilder\ reportbuilder\
reportdesign\ reportdesign\
rdbmaker\ rhino\
ridljar\ ridljar\
rsc\ rsc\
sal\ sal\
...@@ -245,7 +246,6 @@ postgresql\ ...@@ -245,7 +246,6 @@ postgresql\
postprocess\ postprocess\
python\ python\
redland\ redland\
rhino\
setup_native\ setup_native\
stax\ stax\
stlport\ stlport\
......
...@@ -120,6 +120,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\ ...@@ -120,6 +120,7 @@ $(eval $(call gb_Module_add_moduledirs,tail_end,\
remotebridges \ remotebridges \
reportbuilder \ reportbuilder \
reportdesign \ reportdesign \
$(call gb_Helper_optional,RHINO,rhino) \
ridljar \ ridljar \
rsc \ rsc \
salhelper \ salhelper \
......
...@@ -129,6 +129,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\ ...@@ -129,6 +129,7 @@ $(eval $(call gb_Module_add_moduledirs,ooo,\
remotebridges \ remotebridges \
reportbuilder \ reportbuilder \
reportdesign \ reportdesign \
$(call gb_Helper_optional,RHINO,rhino) \
ridljar \ ridljar \
rsc \ rsc \
sal \ sal \
......
...@@ -481,6 +481,7 @@ export RANLIB=@RANLIB@ ...@@ -481,6 +481,7 @@ export RANLIB=@RANLIB@
export REDLAND_CFLAGS=@REDLAND_CFLAGS@ export REDLAND_CFLAGS=@REDLAND_CFLAGS@
export REDLAND_LIBS=@REDLAND_LIBS@ export REDLAND_LIBS=@REDLAND_LIBS@
export RHINO_JAR=@RHINO_JAR@ export RHINO_JAR=@RHINO_JAR@
export RHINO_TARBALL=@RHINO_TARBALL@
export RPM=@RPM@ export RPM=@RPM@
export RTL_OS=@RTL_OS@ export RTL_OS=@RTL_OS@
export RTL_ARCH=@RTL_ARCH@ export RTL_ARCH=@RTL_ARCH@
......
...@@ -10107,6 +10107,7 @@ if test "x$enable_ext_scripting_javascript" = "xyes" -a "x$enable_extension_inte ...@@ -10107,6 +10107,7 @@ if test "x$enable_ext_scripting_javascript" = "xyes" -a "x$enable_extension_inte
else else
AC_MSG_RESULT([internal]) AC_MSG_RESULT([internal])
SYSTEM_RHINO=NO SYSTEM_RHINO=NO
RHINO_TARBALL="798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip"
BUILD_TYPE="$BUILD_TYPE RHINO" BUILD_TYPE="$BUILD_TYPE RHINO"
fi fi
else else
...@@ -10117,6 +10118,7 @@ fi ...@@ -10117,6 +10118,7 @@ fi
AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT) AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT)
AC_SUBST(SYSTEM_RHINO) AC_SUBST(SYSTEM_RHINO)
AC_SUBST(RHINO_JAR) AC_SUBST(RHINO_JAR)
AC_SUBST(RHINO_TARBALL)
dnl Scripting provider for Python extension? dnl Scripting provider for Python extension?
dnl We always provide this unless we have disabled Python completely dnl We always provide this unless we have disabled Python completely
......
# -*- 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/.
#
# for RSCREVISION
include $(SOLARENV)/inc/minor.mk
$(eval $(call gb_ExternalProject_ExternalProject,rhino))
$(eval $(call gb_ExternalProject_use_unpacked,rhino,rhino))
$(eval $(call gb_ExternalProject_register_targets,rhino,\
build \
))
$(call gb_ExternalProject_get_state_target,rhino,build) :
cd "$(call gb_UnpackedTarball_get_dir,rhino)" && \
"$(ANT)" \
-q \
-f build.xml \
-Dbuild.label="build-$(RSCREVISION)" \
-DTARFILE_LOCATION="$(TARFILE_LOCATION)" \
$(if $(filter yes,$(JAVACISGCJ))\
,-Dbuild.compiler=gcj \
,-Dant.build.javac.source=$(JAVA_SOURCE_VER) \
-Dant.build.javac.target=$(JAVA_TARGET_VER) \
) \
$(if $(debug),-Dbuild.debug="on") \
jar && \
touch $@
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
include $(module_directory)/../solenv/gbuild/partial_build.mk
# vim: set noet sw=4 ts=4:
# -*- 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_Module_Module,rhino))
ifneq ($(SOLAR_JAVA),)
ifneq ($(filter RHINO,$(BUILD_TYPE)),)
$(eval $(call gb_Module_add_targets,rhino,\
ExternalProject_rhino \
Package_rhino \
UnpackedTarball_rhino \
))
endif
endif
# vim: set noet sw=4 ts=4:
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
*
* This file is part of OpenOffice.org.
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
*
************************************************************************/
package org.mozilla.javascript.tools.debugger;
import java.net.URL;
import java.util.Hashtable;
import org.mozilla.javascript.Scriptable;
public class OfficeScriptInfo
{
private Hashtable loadedSFScripts = new Hashtable();
public void addScript( URL url, Scriptable scope, Runnable closeCallback )
{
addScript( url.toString(), url, scope, closeCallback );
}
public void addScript( String key, URL url, Scriptable scope, Runnable closeCallback )
{
SFScriptInfo si = (SFScriptInfo)loadedSFScripts.get( key );
if ( si == null )
{
si = new SFScriptInfo();
si.url = url;
si.scope = scope;
si.closeCallback = closeCallback;
loadedSFScripts.put( key, si );
}
}
public void deleteScript( String key )
{
SFScriptInfo info = (SFScriptInfo)loadedSFScripts.remove( key );
if ( info != null )
{
if ( info.closeCallback != null )
{
System.out.println("** In removeSFScriptInfo have callback for " + key );
info.closeCallback.run(); // really need to do this in seperate thread????
}
}
}
public Scriptable getScriptScope( String key )
{
Scriptable result = null;
SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
if ( info != null )
{
result = info.scope;
}
return result;
}
public URL getScriptUrl( String key )
{
URL result = null;
SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
if ( info != null )
{
result = info.url;
}
return result;
}
public boolean hasScript( String key )
{
boolean result = true;
SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
if ( info == null )
{
result = false;
}
return result;
}
public void setScriptRunning( String key, boolean running )
{
SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
if ( info != null )
{
info.isExecuting = running;
}
}
public boolean isScriptRunning( String key )
{
boolean result = false;
SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
if ( info != null )
{
result = info.isExecuting;
}
return result;
}
class SFScriptInfo
{
Scriptable scope;
boolean isExecuting;
URL url;
Runnable closeCallback;
}
}
# -*- 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_Package_Package,rhino,$(call gb_UnpackedTarball_get_dir,rhino)))
$(eval $(call gb_Package_use_external_project,rhino,rhino))
$(eval $(call gb_Package_add_file,rhino,bin/js.jar,build/rhino1_5R5/js.jar))
# vim: set noet sw=4 ts=4:
# -*- 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)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,rhino,2))
$(eval $(call gb_UnpackedTarball_add_patches,rhino,\
rhino/rhino1_5R5.patch \
rhino/rhino1_5R5-find_swing.patch \
rhino/rhino1_5R5-updateToolTip.patch \
))
$(eval $(call gb_UnpackedTarball_add_file,rhino,toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java,rhino/OfficeScriptInfo.java))
# vim: set noet sw=4 ts=4:
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
#
# This file is part of OpenOffice.org.
#
# OpenOffice.org is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3
# only, as published by the Free Software Foundation.
#
# OpenOffice.org is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License version 3 for more details
# (a copy is included in the LICENSE file that accompanied this code).
#
# You should have received a copy of the GNU Lesser General Public License
# version 3 along with OpenOffice.org. If not, see
# <http://www.openoffice.org/license.html>
# for a copy of the LGPLv3 License.
#
#*************************************************************************
PRJ=.
PRJNAME=ooo_rhino
TARGET=ooo_rhino
.IF "$(SOLAR_JAVA)"!=""
# --- Settings -----------------------------------------------------
.INCLUDE : settings.mk
.INCLUDE : antsettings.mk
# --- Files --------------------------------------------------------
TARFILE_NAME=rhino1_5R5
TARFILE_MD5=798b2ffdc8bcfe7bca2cf92b62caf685
TARFILE_ROOTDIR=rhino1_5R5
ADDITIONAL_FILES= \
toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java
PATCH_FILES=rhino1_5R5.patch \
rhino1_5R5-find_swing.patch \
rhino1_5R5-updateToolTip.patch
.IF "$(OS_FOR_BUILD)"=="WNT"
FIXED_TARFILE_LOCATION=`cygpath -m -s "$(TARFILE_LOCATION)"`
.ELSE
FIXED_TARFILE_LOCATION=$(TARFILE_LOCATION)
.ENDIF
.IF "$(JAVACISGCJ)"=="yes"
JAVA_HOME=
.EXPORT : JAVA_HOME
BUILD_ACTION="$(ANT)" -DTARFILE_LOCATION="$(FIXED_TARFILE_LOCATION)" -Dbuild.label="build-$(RSCREVISION)" -Dbuild.compiler=gcj jar
.ELSE
BUILD_ACTION="$(ANT)" -DTARFILE_LOCATION="$(FIXED_TARFILE_LOCATION)" -Dbuild.label="build-$(RSCREVISION)" -Dant.build.javac.source=$(JAVA_SOURCE_VER) -Dant.build.javac.target=$(JAVA_TARGET_VER) jar
.ENDIF
# --- Targets ------------------------------------------------------
.INCLUDE : set_ext.mk
.INCLUDE : target.mk
.INCLUDE : tg_ext.mk
.ELSE
all:
@echo java disabled
.ENDIF
xh rhino : soltools NULL xh rhino : soltools NULL
xh rhino usr1 - all xh_mkout NULL xh rhino\prj nmake - all xh_rhino NULL
xh rhino nmake - all xh_rhino NULL
..\%__SRC%\misc\build\rhino1_5R5\build\rhino1_5R5\js.jar %_DEST%\bin\js.jar
...@@ -1041,140 +1041,6 @@ ...@@ -1041,140 +1041,6 @@
+ +
} }
--- misc/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java Fri Mar 28 17:25:34 2008
+++ misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/debugger/OfficeScriptInfo.java Fri Mar 28 17:24:59 2008
@@ -1 +1,130 @@
-dummy
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+
+package org.mozilla.javascript.tools.debugger;
+import java.net.URL;
+import java.util.Hashtable;
+import org.mozilla.javascript.Scriptable;
+
+public class OfficeScriptInfo
+{
+ private Hashtable loadedSFScripts = new Hashtable();
+
+ public void addScript( URL url, Scriptable scope, Runnable closeCallback )
+ {
+ addScript( url.toString(), url, scope, closeCallback );
+ }
+
+ public void addScript( String key, URL url, Scriptable scope, Runnable closeCallback )
+ {
+ SFScriptInfo si = (SFScriptInfo)loadedSFScripts.get( key );
+ if ( si == null )
+ {
+ si = new SFScriptInfo();
+ si.url = url;
+ si.scope = scope;
+ si.closeCallback = closeCallback;
+ loadedSFScripts.put( key, si );
+ }
+ }
+
+ public void deleteScript( String key )
+ {
+ SFScriptInfo info = (SFScriptInfo)loadedSFScripts.remove( key );
+ if ( info != null )
+ {
+ if ( info.closeCallback != null )
+ {
+ System.out.println("** In removeSFScriptInfo have callback for " + key );
+ info.closeCallback.run(); // really need to do this in seperate thread????
+ }
+ }
+ }
+
+ public Scriptable getScriptScope( String key )
+ {
+ Scriptable result = null;
+ SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
+ if ( info != null )
+ {
+ result = info.scope;
+ }
+ return result;
+ }
+
+ public URL getScriptUrl( String key )
+ {
+ URL result = null;
+ SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
+ if ( info != null )
+ {
+ result = info.url;
+ }
+ return result;
+ }
+ public boolean hasScript( String key )
+ {
+ boolean result = true;
+ SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
+ if ( info == null )
+ {
+ result = false;
+ }
+ return result;
+ }
+
+ public void setScriptRunning( String key, boolean running )
+ {
+ SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
+ if ( info != null )
+ {
+ info.isExecuting = running;
+ }
+ }
+
+ public boolean isScriptRunning( String key )
+ {
+ boolean result = false;
+ SFScriptInfo info = (SFScriptInfo)loadedSFScripts.get( key );
+ if ( info != null )
+ {
+ result = info.isExecuting;
+ }
+ return result;
+ }
+
+
+
+ class SFScriptInfo
+ {
+ Scriptable scope;
+ boolean isExecuting;
+ URL url;
+ Runnable closeCallback;
+ }
+}
--- misc/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java Thu Mar 25 21:54:34 2004 --- misc/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java Thu Mar 25 21:54:34 2004
+++ misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java Fri Mar 28 17:24:23 2008 +++ misc/build/rhino1_5R5/toolsrc/org/mozilla/javascript/tools/shell/JavaPolicySecurity.java Fri Mar 28 17:24:23 2008
@@ -36,6 +36,7 @@ @@ -36,6 +36,7 @@
......
tb tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit CURL:curl EXPAT:expat FONTCONFIG:fontconfig FREETYPE:freetype GLIB:glib GRAPHITE:graphite HUNSPELL:hunspell HYPHEN:hyphen ICU:icu JFREEREPORT:jfreereport JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz MYTHES:mythes NSS:nss OPENLDAP:openldap OPENSSL:openssl POSTGRESQL:postgresql PYTHON:python REDLAND:redland stax XPDF:xpdf ZLIB:zlib external RHINO:rhino sal solenv soltools NULL tb tail_build : BERKELEYDB:berkeleydb BOOST:boost CAIRO:cairo CPPUNIT:cppunit CURL:curl EXPAT:expat FONTCONFIG:fontconfig FREETYPE:freetype GLIB:glib GRAPHITE:graphite HUNSPELL:hunspell HYPHEN:hyphen ICU:icu JFREEREPORT:jfreereport JPEG:jpeg LCMS2:lcms2 LIBEXTTEXTCAT:libexttextcat LIBLANGTAG:liblangtag LIBXML2:libxml2 libxmlsec LIBXSLT:libxslt LPSOLVE:lpsolve MOZ:moz MYTHES:mythes NSS:nss OPENLDAP:openldap OPENSSL:openssl POSTGRESQL:postgresql PYTHON:python REDLAND:redland stax XPDF:xpdf ZLIB:zlib external sal solenv soltools NULL
tb tail_build\prj nmake - all tb_prj NULL tb tail_build\prj nmake - all tb_prj NULL
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment