Add Bliss package

This commit is contained in:
Erik Schnetter 2016-06-18 16:20:37 -04:00
parent bc038eb7c3
commit a07056d67b
2 changed files with 86 additions and 0 deletions

View file

@ -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

View file

@ -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)