Merge remote branch 'origin/develop' into develop

This commit is contained in:
Tom Merrick 2017-05-18 13:47:50 -05:00
commit fcd3b90326
11 changed files with 343 additions and 2 deletions

View File

@ -0,0 +1,50 @@
##############################################################################
# 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 Gnupg(AutotoolsPackage):
"""GnuPG is a complete and free implementation of the OpenPGP
standard as defined by RFC4880 """
homepage = "https://gnupg.org/index.html"
url = "https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.1.21.tar.bz2"
version('2.1.21', '685ebf4c3a7134ba0209c96b18b2f064')
depends_on('libgcrypt')
depends_on('libassuan')
depends_on('libksba')
depends_on('libgpg-error')
depends_on('npth')
def configure_args(self):
args = ['--with-npth-prefix=%s' % self.spec['npth'].prefix,
'--with-libgcrypt-prefix=%s' % self.spec['libgcrypt'].prefix,
'--with-libksba-prefixx=%s' % self.spec['libksba'].prefix,
'--with-libassuan-prefix=%s' % self.spec['libassuan'].prefix,
'--with-libpgp-error-prefix=%s' %
self.spec['libgpg-error'].prefix]
return args

View File

@ -0,0 +1,41 @@
##############################################################################
# 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 Libassuan(AutotoolsPackage):
"""Libassuan is a small library implementing the so-called Assuan
protocol."""
homepage = "https://gnupg.org/software/libassuan/index.html"
url = "https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.4.3.tar.bz2"
version('2.4.3', '8e01a7c72d3e5d154481230668e6eb5a')
depends_on('libgpg-error')
def configure_args(self):
args = ['--with-libgpp-error=%s' % self.spec['libgpg-error'].prefix]
return args

View File

@ -32,8 +32,9 @@ class Libgcrypt(AutotoolsPackage):
key algorithms, large integer functions, random numbers and a lot
of supporting functions. """
homepage = "http://www.gnu.org/software/libgcrypt/"
url = "http://gd.tuwien.ac.at/pub/gnupg/libgcrypt/libgcrypt-1.6.2.tar.bz2"
url = "https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.7.6.tar.bz2"
version('1.7.6', '54e180679a7ae4d090f8689ca32b654c')
version('1.6.2', 'b54395a93cb1e57619943c082da09d5f')
depends_on("libgpg-error")

View File

@ -32,7 +32,8 @@ class LibgpgError(AutotoolsPackage):
SmartCard Daemon and possibly more in the future. """
homepage = "https://www.gnupg.org/related_software/libgpg-error"
url = "http://gd.tuwien.ac.at/pub/gnupg/libgpg-error/libgpg-error-1.18.tar.bz2"
url = "https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.27.tar.bz2"
version('1.27', '5217ef3e76a7275a2a3b569a12ddc989')
version('1.21', 'ab0b5aba6d0a185b41d07bda804fd8b2')
version('1.18', '12312802d2065774b787cbfc22cc04e9')

View File

@ -0,0 +1,41 @@
##############################################################################
# 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 Libksba(AutotoolsPackage):
"""Libksba is a library to make the tasks of working with X.509
certificates, CMS data and related objects more easy. """
homepage = "https://gnupg.org/software/libksba/index.html"
url = "https://gnupg.org/ftp/gcrypt/libksba/libksba-1.3.5.tar.bz2"
version('1.3.5', '8302a3e263a7c630aa7dea7d341f07a2')
depends_on('libgpg-error')
def configure_args(self):
args = ['--with-libgpp-error=%s' % self.spec['libgpg-error'].prefix]
return args

View File

@ -0,0 +1,35 @@
##############################################################################
# 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 Npth(AutotoolsPackage):
"""nPth is a library to provide the GNU Pth API and thus a
non-preemptive threads implementation."""
homepage = "https://gnupg.org/software/npth/index.html"
url = "https://gnupg.org/ftp/gcrypt/npth/npth-1.4.tar.bz2"
version('1.4', '76cef5542e0db6a339cf960641ed86f8')

View File

