package.py : added CMakePackage, changed qhull, ibmisc, openjpeg to work as examples

This commit is contained in:
alalazo
2016-07-13 17:36:06 +02:00
parent ad16830f71
commit 7cedd620f1
4 changed files with 161 additions and 125 deletions

View File

@@ -34,7 +34,7 @@ class Ibmisc(CMakePackage):
depends_on('cmake')
depends_on('doxygen')
def configure_args(self):
def cmake_args(self):
spec = self.spec
return [
'-DUSE_EVERYTRACE=%s' % ('YES' if '+everytrace' in spec else 'NO'),

View File

@@ -25,9 +25,9 @@
from spack import *
class Openjpeg(Package):
"""
OpenJPEG is an open-source JPEG 2000 codec written in C language.
class Openjpeg(CMakePackage):
"""OpenJPEG is an open-source JPEG 2000 codec written in C language.
It has been developed in order to promote the use of JPEG 2000, a
still-image compression standard from the Joint Photographic
Experts Group (JPEG).
@@ -35,7 +35,7 @@ class Openjpeg(Package):
ITU-T as a JPEG 2000 Reference Software.
"""
homepage = "https://github.com/uclouvain/openjpeg"
url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz"
url = "https://github.com/uclouvain/openjpeg/archive/version.2.1.tar.gz"
version('2.1', '3e1c451c087f8462955426da38aa3b3d')
version('2.0.1', '105876ed43ff7dbb2f90b41b5a43cfa5')
@@ -44,9 +44,3 @@ class Openjpeg(Package):
version('1.5.1', 'd774e4b5a0db5f0f171c4fc0aabfa14e')
depends_on('cmake')
def install(self, spec, prefix):
cmake('.', *std_cmake_args)
make()
make("install")

View File

@@ -24,7 +24,8 @@
##############################################################################
from spack import *
class Qhull(Package):
class Qhull(CMakePackage):
"""Qhull computes the convex hull, Delaunay triangulation, Voronoi
diagram, halfspace intersection about a point, furt hest-site
Delaunay triangulation, and furthest-site Voronoi diagram. The
@@ -47,8 +48,7 @@ class Qhull(Package):
depends_on('cmake')
def install(self, spec, prefix):
with working_dir('spack-build', create=True):
cmake('..', *std_cmake_args)
make()
make("install")
@CMakePackage.sanity_check('build')
@CMakePackage.on_package_attributes(run_tests=True)
def check(self):
make('test')