[xerces-c] add netaccessor variant, new version (#19927)
* [xerces-c] add netaccessor variant, new version * [geant4] add xerces-c netaccessor requirement * [xerces-c] format
This commit is contained in:
parent
8752fc5872
commit
ee5ae14a3b
@ -66,7 +66,7 @@ class Geant4(CMakePackage):
|
|||||||
when='@10.3.3: cxxstd=' + std)
|
when='@10.3.3: cxxstd=' + std)
|
||||||
|
|
||||||
# Spack only supports Xerces-c 3 and above, so no version req
|
# Spack only supports Xerces-c 3 and above, so no version req
|
||||||
depends_on('xerces-c cxxstd=' + std, when='cxxstd=' + std)
|
depends_on('xerces-c netaccessor=curl cxxstd=' + std, when='cxxstd=' + std)
|
||||||
|
|
||||||
# Vecgeom specific versions for each Geant4 version
|
# Vecgeom specific versions for each Geant4 version
|
||||||
depends_on('vecgeom@1.1.5 cxxstd=' + std,
|
depends_on('vecgeom@1.1.5 cxxstd=' + std,
|
||||||
|
@ -17,6 +17,7 @@ class XercesC(AutotoolsPackage):
|
|||||||
homepage = "https://xerces.apache.org/xerces-c"
|
homepage = "https://xerces.apache.org/xerces-c"
|
||||||
url = "https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.2.1.tar.bz2"
|
url = "https://archive.apache.org/dist/xerces/c/3/sources/xerces-c-3.2.1.tar.bz2"
|
||||||
|
|
||||||
|
version('3.2.3', sha256='45c2329e684405f2b8854ecbddfb8d5b055cdf0fe4d35736cc352c504989bbb6')
|
||||||
version('3.2.2', sha256='1f2a4d1dbd0086ce0f52b718ac0fa4af3dc1ce7a7ff73a581a05fbe78a82bce0')
|
version('3.2.2', sha256='1f2a4d1dbd0086ce0f52b718ac0fa4af3dc1ce7a7ff73a581a05fbe78a82bce0')
|
||||||
version('3.2.1', sha256='a36b6e162913ec218cfb84772d2535d43c3365355a601d45d4b8ce11f0ece0da')
|
version('3.2.1', sha256='a36b6e162913ec218cfb84772d2535d43c3365355a601d45d4b8ce11f0ece0da')
|
||||||
version('3.1.4', sha256='9408f12c1628ecf80730bedbe8b2caad810edd01bb4c66f77b60c873e8cc6891')
|
version('3.1.4', sha256='9408f12c1628ecf80730bedbe8b2caad810edd01bb4c66f77b60c873e8cc6891')
|
||||||
@ -31,6 +32,14 @@ class XercesC(AutotoolsPackage):
|
|||||||
multi=False,
|
multi=False,
|
||||||
description='Use the specified C++ standard when building')
|
description='Use the specified C++ standard when building')
|
||||||
|
|
||||||
|
variant('netaccessor',
|
||||||
|
default='curl',
|
||||||
|
# todo: add additional values (platform-specific)
|
||||||
|
# 'socket', 'cfurl', 'winsock'
|
||||||
|
values=('curl', 'none'),
|
||||||
|
multi=False,
|
||||||
|
description='Net Accessor (used to access network resources')
|
||||||
|
|
||||||
# It's best to be explicit about the transcoder or else xerces may
|
# It's best to be explicit about the transcoder or else xerces may
|
||||||
# choose another value.
|
# choose another value.
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
@ -47,6 +56,7 @@ class XercesC(AutotoolsPackage):
|
|||||||
|
|
||||||
depends_on('iconv', type='link', when='transcoder=gnuiconv')
|
depends_on('iconv', type='link', when='transcoder=gnuiconv')
|
||||||
depends_on('icu4c', type='link', when='transcoder=icu')
|
depends_on('icu4c', type='link', when='transcoder=icu')
|
||||||
|
depends_on('curl', when='netaccessor=curl')
|
||||||
|
|
||||||
# Pass flags to configure. This is necessary for CXXFLAGS or else
|
# Pass flags to configure. This is necessary for CXXFLAGS or else
|
||||||
# the xerces default will override the spack wrapper.
|
# the xerces default will override the spack wrapper.
|
||||||
@ -67,7 +77,12 @@ def flag_handler(self, name, flags):
|
|||||||
|
|
||||||
def configure_args(self):
|
def configure_args(self):
|
||||||
spec = self.spec
|
spec = self.spec
|
||||||
args = ['--disable-network']
|
args = []
|
||||||
|
|
||||||
|
if 'netaccessor=curl' in spec:
|
||||||
|
args.append('--enable-netaccessor-curl')
|
||||||
|
else:
|
||||||
|
args.append('--disable-network')
|
||||||
|
|
||||||
if 'transcoder=gnuiconv' in spec:
|
if 'transcoder=gnuiconv' in spec:
|
||||||
args.append('--enable-transcoder-gnuiconv')
|
args.append('--enable-transcoder-gnuiconv')
|
||||||
|
Loading…
Reference in New Issue
Block a user