Add MDB driver support to GDAL (#8614)
This commit is contained in:
parent
1e0c337fe9
commit
1383834d15
50
var/spack/repos/builtin/packages/commons-lang/package.py
Normal file
50
var/spack/repos/builtin/packages/commons-lang/package.py
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
##############################################################################
|
||||||
|
# Copyright (c) 2013-2018, 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/spack/spack
|
||||||
|
# Please also see the NOTICE and LICENSE files 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 CommonsLang(Package):
|
||||||
|
"""The standard Java libraries fail to provide enough methods for
|
||||||
|
manipulation of its core classes. Apache Commons Lang provides these
|
||||||
|
extra methods.
|
||||||
|
|
||||||
|
Lang provides a host of helper utilities for the java.lang API, notably
|
||||||
|
String manipulation methods, basic numerical methods, object reflection,
|
||||||
|
concurrency, creation and serialization and System properties. Additionally
|
||||||
|
it contains basic enhancements to java.util.Date and a series of utilities
|
||||||
|
dedicated to help with building methods, such as hashCode, toString and
|
||||||
|
equals."""
|
||||||
|
|
||||||
|
homepage = "http://commons.apache.org/proper/commons-lang/"
|
||||||
|
url = "https://archive.apache.org/dist/commons/lang/binaries/commons-lang-2.6-bin.tar.gz"
|
||||||
|
|
||||||
|
version('2.6', '444075803459bffebfb5e28877861d23')
|
||||||
|
version('2.4', '5ff5d890e46021a2dbd77caba80f90f2')
|
||||||
|
|
||||||
|
extends('jdk')
|
||||||
|
depends_on('java@2:', type='run')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
install('commons-lang-{0}.jar'.format(self.version), prefix)
|
49
var/spack/repos/builtin/packages/commons-lang3/package.py
Normal file
49
var/spack/repos/builtin/packages/commons-lang3/package.py
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
##############################################################################
|
||||||
|
# Copyright (c) 2013-2018, 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/spack/spack
|
||||||
|
# Please also see the NOTICE and LICENSE files 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 CommonsLang3(Package):
|
||||||
|
"""The standard Java libraries fail to provide enough methods for
|
||||||
|
manipulation of its core classes. Apache Commons Lang provides these
|
||||||
|
extra methods.
|
||||||
|
|
||||||
|
Lang provides a host of helper utilities for the java.lang API, notably
|
||||||
|
String manipulation methods, basic numerical methods, object reflection,
|
||||||
|
concurrency, creation and serialization and System properties. Additionally
|
||||||
|
it contains basic enhancements to java.util.Date and a series of utilities
|
||||||
|
dedicated to help with building methods, such as hashCode, toString and
|
||||||
|
equals."""
|
||||||
|
|
||||||
|
homepage = "http://commons.apache.org/proper/commons-lang/"
|
||||||
|
url = "https://archive.apache.org/dist/commons/lang/binaries/commons-lang3-3.7-bin.tar.gz"
|
||||||
|
|
||||||
|
version('3.7', 'c7577443639dc6efadc80f1cbc7fced5')
|
||||||
|
|
||||||
|
extends('jdk')
|
||||||
|
depends_on('java@7:', type='run')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
install('commons-lang3-{0}.jar'.format(self.version), prefix)
|
51
var/spack/repos/builtin/packages/commons-logging/package.py
Normal file
51
var/spack/repos/builtin/packages/commons-logging/package.py
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
##############################################################################
|
||||||
|
# Copyright (c) 2013-2018, 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/spack/spack
|
||||||
|
# Please also see the NOTICE and LICENSE files 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 CommonsLogging(Package):
|
||||||
|
"""When writing a library it is very useful to log information. However
|
||||||
|
there are many logging implementations out there, and a library cannot
|
||||||
|
impose the use of a particular one on the overall application that the
|
||||||
|
library is a part of.
|
||||||
|
|
||||||
|
The Logging package is an ultra-thin bridge between different logging
|
||||||
|
implementations. A library that uses the commons-logging API can be used
|
||||||
|
with any logging implementation at runtime. Commons-logging comes with
|
||||||
|
support for a number of popular logging implementations, and writing
|
||||||
|
adapters for others is a reasonably simple task."""
|
||||||
|
|
||||||
|
homepage = "http://commons.apache.org/proper/commons-logging/"
|
||||||
|
url = "http://archive.apache.org/dist/commons/logging/binaries/commons-logging-1.2-bin.tar.gz"
|
||||||
|
|
||||||
|
version('1.2', 'ac043ce7ab3374eb4ed58354a6b2c3de')
|
||||||
|
version('1.1.3', 'b132f9a1e875677ae6b449406cff2a78')
|
||||||
|
version('1.1.1', 'e5de09672af9b386c30a311654d8541a')
|
||||||
|
|
||||||
|
extends('jdk')
|
||||||
|
depends_on('java', type='run')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
install('commons-logging-{0}.jar'.format(self.version), prefix)
|
@ -83,6 +83,7 @@ class Gdal(AutotoolsPackage):
|
|||||||
variant('perl', default=False, description='Enable perl bindings')
|
variant('perl', default=False, description='Enable perl bindings')
|
||||||
variant('python', default=False, description='Enable python bindings')
|
variant('python', default=False, description='Enable python bindings')
|
||||||
variant('java', default=False, description='Include Java support')
|
variant('java', default=False, description='Include Java support')
|
||||||
|
variant('mdb', default=False, description='Include MDB driver')
|
||||||
variant('armadillo', default=False, description='Include Armadillo support for faster TPS transform computation')
|
variant('armadillo', default=False, description='Include Armadillo support for faster TPS transform computation')
|
||||||
variant('cryptopp', default=False, description='Include cryptopp support')
|
variant('cryptopp', default=False, description='Include cryptopp support')
|
||||||
variant('crypto', default=False, description='Include crypto (from openssl) support')
|
variant('crypto', default=False, description='Include crypto (from openssl) support')
|
||||||
@ -117,7 +118,7 @@ class Gdal(AutotoolsPackage):
|
|||||||
depends_on('hdf5', when='+hdf5')
|
depends_on('hdf5', when='+hdf5')
|
||||||
depends_on('kealib', when='+kea @2:')
|
depends_on('kealib', when='+kea @2:')
|
||||||
depends_on('netcdf', when='+netcdf')
|
depends_on('netcdf', when='+netcdf')
|
||||||
depends_on('jasper@1.900.1', patches=patch('uuid.patch'), when='+jasper')
|
depends_on('jasper@1.900.1', patches='uuid.patch', when='+jasper')
|
||||||
depends_on('openjpeg', when='+openjpeg')
|
depends_on('openjpeg', when='+openjpeg')
|
||||||
depends_on('xerces-c', when='+xerces')
|
depends_on('xerces-c', when='+xerces')
|
||||||
depends_on('expat', when='+expat')
|
depends_on('expat', when='+expat')
|
||||||
@ -136,7 +137,8 @@ class Gdal(AutotoolsPackage):
|
|||||||
# swig/python/setup.py
|
# swig/python/setup.py
|
||||||
depends_on('py-setuptools', type='build', when='+python')
|
depends_on('py-setuptools', type='build', when='+python')
|
||||||
depends_on('py-numpy@1.0.0:', type=('build', 'run'), when='+python')
|
depends_on('py-numpy@1.0.0:', type=('build', 'run'), when='+python')
|
||||||
depends_on('java', type=('build', 'run'), when='+java')
|
depends_on('java', type=('build', 'link', 'run'), when='+java')
|
||||||
|
depends_on('jackcess@1.2.0:1.2.999', type='run', when='+mdb')
|
||||||
depends_on('armadillo', when='+armadillo')
|
depends_on('armadillo', when='+armadillo')
|
||||||
depends_on('cryptopp', when='+cryptopp @2.1:')
|
depends_on('cryptopp', when='+cryptopp @2.1:')
|
||||||
depends_on('openssl', when='+crypto @2.3:')
|
depends_on('openssl', when='+crypto @2.3:')
|
||||||
@ -149,6 +151,8 @@ class Gdal(AutotoolsPackage):
|
|||||||
conflicts('%xl@:13.0', msg=msg)
|
conflicts('%xl@:13.0', msg=msg)
|
||||||
conflicts('%xl_r@:13.0', msg=msg)
|
conflicts('%xl_r@:13.0', msg=msg)
|
||||||
|
|
||||||
|
conflicts('+mdb', when='~java', msg='MDB driver requires Java')
|
||||||
|
|
||||||
def setup_environment(self, spack_env, run_env):
|
def setup_environment(self, spack_env, run_env):
|
||||||
# Needed to install Python bindings to GDAL installation
|
# Needed to install Python bindings to GDAL installation
|
||||||
# prefix instead of Python installation prefix.
|
# prefix instead of Python installation prefix.
|
||||||
@ -355,11 +359,24 @@ def configure_args(self):
|
|||||||
else:
|
else:
|
||||||
args.append('--with-python=no')
|
args.append('--with-python=no')
|
||||||
|
|
||||||
|
# https://trac.osgeo.org/gdal/wiki/GdalOgrInJava
|
||||||
if '+java' in spec:
|
if '+java' in spec:
|
||||||
args.append('--with-java={0}'.format(spec['java'].prefix))
|
args.extend([
|
||||||
|
'--with-java={0}'.format(spec['java'].home),
|
||||||
|
'--with-jvm-lib={0}'.format(
|
||||||
|
spec['java'].libs.directories[0]),
|
||||||
|
'--with-jvm-lib-add-rpath'
|
||||||
|
])
|
||||||
else:
|
else:
|
||||||
args.append('--with-java=no')
|
args.append('--with-java=no')
|
||||||
|
|
||||||
|
# https://trac.osgeo.org/gdal/wiki/mdbtools
|
||||||
|
# http://www.gdal.org/drv_mdb.html
|
||||||
|
if '+mdb' in spec:
|
||||||
|
args.append('--with-mdb=yes')
|
||||||
|
else:
|
||||||
|
args.append('--with-mdb=no')
|
||||||
|
|
||||||
if '+armadillo' in spec:
|
if '+armadillo' in spec:
|
||||||
args.append('--with-armadillo={0}'.format(
|
args.append('--with-armadillo={0}'.format(
|
||||||
spec['armadillo'].prefix))
|
spec['armadillo'].prefix))
|
||||||
@ -410,8 +427,6 @@ def configure_args(self):
|
|||||||
'--with-pam=no',
|
'--with-pam=no',
|
||||||
'--with-podofo=no',
|
'--with-podofo=no',
|
||||||
'--with-php=no',
|
'--with-php=no',
|
||||||
# https://trac.osgeo.org/gdal/wiki/mdbtools
|
|
||||||
'--with-mdb=no',
|
|
||||||
'--with-rasdaman=no',
|
'--with-rasdaman=no',
|
||||||
])
|
])
|
||||||
|
|
||||||
|
46
var/spack/repos/builtin/packages/jackcess/package.py
Normal file
46
var/spack/repos/builtin/packages/jackcess/package.py
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
##############################################################################
|
||||||
|
# Copyright (c) 2013-2018, 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/spack/spack
|
||||||
|
# Please also see the NOTICE and LICENSE files 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 Jackcess(Package):
|
||||||
|
"""Jackcess is a pure Java library for reading from and writing to
|
||||||
|
MS Access databases (currently supporting versions 2000-2016)."""
|
||||||
|
|
||||||
|
homepage = "http://jackcess.sourceforge.net/"
|
||||||
|
url = "https://sourceforge.net/projects/jackcess/files/jackcess/2.1.12/jackcess-2.1.12.jar"
|
||||||
|
|
||||||
|
version('2.1.12', '7d051d8dd93f2fe7e5e86389ea380619', expand=False)
|
||||||
|
version('1.2.14.3', 'ef778421c1385ac9ab4aa7edfb954caa', expand=False)
|
||||||
|
|
||||||
|
extends('jdk')
|
||||||
|
depends_on('java', type='run')
|
||||||
|
depends_on('commons-lang@2.6', when='@2.1.12', type='run')
|
||||||
|
depends_on('commons-lang@2.4', when='@1.2.14.3', type='run')
|
||||||
|
depends_on('commons-logging@1.1.3', when='@2.1.12', type='run')
|
||||||
|
depends_on('commons-logging@1.1.1', when='@1.2.14.3', type='run')
|
||||||
|
|
||||||
|
def install(self, spec, prefix):
|
||||||
|
install('jackcess-{0}.jar'.format(self.version), prefix)
|
Loading…
Reference in New Issue
Block a user