diff options
| author | Hanno Meyer-Thurow <h.mth@web.de> | 2011-03-13 16:07:50 +0100 |
|---|---|---|
| committer | Hanno Meyer-Thurow <h.mth@web.de> | 2011-03-14 18:47:10 +0100 |
| commit | 189dcbf0639c5dc42474e0541f40f3358f745a6b (patch) | |
| tree | d582717aa53da4541681f07e66fd102510e7d163 | |
| parent | 15b8ac2a753c8080549f7f0cd23aca485eda3ad0 (diff) | |
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)
| -rwxr-xr-x | configure.in | 46 | ||||
| -rw-r--r-- | instsetoo_native/util/makefile.mk | 4 | ||||
| -rw-r--r-- | scp2/source/ooo/common_brand.scp | 2 | ||||
| -rw-r--r-- | scp2/source/ooo/makefile.mk | 4 | ||||
| -rw-r--r-- | scp2/source/python/file_python.scp | 4 | ||||
| -rw-r--r-- | scp2/source/python/makefile.mk | 4 | ||||
| -rw-r--r-- | scp2/source/python/module_python.scp | 4 | ||||
| -rw-r--r-- | scp2/source/python/module_python_mailmerge.scp | 2 | ||||
| -rw-r--r-- | scp2/source/python/profileitem_python.scp | 4 | ||||
| -rwxr-xr-x | set_soenv.in | 6 |
10 files changed, 77 insertions, 3 deletions
diff --git a/configure.in b/configure.in index 0a0eeea4c..a1e231d47 100755 --- a/configure.in +++ b/configure.in @@ -265,6 +265,9 @@ AC_ARG_ENABLE(crashdump, AS_HELP_STRING([--enable-crashdump], [Enable the crashdump feature.])) +AC_ARG_ENABLE(python, + AS_HELP_STRING([--disable-python], + [Disable build of Python 2.x UNO API.])) AC_ARG_ENABLE(gtk, AS_HELP_STRING([--disable-gtk], [Determines whether to use Gtk+ vclplug on platforms where Gtk+ is available.]), @@ -1015,6 +1018,16 @@ AC_ARG_WITH(java_target_version, ], ,) +AC_ARG_WITH(jvm-path, + AS_HELP_STRING([--with-jvm-path], + [Use a specific JVM search path at runtime.]) + [ + Usage: --with-jvm-path=<absolute path to parent of jvm home> + + e. g.: --with-jvm-path=/usr/lib/ + to find JRE/JDK in /usr/lib/jvm/ + ], +,) AC_ARG_WITH(ant-home, AS_HELP_STRING([--with-ant-home], [If you have installed Jakarta Ant on your system, please supply the path here. @@ -4137,8 +4150,13 @@ AC_SUBST(LIBXML_CFLAGS) AC_SUBST(LIBXML_LIBS) dnl =================================================================== -dnl Check for system python +dnl Check for python dnl =================================================================== +AC_MSG_CHECKING([whether to enable Python 2.x UNO API]) +if test "$enable_python" != "no"; then + AC_MSG_RESULT([yes]) + BUILD_TYPE="$BUILD_TYPE PYUNO" + AC_MSG_CHECKING([which python to use]) if test "$_os" = "WINNT"; then with_system_python=no @@ -4189,6 +4207,12 @@ AC_SUBST(PYTHON_CFLAGS) AC_SUBST(PYTHON_LIBS) HOME=`echo $HOME | $SED 's:\\\\:/:g'` AC_SUBST(HOME) +dnl disable python +else + AC_MSG_RESULT([no]) + DISABLE_PYTHON=TRUE + AC_SUBST(DISABLE_PYTHON) +fi dnl =================================================================== dnl Check for system berkley db @@ -7471,6 +7495,26 @@ AC_SUBST(USE_XINERAMA) AC_SUBST(XINERAMA_LINK) dnl =================================================================== +dnl Check for runtime JVM search path +dnl =================================================================== +if test "$SOLAR_JAVA" != ""; then + AC_MSG_CHECKING([whether to use specific JVM search path at runtime]) + if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then + AC_MSG_RESULT([yes]) + if ! test -d "$with_jvm_path"; then + AC_MSG_ERROR(["$with_jvm_path" not a directory]) + fi + if ! test -d "$with_jvm_path"jvm; then + AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm]) + fi + JVM_ONE_PATH_CHECK="$with_jvm_path" + AC_SUBST(JVM_ONE_PATH_CHECK) + else + AC_MSG_RESULT([no]) + fi +fi + +dnl =================================================================== dnl Test for the presence of Ant and that it works dnl =================================================================== diff --git a/instsetoo_native/util/makefile.mk b/instsetoo_native/util/makefile.mk index da4478cb4..5911c3fe2 100644 --- a/instsetoo_native/util/makefile.mk +++ b/instsetoo_native/util/makefile.mk @@ -68,12 +68,14 @@ INSTALLDIR=$(OUT) .INCLUDE: target.mk +.IF "$(DISABLE_PYTHON)" != "TRUE" LOCALPYFILES= \ $(BIN)$/uno.py \ $(BIN)$/unohelper.py \ $(BIN)$/pythonloader.py \ $(BIN)$/officehelper.py \ $(BIN)$/mailmerge.py +.ENDIF xxxx: echo $(PERL) -w $(SOLARENV)$/bin$/gen_update_info.pl --buildid $(BUILD) --arch "$(RTL_ARCH)" --os "$(RTL_OS)" --lstfile $(PRJ)$/util$/openoffice.lst --product LibreOffice --languages $(subst,$(@:s/_/ /:1)_, $(@:b)) $(PRJ)$/util$/update.xml @@ -292,12 +294,14 @@ openoffice: .ENDIF # "$(alllangiso)"!="" +.IF "$(DISABLE_PYTHON)" != "TRUE" .IF "$(LOCALPYFILES)"!="" $(foreach,i,$(alllangiso) openoffice_$i{$(PKGFORMAT:^".") .archive} openofficewithjre_$i{$(PKGFORMAT:^".")} openofficedev_$i{$(PKGFORMAT:^".")} broffice_$i{$(PKGFORMAT:^".")} brofficewithjre_$i{$(PKGFORMAT:^".")} brofficedev_$i{$(PKGFORMAT:^".")} sdkoo_$i{$(PKGFORMAT:^".")}) updatepack : $(LOCALPYFILES) .ENDIF # "$(LOCALPYFILES)"!="" $(BIN)$/%.py : $(SOLARSHAREDBIN)$/pyuno$/%.py @$(COPY) $< $@ +.ENDIF # "$(DISABLE_PYTHON)" != "TRUE" $(BIN)$/intro.zip : $(SOLARCOMMONPCKDIR)$/brand$/intro.zip $(COPY) $< $@ diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp index 94f5baf85..20a9826c5 100644 --- a/scp2/source/ooo/common_brand.scp +++ b/scp2/source/ooo/common_brand.scp @@ -1479,7 +1479,7 @@ End #endif //TODO: This actually belongs into a module of its own: -#if !defined SYSTEM_PYTHON +#if !defined DISABLE_PYUNO && !defined SYSTEM_PYTHON File gid_Brand_File_Bin_Python BIN_FILE_BODY; Name = EXENAME(pyuno/python); diff --git a/scp2/source/ooo/makefile.mk b/scp2/source/ooo/makefile.mk index b2dec77ba..fc3034c8b 100644 --- a/scp2/source/ooo/makefile.mk +++ b/scp2/source/ooo/makefile.mk @@ -232,9 +232,13 @@ SCPDEFS+=-DENABLE_VBA SCPDEFS+=-DDISABLE_ATL .ENDIF +.IF "$(DISABLE_PYTHON)" == "TRUE" +SCPDEFS+=-DDISABLE_PYUNO +.ELSE .IF "$(SYSTEM_PYTHON)" == "YES" SCPDEFS+=-DSYSTEM_PYTHON .ENDIF +.ENDIF .IF "$(SYSTEM_LIBTEXTCAT)" == "YES" SCPDEFS+=-DSYSTEM_LIBTEXTCAT diff --git a/scp2/source/python/file_python.scp b/scp2/source/python/file_python.scp index 122890012..ee2186bf5 100644 --- a/scp2/source/python/file_python.scp +++ b/scp2/source/python/file_python.scp @@ -27,6 +27,8 @@ #include "macros.inc" +#ifndef DISABLE_PYUNO + File gid_File_Lib_Pyuno TXT_FILE_BODY; #ifdef UNX @@ -310,3 +312,5 @@ End #endif +// DISABLE_PYUNO +#endif diff --git a/scp2/source/python/makefile.mk b/scp2/source/python/makefile.mk index 4e03218ff..f3bff44cb 100644 --- a/scp2/source/python/makefile.mk +++ b/scp2/source/python/makefile.mk @@ -37,11 +37,15 @@ TARGETTYPE=CUI .INCLUDE : settings.mk +.IF "$(DISABLE_PYTHON)" == "TRUE" +SCPDEFS+=-DDISABLE_PYUNO +.ELSE .IF "$(SYSTEM_PYTHON)" == "YES" SCPDEFS+=-DSYSTEM_PYTHON .ELSE .INCLUDE : pyversion.mk .ENDIF +.ENDIF SCPDEFS+=\ -DPYVERSION=$(PYVERSION) -DPYMAJMIN=$(PYMAJOR).$(PYMINOR) \ diff --git a/scp2/source/python/module_python.scp b/scp2/source/python/module_python.scp index 3b017720d..eef393917 100644 --- a/scp2/source/python/module_python.scp +++ b/scp2/source/python/module_python.scp @@ -27,6 +27,8 @@ #include "macros.inc" +#ifndef DISABLE_PYUNO + Module gid_Module_Optional_Pyuno PackageInfo = "packinfo_office.txt"; MOD_NAME_DESC ( MODULE_OPTIONAL_PYTHON ); @@ -37,3 +39,5 @@ Module gid_Module_Optional_Pyuno Default = YES; Styles = ( ); End + +#endif diff --git a/scp2/source/python/module_python_mailmerge.scp b/scp2/source/python/module_python_mailmerge.scp index 9ad34a290..b14162c2d 100644 --- a/scp2/source/python/module_python_mailmerge.scp +++ b/scp2/source/python/module_python_mailmerge.scp @@ -28,6 +28,7 @@ #include "macros.inc" #ifndef AIX +#ifndef DISABLE_PYUNO File gid_File_Pymailmerge TXT_FILE_BODY; Dir = gid_Dir_Program; @@ -36,3 +37,4 @@ File gid_File_Pymailmerge Styles = (PACKED,UNO_COMPONENT); End #endif +#endif diff --git a/scp2/source/python/profileitem_python.scp b/scp2/source/python/profileitem_python.scp index 1c4fdb077..e0ceceead 100644 --- a/scp2/source/python/profileitem_python.scp +++ b/scp2/source/python/profileitem_python.scp @@ -27,6 +27,7 @@ #include "macros.inc" +#ifndef DISABLE_PYUNO Profile gid_Profile_Pythonloader_Uno_Ini ModuleID = gid_Module_Optional_Pyuno; @@ -92,3 +93,6 @@ ProfileItem gid_Profileitem_Pythonloader_Pythonpath #endif #endif End + +// DISABLE_PYUNO +#endif diff --git a/set_soenv.in b/set_soenv.in index 403a039eb..d103a064b 100755 --- a/set_soenv.in +++ b/set_soenv.in @@ -1456,7 +1456,9 @@ if ($platform =~ m/solaris/) } #The tail, if needed if ($platform =~ m/linux|freebsd|netbsd|aix|openbsd|dragonfly/) - { $SOLARINC .= $I.$XINC; + { if ( $XINC ne "/usr/include" ) { + $SOLARINC .= $I.$XINC; + } } } elsif ($platform =~ m/cygwin/) @@ -1769,6 +1771,7 @@ if ( '@JDK@' ne '' ) ToFile( "JAVAIFLAGS", "@JAVAIFLAGS@", "e" ); ToFile( "JAVACOMPILER", PathFormat("@JAVACOMPILER@"), "e" ); ToFile( "JAVADOC", PathFormat("@JAVADOC@"), "e" ); + ToFile( "JVM_ONE_PATH_CHECK", "@JVM_ONE_PATH_CHECK@", "e" ); } ToFile( "SCPDEFS", '@SCPDEFS@', "e" ); ToFile( "SOLAREXTRAINC", $SOLAREXTRAINC, "e" ); @@ -1852,6 +1855,7 @@ ToFile( "SYSTEM_ZLIB", "@SYSTEM_ZLIB@", "e" ); ToFile( "SYSTEM_OPENSSL", "@SYSTEM_OPENSSL@", "e" ); ToFile( "OPENSSL_CFLAGS", "@OPENSSL_CFLAGS@", "e" ); ToFile( "OPENSSL_LIBS", "@OPENSSL_LIBS@", "e" ); +ToFile( "DISABLE_PYTHON", "@DISABLE_PYTHON@", "e" ); ToFile( "SYSTEM_PYTHON", "@SYSTEM_PYTHON@", "e" ); ToFile( "PYTHON", "@PYTHON@", "e" ); ToFile( "PYTHON_CFLAGS", "@PYTHON_CFLAGS@", "e" ); |
