diff options
author | Fabian Brandt <fabbrandt@gmail.com> | 2020-03-30 15:17:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-30 08:17:21 -0500 |
commit | 605b7b5d23968d80dc1b045babc4866db8792f58 (patch) | |
tree | cee3142a3fbfddc1d04041b97c17769b1f70978a /var | |
parent | e9d573d1101002b127d5c789d86d3c1e92d81309 (diff) | |
download | spack-605b7b5d23968d80dc1b045babc4866db8792f58.tar.gz spack-605b7b5d23968d80dc1b045babc4866db8792f58.tar.bz2 spack-605b7b5d23968d80dc1b045babc4866db8792f58.tar.xz spack-605b7b5d23968d80dc1b045babc4866db8792f58.zip |
New package: libnetworkit (#15714)
* New package libnetworkit
* Fixed artificial dependency restriction
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/libnetworkit/0001-Name-agnostic-import-of-tlx-library.patch | 17 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/libnetworkit/package.py | 44 |
2 files changed, 61 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/libnetworkit/0001-Name-agnostic-import-of-tlx-library.patch b/var/spack/repos/builtin/packages/libnetworkit/0001-Name-agnostic-import-of-tlx-library.patch new file mode 100644 index 0000000000..900a298d9b --- /dev/null +++ b/var/spack/repos/builtin/packages/libnetworkit/0001-Name-agnostic-import-of-tlx-library.patch @@ -0,0 +1,17 @@ +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -203,10 +203,11 @@ if(NOT NETWORKIT_EXT_TLX) + "Please run `git submodule update --init` to fetch the submodule.") + endif() + else() ++ file(GLOB tlx_path ${NETWORKIT_EXT_TLX}/lib/**.a) + add_library(tlx STATIC IMPORTED) + set_target_properties(tlx PROPERTIES +- IMPORTED_LOCATION "${NETWORKIT_EXT_TLX}/lib/libtlx.a" +- INTERFACE_INCLUDE_DIRECTORIES "${NETWORKIT_EXT_TLX}/include/") ++ IMPORTED_LOCATION "${tlx_path}" ++ INTERFACE_INCLUDE_DIRECTORIES "${NETWORKIT_EXT_TLX}/include/") + endif() + + ################################################################################ + diff --git a/var/spack/repos/builtin/packages/libnetworkit/package.py b/var/spack/repos/builtin/packages/libnetworkit/package.py new file mode 100644 index 0000000000..5d7f58eb90 --- /dev/null +++ b/var/spack/repos/builtin/packages/libnetworkit/package.py @@ -0,0 +1,44 @@ +# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +from spack import * + + +class Libnetworkit(CMakePackage): + """NetworKit is a growing open-source toolkit for large-scale network + analysis. Its aim is to provide tools for the analysis of large networks + in the size range from thousands to billions of edges. For this purpose, + it implements efficient graph algorithms, many of them parallel to + utilize multicore architectures. These are meant to compute standard + measures of network analysis, such as degree sequences, clustering + coefficients, and centrality measures. In this respect, NetworKit is + comparable to packages such as NetworkX, albeit with a focus on + parallelism and scalability.""" + + homepage = "https://networkit.github.io/" + url = "https://github.com/networkit/networkit/archive/6.1.tar.gz" + + maintainers = ['fabratu'] + + version('6.1', sha256='22c953ea1054c356663b31c77114c2f0c8fec17e0e707aeec23026241beab9b2') + + variant('static', default=False, description='Enables the build of shared libraries') + variant('doc', default=False, description='Enables the build with sphinx documentation') + + depends_on('libtlx') + depends_on('py-sphinx', when='+doc', type='build') + + patch('0001-Name-agnostic-import-of-tlx-library.patch', when='@6.1') + + def cmake_args(self): + spec = self.spec + + tlx_libs = spec['libtlx'].prefix + + args = ['-DNETWORKIT_EXT_TLX=%s' % tlx_libs, + '-DNETWORKIT_STATIC=%s' % + ('ON' if '+static' in spec else 'OFF')] + + return args |