@ -0,0 +1,80 @@
##############################################################################
# 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 Openbabel(CMakePackage):
"""Open Babel is a chemical toolbox designed to speak the many languages
of chemical data. It's an open, collaborative project allowing anyone to
search, convert, analyze, or store data from molecular modeling, chemistry,
solid-state materials, biochemistry, or related areas."""
homepage = "http://openbabel.org/wiki/Main_Page"
url = "https://sourceforge.net/projects/openbabel/files/openbabel/2.4.1/openbabel-2.4.1.tar.gz"
version('2.4.1', 'd9defcd7830b0592fece4fe54a137b99')
variant('python', default=True, description='Build Python bindings')
extends('python', when='+python')
depends_on('python', type=('build', 'run'), when='+python')
depends_on('cmake@2.4.8:', type='build')
depends_on('pkg-config', type='build')
depends_on('cairo') # required to support PNG depiction
depends_on('eigen@3.0:') # required if using the language bindings
depends_on('libxml2') # required to read/write CML files, XML formats
depends_on('zlib') # required to support reading gzipped files
# Needed for Python 3.6 support
patch('python-3.6-rtld-global.patch', when='@:2.4.1+python')
# Convert tabs to spaces. Allows unit tests to pass
patch('testpdbformat-tabs-to-spaces.patch', when='@:2.4.1')
def cmake_args(self):
spec = self.spec
args = []
if '+python' in spec:
args.extend([
'-DPYTHON_BINDINGS=ON',
'-DPYTHON_EXECUTABLE={0}'.format(spec['python'].command.path),
])
else:
args.append('-DPYTHON_BINDINGS=OFF')
return args
@run_after('install')
@on_package_attributes(run_tests=True)
def check_install(self):
obabel = Executable(join_path(self.prefix.bin, 'obabel'))
obabel('-:C1=CC=CC=C1Br', '-omol')
if '+python' in self.spec:
# Attempt to import the Python modules
for module in ['openbabel', 'pybel']:
python('-c', 'import {0}'.format(module))

View File

@ -0,0 +1,42 @@
The DLFCN module has been removed from python 3.6, as it is not
documented. Same funtionality can be achive with the os module
that makes available the os.RTLD_GLOBAL variable for dlopen()
See https://github.com/openbabel/openbabel/pull/372 for the
source of this patch. The original patch only affects the CMake
file that SWIG uses to generate openbabel.py. This patch also
includes changes to openbabel.py.
diff -Nuar a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
--- a/scripts/CMakeLists.txt 2017-05-17 10:02:54.408527942 -0500
+++ b/scripts/CMakeLists.txt 2017-05-17 10:04:09.701598715 -0500
@@ -81,11 +81,8 @@
COMMAND ${SWIG_EXECUTABLE} -python -c++ -small -O -templatereduce -naturalvar -I${openbabel_SOURCE_DIR}/include -I${openbabel_BINARY_DIR}/include -o ${openbabel_SOURCE_DIR}/scripts/python/openbabel-python.cpp ${eigen_define} -outdir ${openbabel_SOURCE_DIR}/scripts/python ${openbabel_SOURCE_DIR}/scripts/openbabel-python.i
COMMAND ${CMAKE_COMMAND} -E echo "import sys" > ob.py
COMMAND ${CMAKE_COMMAND} -E echo "if sys.platform.find('linux'\) != -1:" >> ob.py
- COMMAND ${CMAKE_COMMAND} -E echo " try:" >> ob.py
- COMMAND ${CMAKE_COMMAND} -E echo " import dl" >> ob.py
- COMMAND ${CMAKE_COMMAND} -E echo " except ImportError:" >> ob.py
- COMMAND ${CMAKE_COMMAND} -E echo " import DLFCN as dl" >> ob.py
- COMMAND ${CMAKE_COMMAND} -E echo " sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL)" >> ob.py
+ COMMAND ${CMAKE_COMMAND} -E echo " import os" >> ob.py
+ COMMAND ${CMAKE_COMMAND} -E echo " sys.setdlopenflags(sys.getdlopenflags() | os.RTLD_GLOBAL)" >> ob.py
COMMAND cat ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py >> ob.py
COMMAND ${CMAKE_COMMAND} -E copy ob.py ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py
COMMAND ${CMAKE_COMMAND} -E remove ob.py
diff -Nuar a/scripts/python/openbabel.py b/scripts/python/openbabel.py
--- a/scripts/python/openbabel.py 2017-05-17 10:02:54.398527534 -0500
+++ b/scripts/python/openbabel.py 2017-05-17 10:04:26.705292138 -0500
@@ -1,10 +1,7 @@
import sys
if sys.platform.find('linux') != -1:
- try:
- import dl
- except ImportError:
- import DLFCN as dl
- sys.setdlopenflags(sys.getdlopenflags() | dl.RTLD_GLOBAL)
+ import os
+ sys.setdlopenflags(sys.getdlopenflags() | os.RTLD_GLOBAL)
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.10
#

