ooo-build r13682 - in trunk: . patches/dev300
- From: pmladek svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r13682 - in trunk: . patches/dev300
- Date: Tue, 26 Aug 2008 18:34:41 +0000 (UTC)
Author: pmladek
Date: Tue Aug 26 18:34:41 2008
New Revision: 13682
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13682&view=rev
Log:
2008-08-25 Petr Mladek <pmladek suse cz>
* patches/dev300/jvmfwk-detect-removed-java.diff: the check for the
directory was not enough => the new version checks for the libjvm.so
modules; I feel very shame by the solution and do not have enough
courage to enable it for all (=> NovellOnlyLinux). I hope that
upstream will come soon with the correct solution (i#83140, n#336242)
* patches/dev300/jvmfwk-detect-removed-java-2.diff: merget into
jvmfwk-detect-removed-java.diff
* patches/dev300/apply: update for the above changes
Removed:
trunk/patches/dev300/jvmfwk-detect-removed-java-2.diff
Modified:
trunk/ChangeLog
trunk/patches/dev300/apply
trunk/patches/dev300/jvmfwk-detect-removed-java.diff
Modified: trunk/patches/dev300/apply
==============================================================================
--- trunk/patches/dev300/apply (original)
+++ trunk/patches/dev300/apply Tue Aug 26 18:34:41 2008
@@ -443,12 +443,6 @@
samba-hyperlinks-sc-sd.diff, n#382718, jholesov
tools-qa-urlobj-unittest.diff, n#261623, flr
-# try autodetection if it is allowed and the current java has been removed
-jvmfwk-detect-removed-java.diff, i#83140, n#336242, pmladek
-# allow to overwrite broken java configuration; it is related
-# to jvmfwk-detect-removed-java.diff that added new types of errors
-jvmfwk-detect-removed-java-2.diff, i#83140, n#393719, pmladek
-
# check real help path defined in registry instead of the $(instpath)/help
sfx-check-real-help-path.diff, i#81139, pmladek
@@ -954,6 +948,10 @@
# we need a good plan before, though ;-)
split-icons-search-usr-share.diff, n#296502, pmladek
+# try autodetection if it is allowed and the current java has been removed
+# crazy hack, I am looking forward for the clean upstream fix
+jvmfwk-detect-removed-java.diff, i#83140, n#336242, pmladek
+
[ BrokenSystemNSS ]
# fix build with system libnss installed apart from mozilla
Modified: trunk/patches/dev300/jvmfwk-detect-removed-java.diff
==============================================================================
--- trunk/patches/dev300/jvmfwk-detect-removed-java.diff (original)
+++ trunk/patches/dev300/jvmfwk-detect-removed-java.diff Tue Aug 26 18:34:41 2008
@@ -46,25 +46,116 @@
*/
javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo);
---- jvmfwk/source/framework.cxx.old 2007-06-13 09:57:42.000000000 +0200
-+++ jvmfwk/source/framework.cxx 2007-10-30 21:01:57.000000000 +0100
-@@ -711,11 +711,26 @@ javaFrameworkError SAL_CALL jfw_getSelec
+--- jvmfwk/source/framework.cxx.old 2008-06-06 10:37:46.000000000 +0200
++++ jvmfwk/source/framework.cxx 2008-08-26 20:02:48.000000000 +0200
+@@ -670,8 +670,87 @@ void SAL_CALL jfw_freeJavaInfo(JavaInfo
+ rtl_freeMemory(pInfo);
+ }
+
++// used by the hack in jfw_getSelectedJRE to search for correct JRE
++#if defined(__sparcv9)
++#define JFW_PLUGIN_ARCH "sparcv9"
++#elif defined SPARC
++#define JFW_PLUGIN_ARCH "sparc"
++#elif defined X86_64
++#define JFW_PLUGIN_ARCH "amd64"
++#elif defined INTEL
++#define JFW_PLUGIN_ARCH "i386"
++#elif defined POWERPC64
++#define JFW_PLUGIN_ARCH "ppc64"
++#elif defined POWERPC
++#define JFW_PLUGIN_ARCH "ppc"
++#elif defined MIPS
++#ifdef OSL_BIGENDIAN
++# define JFW_PLUGIN_ARCH "mips"
++#else
++# define JFW_PLUGIN_ARCH "mips32"
++#endif
++#elif defined S390X
++#define JFW_PLUGIN_ARCH "s390x"
++#elif defined S390
++#define JFW_PLUGIN_ARCH "s390"
++#elif defined ARM
++#define JFW_PLUGIN_ARCH "arm"
++#elif defined IA64
++#define JFW_PLUGIN_ARCH "ia64"
++#elif defined M68K
++#define JFW_PLUGIN_ARCH "m68k"
++#else // SPARC, INTEL, POWERPC, MIPS, ARM, IA64, M68K
++#error unknown plattform
++#endif // SPARC, INTEL, POWERPC, MIPS, ARM
++
++#if defined(MIPS) && defined(OSL_LITENDIAN)
++#define GCJ_JFW_PLUGIN_ARCH "mipsel"
++#else
++#define GCJ_JFW_PLUGIN_ARCH JFW_PLUGIN_ARCH
++#endif
++
+ javaFrameworkError SAL_CALL jfw_getSelectedJRE(JavaInfo **ppInfo)
+ {
++// used by the hack to search for correct JRE
++ static char const * ar[] = {
++#if defined(WNT) || defined(OS2)
++ "/bin/client/jvm.dll",
++ "/bin/hotspot/jvm.dll",
++ "/bin/classic/jvm.dll",
++ "/bin/jrockit/jvm.dll"
++#elif UNX
++#ifdef MACOSX
++ "/../../../JavaVM"
++#else // MACOSX
++ "/gcj-4.1.1/libjvm.so",
++ "/gcj-4.3-90/libjvm.so",
++ "/gcj-4.2-81/libjvm.so",
++ "/gcj-4.2/libjvm.so",
++ "/gcj-4.2.1/libjvm.so",
++ "/gcj-4.2.2/libjvm.so",
++ "/gcj-4.2.3/libjvm.so",
++ "/gcj-4.1-71/libjvm.so",
++ "/gcj-4_1/libjvm.so",
++ "/gcj-4.1/libjvm.so",
++ "/libgcj.so.81",
++ "/libgcj.so.80",
++ "/libgcj.so.8",
++ "/libgcj.so.71",
++ "/libgcj.so.70",
++ "/libgcj.so.7",
++ "/libgcj.so.6",
++ "/bin/classic/libjvm.so", // for IBM Java
++ "/jre/bin/classic/libjvm.so", // for IBM Java
++ "/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so", // for Blackdown PPC
++ "/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so", // for Blackdown AMD64
++ "/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so", // for Blackdown PPC
++ "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so", // for Java of BEA Systems
++ "/libjvm.so",
++ "/lib/" GCJ_JFW_PLUGIN_ARCH "/client/libjvm.so",
++#endif // MACOSX
++#endif // UNX
++ };
++
+ javaFrameworkError errcode = JFW_E_NONE;
+ try
+ {
+@@ -706,11 +785,29 @@ javaFrameworkError SAL_CALL jfw_getSelec
*ppInfo = NULL;
return JFW_E_NONE;
}
+
+ // If the java location does not longer exist, ignore this aInfo
+ rtl::OUString sLocation = aInfo.getLocation();
-+ if (jfw::checkFileURL(sLocation) != jfw::FILE_OK)
-+ {
-+ bool bAutoSelect = settings.getJavaInfoAttrAutoSelect();
++ bool bJavaFound = false;
++ for (int i=(sizeof (ar) / sizeof (char*)); --i > 0; ) {
++ rtl::OUString sJavaPath = sLocation + rtl::OStringToOUString(ar[i], RTL_TEXTENCODING_UTF8);
++ if (jfw::checkFileURL(sJavaPath) == jfw::FILE_OK)
++ {
++ bJavaFound=true;
++ i=0;
++ }
++ }
++ if (!bJavaFound) {
+ jfw_freeJavaInfo(aInfo.detach());
+ *ppInfo = NULL;
-+
-+ if (bAutoSelect)
-+ return JFW_E_TRY_AUTOSELECT;
-+ else
-+ return JFW_E_CONFIGURATION;
++ return JFW_E_TRY_AUTOSELECT;
+ }
+
//If the javavendors.xml has changed, then the current selected
@@ -76,6 +167,16 @@
if (sUpdated.equals(settings.getJavaInfoAttrVendorUpdate()) == sal_False)
return JFW_E_INVALID_SETTINGS;
*ppInfo = aInfo.detach();
+@@ -865,7 +962,8 @@ javaFrameworkError SAL_CALL jfw_setSelec
+ //check if pInfo is the selected JRE
+ JavaInfo *currentInfo = NULL;
+ errcode = jfw_getSelectedJRE( & currentInfo);
+- if (errcode != JFW_E_NONE && errcode != JFW_E_INVALID_SETTINGS)
++ if (errcode != JFW_E_NONE && errcode != JFW_E_INVALID_SETTINGS &&
++ errcode != JFW_E_TRY_AUTOSELECT && errcode != JFW_E_CONFIGURATION )
+ return errcode;
+
+ if (jfw_areEqualJavaInfo(currentInfo, pInfo) == sal_False)
--- jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx.old 2006-09-16 19:45:14.000000000 +0200
+++ jvmfwk/plugins/sunmajor/javaenvsetup/javaldx.cxx 2007-10-30 21:04:14.000000000 +0100
@@ -104,7 +104,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
@@ -121,3 +222,15 @@
/** returns an array.
Caller must free the strings and the array.
+--- svx/source/dialog/optjava.cxx.old 2007-06-27 19:28:51.000000000 +0200
++++ svx/source/dialog/optjava.cxx 2008-05-22 19:58:25.000000000 +0200
+@@ -750,7 +750,8 @@ BOOL SvxJavaOptionsPage::FillItemSet( Sf
+
+ JavaInfo* pSelectedJava = NULL;
+ eErr = jfw_getSelectedJRE( &pSelectedJava );
+- if ( JFW_E_NONE == eErr || JFW_E_INVALID_SETTINGS == eErr )
++ if ( JFW_E_NONE == eErr || JFW_E_INVALID_SETTINGS == eErr ||
++ JFW_E_TRY_AUTOSELECT == eErr || JFW_E_CONFIGURATION == eErr )
+ {
+ if (pSelectedJava == NULL || !jfw_areEqualJavaInfo( pInfo, pSelectedJava ) )
+ {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]