From 97d1923b6ccdef86f3d794b12e625ef0a7d88095 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 18 Oct 2013 22:47:47 +0200 Subject: fdo#70393: move mdds to a subdir of external Change-Id: Idfb327f7217e459ab0328f8692e1f73aef248d32 Reviewed-on: https://gerrit.libreoffice.org/6343 Reviewed-by: David Tardon Tested-by: David Tardon --- RepositoryModule_host.mk | 1 - external/Module_external.mk | 1 + .../mdds/0001-Workaround-for-an-old-gcc-bug.patch | 27 +++++++++++ external/mdds/Makefile | 7 +++ external/mdds/Module_mdds.mk | 16 +++++++ external/mdds/README | 4 ++ external/mdds/UnpackedTarball_mdds.mk | 21 +++++++++ external/mdds/mdds_0.6.0.patch | 54 ++++++++++++++++++++++ mdds/0001-Workaround-for-an-old-gcc-bug.patch | 27 ----------- mdds/Makefile | 7 --- mdds/Module_mdds.mk | 20 -------- mdds/README | 4 -- mdds/UnpackedTarball_mdds.mk | 21 --------- mdds/mdds_0.6.0.patch | 54 ---------------------- 14 files changed, 130 insertions(+), 134 deletions(-) create mode 100644 external/mdds/0001-Workaround-for-an-old-gcc-bug.patch create mode 100644 external/mdds/Makefile create mode 100644 external/mdds/Module_mdds.mk create mode 100644 external/mdds/README create mode 100644 external/mdds/UnpackedTarball_mdds.mk create mode 100644 external/mdds/mdds_0.6.0.patch delete mode 100644 mdds/0001-Workaround-for-an-old-gcc-bug.patch delete mode 100644 mdds/Makefile delete mode 100644 mdds/Module_mdds.mk delete mode 100644 mdds/README delete mode 100644 mdds/UnpackedTarball_mdds.mk delete mode 100644 mdds/mdds_0.6.0.patch diff --git a/RepositoryModule_host.mk b/RepositoryModule_host.mk index 99b24e1342dd..5c337309c7a7 100644 --- a/RepositoryModule_host.mk +++ b/RepositoryModule_host.mk @@ -76,7 +76,6 @@ $(eval $(call gb_Module_add_moduledirs,libreoffice,\ linguistic \ lotuswordpro \ $(call gb_Helper_optional,DESKTOP,l10ntools) \ - $(call gb_Helper_optional,MDDS,mdds) \ $(call gb_Helper_optional,MORE_FONTS,more_fonts) \ $(call gb_Helper_optional,MOZ,moz) \ $(call gb_Helper_optional,MARIADBC,mysqlc) \ diff --git a/external/Module_external.mk b/external/Module_external.mk index 988d477897d3..f4abc76b5f9d 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk @@ -50,6 +50,7 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,LIBXSLT,libxslt) \ $(call gb_Helper_optional,LPSOLVE,lpsolve) \ $(call gb_Helper_optional,MARIADB,libmariadb) \ + $(call gb_Helper_optional,MDDS,mdds) \ $(call gb_Helper_optional,MSPUB,libmspub) \ $(call gb_Helper_optional,MWAW,libmwaw) \ $(call gb_Helper_optional,MYSQLCPPCONN,mysqlcppconn) \ diff --git a/external/mdds/0001-Workaround-for-an-old-gcc-bug.patch b/external/mdds/0001-Workaround-for-an-old-gcc-bug.patch new file mode 100644 index 000000000000..8529fbfc2adf --- /dev/null +++ b/external/mdds/0001-Workaround-for-an-old-gcc-bug.patch @@ -0,0 +1,27 @@ +From 3e3a5c483217fe05b5bd556bf1b2c6f3ec297cb1 Mon Sep 17 00:00:00 2001 +From: Kohei Yoshida +Date: Sat, 22 Jun 2013 21:30:13 -0400 +Subject: [PATCH] Workaround for an old gcc bug. + +c.f. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44963 +--- + include/mdds/multi_type_vector_types.hpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/include/mdds/multi_type_vector_types.hpp b/include/mdds/multi_type_vector_types.hpp +index c4b2772..44af655 100644 +--- a/include/mdds/multi_type_vector_types.hpp ++++ b/c/d/include/mdds/multi_type_vector_types.hpp +@@ -278,7 +278,8 @@ public: + #ifndef MDDS_MULTI_TYPE_VECTOR_USE_DEQUE + d.reserve(d.size() + len); + #endif +- std::copy(its.first, its.second, std::back_inserter(d)); ++ for (; its.first != its.second; ++its.first) ++ d.push_back(*its.first); + } + + static void assign_values_from_block( +-- +1.8.1.4 + diff --git a/external/mdds/Makefile b/external/mdds/Makefile new file mode 100644 index 000000000000..e4968cf85fb6 --- /dev/null +++ b/external/mdds/Makefile @@ -0,0 +1,7 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- + +module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) + +include $(module_directory)/../../solenv/gbuild/partial_build.mk + +# vim: set noet sw=4 ts=4: diff --git a/external/mdds/Module_mdds.mk b/external/mdds/Module_mdds.mk new file mode 100644 index 000000000000..47745940bf90 --- /dev/null +++ b/external/mdds/Module_mdds.mk @@ -0,0 +1,16 @@ +# -*- 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_Module_Module,mdds)) + +$(eval $(call gb_Module_add_targets,mdds,\ + UnpackedTarball_mdds \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/mdds/README b/external/mdds/README new file mode 100644 index 000000000000..bd635eee39f3 --- /dev/null +++ b/external/mdds/README @@ -0,0 +1,4 @@ +Multi-dimensional data structure (mdds) library, available from [http://code.google.com/p/multidimalgorithm/]. + +mdds primarily provides data structures that are used by the calc +core. \ No newline at end of file diff --git a/external/mdds/UnpackedTarball_mdds.mk b/external/mdds/UnpackedTarball_mdds.mk new file mode 100644 index 000000000000..1ccfc2a85f3d --- /dev/null +++ b/external/mdds/UnpackedTarball_mdds.mk @@ -0,0 +1,21 @@ +# -*- 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_UnpackedTarball_UnpackedTarball,mdds)) + +$(eval $(call gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL))) + +$(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,3)) + +$(eval $(call gb_UnpackedTarball_add_patches,mdds,\ + external/mdds/mdds_0.6.0.patch \ + external/mdds/0001-Workaround-for-an-old-gcc-bug.patch \ +)) + +# vim: set noet sw=4 ts=4: diff --git a/external/mdds/mdds_0.6.0.patch b/external/mdds/mdds_0.6.0.patch new file mode 100644 index 000000000000..fba150267329 --- /dev/null +++ b/external/mdds/mdds_0.6.0.patch @@ -0,0 +1,54 @@ +--- misc/mdds_0.6.0/include/mdds/mixed_type_matrix_def.inl 2011-07-13 13:26:27.000000000 -0600 ++++ misc/build/mdds_0.6.0/include/mdds/mixed_type_matrix_def.inl 2011-07-20 02:02:21.164198900 -0600 +@@ -216,8 +216,8 @@ + // assignment to self. + return; + +- size_t row_count = ::std::min(mp_storage->rows(), r.mp_storage->rows()); +- size_t col_count = ::std::min(mp_storage->cols(), r.mp_storage->cols()); ++ size_t row_count = (::std::min)(mp_storage->rows(), r.mp_storage->rows()); ++ size_t col_count = (::std::min)(mp_storage->cols(), r.mp_storage->cols()); + for (size_t i = 0; i < row_count; ++i) + for (size_t j = 0; j < col_count; ++j) + mp_storage->get_element(i, j) = r.mp_storage->get_element(i, j); +--- misc/mdds_0.6.0/include/mdds/mixed_type_matrix_storage_filled_linear.inl 2011-07-13 13:26:27.000000000 -0600 ++++ misc/build/mdds_0.6.0/include/mdds/mixed_type_matrix_storage_filled_linear.inl 2011-07-20 02:02:21.179798900 -0600 +@@ -354,8 +354,8 @@ + } + + array_type new_array(new_size, &m_init_elem); +- size_t min_rows = ::std::min(row, m_rows); +- size_t min_cols = ::std::min(col, m_cols); ++ size_t min_rows = (::std::min)(row, m_rows); ++ size_t min_cols = (::std::min)(col, m_cols); + for (size_t i = 0; i < min_rows; ++i) + { + for (size_t j = 0; j < min_cols; ++j) +@@ -612,8 +612,8 @@ + } + + array_type new_array(new_size, element(0.0)); +- size_t min_rows = ::std::min(row, m_rows); +- size_t min_cols = ::std::min(col, m_cols); ++ size_t min_rows = (::std::min)(row, m_rows); ++ size_t min_cols = (::std::min)(col, m_cols); + for (size_t i = 0; i < min_rows; ++i) + { + for (size_t j = 0; j < min_cols; ++j) +--- misc/mdds_0.6.0/include/mdds/point_quad_tree.hpp 2011-07-13 13:26:27.000000000 -0600 ++++ misc/build/mdds_0.6.0/include/mdds/point_quad_tree.hpp 2011-07-20 02:04:36.088835900 -0600 +@@ -623,10 +623,10 @@ + template + void point_quad_tree<_Key,_Data>::insert(key_type x, key_type y, data_type data) + { +- m_xrange.first = ::std::min(m_xrange.first, x); +- m_xrange.second = ::std::max(m_xrange.second, x); +- m_yrange.first = ::std::min(m_yrange.first, y); +- m_yrange.second = ::std::max(m_yrange.second, y); ++ m_xrange.first = (::std::min)(m_xrange.first, x); ++ m_xrange.second = (::std::max)(m_xrange.second, x); ++ m_yrange.first = (::std::min)(m_yrange.first, y); ++ m_yrange.second = (::std::max)(m_yrange.second, y); + + if (!m_root) + { diff --git a/mdds/0001-Workaround-for-an-old-gcc-bug.patch b/mdds/0001-Workaround-for-an-old-gcc-bug.patch deleted file mode 100644 index 8529fbfc2adf..000000000000 --- a/mdds/0001-Workaround-for-an-old-gcc-bug.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 3e3a5c483217fe05b5bd556bf1b2c6f3ec297cb1 Mon Sep 17 00:00:00 2001 -From: Kohei Yoshida -Date: Sat, 22 Jun 2013 21:30:13 -0400 -Subject: [PATCH] Workaround for an old gcc bug. - -c.f. http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44963 ---- - include/mdds/multi_type_vector_types.hpp | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/include/mdds/multi_type_vector_types.hpp b/include/mdds/multi_type_vector_types.hpp -index c4b2772..44af655 100644 ---- a/include/mdds/multi_type_vector_types.hpp -+++ b/c/d/include/mdds/multi_type_vector_types.hpp -@@ -278,7 +278,8 @@ public: - #ifndef MDDS_MULTI_TYPE_VECTOR_USE_DEQUE - d.reserve(d.size() + len); - #endif -- std::copy(its.first, its.second, std::back_inserter(d)); -+ for (; its.first != its.second; ++its.first) -+ d.push_back(*its.first); - } - - static void assign_values_from_block( --- -1.8.1.4 - diff --git a/mdds/Makefile b/mdds/Makefile deleted file mode 100644 index ccb1c85a04da..000000000000 --- a/mdds/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- - -module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST)))) - -include $(module_directory)/../solenv/gbuild/partial_build.mk - -# vim: set noet sw=4 ts=4: diff --git a/mdds/Module_mdds.mk b/mdds/Module_mdds.mk deleted file mode 100644 index ac0f8a649d7e..000000000000 --- a/mdds/Module_mdds.mk +++ /dev/null @@ -1,20 +0,0 @@ -# -*- 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_Module_Module,mdds)) - -ifeq ($(SYSTEM_MDDS),NO) - -$(eval $(call gb_Module_add_targets,mdds,\ - UnpackedTarball_mdds \ -)) - -endif - -# vim: set noet sw=4 ts=4: diff --git a/mdds/README b/mdds/README deleted file mode 100644 index bd635eee39f3..000000000000 --- a/mdds/README +++ /dev/null @@ -1,4 +0,0 @@ -Multi-dimensional data structure (mdds) library, available from [http://code.google.com/p/multidimalgorithm/]. - -mdds primarily provides data structures that are used by the calc -core. \ No newline at end of file diff --git a/mdds/UnpackedTarball_mdds.mk b/mdds/UnpackedTarball_mdds.mk deleted file mode 100644 index 69fbf189cb46..000000000000 --- a/mdds/UnpackedTarball_mdds.mk +++ /dev/null @@ -1,21 +0,0 @@ -# -*- 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_UnpackedTarball_UnpackedTarball,mdds)) - -$(eval $(call gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL))) - -$(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,3)) - -$(eval $(call gb_UnpackedTarball_add_patches,mdds,\ - mdds/mdds_0.6.0.patch \ - mdds/0001-Workaround-for-an-old-gcc-bug.patch \ -)) - -# vim: set noet sw=4 ts=4: diff --git a/mdds/mdds_0.6.0.patch b/mdds/mdds_0.6.0.patch deleted file mode 100644 index fba150267329..000000000000 --- a/mdds/mdds_0.6.0.patch +++ /dev/null @@ -1,54 +0,0 @@ ---- misc/mdds_0.6.0/include/mdds/mixed_type_matrix_def.inl 2011-07-13 13:26:27.000000000 -0600 -+++ misc/build/mdds_0.6.0/include/mdds/mixed_type_matrix_def.inl 2011-07-20 02:02:21.164198900 -0600 -@@ -216,8 +216,8 @@ - // assignment to self. - return; - -- size_t row_count = ::std::min(mp_storage->rows(), r.mp_storage->rows()); -- size_t col_count = ::std::min(mp_storage->cols(), r.mp_storage->cols()); -+ size_t row_count = (::std::min)(mp_storage->rows(), r.mp_storage->rows()); -+ size_t col_count = (::std::min)(mp_storage->cols(), r.mp_storage->cols()); - for (size_t i = 0; i < row_count; ++i) - for (size_t j = 0; j < col_count; ++j) - mp_storage->get_element(i, j) = r.mp_storage->get_element(i, j); ---- misc/mdds_0.6.0/include/mdds/mixed_type_matrix_storage_filled_linear.inl 2011-07-13 13:26:27.000000000 -0600 -+++ misc/build/mdds_0.6.0/include/mdds/mixed_type_matrix_storage_filled_linear.inl 2011-07-20 02:02:21.179798900 -0600 -@@ -354,8 +354,8 @@ - } - - array_type new_array(new_size, &m_init_elem); -- size_t min_rows = ::std::min(row, m_rows); -- size_t min_cols = ::std::min(col, m_cols); -+ size_t min_rows = (::std::min)(row, m_rows); -+ size_t min_cols = (::std::min)(col, m_cols); - for (size_t i = 0; i < min_rows; ++i) - { - for (size_t j = 0; j < min_cols; ++j) -@@ -612,8 +612,8 @@ - } - - array_type new_array(new_size, element(0.0)); -- size_t min_rows = ::std::min(row, m_rows); -- size_t min_cols = ::std::min(col, m_cols); -+ size_t min_rows = (::std::min)(row, m_rows); -+ size_t min_cols = (::std::min)(col, m_cols); - for (size_t i = 0; i < min_rows; ++i) - { - for (size_t j = 0; j < min_cols; ++j) ---- misc/mdds_0.6.0/include/mdds/point_quad_tree.hpp 2011-07-13 13:26:27.000000000 -0600 -+++ misc/build/mdds_0.6.0/include/mdds/point_quad_tree.hpp 2011-07-20 02:04:36.088835900 -0600 -@@ -623,10 +623,10 @@ - template - void point_quad_tree<_Key,_Data>::insert(key_type x, key_type y, data_type data) - { -- m_xrange.first = ::std::min(m_xrange.first, x); -- m_xrange.second = ::std::max(m_xrange.second, x); -- m_yrange.first = ::std::min(m_yrange.first, y); -- m_yrange.second = ::std::max(m_yrange.second, y); -+ m_xrange.first = (::std::min)(m_xrange.first, x); -+ m_xrange.second = (::std::max)(m_xrange.second, x); -+ m_yrange.first = (::std::min)(m_yrange.first, y); -+ m_yrange.second = (::std::max)(m_yrange.second, y); - - if (!m_root) - { -- cgit