summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/cereal/package.py
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/cereal/package.py')
-rw-r--r--var/spack/repos/builtin/packages/cereal/package.py31
1 files changed, 11 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/cereal/package.py b/var/spack/repos/builtin/packages/cereal/package.py
index 22da01e789..fc7aba4955 100644
--- a/var/spack/repos/builtin/packages/cereal/package.py
+++ b/var/spack/repos/builtin/packages/cereal/package.py
@@ -23,11 +23,9 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
from spack import *
-import os
-import shutil
-class Cereal(Package):
+class Cereal(CMakePackage):
"""cereal is a header-only C++11 serialization library. cereal takes
arbitrary data types and reversibly turns them into different
representations, such as compact binary encodings, XML, or
@@ -54,25 +52,18 @@ class Cereal(Package):
depends_on('cmake@2.6.2:', type='build')
- def install(self, spec, prefix):
+ def patch(self):
# Don't use -Werror
filter_file(r'-Werror', '', 'CMakeLists.txt')
- # configure
+ def cmake_args(self):
# Boost is only used for self-tests, which we are not running (yet?)
- cmake('.',
- '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE',
- '-DSKIP_PORTABILITY_TEST=TRUE',
- *std_cmake_args)
-
- # Build
- make()
+ return [
+ '-DCMAKE_DISABLE_FIND_PACKAGE_Boost=TRUE',
+ '-DSKIP_PORTABILITY_TEST=TRUE',
+ ]
- # Install
- shutil.rmtree(join_path(prefix, 'doc'), ignore_errors=True)
- shutil.rmtree(join_path(prefix, 'include'), ignore_errors=True)
- shutil.rmtree(join_path(prefix, 'lib'), ignore_errors=True)
- shutil.copytree('doc', join_path(prefix, 'doc'), symlinks=True)
- shutil.copytree('include', join_path(prefix, 'include'), symlinks=True)
- # Create empty directory to avoid linker warnings later
- os.mkdir(join_path(prefix, 'lib'))
+ def install(self, spec, prefix):
+ with working_dir(self.build_directory):
+ install_tree('doc', prefix.doc)
+ install_tree('include', prefix.include)