Updates to CGAL and ICU4C packages (#1828)

This commit is contained in:
Adam J. Stewart 2016-09-22 13:50:50 -05:00 committed by Todd Gamblin
parent c7860322f5
commit a638b62ab1
2 changed files with 42 additions and 26 deletions

View File

@ -22,44 +22,57 @@
# License along with this program; if not, write to the Free Software # License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################## ##############################################################################
from spack import * from spack import *
class Cgal(Package): class Cgal(Package):
"""CGAL is a software project that provides easy access to efficient and """The Computational Geometry Algorithms Library (CGAL) is a C++ library
reliable geometric algorithms in the form of a C++ library. CGAL that aims to provide easy access to efficient and reliable algorithms in
is used in various areas needing geometric computation, such as computational geometry. CGAL is used in various areas needing geometric
geographic information systems, computer aided design, molecular computation, such as geographic information systems, computer aided design,
biology, medical imaging, computer graphics, and robotics. molecular biology, medical imaging, computer graphics, and robotics.
""" """
homepage = 'http://www.cgal.org/' homepage = 'http://www.cgal.org/'
url = 'https://github.com/CGAL/cgal/archive/releases/CGAL-4.7.tar.gz' url = 'https://github.com/CGAL/cgal/archive/releases/CGAL-4.7.tar.gz'
version('4.9', '7b628db3e5614347f776c046b7666089')
version('4.7', '4826714810f3b4c65cac96b90fb03b67') version('4.7', '4826714810f3b4c65cac96b90fb03b67')
version('4.6.3', 'e8ee2ecc8d2b09b94a121c09257b576d') version('4.6.3', 'e8ee2ecc8d2b09b94a121c09257b576d')
# Installation instructions :
# http://doc.cgal.org/latest/Manual/installation.html
variant('shared', default=True, variant('shared', default=True,
description='Enables the build of shared libraries') description='Enables the build of shared libraries')
variant('debug', default=False, variant('debug', default=False,
description='Builds a debug version of the libraries') description='Builds a debug version of the libraries')
# Essential Third Party Libraries
depends_on('boost') depends_on('boost')
depends_on('mpfr')
depends_on('gmp') depends_on('gmp')
depends_on('mpfr')
depends_on('zlib') depends_on('zlib')
# depends_on('opengl')
depends_on('qt@5:')
# Optional Third Party Libraries
# depends_on('leda')
# depends_on('mpfi')
# depends_on('rs')
# depends_on('rs3')
# depends_on('ntl')
# depends_on('eigen')
# depends_on('libqglviewer')
# depends_on('esbtl')
# depends_on('intel-tbb')
# Build dependencies
depends_on('cmake', type='build') depends_on('cmake', type='build')
# FIXME : Qt5 dependency missing (needs Qt5 and OpenGL)
# FIXME : Optional third party libraries missing
def install(self, spec, prefix): def install(self, spec, prefix):
# Installation instructions:
# http://doc.cgal.org/latest/Manual/installation.html
options = [] options = []
options.extend(std_cmake_args) options.extend(std_cmake_args)
# CGAL supports only Release and Debug build type. Any other build type # CGAL supports only Release and Debug build type. Any other build type
# will raise an error at configure time # will raise an error at configure time
if '+debug' in spec: if '+debug' in spec:
@ -72,9 +85,7 @@ def install(self, spec, prefix):
else: else:
options.append('-DBUILD_SHARED_LIBS:BOOL=OFF') options.append('-DBUILD_SHARED_LIBS:BOOL=OFF')
build_directory = join_path(self.stage.path, 'spack-build') cmake('.', *options)
source_directory = self.stage.source_path
with working_dir(build_directory, create=True): make()
cmake(source_directory, *options) make('install')
make()
make("install")

View File

@ -28,17 +28,22 @@
class Icu4c(Package): class Icu4c(Package):
"""ICU is a mature, widely used set of C/C++ and Java libraries providing """ICU is a mature, widely used set of C/C++ and Java libraries providing
Unicode and Globalization support for software applications. Unicode and Globalization support for software applications.
""" """
homepage = "http://site.icu-project.org/" homepage = "http://site.icu-project.org/"
url = "http://downloads.sourceforge.net/project/icu/ICU4C/54.1/icu4c-54_1-src.tgz" url = "http://download.icu-project.org/files/icu4c/57.1/icu4c-57_1-src.tgz"
version('54_1', 'e844caed8f2ca24c088505b0d6271bc0') version('57.1', '976734806026a4ef8bdd17937c8898b9')
def url_for_version(self, version):
base_url = "http://download.icu-project.org/files/icu4c"
return "{0}/{1}/icu4c-{2}-src.tgz".format(
base_url, version, version.underscored)
def install(self, spec, prefix): def install(self, spec, prefix):
cd("source") cd('source')
configure("--prefix=%s" % prefix)
configure('--prefix={0}'.format(prefix))
make() make()
make("install") make('check')
make('install')