summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/cereal/package.py
diff options
context:
space:
mode:
authorAdam J. Stewart <ajstewart426@gmail.com>2017-08-05 10:15:18 -0500
committerGitHub <noreply@github.com>2017-08-05 10:15:18 -0500
commitc7df12f69826448fd9af875e44348b8f8d0ff067 (patch)
tree55ab6e582d463f2c45f7935f5c15362d50b7470d /var/spack/repos/builtin/packages/cereal/package.py
parent17cdb73be7a781b7ec49fa02703a0e324ee2eaba (diff)
downloadspack-c7df12f69826448fd9af875e44348b8f8d0ff067.tar.gz
spack-c7df12f69826448fd9af875e44348b8f8d0ff067.tar.bz2
spack-c7df12f69826448fd9af875e44348b8f8d0ff067.tar.xz
spack-c7df12f69826448fd9af875e44348b8f8d0ff067.zip
Massive conversion from Package to CMakePackage (#4975)
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)