Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Spack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
eic_tools
Spack
Commits
70bb1f17
Commit
70bb1f17
authored
8 years ago
by
Adam J. Stewart
Browse files
Options
Downloads
Patches
Plain Diff
Reduce number of variants, just use system or no-system libs
parent
b47357d7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
var/spack/repos/builtin/packages/cmake/package.py
+18
-25
18 additions, 25 deletions
var/spack/repos/builtin/packages/cmake/package.py
var/spack/repos/builtin/packages/libarchive/package.py
+12
-39
12 additions, 39 deletions
var/spack/repos/builtin/packages/libarchive/package.py
with
30 additions
and
64 deletions
var/spack/repos/builtin/packages/cmake/package.py
+
18
−
25
View file @
70bb1f17
...
@@ -42,25 +42,19 @@ class Cmake(Package):
...
@@ -42,25 +42,19 @@ class Cmake(Package):
version
(
'
3.0.2
'
,
'
db4c687a31444a929d2fdc36c4dfb95f
'
)
version
(
'
3.0.2
'
,
'
db4c687a31444a929d2fdc36c4dfb95f
'
)
version
(
'
2.8.10.2
'
,
'
097278785da7182ec0aea8769d06860c
'
)
version
(
'
2.8.10.2
'
,
'
097278785da7182ec0aea8769d06860c
'
)
variant
(
'
curl
'
,
default
=
True
,
description
=
'
Build external curl library
'
)
variant
(
'
ownlibs
'
,
default
=
False
,
description
=
'
Use CMake-provided third-party libraries
'
)
variant
(
'
expat
'
,
default
=
True
,
description
=
'
Build external expat library
'
)
# variant('jsoncpp', default=True, description='Build external jsoncpp library') # NOQA: ignore=E501
variant
(
'
zlib
'
,
default
=
True
,
description
=
'
Build external zlib library
'
)
variant
(
'
bzip2
'
,
default
=
True
,
description
=
'
Build external bzip2 library
'
)
variant
(
'
xz
'
,
default
=
True
,
description
=
'
Build external lzma library
'
)
variant
(
'
archive
'
,
default
=
True
,
description
=
'
Build external archive library
'
)
variant
(
'
qt
'
,
default
=
False
,
description
=
'
Enables the build of cmake-gui
'
)
variant
(
'
qt
'
,
default
=
False
,
description
=
'
Enables the build of cmake-gui
'
)
variant
(
'
doc
'
,
default
=
False
,
description
=
'
Enables the generation of html and man page documentation
'
)
variant
(
'
doc
'
,
default
=
False
,
description
=
'
Enables the generation of html and man page documentation
'
)
variant
(
'
openssl
'
,
default
=
True
,
description
=
"
Enables CMake
'
s OpenSSL features
"
)
variant
(
'
openssl
'
,
default
=
True
,
description
=
"
Enables CMake
'
s OpenSSL features
"
)
variant
(
'
ncurses
'
,
default
=
True
,
description
=
'
Enables the build of the ncurses gui
'
)
variant
(
'
ncurses
'
,
default
=
True
,
description
=
'
Enables the build of the ncurses gui
'
)
depends_on
(
'
curl
'
,
when
=
'
+curl
'
)
depends_on
(
'
curl
'
,
when
=
'
~ownlibs
'
)
depends_on
(
'
expat
'
,
when
=
'
+expat
'
)
depends_on
(
'
expat
'
,
when
=
'
~ownlibs
'
)
# depends_on('jsoncpp', when='
+jsoncpp
') # circular dependency
# depends_on('jsoncpp', when='
~ownlibs
') # circular dependency
depends_on
(
'
zlib
'
,
when
=
'
+z
lib
'
)
depends_on
(
'
zlib
'
,
when
=
'
~own
lib
s
'
)
depends_on
(
'
bzip2
'
,
when
=
'
+bzip2
'
)
depends_on
(
'
bzip2
'
,
when
=
'
~ownlibs
'
)
depends_on
(
'
xz
'
,
when
=
'
+xz
'
)
depends_on
(
'
xz
'
,
when
=
'
~ownlibs
'
)
depends_on
(
'
libarchive
'
,
when
=
'
+archive
'
)
depends_on
(
'
libarchive
'
,
when
=
'
~ownlibs
'
)
depends_on
(
'
qt
'
,
when
=
'
+qt
'
)
depends_on
(
'
qt
'
,
when
=
'
+qt
'
)
depends_on
(
'
python@2.7.11:
'
,
when
=
'
+doc
'
,
type
=
'
build
'
)
depends_on
(
'
python@2.7.11:
'
,
when
=
'
+doc
'
,
type
=
'
build
'
)
depends_on
(
'
py-sphinx
'
,
when
=
'
+doc
'
,
type
=
'
build
'
)
depends_on
(
'
py-sphinx
'
,
when
=
'
+doc
'
,
type
=
'
build
'
)
...
@@ -92,22 +86,21 @@ def install(self, spec, prefix):
...
@@ -92,22 +86,21 @@ def install(self, spec, prefix):
# Consistency check
# Consistency check
self
.
validate
(
spec
)
self
.
validate
(
spec
)
def
variant_to_bool
(
variant
):
return
'
system
'
if
variant
in
spec
else
'
no-system
'
# configure, build, install:
options
=
[
options
=
[
'
--prefix={0}
'
.
format
(
prefix
),
'
--prefix={0}
'
.
format
(
prefix
),
'
--parallel={0}
'
.
format
(
make_jobs
),
'
--parallel={0}
'
.
format
(
make_jobs
),
'
--{0}-curl
'
.
format
(
variant_to_bool
(
'
+curl
'
)),
# jsoncpp requires CMake to build
'
--{0}-expat
'
.
format
(
variant_to_bool
(
'
+expat
'
)),
# use CMake-provided library to avoid circular dependency
'
--{0}-jsoncpp
'
.
format
(
variant_to_bool
(
'
+jsoncpp
'
)),
'
--no-system-jsoncpp
'
'
--{0}-zlib
'
.
format
(
variant_to_bool
(
'
+zlib
'
)),
'
--{0}-bzip2
'
.
format
(
variant_to_bool
(
'
+bzip2
'
)),
'
--{0}-liblzma
'
.
format
(
variant_to_bool
(
'
+xz
'
)),
'
--{0}-libarchive
'
.
format
(
variant_to_bool
(
'
+archive
'
))
]
]
if
'
+ownlibs
'
in
spec
:
# Build and link to the CMake-provided third-party libraries
options
.
append
(
'
--no-system-libs
'
)
else
:
# Build and link to the Spack-installed third-party libraries
options
.
append
(
'
--system-libs
'
)
if
'
+qt
'
in
spec
:
if
'
+qt
'
in
spec
:
options
.
append
(
'
--qt-gui
'
)
options
.
append
(
'
--qt-gui
'
)
else
:
else
:
...
...
This diff is collapsed.
Click to expand it.
var/spack/repos/builtin/packages/libarchive/package.py
+
12
−
39
View file @
70bb1f17
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
class
Libarchive
(
Package
):
class
Libarchive
(
Package
):
"""
libarchive: C library and command-line tools for reading and
"""
libarchive: C library and command-line tools for reading and
writing tar, cpio, zip, ISO, and other archive formats.
"""
writing tar, cpio, zip, ISO, and other archive formats.
"""
homepage
=
"
http://www.libarchive.org
"
homepage
=
"
http://www.libarchive.org
"
url
=
"
http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz
"
url
=
"
http://www.libarchive.org/downloads/libarchive-3.1.2.tar.gz
"
...
@@ -36,47 +37,19 @@ class Libarchive(Package):
...
@@ -36,47 +37,19 @@ class Libarchive(Package):
version
(
'
3.1.1
'
,
'
1f3d883daf7161a0065e42a15bbf168f
'
)
version
(
'
3.1.1
'
,
'
1f3d883daf7161a0065e42a15bbf168f
'
)
version
(
'
3.1.0
'
,
'
095a287bb1fd687ab50c85955692bf3a
'
)
version
(
'
3.1.0
'
,
'
095a287bb1fd687ab50c85955692bf3a
'
)
variant
(
'
zlib
'
,
default
=
True
,
description
=
'
Build support for gzip through zlib
'
)
depends_on
(
'
zlib
'
)
variant
(
'
bzip2
'
,
default
=
True
,
description
=
'
Build support for bzip2 through bz2lib
'
)
depends_on
(
'
bzip2
'
)
variant
(
'
lzma
'
,
default
=
True
,
description
=
'
Build support for lzma through lzmadec
'
)
depends_on
(
'
lzma
'
)
variant
(
'
lz4
'
,
default
=
True
,
description
=
'
Build support for lz4 through liblz4
'
)
depends_on
(
'
lz4
'
)
variant
(
'
xz
'
,
default
=
True
,
description
=
'
Build support for xz through lzma
'
)
depends_on
(
'
xz
'
)
variant
(
'
lzo
'
,
default
=
True
,
description
=
'
Build support for lzop through liblzo2
'
)
depends_on
(
'
lzo
'
)
variant
(
'
nettle
'
,
default
=
True
,
description
=
'
Build with crypto support from Nettle
'
)
depends_on
(
'
nettle
'
)
variant
(
'
openssl
'
,
default
=
True
,
description
=
'
Build support for mtree and xar hashes through openssl
'
)
depends_on
(
'
openssl
'
)
variant
(
'
libxml2
'
,
default
=
True
,
description
=
'
Build support for xar through libxml2
'
)
depends_on
(
'
libxml2
'
)
variant
(
'
expat
'
,
default
=
True
,
description
=
'
Build support for xar through expat
'
)
depends_on
(
'
expat
'
)
depends_on
(
'
zlib
'
,
when
=
'
+zlib
'
)
depends_on
(
'
bzip2
'
,
when
=
'
+bzip2
'
)
depends_on
(
'
lzma
'
,
when
=
'
+lzma
'
)
depends_on
(
'
lz4
'
,
when
=
'
+lz4
'
)
depends_on
(
'
xz
'
,
when
=
'
+xz
'
)
depends_on
(
'
lzo
'
,
when
=
'
+lzo
'
)
depends_on
(
'
nettle
'
,
when
=
'
+nettle
'
)
depends_on
(
'
openssl
'
,
when
=
'
+openssl
'
)
depends_on
(
'
libxml2
'
,
when
=
'
+libxml2
'
)
depends_on
(
'
expat
'
,
when
=
'
+expat
'
)
def
install
(
self
,
spec
,
prefix
):
def
install
(
self
,
spec
,
prefix
):
def
variant_to_bool
(
variant
):
configure
(
'
--prefix={0}
'
.
format
(
prefix
))
return
'
with
'
if
variant
in
spec
else
'
without
'
config_args
=
[
'
--prefix={0}
'
.
format
(
prefix
),
'
--{0}-zlib
'
.
format
(
variant_to_bool
(
'
+zlib
'
)),
'
--{0}-bz2lib
'
.
format
(
variant_to_bool
(
'
+bzip2
'
)),
'
--{0}-lzmadec
'
.
format
(
variant_to_bool
(
'
+lzma
'
)),
'
--{0}-lz4
'
.
format
(
variant_to_bool
(
'
+lz4
'
)),
'
--{0}-lzma
'
.
format
(
variant_to_bool
(
'
+xz
'
)),
'
--{0}-lzo2
'
.
format
(
variant_to_bool
(
'
+lzo
'
)),
'
--{0}-nettle
'
.
format
(
variant_to_bool
(
'
+nettle
'
)),
'
--{0}-openssl
'
.
format
(
variant_to_bool
(
'
+openssl
'
)),
'
--{0}-xml2
'
.
format
(
variant_to_bool
(
'
+libxml2
'
)),
'
--{0}-expat
'
.
format
(
variant_to_bool
(
'
+expat
'
))
]
configure
(
*
config_args
)
make
()
make
()
# make('check') # cannot build test suite with Intel compilers
# make('check') # cannot build test suite with Intel compilers
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment