From c32c11fbd49e0194534be9d21c22da6799728be3 Mon Sep 17 00:00:00 2001 From: Michael Meeks Date: Tue, 4 Jun 2013 14:02:48 +0100 Subject: MPLv2 subset improvements. --- config_host.mk.in | 1 + config_host/config_lgpl.h.in | 2 +- config_host/config_mpl.h.in | 9 +++++ configure.ac | 44 +++++++++++++++++++++- lpsolve/Module_lpsolve.mk | 2 +- postprocess/Rdb_services.mk | 4 +- sc/Library_sc.mk | 6 ++- sc/source/ui/dbgui/fieldwnd.cxx | 2 + sc/source/ui/dbgui/pvlaydlg.cxx | 2 + sc/source/ui/inc/pvlaydlg.hxx | 2 + sc/source/ui/view/cellsh2.cxx | 1 - sc/source/ui/view/tabvwshc.cxx | 8 +++- sccomp/Module_sccomp.mk | 2 +- sccomp/source/solver/solver.cxx | 11 ++++++ scp2/InstallModule_calc.mk | 1 + scp2/InstallModule_ooo.mk | 1 + scp2/source/calc/file_calc.scp | 8 +++- .../engine/OGLTrans/generic/OGLTrans_Shaders.cxx | 11 ++++++ .../engine/OGLTrans/generic/OGLTrans_Shaders.hxx | 2 + .../OGLTrans/generic/OGLTrans_TransitionImpl.hxx | 2 + .../source/engine/OGLTrans/mac/OGLTrans_Shaders.h | 2 + .../OGLTrans/mac/OGLTrans_TransitionImpl.hxx | 2 + .../OGLTrans/win/OGLTrans_TransitionImpl.hxx | 2 + 23 files changed, 115 insertions(+), 12 deletions(-) create mode 100644 config_host/config_mpl.h.in diff --git a/config_host.mk.in b/config_host.mk.in index 61746411a784..9e35fcfe9189 100644 --- a/config_host.mk.in +++ b/config_host.mk.in @@ -128,6 +128,7 @@ export ENABLE_KDE4=@ENABLE_KDE4@ export ENABLE_KDE=@ENABLE_KDE@ export ENABLE_LIBLANGTAG=@ENABLE_LIBLANGTAG@ export ENABLE_LOCKDOWN=@ENABLE_LOCKDOWN@ +export ENABLE_LPSOLVE=@ENABLE_LPSOLVE@ export ENABLE_LTO=@ENABLE_LTO@ export ENABLE_LWP=@ENABLE_LWP@ export ENABLE_MACOSX_SANDBOX=@ENABLE_MACOSX_SANDBOX@ diff --git a/config_host/config_lgpl.h.in b/config_host/config_lgpl.h.in index f81b33768df1..18d17dae7681 100644 --- a/config_host/config_lgpl.h.in +++ b/config_host/config_lgpl.h.in @@ -5,7 +5,7 @@ #ifndef CONFIG_LGPL_H #define CONFIG_LGPL_H -#define MPL_HAVE_SUBSET 0 +#include #if MPL_HAVE_SUBSET # error "Attempting to compile LGPL code into MPL subset" diff --git a/config_host/config_mpl.h.in b/config_host/config_mpl.h.in new file mode 100644 index 000000000000..bde10e3cea98 --- /dev/null +++ b/config_host/config_mpl.h.in @@ -0,0 +1,9 @@ +/* config_host/config_mpl.h. Generated from config_mpl.h.in by configure. */ + +#ifndef CONFIG_MPL_H +#define CONFIG_MPL_H + +#define MPL_HAVE_SUBSET 0 + +#endif + diff --git a/configure.ac b/configure.ac index 057ad50fc29a..251ee50a0989 100644 --- a/configure.ac +++ b/configure.ac @@ -569,6 +569,12 @@ dragonfly*) linux-android*) build_gstreamer=no build_gstreamer_0_10=no + enable_lotuswordpro=no + enable_neon=no + enable_mpl_subset=yes + enable_opengl=no + enable_lpsolve=no + with_theme="tango" test_cups=no test_dbus=no test_fontconfig=no @@ -695,6 +701,12 @@ AC_ARG_ENABLE(ext-wiki-publisher, AS_HELP_STRING([--enable-ext-wiki-publisher], [Enable the Wiki Publisher extension.]) ) + +AC_ARG_ENABLE(lpsolve, + AS_HELP_STRING([--disable-lpsolve], + [Disable compilation of the lp solve solver ]) +) + ############################################################################### dnl ---------- *** ---------- @@ -6913,10 +6925,14 @@ AC_SUBST(WINEGCC) if test $_os = iOS; then enable_mpl_subset=yes + enable_opengl=no + enable_lotuswordpro=no + enable_lpsolve=no enable_postgresql_sdbc=no enable_lotuswordpro=no enable_neon=no enable_extension_integration=no + with_theme="tango" with_ppds=no fi @@ -8773,8 +8789,18 @@ AC_SUBST(MYTHES_CFLAGS) AC_SUBST(MYTHES_LIBS) dnl =================================================================== -dnl Checking for lpsolve +dnl How should we build the linear programming solver ? dnl =================================================================== +ENABLE_LPSOLVE= +AC_MSG_CHECKING([whether to build with lpsolve]) +if test "$enable_lpsolve" != "no"; then + ENABLE_LPSOLVE=TRUE + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) +fi +AC_SUBST(ENABLE_LPSOLVE) + AC_MSG_CHECKING([which lpsolve to use]) if test "$with_system_lpsolve" = "yes"; then AC_MSG_RESULT([external]) @@ -11709,7 +11735,7 @@ if test "$enable_mpl_subset" = "yes"; then if test "$enable_lotuswordpro" = "yes"; then AC_MSG_ERROR([need to --disable-lotuswordpro - a Lotus Word Pro file format import filter.]) fi - if test "$enable_neon" != "no"; then + if test "$enable_neon" != "no" -o "x$DISABLE_NEON" != "xTRUE"; then AC_MSG_ERROR([need to --disable-neon - webdav support.]) fi if test "x$enable_ext_mariadb_connector" = "xyes"; then @@ -11724,6 +11750,19 @@ if test "$enable_mpl_subset" = "yes"; then if test "x$WITH_EXTRA_EXTENSIONS" != "x"; then AC_MSG_ERROR([need to disable extra extensions '$WITH_EXTRA_EXTENSIONS']) fi + for theme in $WITH_THEMES; do + case $theme in + crystal|default|hicontrast|human|oxygen) + AC_MSG_ERROR([need to disable icon themes from '$WITH_THEMES': $theme present, use --with-theme=tango]) ;; + *) : ;; + esac + done + if test "$enable_opengl" != "no" -o "x$ENABLE_OPENGL" == "xTRUE"; then + AC_MSG_ERROR([need to --disable-opengl - GL transitions support.]) + fi + if test "$enable_lpsolve" != "no" -o "x$ENABLE_LPSOLVE" == "xTRUE"; then + AC_MSG_ERROR([need to --disable-lpsolve - calc linear programming solver.]) + fi MPL_SUBSET="TRUE" AC_DEFINE(MPL_HAVE_SUBSET) @@ -11854,6 +11893,7 @@ AC_CONFIG_HEADERS([config_host/config_features.h]) AC_CONFIG_HEADERS([config_host/config_global.h]) AC_CONFIG_HEADERS([config_host/config_graphite.h]) AC_CONFIG_HEADERS([config_host/config_lgpl.h]) +AC_CONFIG_HEADERS([config_host/config_mpl.h]) AC_CONFIG_HEADERS([config_host/config_kde4.h]) AC_CONFIG_HEADERS([config_host/config_mingw.h]) AC_CONFIG_HEADERS([config_host/config_oox.h]) diff --git a/lpsolve/Module_lpsolve.mk b/lpsolve/Module_lpsolve.mk index 420053467f6d..10d0bbad2d30 100644 --- a/lpsolve/Module_lpsolve.mk +++ b/lpsolve/Module_lpsolve.mk @@ -9,8 +9,8 @@ $(eval $(call gb_Module_Module,lpsolve)) +ifeq ($(ENABLE_LPSOLVE),TRUE) ifeq ($(SYSTEM_LPSOLVE),NO) -ifneq ($(OS),IOS) $(eval $(call gb_Module_add_targets,lpsolve,\ UnpackedTarball_lpsolve \ ExternalPackage_lpsolve \ diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk index d68df0e107cf..0ad9e669043d 100644 --- a/postprocess/Rdb_services.mk +++ b/postprocess/Rdb_services.mk @@ -112,8 +112,10 @@ $(eval $(call gb_Rdb_add_components,services,\ xmlscript/util/xmlscript \ xmlsecurity/util/xmlsecurity \ xmlsecurity/util/xsec_fw \ - $(if $(filter-out IOS,$(OS)), \ + $(if $(ENABLE_LPSOLVE), \ sccomp/source/solver/solver \ + ) \ + $(if $(filter-out IOS,$(OS)), \ writerfilter/util/writerfilter \ writerperfect/util/wpftwriter \ writerperfect/util/wpftdraw \ diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk index 9178c925d546..94ad19e17aec 100644 --- a/sc/Library_sc.mk +++ b/sc/Library_sc.mk @@ -357,11 +357,13 @@ $(eval $(call gb_Library_add_exception_objects,sc,\ sc/source/ui/dbgui/csvtablebox \ sc/source/ui/dbgui/dbnamdlg \ sc/source/ui/dbgui/expftext \ - sc/source/ui/dbgui/fieldwnd \ + $(if $(filter TRUE,$(MPL_SUBSET)),, \ + sc/source/ui/dbgui/fieldwnd) \ sc/source/ui/dbgui/filtdlg \ sc/source/ui/dbgui/foptmgr \ sc/source/ui/dbgui/imoptdlg \ - sc/source/ui/dbgui/pvlaydlg \ + $(if $(filter TRUE,$(MPL_SUBSET)),, \ + sc/source/ui/dbgui/pvlaydlg) \ sc/source/ui/dbgui/sfiltdlg \ sc/source/ui/docshell/arealink \ sc/source/ui/docshell/autostyl \ diff --git a/sc/source/ui/dbgui/fieldwnd.cxx b/sc/source/ui/dbgui/fieldwnd.cxx index 2abc85c3a26d..37010813e658 100644 --- a/sc/source/ui/dbgui/fieldwnd.cxx +++ b/sc/source/ui/dbgui/fieldwnd.cxx @@ -35,6 +35,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . ************************************************************************/ +#include + #include "fieldwnd.hxx" #include diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 98d66e289f85..79178c9f3e85 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -35,6 +35,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . ************************************************************************/ +#include + #include "pvlaydlg.hxx" #include "dpuiglobal.hxx" diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx index 89c36b0b0231..59ad13b321be 100644 --- a/sc/source/ui/inc/pvlaydlg.hxx +++ b/sc/source/ui/inc/pvlaydlg.hxx @@ -38,6 +38,8 @@ #ifndef SC_PVLAYDLG_HXX #define SC_PVLAYDLG_HXX +#include + #include #include diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx index 5f16fb1f81bf..fd953a70d78e 100644 --- a/sc/source/ui/view/cellsh2.cxx +++ b/sc/source/ui/view/cellsh2.cxx @@ -48,7 +48,6 @@ #include "filtdlg.hxx" #include "dbnamdlg.hxx" #include "reffact.hxx" -#include "pvlaydlg.hxx" #include "validat.hxx" #include "scresid.hxx" diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx index 6c70b2a10cf8..f8e7763d35ad 100644 --- a/sc/source/ui/view/tabvwshc.cxx +++ b/sc/source/ui/view/tabvwshc.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include + #include "scitems.hxx" #include #include @@ -41,7 +43,9 @@ #include "consdlg.hxx" #include "filtdlg.hxx" #include "dbnamdlg.hxx" -#include "pvlaydlg.hxx" +#if ! MPL_HAVE_SUBSET +# include "pvlaydlg.hxx" +#endif #include "areasdlg.hxx" #include "rangeutl.hxx" #include "crnrdlg.hxx" @@ -317,6 +321,7 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( case SID_OPENDLG_PIVOTTABLE: { +#if ! MPL_HAVE_SUBSET // all settings must be in pDialogDPObject if( pDialogDPObject ) @@ -329,6 +334,7 @@ SfxModelessDialog* ScTabViewShell::CreateRefDialog( GetViewData()->SetRefTabNo( GetViewData()->GetTabNo() ); pResult = new ScPivotLayoutDlg( pB, pCW, pParent, *pDialogDPObject, pObj == NULL); } +#endif } break; diff --git a/sccomp/Module_sccomp.mk b/sccomp/Module_sccomp.mk index 44d26f3cb1f4..15d9a6c6eeea 100644 --- a/sccomp/Module_sccomp.mk +++ b/sccomp/Module_sccomp.mk @@ -19,7 +19,7 @@ $(eval $(call gb_Module_Module,sccomp)) -ifneq ($(OS),IOS) +ifeq ($(ENABLE_LPSOLVE),TRUE) $(eval $(call gb_Module_add_targets,sccomp,\ AllLangResTarget_solver \ diff --git a/sccomp/source/solver/solver.cxx b/sccomp/source/solver/solver.cxx index c5b1c272cfae..1a38e8b7a1df 100644 --- a/sccomp/source/solver/solver.cxx +++ b/sccomp/source/solver/solver.cxx @@ -24,9 +24,20 @@ * * for a copy of the LGPLv3 License. * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . + * ************************************************************************/ #include "sal/config.h" +#include #undef LANGUAGE_NONE #if defined SAL_W32 diff --git a/scp2/InstallModule_calc.mk b/scp2/InstallModule_calc.mk index d91b1fe9931e..dba59607002b 100644 --- a/scp2/InstallModule_calc.mk +++ b/scp2/InstallModule_calc.mk @@ -10,6 +10,7 @@ $(eval $(call gb_InstallModule_InstallModule,scp2/calc)) $(eval $(call gb_InstallModule_define_if_set,scp2/calc,\ + ENABLE_LPSOLVE \ SYSTEM_LPSOLVE \ )) diff --git a/scp2/InstallModule_ooo.mk b/scp2/InstallModule_ooo.mk index 40cdafc335c7..b8c6130ea196 100644 --- a/scp2/InstallModule_ooo.mk +++ b/scp2/InstallModule_ooo.mk @@ -31,6 +31,7 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/ooo,\ ENABLE_KDE \ ENABLE_KDE4 \ ENABLE_LIBLANGTAG \ + ENABLE_LPSOLVE \ ENABLE_NPAPI_FROM_BROWSER \ ENABLE_NPAPI_INTO_BROWSER \ ENABLE_ONLINE_UPDATE \ diff --git a/scp2/source/calc/file_calc.scp b/scp2/source/calc/file_calc.scp index 91bcc94d06ef..115681b9c901 100644 --- a/scp2/source/calc/file_calc.scp +++ b/scp2/source/calc/file_calc.scp @@ -43,8 +43,6 @@ STD_LIB_FILE( gid_File_Lib_Scfilt, scfilt) STD_LIB_FILE( gid_File_Lib_Scd, scd) -STD_RES_FILE( gid_File_Res_Solver, solver) - STD_RES_FILE( gid_File_Res_Analysis, analysis) STD_RES_FILE( gid_File_Res_Date, date) @@ -70,9 +68,15 @@ File gid_File_Exe_Scalc End #endif +#if defined(ENABLE_LPSOLVE) + +STD_RES_FILE( gid_File_Res_Solver, solver) + #if ! defined (SYSTEM_LPSOLVE) File gid_File_Lib_Lpsolve PACKED_LIB_FILE_BODY; Name = SPECIAL_NAME(lpsolve55); End #endif + +#endif diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_Shaders.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_Shaders.cxx index ea8bdb6739b6..9e0445270594 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_Shaders.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_Shaders.cxx @@ -24,8 +24,19 @@ * * for a copy of the LGPLv3 License. * + * This file incorporates work covered by the following license notice: + * + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed + * with this work for additional information regarding copyright + * ownership. The ASF licenses this file to you under the Apache + * License, Version 2.0 (the "License"); you may not use this file + * except in compliance with the License. You may obtain a copy of + * the License at http://www.apache.org/licenses/LICENSE-2.0 . ************************************************************************/ +#include + #include #include "OGLTrans_Shaders.hxx" diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_Shaders.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_Shaders.hxx index d6a2cb66e8a3..bb2aa9d13847 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_Shaders.hxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_Shaders.hxx @@ -29,6 +29,8 @@ #ifndef INCLUDED_OGLTRANS_SHADERS_HXX_ #define INCLUDED_OGLTRANS_SHADERS_HXX_ +#include + #define GL_GLEXT_PROTOTYPES 1 #include #include diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx index d67fdc751b61..b74552652f76 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx @@ -28,6 +28,8 @@ #ifndef INCLUDED_OGLTRANS_TRANSITIONIMPL_HXX_ #define INCLUDED_OGLTRANS_TRANSITIONIMPL_HXX_ +#include + #include #include diff --git a/slideshow/source/engine/OGLTrans/mac/OGLTrans_Shaders.h b/slideshow/source/engine/OGLTrans/mac/OGLTrans_Shaders.h index 358630beb583..e739a2da1044 100644 --- a/slideshow/source/engine/OGLTrans/mac/OGLTrans_Shaders.h +++ b/slideshow/source/engine/OGLTrans/mac/OGLTrans_Shaders.h @@ -29,6 +29,8 @@ #ifndef INCLUDED_OGLTRANS_SHADERS_HXX_ #define INCLUDED_OGLTRANS_SHADERS_HXX_ +#include + /* FIXME : Really needed ? */ #define GL_GLEXT_PROTOTYPES 1 diff --git a/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionImpl.hxx index 983c6bd7c56f..ecca64feb9ff 100644 --- a/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionImpl.hxx +++ b/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionImpl.hxx @@ -28,6 +28,8 @@ #ifndef INCLUDED_OGLTRANS_TRANSITIONIMPL_HXX_ #define INCLUDED_OGLTRANS_TRANSITIONIMPL_HXX_ +#include + #include #include diff --git a/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionImpl.hxx index e64f9965a57e..ecfbae682c14 100644 --- a/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionImpl.hxx +++ b/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionImpl.hxx @@ -28,6 +28,8 @@ #ifndef INCLUDED_OGLTRANS_TRANSITIONIMPL_HXX_ #define INCLUDED_OGLTRANS_TRANSITIONIMPL_HXX_ +#include + #include #include -- cgit