[Libreoffice-commits] core.git: 2 commits - config_host.mk.in configure.ac postprocess/Rdb_services.mk RepositoryExternal.mk Repository.mk sccomp/Library_coinmpsolver.mk sccomp/Library_solver.mk sccomp/Module_sccomp.mk sccomp/source scp2/InstallModule_calc.mk
Matúš Kukan
matus.kukan at collabora.com
Tue Apr 1 02:06:49 PDT 2014
Repository.mk | 3
RepositoryExternal.mk | 8 +-
config_host.mk.in | 3
configure.ac | 95 +++++++++++++---------------
postprocess/Rdb_services.mk | 5 +
sccomp/Library_coinmpsolver.mk | 34 ++++++++++
sccomp/Library_solver.mk | 10 --
sccomp/Module_sccomp.mk | 9 --
sccomp/source/solver/coinmpsolver.component | 15 ++++
sccomp/source/solver/solver.cxx | 6 -
sccomp/source/solver/solver.hrc | 1
sccomp/source/solver/solver.src | 5 +
scp2/InstallModule_calc.mk | 2
13 files changed, 122 insertions(+), 74 deletions(-)
New commits:
commit de7cdbc5840fd7d958d486901e405890eff224b9
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Mon Mar 31 19:18:41 2014 +0200
Install coinmp and lpsolve linear solvers in parallel.
Change-Id: If07d94a2f646c8377b76fdf645e85f9491e4f061
diff --git a/Repository.mk b/Repository.mk
index f30540e..b0a9193 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -150,14 +150,15 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,base, \
$(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \
analysis \
calc \
+ $(if $(ENABLE_COINMP),coinmpsolver) \
date \
pricing \
sc \
scd \
scfilt \
scui \
- $(if $(MPL_SUBSET),,$(if $(ENABLE_LPSOLVE),solver)) \
$(if $(ENABLE_OPENCL),scopencl) \
+ $(if $(ENABLE_LPSOLVE),solver) \
$(if $(DISABLE_SCRIPTING),,vbaobj) \
$(if $(ENABLE_TELEPATHY),tubes) \
))
diff --git a/config_host.mk.in b/config_host.mk.in
index 43d403f..bcb4e97 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -108,6 +108,7 @@ export EBOOK_LIBS=$(gb_SPACE)@EBOOK_LIBS@
export ENABLE_AVAHI=@ENABLE_AVAHI@
export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@
export ENABLE_CMIS=@ENABLE_CMIS@
+export ENABLE_COINMP=@ENABLE_COINMP@
export ENABLE_CRASHDUMP=@ENABLE_CRASHDUMP@
export ENABLE_CUPS=@ENABLE_CUPS@
export ENABLE_CURL=@ENABLE_CURL@
diff --git a/configure.ac b/configure.ac
index f039f1b..3bd4575 100644
--- a/configure.ac
+++ b/configure.ac
@@ -654,6 +654,7 @@ linux-android*)
enable_lotuswordpro=no
enable_mpl_subset=yes
enable_opengl=no
+ enable_coinmp=no
enable_lpsolve=no
enable_report_builder=no
with_theme="tango"
@@ -7323,6 +7324,7 @@ if test $_os = iOS; then
enable_mpl_subset=yes
enable_opengl=no
enable_lotuswordpro=no
+ enable_coinmp=no
enable_lpsolve=no
enable_postgresql_sdbc=no
enable_lotuswordpro=no
@@ -9408,8 +9410,17 @@ dnl ===================================================================
dnl How should we build the linear programming solver ?
dnl ===================================================================
-# Should we check for system CoinMP ? How to do that ?
-BUILD_TYPE="$BUILD_TYPE COINMP"
+ENABLE_COINMP=
+AC_MSG_CHECKING([whether to build with CoinMP])
+if test "$enable_coinmp" != "no"; then
+ ENABLE_COINMP=TRUE
+ AC_MSG_RESULT([yes])
+ # Should we check for system CoinMP ? How to do that ?
+ BUILD_TYPE="$BUILD_TYPE COINMP"
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST(ENABLE_COINMP)
ENABLE_LPSOLVE=
AC_MSG_CHECKING([whether to build with lpsolve])
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index 8c56370..83ce7dc 100755
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -109,6 +109,9 @@ $(eval $(call gb_Rdb_add_components,services,\
xmlscript/util/xmlscript \
xmlsecurity/util/xmlsecurity \
xmlsecurity/util/xsec_fw \
+ $(if $(ENABLE_COINMP), \
+ sccomp/source/solver/coinmpsolver \
+ ) \
$(if $(ENABLE_LPSOLVE), \
sccomp/source/solver/solver \
) \
diff --git a/sccomp/Library_coinmpsolver.mk b/sccomp/Library_coinmpsolver.mk
new file mode 100644
index 0000000..849ce0f
--- /dev/null
+++ b/sccomp/Library_coinmpsolver.mk
@@ -0,0 +1,34 @@
+# -*- 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_Library_Library,coinmpsolver))
+
+$(eval $(call gb_Library_set_componentfile,coinmpsolver,sccomp/source/solver/coinmpsolver))
+
+$(eval $(call gb_Library_use_sdk_api,coinmpsolver))
+
+$(eval $(call gb_Library_use_libraries,coinmpsolver,\
+ comphelper \
+ cppu \
+ cppuhelper \
+ sal \
+ tl \
+ i18nlangtag \
+ $(gb_UWINAPI) \
+))
+
+$(eval $(call gb_Library_use_externals,coinmpsolver,\
+ boost_headers \
+ coinmp \
+))
+
+$(eval $(call gb_Library_add_exception_objects,coinmpsolver,\
+ sccomp/source/solver/solver \
+))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sccomp/Module_sccomp.mk b/sccomp/Module_sccomp.mk
index dd56f87..08df52b 100644
--- a/sccomp/Module_sccomp.mk
+++ b/sccomp/Module_sccomp.mk
@@ -19,16 +19,13 @@
$(eval $(call gb_Module_Module,sccomp))
-ifeq ($(ENABLE_LPSOLVE),TRUE)
-
$(eval $(call gb_Module_add_targets,sccomp,\
- Library_solver \
+ $(if $(ENABLE_COINMP), Library_coinmpsolver) \
+ $(if $(ENABLE_LPSOLVE), Library_solver) \
))
$(eval $(call gb_Module_add_l10n_targets,sccomp,\
- AllLangResTarget_solver \
+ $(if $(ENABLE_COINMP)$(ENABLE_LPSOLVE), AllLangResTarget_solver) \
))
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/sccomp/source/solver/coinmpsolver.component b/sccomp/source/solver/coinmpsolver.component
new file mode 100644
index 0000000..0feb3d0
--- /dev/null
+++ b/sccomp/source/solver/coinmpsolver.component
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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/.
+ -->
+
+<component loader="com.sun.star.loader.SharedLibrary" prefix="coinmp"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.comp.Calc.CoinMPSolver">
+ <service name="com.sun.star.sheet.Solver"/>
+ </implementation>
+</component>
diff --git a/sccomp/source/solver/solver.cxx b/sccomp/source/solver/solver.cxx
index 128e877..5ea871e 100644
--- a/sccomp/source/solver/solver.cxx
+++ b/sccomp/source/solver/solver.cxx
@@ -177,7 +177,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL SolverComponent::getPropertySet
OUString SAL_CALL SolverComponent::getComponentDescription() throw (uno::RuntimeException, std::exception)
{
- return lcl_GetResourceString( RID_SOLVER_COMPONENT );
+ return lcl_GetResourceString( RID_COINMP_SOLVER_COMPONENT );
}
OUString SAL_CALL SolverComponent::getStatusDescription() throw (uno::RuntimeException, std::exception)
@@ -589,7 +589,7 @@ uno::Sequence< OUString > SolverComponent_getSupportedServiceNames()
OUString SolverComponent_getImplementationName()
{
- return OUString::createFromAscii( "com.sun.star.comp.Calc.Solver" );
+ return OUString::createFromAscii( "com.sun.star.comp.Calc.CoinMPSolver" );
}
OUString SAL_CALL SolverComponent::getImplementationName() throw(uno::RuntimeException, std::exception)
@@ -615,7 +615,7 @@ uno::Reference<uno::XInterface> SolverComponent_createInstance( const uno::Refer
extern "C"
{
- SAL_DLLPUBLIC_EXPORT void* SAL_CALL solver_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
+ SAL_DLLPUBLIC_EXPORT void* SAL_CALL coinmp_component_getFactory( const sal_Char * pImplName, void * pServiceManager, void * /*pRegistryKey*/ )
{
OUString aImplName( OUString::createFromAscii( pImplName ) );
void* pRet = 0;
diff --git a/sccomp/source/solver/solver.hrc b/sccomp/source/solver/solver.hrc
index bf017af..8887398 100644
--- a/sccomp/source/solver/solver.hrc
+++ b/sccomp/source/solver/solver.hrc
@@ -32,6 +32,7 @@
#define RID_ERROR_INFEASIBLE (SOLVER_RESOURCE_START + 8)
#define RID_ERROR_UNBOUNDED (SOLVER_RESOURCE_START + 9)
#define RID_ERROR_TIMEOUT (SOLVER_RESOURCE_START + 10)
+#define RID_COINMP_SOLVER_COMPONENT (SOLVER_RESOURCE_START + 11)
#endif
diff --git a/sccomp/source/solver/solver.src b/sccomp/source/solver/solver.src
index 52a9b9e..0504400 100644
--- a/sccomp/source/solver/solver.src
+++ b/sccomp/source/solver/solver.src
@@ -24,6 +24,11 @@ String RID_SOLVER_COMPONENT
Text [ en-US ] = "%PRODUCTNAME Linear Solver";
};
+String RID_COINMP_SOLVER_COMPONENT
+{
+ Text [ en-US ] = "%PRODUCTNAME CoinMP Linear Solver";
+};
+
String RID_PROPERTY_NONNEGATIVE
{
Text [ en-US ] = "Assume variables as non-negative";
commit 8dc394d5c573e5583760c7cc56c5c19062d3f062
Author: Matúš Kukan <matus.kukan at collabora.com>
Date: Mon Mar 31 19:36:41 2014 +0200
Revert "Allow to build lpsolver based on CoinMP library."
This reverts commit 4f7b96886ec2e98f270a9ec3c3509cd523fce7cc.
Conflicts:
configure.ac
scp2/InstallModule_ooo.mk
Change-Id: I5621496d70a2c493eb964c1138d310c68fa6d660
diff --git a/Repository.mk b/Repository.mk
index 6c2bb67..f30540e 100644
--- a/Repository.mk
+++ b/Repository.mk
@@ -156,8 +156,8 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,calc, \
scd \
scfilt \
scui \
+ $(if $(MPL_SUBSET),,$(if $(ENABLE_LPSOLVE),solver)) \
$(if $(ENABLE_OPENCL),scopencl) \
- $(if $(WITH_LPSOLVER),solver) \
$(if $(DISABLE_SCRIPTING),,vbaobj) \
$(if $(ENABLE_TELEPATHY),tubes) \
))
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 0a70e26..150e289 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -1982,7 +1982,7 @@ endef
endif # ANDROID
endif # SYSTEM_LCMS2
-ifeq ($(WITH_LPSOLVER),lpsolve)
+ifneq ($(ENABLE_LPSOLVE),)
ifneq ($(SYSTEM_LPSOLVE),)
@@ -2020,7 +2020,9 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
endif # SYSTEM_LPSOLVE
-else ifeq ($(WITH_LPSOLVER),coinmp)
+endif # ENABLE_LPSOLVE
+
+ifneq ($(ENABLE_COINMP),)
define gb_LinkTarget__use_coinmp
$(call gb_LinkTarget_use_package,$(1),coinmp)
@@ -2050,7 +2052,7 @@ $(eval $(call gb_Helper_register_packages_for_install,ooo,\
coinmp \
))
-endif # WITH_LPSOLVER
+endif # ENABLE_COINMP
ifeq ($(ENABLE_GIO),TRUE)
diff --git a/config_host.mk.in b/config_host.mk.in
index 1c2d25b..43d403f 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -137,6 +137,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_MACLIKE_APP_STRUCTURE=@ENABLE_MACOSX_MACLIKE_APP_STRUCTURE@
@@ -601,7 +602,6 @@ export WITH_KRB5=@WITH_KRB5@
export WITH_LANG=@WITH_LANG@
export WITH_LANG_LIST=@WITH_LANG_LIST@
export WITH_LINKER_HASH_STYLE=@WITH_LINKER_HASH_STYLE@
-export WITH_LPSOLVER=@WITH_LPSOLVER@
export WITH_MOZAB4WIN=@WITH_MOZAB4WIN@
export WITH_MYSPELL_DICTS=@WITH_MYSPELL_DICTS@
export WITH_POOR_HELP_LOCALIZATIONS=@WITH_POOR_HELP_LOCALIZATIONS@
diff --git a/configure.ac b/configure.ac
index 07b2d24..f039f1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -654,6 +654,7 @@ linux-android*)
enable_lotuswordpro=no
enable_mpl_subset=yes
enable_opengl=no
+ enable_lpsolve=no
enable_report_builder=no
with_theme="tango"
test_cups=no
@@ -1763,14 +1764,6 @@ AC_ARG_WITH(system-npapi-headers,
[with_system_npapi_headers="$with_system_headers"]
)
-AC_ARG_WITH(lpsolver,
- AS_HELP_STRING([--with-lpsolver],
- [Specify which library to use for lpsolver implementation in sccomp.
- Possible values: "lpsolve", "coinmp", "no". The default value is "lpsolve".
- Example: --with-lpsolver="coinmp"]),
- WITH_LPSOLVER=$withval,
- WITH_LPSOLVER="lpsolve")
-
AC_ARG_WITH(webdav,
AS_HELP_STRING([--with-webdav],
[Specify which library to use for webdav implementation.
@@ -7330,6 +7323,7 @@ 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_extension_integration=no
@@ -9413,48 +9407,40 @@ AC_SUBST(MYTHES_LIBS)
dnl ===================================================================
dnl How should we build the linear programming solver ?
dnl ===================================================================
-if test "$enable_mpl_subset" = "yes"; then
- WITH_LPSOLVER="coinmp"
+
+# Should we check for system CoinMP ? How to do that ?
+BUILD_TYPE="$BUILD_TYPE COINMP"
+
+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])
+ SYSTEM_LPSOLVE=TRUE
+ AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
+ [ AC_MSG_ERROR(lpsolve headers not found.)], [])
+ save_LIBS=$LIBS
+ # some systems need this. Like Ubuntu....
+ AC_CHECK_LIB(m, floor)
+ AC_CHECK_LIB(dl, dlopen)
+ AC_CHECK_LIB([lpsolve55], [make_lp], [:],
+ [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
+ LIBS=$save_LIBS
+ libo_MINGW_CHECK_DLL([lpsolve55])
+else
+ AC_MSG_RESULT([internal])
+ SYSTEM_LPSOLVE=
+ BUILD_TYPE="$BUILD_TYPE LPSOLVE"
fi
-if test $_os = iOS -o $_os = Android; then
- WITH_LPSOLVER="no"
-fi
-AC_MSG_CHECKING([for lpsolver library])
-case "$WITH_LPSOLVER" in
-coinmp)
- AC_MSG_RESULT([CoinMP])
- # Should we check for system CoinMP ? How to do that ?
- BUILD_TYPE="$BUILD_TYPE COINMP"
- ;;
-lpsolve)
- AC_MSG_RESULT([lpsolve])
- AC_MSG_CHECKING([which lpsolve to use])
- if test "$with_system_lpsolve" = "yes"; then
- AC_MSG_RESULT([external])
- SYSTEM_LPSOLVE=TRUE
- AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
- [ AC_MSG_ERROR(lpsolve headers not found.)], [])
- save_LIBS=$LIBS
- # some systems need this. Like Ubuntu....
- AC_CHECK_LIB(m, floor)
- AC_CHECK_LIB(dl, dlopen)
- AC_CHECK_LIB([lpsolve55], [make_lp], [:],
- [ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
- LIBS=$save_LIBS
- libo_MINGW_CHECK_DLL([lpsolve55])
- else
- AC_MSG_RESULT([internal])
- SYSTEM_LPSOLVE=
- BUILD_TYPE="$BUILD_TYPE LPSOLVE"
- fi
- ;;
-*)
- AC_MSG_RESULT([none, disabled])
- WITH_LPSOLVER=""
- ;;
-esac
AC_SUBST(SYSTEM_LPSOLVE)
-AC_SUBST(WITH_LPSOLVER)
dnl ===================================================================
dnl Checking for libexttextcat
@@ -12552,8 +12538,8 @@ if test "$enable_mpl_subset" = "yes"; then
if test "$enable_opengl" != "no" -o "x$ENABLE_OPENGL" = "xTRUE"; then
AC_MSG_ERROR([need to --disable-opengl - GL transitions support.])
fi
- if test "$WITH_LPSOLVER" = "lpsolve"; then
- AC_MSG_ERROR([need --with-lpsolver=coinmp or --without-lpsolver - calc linear programming solver.])
+ 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"
diff --git a/postprocess/Rdb_services.mk b/postprocess/Rdb_services.mk
index a7920aa..8c56370 100755
--- a/postprocess/Rdb_services.mk
+++ b/postprocess/Rdb_services.mk
@@ -109,7 +109,7 @@ $(eval $(call gb_Rdb_add_components,services,\
xmlscript/util/xmlscript \
xmlsecurity/util/xmlsecurity \
xmlsecurity/util/xsec_fw \
- $(if $(WITH_LPSOLVER), \
+ $(if $(ENABLE_LPSOLVE), \
sccomp/source/solver/solver \
) \
writerfilter/util/writerfilter \
diff --git a/sccomp/Library_solver.mk b/sccomp/Library_solver.mk
index c553105..e1b2ca3 100644
--- a/sccomp/Library_solver.mk
+++ b/sccomp/Library_solver.mk
@@ -35,19 +35,11 @@ $(eval $(call gb_Library_use_libraries,solver,\
$(eval $(call gb_Library_use_externals,solver,\
boost_headers \
- $(WITH_LPSOLVER) \
+ lpsolve \
))
-ifeq ($(WITH_LPSOLVER),lpsolve)
$(eval $(call gb_Library_add_exception_objects,solver,\
sccomp/source/solver/solver-lpsolve \
))
-else ifeq ($(WITH_LPSOLVER),coinmp)
-$(eval $(call gb_Library_add_exception_objects,solver,\
- sccomp/source/solver/solver \
-))
-
-endif
-
# vim: set noet sw=4 ts=4:
diff --git a/sccomp/Module_sccomp.mk b/sccomp/Module_sccomp.mk
index d250e3b..dd56f87 100644
--- a/sccomp/Module_sccomp.mk
+++ b/sccomp/Module_sccomp.mk
@@ -19,7 +19,7 @@
$(eval $(call gb_Module_Module,sccomp))
-ifneq ($(WITH_LPSOLVER),)
+ifeq ($(ENABLE_LPSOLVE),TRUE)
$(eval $(call gb_Module_add_targets,sccomp,\
Library_solver \
diff --git a/scp2/InstallModule_calc.mk b/scp2/InstallModule_calc.mk
index b64ae2a..a4d5583 100644
--- a/scp2/InstallModule_calc.mk
+++ b/scp2/InstallModule_calc.mk
@@ -16,7 +16,7 @@ $(eval $(call gb_InstallModule_define_if_set,scp2/calc,\
ENABLE_MACOSX_SANDBOX \
))
-ifneq (,$(WITH_LPSOLVER))
+ifneq (,$(ENABLE_COINMP)$(ENABLE_LPSOLVE))
$(eval $(call gb_InstallModule_add_defs,scp2/calc,\
-DWITH_LPSOLVER \
))
More information about the Libreoffice-commits
mailing list