summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorChris Green <greenc@fnal.gov>2019-04-24 01:48:52 -0500
committerJavier Cervantes <javiercvilla@gmail.com>2019-04-24 08:48:52 +0200
commit1b2817ee0a4e4333ae1d97059cc32d8003c50a1d (patch)
tree5d0250e1fcdcb4e75d9da83ca82029c401d912fe /var
parentac7f9ef93d788120714859eb21e4c0d78f90643e (diff)
downloadspack-1b2817ee0a4e4333ae1d97059cc32d8003c50a1d.tar.gz
spack-1b2817ee0a4e4333ae1d97059cc32d8003c50a1d.tar.bz2
spack-1b2817ee0a4e4333ae1d97059cc32d8003c50a1d.tar.xz
spack-1b2817ee0a4e4333ae1d97059cc32d8003c50a1d.zip
root: new versions, variants and patches (#11215)
* root: new versions, variants and patches to bring in to line with FNAL's use. * Support MySQL. * Patches: * Bigger stringbuf. * Find MySQL even when it's called mariadb-c-client. * Honor external provision of unuran. * Properly handle the ROOT7 web GUI for 6.16/00. * `memstat` variant is now default-OFF due to version-related constraints. * Add missing dependencies. * Propagate `python` to `libxml2`. * Handle external FTGL dependency with X / OpenGL: depends on PR #### * Force `SPACK_INCLUDE_DIRS` to avoid warning. * New `gminimal` variant default ON per discussion with Javier Cervantes. * Style fixes per flake8. * Remove redundant `PATH_SUFFIX` per https://github.com/root-project/root/pull/1993#discussion_r276840329 * Comment patches per https://github.com/spack/spack/pull/11215#discussion_r276887199. * Reflect the fact that MariaDB support patch is now upstream. * Restore ncurses dependency for libtinfo.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/root/find-mysql.patch60
-rw-r--r--var/spack/repos/builtin/packages/root/format-stringbuf-size.patch14
-rw-r--r--var/spack/repos/builtin/packages/root/honor-unuran-switch.patch26
-rw-r--r--var/spack/repos/builtin/packages/root/package.py207
-rw-r--r--var/spack/repos/builtin/packages/root/root7-webgui.patch106
5 files changed, 337 insertions, 76 deletions
diff --git a/var/spack/repos/builtin/packages/root/find-mysql.patch b/var/spack/repos/builtin/packages/root/find-mysql.patch
new file mode 100644
index 0000000000..230da73d7f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/root/find-mysql.patch
@@ -0,0 +1,60 @@
+diff --git a/cmake/modules/FindMySQL.cmake b/cmake/modules/FindMySQL.cmake
+index c818f5a..755da92 100644
+--- a/cmake/modules/FindMySQL.cmake
++++ b/cmake/modules/FindMySQL.cmake
+@@ -10,11 +10,18 @@ if(MYSQL_INCLUDE_DIR OR MYSQL_)
+ endif()
+
+ if(NOT WIN32)
+- find_program(MYSQL_CONFIG_EXECUTABLE mysql_config
+- /usr/bin/
+- /usr/local/bin
+- ${MYSQL_DIR}/bin $ENV{MYSQL_DIR}/bin
+- )
++ # Split into two find_program invocations to avoid user-specified
++ # mariadb_config being overridden by system mysql_config.
++ find_program(MYSQL_CONFIG_EXECUTABLE NAMES mysql_config mariadb_config
++ PATH_SUFFIXES bin
++ NO_DEFAULT_PATH
++ HINTS ${MYSQL_DIR} $ENV{MYSQL_DIR}
++ )
++ # Will not overwrite if MYSQL_CONFIG_EXECUTABLE is already set.
++ find_program(MYSQL_CONFIG_EXECUTABLE NAMES mysql_config mariadb_config
++ PATH_SUFFIXES bin
++ PATHS /usr/local /usr
++ )
+ endif()
+
+ if(MYSQL_CONFIG_EXECUTABLE)
+@@ -26,17 +33,22 @@ if(MYSQL_CONFIG_EXECUTABLE)
+ execute_process(COMMAND ${MYSQL_CONFIG_EXECUTABLE} --libs OUTPUT_VARIABLE MYSQL_LIBRARIES OUTPUT_STRIP_TRAILING_WHITESPACE)
+ else()
+ find_path(MYSQL_INCLUDE_DIR mysql.h
+- /usr/local/mysql/include
+- /usr/local/include/mysql
+- /usr/local/include
+- /usr/include/mysql
+- /usr/include
+- /usr/mysql/include
+- $ENV{MYSQL_DIR}/include
+- )
++ PATH_SUFFIXES include/mysql include/mariadb
++ HINTS ${MYSQL_DIR} $ENV{MYSQL_DIR}
++ NO_DEFAULT_PATH
++ )
++ if (NOT MYSQL_INCLUDE_DIR)
++ find_path(MYSQL_INCLUDE_DIR mysql.h
++ PATH_SUFFIXES include/mysql include/mariadb
++ PATHS /usr/local/mysql /usr/local /usr
++ )
++ endif()
+ set(MYSQL_NAMES mysqlclient mysqlclient_r)
+ find_library(MYSQL_LIBRARY NAMES ${MYSQL_NAMES}
+- PATHS /usr/local/mysql/lib /usr/local/lib /usr/lib $ENV{MYSQL_DIR}/lib $ENV{MYSQL_DIR}/lib/opt
++ PATH_SUFFIXES lib lib/mariadb lib/mysql
++ lib/opt lib/opt/mariadb lib/opt/mysql
++ HINTS ${MYSQL_DIR} $ENV{MYSQL_DIR}
++ PATHS /usr/local/mysql /usr/local /usr
+ )
+ set(MYSQL_LIBRARIES ${MYSQL_LIBRARY})
+ endif()
diff --git a/var/spack/repos/builtin/packages/root/format-stringbuf-size.patch b/var/spack/repos/builtin/packages/root/format-stringbuf-size.patch
new file mode 100644
index 0000000000..5cb507ab20
--- /dev/null
+++ b/var/spack/repos/builtin/packages/root/format-stringbuf-size.patch
@@ -0,0 +1,14 @@
+diff -Naur core/base/src/TString.cxx core/base/src/TString.cxx
+--- core/base/src/TString.cxx 2016-02-03 03:15:51.000000000 -0600
++++ core/base/src/TString.cxx 2016-02-22 16:51:35.283316959 -0600
+@@ -2397,8 +2397,8 @@
+
+ static char *Format(const char *format, va_list ap)
+ {
+- static const int cb_size = 4096;
+- static const int fld_size = 2048;
++ static const int cb_size = 3*4096;
++ static const int fld_size = 3*2048;
+
+ // a circular formating buffer
+ TTHREAD_TLS_ARRAY(char,cb_size,gFormbuf); // gFormbuf[cb_size]; // some slob for form overflow
diff --git a/var/spack/repos/builtin/packages/root/honor-unuran-switch.patch b/var/spack/repos/builtin/packages/root/honor-unuran-switch.patch
new file mode 100644
index 0000000000..1ea73d80be
--- /dev/null
+++ b/var/spack/repos/builtin/packages/root/honor-unuran-switch.patch
@@ -0,0 +1,26 @@
+From 20be628aeb0e2548693966b560fdde3e8d19c2d0 Mon Sep 17 00:00:00 2001
+From: Guilherme Amadio <amadio@cern.ch>
+Date: Tue, 8 May 2018 15:12:55 +0200
+Subject: [PATCH] Do not search for unuran or enable builtin_unuran if
+ unuran=OFF
+
+---
+ cmake/modules/SearchInstalledSoftware.cmake | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake
+index f69158e..b47ba34 100644
+--- a/cmake/modules/SearchInstalledSoftware.cmake
++++ b/cmake/modules/SearchInstalledSoftware.cmake
+@@ -60,7 +60,7 @@ if(builtin_zlib)
+ endif()
+
+ #---Check for Unuran ------------------------------------------------------------------
+-if(NOT builtin_unuran)
++if(unuran AND NOT builtin_unuran)
+ message(STATUS "Looking for Unuran")
+ find_Package(Unuran)
+ if(NOT UNURAN_FOUND)
+--
+1.8.3.1
+
diff --git a/var/spack/repos/builtin/packages/root/package.py b/var/spack/repos/builtin/packages/root/package.py
index 9d0f4937ff..312ccff330 100644
--- a/var/spack/repos/builtin/packages/root/package.py
+++ b/var/spack/repos/builtin/packages/root/package.py
@@ -12,7 +12,7 @@ class Root(CMakePackage):
"""ROOT is a data analysis framework."""
homepage = "https://root.cern.ch"
- url = "https://root.cern/download/root_v6.14.00.source.tar.gz"
+ url = "https://root.cern/download/root_v6.16.00.source.tar.gz"
# ###################### Versions ##########################
@@ -20,29 +20,49 @@ class Root(CMakePackage):
version('master', git="https://github.com/root-project/root.git",
branch='master')
- # Development version
- version('6.15.02', sha256='2236fe4935139459239c935b2f93b3aa6bbfe92765ae9d9db9dd0b947bf19071')
+ # Development version (when more recent than production).
# Production version
version('6.16.00', sha256='2a45055c6091adaa72b977c512f84da8ef92723c30837c7e2643eecc9c5ce4d8', preferred=True)
# Old versions
+ version('6.14.08', sha256='1b63b51cfb4dc20f1f5749faac6bbd1098eccab777f8b49911257d77186c73c4')
+ version('6.14.06', sha256='0fb943b61396f282b289e35c455a9ab60126229be1bd3f04a8f00b37c13ab432')
version('6.14.04', sha256='463ec20692332a422cfb5f38c78bedab1c40ab4d81be18e99b50cf9f53f596cf')
version('6.14.02', sha256='93816519523e87ac75924178d87112d1573eaa108fc65691aea9a9dd5bc05b3e')
version('6.14.00', sha256='7946430373489310c2791ff7a3520e393dc059db1371272bcd9d9cf0df347a0b')
- version('6.13.08', sha256='353e6aab4826b981190ad45678cc7d3d9ca5ba02469e5d8aa46543ea61961139')
version('6.12.06', sha256='aedcfd2257806e425b9f61b483e25ba600eb0ea606e21262eafaa9dc745aa794')
version('6.10.08', sha256='2cd276d2ac365403c66f08edd1be62fe932a0334f76349b24d8c737c0d6dad8a')
- version('6.09.02', sha256='5348096084adea514297050884baa33f6cf6fd9e91e83e9967c6f07528588639')
version('6.08.06', sha256='ea31b047ba6fc04b0b312667349eaf1498a254ccacd212144f15ffcb3f5c0592')
version('6.06.08', sha256='7cb836282014cce822ef589cad27811eb7a86d7fad45a871fa6b0e6319ec201a')
version('6.06.06', sha256='0a7d702a130a260c72cb6ea754359eaee49a8c4531b31f23de0bfcafe3ce466b')
version('6.06.04', sha256='ab86dcc80cbd8e704099af0789e23f49469932ac4936d2291602301a7aa8795b')
version('6.06.02', sha256='18a4ce42ee19e1a810d5351f74ec9550e6e422b13b5c58e0c3db740cdbc569d1')
- version('5.34.36', sha256='fc868e5f4905544c3f392cc9e895ef5571a08e48682e7fe173bd44c0ba0c7dcd')
+ version('5.34.38', sha256='2c3bda69601d94836bdd88283a6585b4774eafc813deb6aa348df0af2922c4d2')
+
+ # ###################### Patches ##########################
+
+ # Widely used patch (CMS, FNAL) to increase the size of static
+ # buffers used to improve the operation of TString.
+ patch('format-stringbuf-size.patch', level=0)
+ # Support use of `mariadb-c-client` and `mariadb` to provide the
+ # MySQL API _cf_
+ # https://github.com/root-project/root/commit/9c0fa8c554a569c971185249f9acfff4418c0c13.
+ patch('find-mysql.patch', level=1, when='@:6.16.00')
+ # Some ROOT versions did not honor the option to avoid building an
+ # internal version of unuran, _cf_
+ # https://github.com/root-project/ROOT/commit/3e60764f133218b6938e5aa4986de760e8f058d9.
+ patch('honor-unuran-switch.patch', level=1, when='@:6.13.99')
+ # 6.16.00 fails to handle particular build option combinations, _cf_
+ # https://github.com/root-project/ROOT/commit/e0ae0483985d90a71a6cabd10d3622dfd1c15611.
+ patch('root7-webgui.patch', level=1, when='@6.16.00')
if sys.platform == 'darwin':
+ # Resolve non-standard use of uint, _cf_
+ # https://sft.its.cern.ch/jira/browse/ROOT-7886.
patch('math_uint.patch', when='@6.06.02')
+ # Resolve circular dependency, _cf_
+ # https://sft.its.cern.ch/jira/browse/ROOT-8226.
patch('root6-60606-mathmore.patch', when='@6.06.06')
# ###################### Variants ##########################
@@ -71,6 +91,9 @@ class Root(CMakePackage):
description='Enable graphviz support')
variant('gdml', default=True,
description='Enable GDML writer and reader')
+ variant('gminimal', default=True,
+ description='Ignore most of Root\'s feature defaults except for '
+ 'basic graphic options')
variant('gsl', default=True,
description='Enable linking against shared libraries for GSL')
variant('http', default=False,
@@ -85,13 +108,13 @@ class Root(CMakePackage):
description='Build using libc++')
variant('math', default=True,
description='Build the new libMathMore extended math library')
- variant('memstat', default=True,
+ variant('memstat', default=False,
description='Enable a memory stats utility to detect memory leaks')
# Minuit must not be installed as a dependency of root
# otherwise it crashes with the internal minuit library
variant('minuit', default=True,
description='Automatically search for support libraries')
- # variant('mysql', default=False) - not supported by spack
+ variant('mysql', default=False)
variant('odbc', default=False,
description='Enable ODBC support')
variant('opengl', default=True,
@@ -148,14 +171,6 @@ class Root(CMakePackage):
variant('xrootd', default=False,
description='Build xrootd file server and its client')
- # ################# Variants dependencies ##########################
-
- # Davix variant also requires openssl support
- depends_on('openssl', when='+davix')
-
- # If not x variant, then asimage,opengl,qt4 and tiff are not needed either
- # or: if ~x then ~asimage~opengl~qt4~tiff
-
# ###################### Compiler variants ########################
variant('cxxstd',
@@ -164,19 +179,21 @@ class Root(CMakePackage):
multi=False,
description='Use the specified C++ standard when building.')
- # ###################### Dependencies ##############################
+ # ###################### Dependencies ######################
- # minimum cmake version required
depends_on('cmake@3.4.3:', type='build')
depends_on('pkgconfig', type='build')
- depends_on('lz4', when='@6.13.02:')
- depends_on('xxhash', when='@6.13.02:')
- depends_on('xz')
- depends_on('pcre')
+ depends_on('blas')
depends_on('freetype')
+ depends_on('jpeg')
+ depends_on('libice')
depends_on('libpng')
+ depends_on('lz4', when='@6.13.02:') # See cmake_args, below.
depends_on('ncurses')
+ depends_on('pcre')
+ depends_on('xxhash', when='@6.13.02:') # See cmake_args, below.
+ depends_on('xz')
depends_on('zlib')
# X-Graphics
@@ -184,9 +201,10 @@ class Root(CMakePackage):
depends_on('libxext', when="+x")
depends_on('libxft', when="+x")
depends_on('libxpm', when="+x")
+ depends_on('libsm', when="+x")
# OpenGL
- depends_on('ftgl', when="+x+opengl")
+ depends_on('ftgl@2.1.3-rc5', when="+x+opengl")
depends_on('glew', when="+x+opengl")
depends_on('gl', when="+x+opengl")
depends_on('glu', when="+x+opengl")
@@ -215,12 +233,13 @@ class Root(CMakePackage):
depends_on('kerberos', when='+kerberos')
depends_on('ldap', when='+ldap')
depends_on('libcxx', when='+libcxx')
- # depends_on('mysql', when='+mysql') - not supported
+ depends_on('mysql-client', when='+mysql')
depends_on('odbc', when='+odbc')
# depends_on('oracle', when='+oracle')
depends_on('openssl', when='+ssl')
+ depends_on('openssl', when='+davix') # Also with davix
depends_on('postgresql', when='+postgres')
- depends_on('pythia6@6:6.999+root', when='+pythia6')
+ depends_on('pythia6+root', when='+pythia6')
# depends_on('pythia@8:8.999', when='+pythia8') - not supported on Spack
depends_on('python@2.7:', when='+python', type=('build', 'run'))
depends_on('r', when='+r', type=('build', 'run'))
@@ -233,7 +252,8 @@ class Root(CMakePackage):
depends_on('vc', when='+vc')
depends_on('veccore', when='+veccore')
depends_on('vdt', when='+vdt')
- depends_on('libxml2', when='+xml')
+ depends_on('libxml2+python', when='+xml+python')
+ depends_on('libxml2~python', when='+xml~python')
depends_on('xrootd', when='+xrootd')
# depends_on('hdfs') - supported (TODO)
@@ -248,17 +268,24 @@ class Root(CMakePackage):
# depends_on('ldap')
# depends_on('rfio')
+ # ###################### Conflicts ######################
+
# I was unable to build root with any Intel compiler
# See https://sft.its.cern.ch/jira/browse/ROOT-7517
conflicts('%intel')
# Incompatible variants
conflicts('+tmva', when='~gsl', msg="TVMA requires GSL")
+ conflicts('cxxstd=11', when='+root7', msg="root7 requires at least C++14")
- def cmake_args(self):
+ # Feature removed:
+ conflicts('+memstat', when='@6.18.00:',
+ msg="Obsolete option +memstat selected.")
+ conflicts('+memstat', when='@master',
+ msg="Obsolete option +memstat selected.")
+ def cmake_args(self):
spec = self.spec
-
options = []
# #################### Base Settings #######################
@@ -274,32 +301,32 @@ class Root(CMakePackage):
'-Dbuiltin_afterimage=ON',
'-Dasimage:BOOL=ON', # if afterimage is taken from builtin
'-Dastiff:BOOL=ON', # asimage and astiff must be ON too
- '-Dbuiltin_cfitsio=OFF',
- '-Dbuiltin_davix=OFF',
- '-Dbuiltin_fftw3=OFF',
- '-Dbuiltin_freetype=OFF',
- '-Dbuiltin_ftgl=ON',
- '-Dbuiltin_gl2ps=OFF',
- '-Dbuiltin_glew=OFF',
- '-Dbuiltin_gsl=OFF',
- '-Dbuiltin_lzma=OFF',
- '-Dbuiltin_openssl=OFF',
- '-Dbuiltin_pcre=OFF',
- '-Dbuiltin_tbb=OFF',
- '-Dbuiltin_unuran=OFF',
- '-Dbuiltin_vc=OFF',
- '-Dbuiltin_vdt=OFF',
- '-Dbuiltin_veccore=OFF',
- '-Dbuiltin_xrootd=OFF',
- '-Dbuiltin_zlib=OFF'
+ '-Dbuiltin_cfitsio:BOOL=OFF',
+ '-Dbuiltin_davix:BOOL=OFF',
+ '-Dbuiltin_fftw3:BOOL=OFF',
+ '-Dbuiltin_freetype:BOOL=OFF',
+ '-Dbuiltin_ftgl:BOOL=OFF',
+ '-Dbuiltin_gl2ps:BOOL=OFF',
+ '-Dbuiltin_glew:BOOL=OFF',
+ '-Dbuiltin_gsl:BOOL=OFF',
+ '-Dbuiltin_lzma:BOOL=OFF',
+ '-Dbuiltin_openssl:BOOL=OFF',
+ '-Dbuiltin_pcre:BOOL=OFF',
+ '-Dbuiltin_tbb:BOOL=OFF',
+ '-Dbuiltin_unuran:BOOL=OFF',
+ '-Dbuiltin_vc:BOOL=OFF',
+ '-Dbuiltin_vdt:BOOL=OFF',
+ '-Dbuiltin_veccore:BOOL=OFF',
+ '-Dbuiltin_xrootd:BOOL=OFF',
+ '-Dbuiltin_zlib:BOOL=OFF'
]
# LZ4 and xxhash do not work as external deps for older versions
options.extend([
'-Dbuiltin_lz4:BOOL=%s' % (
- 'ON' if self.spec.satisfies('@:6.12.99') else 'OFF'),
+ 'ON' if self.spec.satisfies('@6.12.02:6.12.99') else 'OFF'),
'-Dbuiltin_xxhash:BOOL=%s' % (
- 'ON' if self.spec.satisfies('@:6.12.99') else 'OFF'),
+ 'ON' if self.spec.satisfies('@6.12.02:6.12.99') else 'OFF'),
])
# #################### ROOT options #######################
@@ -313,8 +340,6 @@ class Root(CMakePackage):
'ON' if '+avahi' in spec else 'OFF'),
'-Dcocoa:BOOL=%s' % (
'ON' if '+aqua' in spec else 'OFF'),
- '-Dcxx14:BOOL=%s' % (
- 'ON' if '+root7' in spec else 'OFF'),
# -Dcxxmodules=OFF # use clang C++ modules
'-Ddavix:BOOL=%s' % (
'ON' if '+davix' in spec else 'OFF'),
@@ -332,6 +357,8 @@ class Root(CMakePackage):
'ON' if '+opengl' in spec else 'OFF'),
'-Dgenvector:BOOL=%s' % (
'ON' if '+math' in spec else 'OFF'), # default ON
+ '-Dgminimal:BOOL=%s' % ( # Reduce unwanted surprises
+ 'ON' if '+gminimal' in spec else 'OFF'), # Default ON
'-Dgsl_shared:BOOL=%s' % (
'ON' if '+gsl' in spec else 'OFF'),
'-Dgviz:BOOL=%s' % (
@@ -359,7 +386,7 @@ class Root(CMakePackage):
'-Dminuit2:BOOL=%s' % (
'ON' if '+minuit' in spec else 'OFF'),
'-Dmysql:BOOL=%s' % (
- 'ON' if '+mysql' in spec else 'OFF'), # not supported
+ 'ON' if '+mysql' in spec else 'OFF'),
'-Dodbc:BOOL=%s' % (
'ON' if '+odbc' in spec else 'OFF'),
'-Dopengl:BOOL=%s' % (
@@ -377,7 +404,11 @@ class Root(CMakePackage):
'-Dpythia8:BOOL=%s' % (
'ON' if '+pythia8' in spec else 'OFF'),
'-Dpython:BOOL=%s' % (
- 'ON' if '+python' in spec else 'OFF'),
+ 'ON' if self.spec.satisfies('+python ^python@2.7:2.99.99')
+ else 'OFF'),
+ '-Dpython3:BOOL=%s' % (
+ 'ON' if self.spec.satisfies('+python ^python@3.0:')
+ else 'OFF'),
'-Dqt:BOOL=%s' % (
'ON' if '+qt4' in spec else 'OFF'),
'-Dqtgsi:BOOL=%s' % (
@@ -388,6 +419,8 @@ class Root(CMakePackage):
'ON' if '+roofit' in spec else 'OFF'),
'-Droot7:BOOL=%s' % (
'ON' if '+root7' in spec else 'OFF'), # requires C++14
+ '-Dwebui:BOOL=%s' % (
+ 'ON' if '+root7' in spec else 'OFF'), # requires root7
'-Drpath:BOOL=%s' % (
'ON' if '+rpath' in spec else 'OFF'),
'-Dshadowpw:BOOL=%s' % (
@@ -420,29 +453,29 @@ class Root(CMakePackage):
'ON' if '+xrootd' in spec else 'OFF'), # default ON
# Fixed options
- '-Dafdsmrgd=OFF', # not supported
- '-Dafs=OFF', # not supported
- '-Dalien=OFF',
- '-Dcastor=OFF', # not supported
- '-Dccache=OFF', # not supported
- '-Dchirp=OFF',
- '-Dcling=ON',
- '-Ddcache=OFF', # not supported
- '-Dgeocad=OFF', # not supported
- '-Dgfal=OFF', # not supported
- '-Dglite=OFF', # not supported
- '-Dglobus=OFF',
- '-Dgminimal=OFF',
- '-Dgnuinstall=OFF',
- '-Dhdfs=OFF', # TODO pending to add
- '-Dmonalisa=OFF', # not supported
- '-Drfio=OFF', # not supported
- '-Droottest=OFF', # requires network
- '-Druby=OFF', # unmantained upstream
- '-Druntime_cxxmodules=OFF', # use clang C++ modules, experimental
- '-Dsapdb=OFF', # option not implemented
- '-Dsrp=OFF', # option not implemented
- '-Dtcmalloc=OFF'
+ '-Dafdsmrgd:BOOL=OFF', # not supported
+ '-Dafs:BOOL=OFF', # not supported
+ '-Dalien:BOOL=OFF',
+ '-Dcastor:BOOL=OFF', # not supported
+ '-Dccache:BOOL=OFF', # not supported
+ '-Dchirp:BOOL=OFF',
+ '-Dcling:BOOL=ON',
+ '-Ddcache:BOOL=OFF', # not supported
+ '-Dgeocad:BOOL=OFF', # not supported
+ '-Dgfal:BOOL=OFF', # not supported
+ '-Dglite:BOOL=OFF', # not supported
+ '-Dglobus:BOOL=OFF',
+ '-Dgnuinstall:BOOL=OFF',
+ '-Dhdfs:BOOL=OFF', # TODO pending to add
+ '-Dmonalisa:BOOL=OFF', # not supported
+ '-Drfio:BOOL=OFF', # not supported
+ '-Droottest:BOOL=OFF', # requires network
+ '-Druby:BOOL=OFF', # unmantained upstream
+ # Use clang C++ modules, experimental
+ '-Druntime_cxxmodules:BOOL=OFF',
+ '-Dsapdb:BOOL=OFF', # option not implemented
+ '-Dsrp:BOOL=OFF', # option not implemented
+ '-Dtcmalloc:BOOL=OFF'
])
@@ -459,13 +492,35 @@ class Root(CMakePackage):
'-Dcxx{0}=ON'.format(self.spec.variants['cxxstd'].value)
)
+ if 'mysql-client' in self.spec:
+ options.append('-DCMAKE_PROGRAM_PATH={0}'.format(
+ self.spec['mysql-client'].prefix.bin))
+
+ if '+x+opengl' in self.spec:
+ options.append('-DFTGL_ROOT_DIR={0}'.format(
+ self.spec['ftgl'].prefix))
+ options.append('-DFTGL_INCLUDE_DIR={0}'.format(
+ self.spec['ftgl'].prefix.include))
+
return options
def setup_environment(self, spack_env, run_env):
+ run_env.set('ROOTSYS', self.prefix)
+ run_env.set('ROOT_VERSION', 'v{0}'.format(self.version.up_to(1)))
run_env.prepend_path('PYTHONPATH', self.prefix.lib)
- spack_env.set('SPACK_INCLUDE_DIRS', '')
+ if 'lz4' in self.spec:
+ spack_env.append_path('CMAKE_PREFIX_PATH',
+ self.spec['lz4'].prefix)
+ spack_env.set('SPACK_INCLUDE_DIRS', '', force=True)
def setup_dependent_environment(self, spack_env, run_env, dependent_spec):
spack_env.set('ROOTSYS', self.prefix)
spack_env.set('ROOT_VERSION', 'v{0}'.format(self.version.up_to(1)))
spack_env.prepend_path('PYTHONPATH', self.prefix.lib)
+ spack_env.prepend_path('PATH', self.prefix.bin)
+ spack_env.append_path('CMAKE_MODULE_PATH', '{0}/cmake'
+ .format(self.prefix))
+ run_env.set('ROOTSYS', self.prefix)
+ run_env.set('ROOT_VERSION', 'v{0}'.format(self.version.up_to(1)))
+ run_env.prepend_path('PYTHONPATH', self.prefix.lib)
+ run_env.prepend_path('PATH', self.prefix.bin)
diff --git a/var/spack/repos/builtin/packages/root/root7-webgui.patch b/var/spack/repos/builtin/packages/root/root7-webgui.patch
new file mode 100644
index 0000000000..61cf5150d3
--- /dev/null
+++ b/var/spack/repos/builtin/packages/root/root7-webgui.patch
@@ -0,0 +1,106 @@
+diff --git a/cmake/modules/CheckCompiler.cmake b/cmake/modules/CheckCompiler.cmake
+index 71f628f7f6..56d64fee43 100644
+--- a/cmake/modules/CheckCompiler.cmake
++++ b/cmake/modules/CheckCompiler.cmake
+@@ -130,10 +130,10 @@ if(cxx17)
+ endif()
+ if(root7)
+ if(cxx11)
+- message(STATUS "ROOT7 interfaces require >= cxx14 which is disabled. Switching OFF root7 option")
+- set(root7 OFF CACHE BOOL "" FORCE)
++ message(FATAL ERROR "ROOT 7 requires C++14 or higher")
++ elseif(NOT http)
++ set(http ON CACHE BOOL "(Enabled since it's needed by ROOT 7)" FORCE)
+ endif()
+- set(http ON CACHE BOOL "" FORCE)
+ endif()
+
+ #---Check for libcxx option------------------------------------------------------------
+diff --git a/cmake/modules/RootBuildOptions.cmake b/cmake/modules/RootBuildOptions.cmake
+index f1e6237592..4406549367 100644
+--- a/cmake/modules/RootBuildOptions.cmake
++++ b/cmake/modules/RootBuildOptions.cmake
+@@ -156,6 +156,7 @@ ROOT_BUILD_OPTION(qt5web OFF "Enable support for Qt5 web-based display (requires
+ ROOT_BUILD_OPTION(r OFF "Enable support for R bindings (requires R, Rcpp, and RInside)")
+ ROOT_BUILD_OPTION(rfio OFF "Enable support for RFIO (Remote File IO) for CASTOR")
+ ROOT_BUILD_OPTION(roofit ON "Build RooFit advanced fitting package")
++ROOT_BUILD_OPTION(webui ON "Build Web-based UI components of ROOT (requires C++14 standard or higher)")
+ ROOT_BUILD_OPTION(root7 OFF "Build ROOT 7 components of ROOT (requires C++14 standard or higher)")
+ ROOT_BUILD_OPTION(rpath OFF "Link libraries with built-in RPATH (run-time search path)")
+ ROOT_BUILD_OPTION(runtime_cxxmodules OFF "Enable runtime support for C++ modules")
+@@ -317,6 +318,17 @@ endforeach()
+ #---Apply root7 versus language------------------------------------------------------------------
+ if(cxx14 OR cxx17 OR cxx14_defval OR cxx17_defval)
+ set(root7_defvalue ON)
++else()
++ set(root7_defvalue OFF)
++ set(webui_defvalue OFF)
++endif()
++
++if(webui)
++ if(cxx11)
++ message(FATAL_ERROR "WebUI requires C++14 or higher")
++ elseif(NOT http)
++ set(http ON CACHE BOOL "(Enabled since it's needed by webui)" FORCE)
++ endif()
+ endif()
+
+ #---roottest option implies testing
+diff --git a/cmake/modules/SearchInstalledSoftware.cmake b/cmake/modules/SearchInstalledSoftware.cmake
+index 8273d5e382..7598ccaaeb 100644
+--- a/cmake/modules/SearchInstalledSoftware.cmake
++++ b/cmake/modules/SearchInstalledSoftware.cmake
+@@ -1599,14 +1599,16 @@ endif()
+
+
+ #------------------------------------------------------------------------------------
+-ExternalProject_Add(
+- OPENUI5
+- URL ${CMAKE_SOURCE_DIR}/net/http/openui5/openui5.tar.gz
+- URL_HASH SHA256=32e50e3e8808295c67ecb7561ea9cd9beb76dd934263170fbbd05ff59b6d501d
+- CONFIGURE_COMMAND ""
+- BUILD_COMMAND ""
+- INSTALL_COMMAND ""
+- SOURCE_DIR ${CMAKE_BINARY_DIR}/etc/http/openui5dist)
++if(webui)
++ ExternalProject_Add(
++ OPENUI5
++ URL ${CMAKE_SOURCE_DIR}/net/http/openui5/openui5.tar.gz
++ URL_HASH SHA256=32e50e3e8808295c67ecb7561ea9cd9beb76dd934263170fbbd05ff59b6d501d
++ CONFIGURE_COMMAND ""
++ BUILD_COMMAND ""
++ INSTALL_COMMAND ""
++ SOURCE_DIR ${CMAKE_BINARY_DIR}/etc/http/openui5dist)
++endif()
+
+ #---Report removed options---------------------------------------------------
+ foreach(opt afs glite sapdb srp chirp ios)
+diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
+index 499c427180..38b73b29cd 100644
+--- a/gui/CMakeLists.txt
++++ b/gui/CMakeLists.txt
+@@ -6,7 +6,7 @@ add_subdirectory(guihtml)
+ add_subdirectory(recorder)
+ add_subdirectory(sessionviewer)
+
+-if(cxx14 OR cxx17 OR root7)
++if(webui)
+ add_subdirectory(webdisplay)
+ if(cefweb)
+ add_subdirectory(cefdisplay)
+@@ -15,11 +15,10 @@ if(cxx14 OR cxx17 OR root7)
+ add_subdirectory(qt5webdisplay)
+ endif()
+ add_subdirectory(webgui6)
+-endif()
+-
+-if(root7)
+- add_subdirectory(canvaspainter)
+- add_subdirectory(fitpanelv7)
++ if(root7)
++ add_subdirectory(canvaspainter)
++ add_subdirectory(fitpanelv7)
++ endif()
+ endif()
+ if(qtgsi)
+ add_subdirectory(qtgsi)