summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2016-06-18 16:20:37 -0400
committerErik Schnetter <schnetter@gmail.com>2016-06-18 16:20:37 -0400
commita07056d67b71b7857e32fae2cb19a62a70ded7be (patch)
treef426e3b8b9b3e5f2854f3ee16992241b66f797a2 /var
parentbc038eb7c36bbc24133311c167d4457b39de4a8a (diff)
downloadspack-a07056d67b71b7857e32fae2cb19a62a70ded7be.tar.gz
spack-a07056d67b71b7857e32fae2cb19a62a70ded7be.tar.bz2
spack-a07056d67b71b7857e32fae2cb19a62a70ded7be.tar.xz
spack-a07056d67b71b7857e32fae2cb19a62a70ded7be.zip
Add Bliss package
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/bliss/Makefile.spack.patch38
-rw-r--r--var/spack/repos/builtin/packages/bliss/package.py48
2 files changed, 86 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/bliss/Makefile.spack.patch b/var/spack/repos/builtin/packages/bliss/Makefile.spack.patch
new file mode 100644
index 0000000000..39a3a63b41
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bliss/Makefile.spack.patch
@@ -0,0 +1,38 @@
+--- old/Makefile.spack
++++ new/Makefile.spack
+@@ -0,0 +1,35 @@
++# Set PREFIX to the install location for both building and installing
++# Set GMP_PREFIX to the location where GMP is installed
++
++SRCS = \
++ bliss_C.cc \
++ defs.cc \
++ graph.cc \
++ heap.cc \
++ orbit.cc \
++ partition.cc \
++ timer.cc \
++ uintseqhash.cc \
++ utils.cc
++
++OBJS = $(SRCS:%.cc=%.lo)
++
++all: libbliss_gmp.la bliss_gmp
++
++libbliss_gmp.la: $(OBJS)
++ libtool --mode=link --tag=CXX c++ -g -O2 \
++ -rpath $(PREFIX)/lib -o $@ $^ -L$(GMP_PREFIX)/lib -lgmp
++
++bliss_gmp: bliss.lo libbliss_gmp.la
++ libtool --mode=link --tag=CXX c++ -g -O2 -o $@ $^
++
++%.lo: %.cc
++ libtool --mode=compile --tag=CXX c++ -g -O2 -DBLISS_USE_GMP -c $*.cc
++
++install:
++ mkdir -p $(PREFIX)/bin
++ mkdir -p $(PREFIX)/lib
++ libtool --mode=install cp bliss_gmp $(PREFIX)/bin/bliss_gmp
++ libtool --mode=install cp libbliss_gmp.la $(PREFIX)/lib/libbliss_gmp.la
++
++.PHONY: all install
diff --git a/var/spack/repos/builtin/packages/bliss/package.py b/var/spack/repos/builtin/packages/bliss/package.py
new file mode 100644
index 0000000000..87e9424bcf
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bliss/package.py
@@ -0,0 +1,48 @@
+##############################################################################
+# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.
+# Produced at the Lawrence Livermore National Laboratory.
+#
+# This file is part of Spack.
+# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
+# LLNL-CODE-647188
+#
+# For details, see https://github.com/llnl/spack
+# Please also see the LICENSE file for our notice and the LGPL.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License (as
+# published by the Free Software Foundation) version 2.1, February 1999.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the IMPLIED WARRANTY OF
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the terms and
+# conditions of the GNU Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+##############################################################################
+
+from spack import *
+
+class Bliss(Package):
+ """bliss: A Tool for Computing Automorphism Groups and Canonical Labelings of Graphs"""
+
+ homepage = "http://www.tcs.hut.fi/Software/bliss/"
+ url = "http://www.tcs.hut.fi/Software/bliss/bliss-0.73.zip"
+
+ # Note: Bliss can also be built without gmp, but we don't support this yet
+
+ depends_on("gmp")
+ depends_on("libtool")
+
+ version('0.73', '72f2e310786923b5c398ba0fc40b42ce')
+
+ patch("Makefile.spack.patch")
+
+ def install(self, spec, prefix):
+ # The Makefile isn't portable; use our own instead
+ makeargs = ["-f", "Makefile.spack",
+ "PREFIX=%s" % prefix, "GMP_PREFIX=%s" % spec["gmp"].prefix]
+ make(*makeargs)
+ make("install", *makeargs)