Kaydet (Commit) 6cd98b3d authored tarafından Hanno Meyer-Thurow's avatar Hanno Meyer-Thurow

Merge Gentoo patches from old build and downstream repositories.

1. Do not add compiler default include and library path: potentially build
   against different version of system library than requested by the user.
2. Add a configure option to disable Python2 (PyUNO) bindings. Python3 is
   available for more than two years. Noone cares, therefore rest in peace.
   Python2 is going to be ditched at some point. Simply do not fail then.
   Windows builds need to be updated for BUILD_TYPE: "PYUNO". Or how is it
   handled nowadays?
3. Fix sandbox violation in officecfg module: rm /bin/<language>.zip
4. Add a configure option to search only in one place for JVMs, which is quite
   interesting for Linux Distributions. Enforce the user to place JVMs in one
   base directory.
5. Fix build for libxml-2.7.8 with ICU support.

* config_office-XINC-XLIB-defaults.diff: (1)
* disable-python.diff: (2)
* gentoo-sandbox.diff: (3)
* jvm-search-path.diff: (4)
* libxmlsec_fix_extern_c.diff: (5)
üst b6e36a7f
......@@ -73,6 +73,10 @@ SHL1STDLIBS += -luwinapi -ladvapi32
.ENDIF # GCC
.ENDIF #WNT
.IF "$(JVM_ONE_PATH_CHECK)" != ""
CFLAGS += -DJVM_ONE_PATH_CHECK=\"$(JVM_ONE_PATH_CHECK)\"
.ENDIF
SHL1VERSIONMAP = sunjavaplugin.map
SHL1DEPN=
SHL1IMPLIB= i$(UNOCOMPONENT1)
......
......@@ -92,12 +92,14 @@ char const *g_arJavaNames[] = {
*/
char const *g_arCollectDirs[] = {
"",
#ifndef JVM_ONE_PATH_CHECK
"j2re/",
"j2se/",
"j2sdk/",
"jdk/",
"jre/",
"java/",
#endif
"jvm/"
};
......@@ -109,6 +111,7 @@ char const *g_arSearchPaths[] = {
"",
"System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/"
#else
#ifndef JVM_ONE_PATH_CHECK
"",
"usr/",
"usr/local/",
......@@ -119,6 +122,9 @@ char const *g_arSearchPaths[] = {
#endif
"usr/lib/",
"usr/bin/"
#else
JVM_ONE_PATH_CHECK
#endif
#endif
};
}
......@@ -368,6 +374,9 @@ void AsynchReader::run()
bool getJavaProps(const OUString & exePath,
#ifdef JVM_ONE_PATH_CHECK
const OUString & homePath,
#endif
std::vector<std::pair<rtl::OUString, rtl::OUString> >& props,
bool * bProcessRun)
{
......@@ -469,6 +478,15 @@ bool getJavaProps(const OUString & exePath,
OUString sKey = sLine.copy(0, index);
OUString sVal = sLine.copy(index + 1);
#ifdef JVM_ONE_PATH_CHECK
//replace absolute path by linux distro link
OUString sHomeProperty(RTL_CONSTASCII_USTRINGPARAM("java.home"));
if(sHomeProperty.equals(sKey))
{
sVal = homePath + OUString::createFromAscii("/jre");
}
#endif
props.push_back(std::make_pair(sKey, sVal));
}
......@@ -751,10 +769,12 @@ vector<Reference<VendorBase> > getAllJREInfos()
createJavaInfoFromWinReg(vecInfos);
#endif // WNT
#ifndef JVM_ONE_PATH_CHECK
createJavaInfoFromJavaHome(vecInfos);
//this function should be called after createJavaInfoDirScan.
//Otherwise in SDKs Java may be started twice
createJavaInfoFromPath(vecInfos);
#endif
#ifdef UNX
createJavaInfoDirScan(vecInfos);
......@@ -818,7 +838,11 @@ OUString resolveDirPath(const OUString & path)
if (item.getFileStatus(status) == File::E_None
&& status.getFileType() == FileStatus::Directory)
{
#ifndef JVM_ONE_PATH_CHECK
ret = sResolved;
#else
ret = path;
#endif
}
}
else
......@@ -847,7 +871,11 @@ OUString resolveFilePath(const OUString & path)
if (item.getFileStatus(status) == File::E_None
&& status.getFileType() == FileStatus::Regular)
{
#ifndef JVM_ONE_PATH_CHECK
ret = sResolved;
#else
ret = path;
#endif
}
}
else
......@@ -942,7 +970,11 @@ rtl::Reference<VendorBase> getJREInfoByPath(
}
bool bProcessRun= false;
if (getJavaProps(sFilePath, props, & bProcessRun) == false)
if (getJavaProps(sFilePath,
#ifdef JVM_ONE_PATH_CHECK
sResolvedDir,
#endif
props, & bProcessRun) == false)
{
//The java executable could not be run or the system properties
//could not be retrieved. We can assume that this java is corrupt.
......@@ -961,7 +993,11 @@ rtl::Reference<VendorBase> getJREInfoByPath(
//invoked to build the path to the executable. It we start the script directy as .java_wrapper
//then it tries to start a jdk/.../native_threads/.java_wrapper. Therefore the link, which
//is named java, must be used to start the script.
getJavaProps(sFullPath, props, & bProcessRun);
getJavaProps(sFullPath,
#ifdef JVM_ONE_PATH_CHECK
sResolvedDir,
#endif
props, & bProcessRun);
// Either we found a working 1.3.1
//Or the java is broken. In both cases we stop searchin under this "root" directory
bBreak = true;
......
......@@ -118,6 +118,9 @@ std::vector<rtl::Reference<VendorBase> > getAllJREInfos();
bool getJavaProps(
const rtl::OUString & exePath,
#ifdef JVM_ONE_PATH_CHECK
const rtl::OUString & homePath,
#endif
std::vector<std::pair<rtl::OUString, rtl::OUString> >& props,
bool * bProcessRun);
......
......@@ -131,6 +131,7 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
}
else if (!bHome && sHomeProperty.equals(i->first))
{
#ifndef JVM_ONE_PATH_CHECK
OUString fileURL;
if (osl_getFileURLFromSystemPath(i->second.pData,& fileURL.pData) ==
osl_File_E_None)
......@@ -144,6 +145,10 @@ bool VendorBase::initialize(vector<pair<OUString, OUString> > props)
bHome = true;
}
}
#else
m_sHome = i->second;
bHome = true;
#endif
}
else if (!bAccess && sAccessProperty.equals(i->first))
{
......
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