diff options
author | Christoph Junghans <christoph.junghans@gmail.com> | 2017-09-05 13:15:08 -0600 |
---|---|---|
committer | Todd Gamblin <tgamblin@llnl.gov> | 2017-09-05 09:15:08 -1000 |
commit | feefdedadf224315d69ef2f6da1fafd6338bba5a (patch) | |
tree | 08221eac0f1328a832e5c3b2be93fcc77ac31ab7 /var | |
parent | 41d8981ab5b5e912d38e201b71b981ef0f17e20e (diff) | |
download | spack-feefdedadf224315d69ef2f6da1fafd6338bba5a.tar.gz spack-feefdedadf224315d69ef2f6da1fafd6338bba5a.tar.bz2 spack-feefdedadf224315d69ef2f6da1fafd6338bba5a.tar.xz spack-feefdedadf224315d69ef2f6da1fafd6338bba5a.zip |
nauty: shared libraries (#5207)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/nauty/package.py | 95 |
1 files changed, 45 insertions, 50 deletions
diff --git a/var/spack/repos/builtin/packages/nauty/package.py b/var/spack/repos/builtin/packages/nauty/package.py index 11c7945f39..1dc60a28ac 100644 --- a/var/spack/repos/builtin/packages/nauty/package.py +++ b/var/spack/repos/builtin/packages/nauty/package.py @@ -23,67 +23,62 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ############################################################################## -import shutil +import os from spack import * -class Nauty(Package): +class Nauty(AutotoolsPackage): """nauty and Traces are programs for computing automorphism groups of graphsq and digraphs""" homepage = "http://pallini.di.uniroma1.it/index.html" url = "http://pallini.di.uniroma1.it/nauty26r7.tar.gz" version('2.6r7', 'b2b18e03ea7698db3fbe06c5d76ad8fe') - version('2.6r5', '91b03a7b069962e94fc9aac8831ce8d2') - version('2.5r9', 'e8ecd08b0892a1fb13329c147f08de6d') + + # Debian/ Fedora patches for @2.6r7: + urls_for_patches = { + '@2.6r7': [ + # Debian patch to fix the gt_numorbits declaration + ('https://src.fedoraproject.org/rpms/nauty/raw/0f07d01caf84e9d30cb06b11af4860dd3837636a/f/nauty-fix-gt_numorbits.patch', 'a6e1ef4897aabd67c104fd1d78bcc334'), # noqa: E50 + # Debian patch to add explicit extern declarations where needed + ('https://src.fedoraproject.org/rpms/nauty/raw/0f07d01caf84e9d30cb06b11af4860dd3837636a/f/nauty-fix-include-extern.patch', '741034dec2d2f8b418b6e186aa3eb50f'), # noqa: E50 + # Debian patch to use zlib instead of invoking zcat through a pipe + ('https://src.fedoraproject.org/rpms/nauty/raw/0f07d01caf84e9d30cb06b11af4860dd3837636a/f/nauty-zlib-blisstog.patch', '667e1ce341f2506482ad30afd04f17e3'), # noqa: E50 + # Debian patch to improve usage and help information + ('https://src.fedoraproject.org/rpms/nauty/raw/0f07d01caf84e9d30cb06b11af4860dd3837636a/f/nauty-help2man.patch', '4202e6d83362daa2c4c4ab0788e11ac5'), # noqa: E50 + # Debian patch to add libtool support for building a shared library + ('https://src.fedoraproject.org/rpms/nauty/raw/0f07d01caf84e9d30cb06b11af4860dd3837636a/f/nauty-autotoolization.patch', 'ea75f19c8a980c4d6d4e07223785c751'), # noqa: E50 + # Debian patch to canonicalize header file usage + ('https://src.fedoraproject.org/rpms/nauty/raw/0f07d01caf84e9d30cb06b11af4860dd3837636a/f/nauty-includes.patch', 'c6ce4209d1381fb5489ed552ef35d7dc'), # noqa: E50 + # Debian patch to prefix "nauty-" to the names of the generic tools + ('https://src.fedoraproject.org/rpms/nauty/raw/0f07d01caf84e9d30cb06b11af4860dd3837636a/f/nauty-tool-prefix.patch', 'e89d87b4450adc5d0009ce11438dc975'), # noqa: E50 + # Fedora patch to detect availability of the popcnt + # instruction at runtime + ('https://src.fedoraproject.org/rpms/nauty/raw/0f07d01caf84e9d30cb06b11af4860dd3837636a/f/nauty-popcnt.patch', '8a32d31a7150c8f5f21ccb1f6dc857b1') # noqa: E50 + ] + } + # Iterate over patches + for condition, urls in urls_for_patches.items(): + for url, md5 in urls: + patch(url, when=condition, level=1, md5=md5) + + depends_on('m4', type='build', when='@2.6r7') + depends_on('autoconf', type='build', when='@2.6r7') + depends_on('automake', type='build', when='@2.6r7') + depends_on('libtool', type='build', when='@2.6r7') + depends_on('pkg-config', type='build') + depends_on('zlib') + + @property + def force_autoreconf(self): + return self.spec.satisfies('@2.6r7') def url_for_version(self, version): url = "http://pallini.di.uniroma1.it/nauty{0}.tar.gz" return url.format(version.joined) - def install(self, spec, prefix): - configure('--prefix=%s' % prefix) - make() - - exes = [ - "NRswitchg", - "addedgeg", - "amtog", - "biplabg", - "catg", - "complg", - "converseg", - "copyg", - "countg", - "cubhamg", - "deledgeg", - "delptg", - "directg", - "dreadnaut", - "dretodot", - "dretog", - "genbg", - "genbgL", - "geng", - "genquarticg", - "genrang", - "genspecialg", - "gentourng", - "gentreeg", - "hamheuristic", - "labelg", - "linegraphg", - "listg", - "multig", - "newedgeg", - "pickg", - "planarg", - "ranlabg", - "shortg", - "subdivideg", - "twohamg", - "vcolg", - "watercluster2"] - mkdirp(prefix.bin) - for exe in exes: - shutil.copyfile(exe, join_path(prefix.bin, exe)) + def patch(self): + os.remove('makefile') + ver = str(self.version.dotted).replace('r', '.') + if self.spec.satisfies('@2.6r7'): + filter_file('@INJECTVER@', ver, "configure.ac") |