From ae8380c4fb77ced4bb9fab262ad45b7f8f9c8eb8 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Mon, 20 Mar 2017 16:05:02 -0400 Subject: cereal: Update to 1.2.2 (#3499) --- .../repos/builtin/packages/cereal/Boost.patch | 14 +++++++++ .../repos/builtin/packages/cereal/Boost2.patch | 10 +++++++ .../repos/builtin/packages/cereal/Werror.patch | 33 ---------------------- var/spack/repos/builtin/packages/cereal/package.py | 10 +++++-- .../repos/builtin/packages/cereal/pointers.patch | 19 +++++++++++++ 5 files changed, 51 insertions(+), 35 deletions(-) create mode 100644 var/spack/repos/builtin/packages/cereal/Boost.patch create mode 100644 var/spack/repos/builtin/packages/cereal/Boost2.patch delete mode 100644 var/spack/repos/builtin/packages/cereal/Werror.patch create mode 100644 var/spack/repos/builtin/packages/cereal/pointers.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/cereal/Boost.patch b/var/spack/repos/builtin/packages/cereal/Boost.patch new file mode 100644 index 0000000000..fdc2a72208 --- /dev/null +++ b/var/spack/repos/builtin/packages/cereal/Boost.patch @@ -0,0 +1,14 @@ +--- old/sandbox/CMakeLists.txt ++++ new/sandbox/CMakeLists.txt +@@ -4,9 +4,11 @@ + add_executable(sandbox_json sandbox_json.cpp) + add_executable(sandbox_rtti sandbox_rtti.cpp) + ++if(Boost_FOUND) + add_executable(sandbox_vs sandbox_vs.cpp) + target_link_libraries(sandbox_vs sandbox_vs_dll) + include_directories(sandbox_shared_lib) ++endif(Boost_FOUND) + + if(Boost_FOUND) + add_executable(performance performance.cpp) diff --git a/var/spack/repos/builtin/packages/cereal/Boost2.patch b/var/spack/repos/builtin/packages/cereal/Boost2.patch new file mode 100644 index 0000000000..f8edb2c479 --- /dev/null +++ b/var/spack/repos/builtin/packages/cereal/Boost2.patch @@ -0,0 +1,10 @@ +--- old/unittests/CMakeLists.txt ++++ new/unittests/CMakeLists.txt +@@ -1,4 +1,7 @@ + file(GLOB TESTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) ++if(NOT Boost_FOUND) ++ list(REMOVE_ITEM TESTS boost_variant.cpp) ++endif(Boost_FOUND) + + # A semi-colon separated list of test sources that should not be automatically built with doctest + set(SPECIAL_TESTS "portability_test.cpp") diff --git a/var/spack/repos/builtin/packages/cereal/Werror.patch b/var/spack/repos/builtin/packages/cereal/Werror.patch deleted file mode 100644 index d39eaaffdb..0000000000 --- a/var/spack/repos/builtin/packages/cereal/Werror.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- old/sandbox/CMakeLists.txt -+++ new/sandbox/CMakeLists.txt -@@ -4,9 +4,11 @@ - add_executable(sandbox_json sandbox_json.cpp) - add_executable(sandbox_rtti sandbox_rtti.cpp) - -+if(Boost_FOUND) - add_executable(sandbox_vs sandbox_vs.cpp) - target_link_libraries(sandbox_vs sandbox_vs_dll) - include_directories(sandbox_shared_lib) -+endif(Boost_FOUND) - - if(Boost_FOUND) - add_executable(performance performance.cpp) ---- old/include/cereal/types/common.hpp -+++ new/include/cereal/types/common.hpp -@@ -106,14 +106,16 @@ - t = reinterpret_cast::type const &>( value ); - } - -+#ifndef CEREAL_ENABLE_RAW_POINTER_SERIALIZATION - //! Serialization for raw pointers - /*! This exists only to throw a static_assert to let users know we don't support raw pointers. */ - template inline - void CEREAL_SERIALIZE_FUNCTION_NAME( Archive &, T * & ) - { - static_assert(cereal::traits::detail::delay_static_assert::value, - "Cereal does not support serializing raw pointers - please use a smart pointer"); - } -+#endif - - //! Serialization for C style arrays - template inline diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py index 0ce6ec593c..7f1f103a94 100644 --- a/var/spack/repos/builtin/packages/cereal/package.py +++ b/var/spack/repos/builtin/packages/cereal/package.py @@ -39,6 +39,7 @@ class Cereal(Package): homepage = "http://uscilab.github.io/cereal/" url = "https://github.com/USCiLab/cereal/archive/v1.1.2.tar.gz" + version('1.2.2', '4c56c7b9499dba79404250ef9a040481') version('1.2.1', '64476ed74c19068ee543b53ad3992261') version('1.2.0', 'e372c9814696481dbdb7d500e1410d2b') version('1.1.2', '34d4ad174acbff005c36d4d10e48cbb9') @@ -47,7 +48,9 @@ class Cereal(Package): version('1.0.0', 'd1bacca70a95cec0ddbff68b0871296b') version('0.9.1', '8872d4444ff274ce6cd1ed364d0fc0ad') - patch("Werror.patch") + patch("Boost.patch") + patch("Boost2.patch", when="@1.2.2:") + patch("pointers.patch") depends_on('cmake@2.6.2:', type='build') @@ -57,7 +60,10 @@ class Cereal(Package): # configure # Boost is only used for self-tests, which we are not running (yet?) - cmake('.', '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE', *std_cmake_args) + cmake('.', + '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE', + '-DSKIP_PORTABILITY_TEST=TRUE', + *std_cmake_args) # Build make() diff --git a/var/spack/repos/builtin/packages/cereal/pointers.patch b/var/spack/repos/builtin/packages/cereal/pointers.patch new file mode 100644 index 0000000000..39d17a2d54 --- /dev/null +++ b/var/spack/repos/builtin/packages/cereal/pointers.patch @@ -0,0 +1,19 @@ +--- old/include/cereal/types/common.hpp ++++ new/include/cereal/types/common.hpp +@@ -106,14 +106,16 @@ + t = reinterpret_cast::type const &>( value ); + } + ++#ifndef CEREAL_ENABLE_RAW_POINTER_SERIALIZATION + //! Serialization for raw pointers + /*! This exists only to throw a static_assert to let users know we don't support raw pointers. */ + template inline + void CEREAL_SERIALIZE_FUNCTION_NAME( Archive &, T * & ) + { + static_assert(cereal::traits::detail::delay_static_assert::value, + "Cereal does not support serializing raw pointers - please use a smart pointer"); + } ++#endif + + //! Serialization for C style arrays + template inline -- cgit v1.2.3-70-g09d2