View File

@ -0,0 +1,47 @@
From 08cd38485d4cf1df8802da540f3018921dbc735e Mon Sep 17 00:00:00 2001
From: "Adam J. Stewart" <ajstewart426@gmail.com>
Date: Wed, 17 May 2017 10:56:23 -0500
Subject: [PATCH] Convert tabs to spaces in testpdbformat.py
See https://github.com/openbabel/openbabel/pull/1568
---
test/testpdbformat.py | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/testpdbformat.py b/test/testpdbformat.py
index 40bd316..ceb8496 100644
--- a/test/testpdbformat.py
+++ b/test/testpdbformat.py
@@ -24,12 +24,12 @@ class TestPDBFormat(BaseTest):
def testInsertionCodes(self):
"""
- Testing a PDB entry with insertion codes to distinguish residues
- upon conversion to FASTA.
+ Testing a PDB entry with insertion codes to distinguish residues
+ upon conversion to FASTA.
"""
self.canFindExecutable("babel")
- self.entryPDBwithInsertioncodes="""ATOM 406 N VAL L 29 58.041 17.797 48.254 1.00 0.00 N
+ self.entryPDBwithInsertioncodes="""ATOM 406 N VAL L 29 58.041 17.797 48.254 1.00 0.00 N
ATOM 407 CA VAL L 29 57.124 18.088 47.170 1.00 0.00 C
ATOM 408 C VAL L 29 55.739 17.571 47.538 1.00 0.00 C
ATOM 409 O VAL L 29 55.535 16.362 47.550 1.00 0.00 O
@@ -100,9 +100,9 @@ ATOM 473 HE1 TYR L 32 48.512 15.775 42.066 1.00 0.00 H
ATOM 474 HE2 TYR L 32 48.145 19.172 44.648 1.00 0.00 H
ATOM 475 HH TYR L 32 46.462 17.658 44.280 1.00 0.00 H
"""
- output, error = run_exec(self.entryPDBwithInsertioncodes,
- "babel -ipdb -ofasta")
- self.assertEqual(output.rstrip().rsplit("\n",1)[1], "VSSSY")
+ output, error = run_exec(self.entryPDBwithInsertioncodes,
+ "babel -ipdb -ofasta")
+ self.assertEqual(output.rstrip().rsplit("\n",1)[1], "VSSSY")
if __name__ == "__main__":
testsuite = []
--
2.9.4

View File

@ -531,6 +531,8 @@ def setup_dependent_package(self, module, dependent_spec):
module.site_packages_dir = join_path(dependent_spec.prefix,
self.site_packages_dir)
self.spec.home = self.home
# Make the site packages directory for extensions
if dependent_spec.package.is_extension:
mkdirp(module.site_packages_dir)

View File

@ -44,6 +44,7 @@ class Root(CMakePackage):
version('6.06.06', '4308449892210c8d36e36924261fea26')
version('6.06.04', '55a2f98dd4cea79c9c4e32407c2d6d17')
version('6.06.02', 'e9b8b86838f65b0a78d8d02c66c2ec55')
version('5.34.36', '6a1ad549b3b79b10bbb1f116b49067ee')
if sys.platform == 'darwin':
patch('math_uint.patch', when='@6.06.02')