From 29a53ee6a25d15be2f8bcf69f6ea37847fd5104c Mon Sep 17 00:00:00 2001
From: Lukas Krupcik <lukas.krupcik@vsb.cz>
Date: Fri, 17 Mar 2017 09:27:42 +0100
Subject: [PATCH] Anselm ... GNU/6.3.0/2.27

---
 c/CGAL/CGAL-4.8.1-intel-2017a.eb              |  34 ++
 .../CORALbenchmark-1.00-foss-2016a.eb         |  16 +
 c/cURL/cURL-7.53.1.eb                         |  21 ++
 e/EasyBuild/EasyBuild-3.1.1-test.eb           |  39 +++
 e/EasyBuild/EasyBuild-3.1.1-test2.eb          |  39 +++
 e/Eigen/Eigen-3.2.9.eb                        |  13 +
 g/GEOS/GEOS-3.5.0.eb                          |  14 +
 g/GNU/GNU-6.3.0-2.27.eb                       |  20 ++
 ...S-5.1.4-foss-2016a-hybrid-single-PLUMED.eb |   2 +-
 g/git/git-2.12.0.eb                           |  37 +++
 l/LSMS/LSMS-3_rev237-foss-2015g.eb            |  32 ++
 l/LSMS/LSMS-3_rev237-foss-2016a.eb            |  31 ++
 l/LSMS/LSMS-Makefiles.patch                   | 106 +++++++
 l/Lmod/Lmod-7.3.28.eb                         |  28 ++
 l/libGLU/libGLU-9.0.0-intel-2017a.eb          |  24 ++
 m/METIS/METIS-5.1.0.eb                        |  24 ++
 m/MPFR/MPFR-3.1.4-intel-2017a.eb              |  28 ++
 m/Mesa/Mesa-11.1.2-intel-2017a.eb             |  68 ++++
 o/ORCA/ORCA-4_0_0-linux_x86-64.eb             |  39 +++
 o/OpenFOAM/OpenFOAM-4.1-cleanup.patch         | 291 ++++++++++++++++++
 o/OpenFOAM/OpenFOAM-4.1-intel-2017a.eb        |  36 +++
 o/OpenMPI/OpenMPI-1.10.2-GCC-4.9.3-2.25.eb    |   5 +
 o/osm2pgsql/osm2pgsql-0.92.0-intel-2017a.eb   |  42 +++
 o/osm2pgsql/osm2pgsql-0.92.0_fix.patch        |  13 +
 p/PROJ_4/PROJ_4-4.9.2.eb                      |  15 +
 p/ParaView/ParaView-5.1.2-intel-2017a-mpi.eb  |  50 +++
 q/QBOX/QBOX-r140b-foss-2016a.eb               |  28 ++
 q/QBOX/QBOX-r140b_fix.patch                   |  40 +++
 q/Qt5/Qt5-5.7.0-intel-2017a.eb                |  56 ++++
 29 files changed, 1190 insertions(+), 1 deletion(-)
 create mode 100644 c/CGAL/CGAL-4.8.1-intel-2017a.eb
 create mode 100644 c/CORALbenchmark/CORALbenchmark-1.00-foss-2016a.eb
 create mode 100644 c/cURL/cURL-7.53.1.eb
 create mode 100644 e/EasyBuild/EasyBuild-3.1.1-test.eb
 create mode 100644 e/EasyBuild/EasyBuild-3.1.1-test2.eb
 create mode 100644 e/Eigen/Eigen-3.2.9.eb
 create mode 100644 g/GEOS/GEOS-3.5.0.eb
 create mode 100644 g/GNU/GNU-6.3.0-2.27.eb
 create mode 100644 g/git/git-2.12.0.eb
 create mode 100644 l/LSMS/LSMS-3_rev237-foss-2015g.eb
 create mode 100644 l/LSMS/LSMS-3_rev237-foss-2016a.eb
 create mode 100644 l/LSMS/LSMS-Makefiles.patch
 create mode 100644 l/Lmod/Lmod-7.3.28.eb
 create mode 100644 l/libGLU/libGLU-9.0.0-intel-2017a.eb
 create mode 100644 m/METIS/METIS-5.1.0.eb
 create mode 100644 m/MPFR/MPFR-3.1.4-intel-2017a.eb
 create mode 100644 m/Mesa/Mesa-11.1.2-intel-2017a.eb
 create mode 100644 o/ORCA/ORCA-4_0_0-linux_x86-64.eb
 create mode 100644 o/OpenFOAM/OpenFOAM-4.1-cleanup.patch
 create mode 100644 o/OpenFOAM/OpenFOAM-4.1-intel-2017a.eb
 create mode 100644 o/osm2pgsql/osm2pgsql-0.92.0-intel-2017a.eb
 create mode 100644 o/osm2pgsql/osm2pgsql-0.92.0_fix.patch
 create mode 100644 p/PROJ_4/PROJ_4-4.9.2.eb
 create mode 100644 p/ParaView/ParaView-5.1.2-intel-2017a-mpi.eb
 create mode 100644 q/QBOX/QBOX-r140b-foss-2016a.eb
 create mode 100644 q/QBOX/QBOX-r140b_fix.patch
 create mode 100644 q/Qt5/Qt5-5.7.0-intel-2017a.eb

diff --git a/c/CGAL/CGAL-4.8.1-intel-2017a.eb b/c/CGAL/CGAL-4.8.1-intel-2017a.eb
new file mode 100644
index 00000000..9f940415
--- /dev/null
+++ b/c/CGAL/CGAL-4.8.1-intel-2017a.eb
@@ -0,0 +1,34 @@
+name = 'CGAL'
+version = '4.8.1'
+
+homepage = 'http://www.cgal.org/'
+description = """The goal of the CGAL Open Source Project is to provide easy access to efficient
+ and reliable geometric algorithms in the form of a C++ library."""
+
+toolchain = {'name': 'intel', 'version': '2017a'}
+toolchainopts = {'strict': True}
+
+source_urls = ['https://github.com/CGAL/cgal/releases/download/releases%2FCGAL-%(version)s']
+sources = [SOURCE_TAR_XZ]
+
+dependencies = [
+    ('zlib', '1.2.11', '', True),
+    ('Boost', '1.63.0'),
+    ('MPFR', '3.1.4'),
+    ('GMP', '6.1.1'),
+    ('libGLU', '9.0.0'),
+    ('Qt5', '5.7.0'),
+]
+
+builddependencies = [
+    ('CMake', '3.7.2', '', True),
+    ('Eigen', '3.2.9', '', True),
+]
+
+configopts = "-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include\;$EBROOTLIBGLU/include "
+configopts += "-DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s " % SHLIB_EXT
+configopts += "-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s " % SHLIB_EXT
+configopts += "-DWITH_ZLIB=ON -DWITH_MPFR=ON -DWITH_OpenGL=ON -DWITH_Eigen3=ON "
+configopts += "-DWITH_GMPXX=ON -DWITH_LAPACK=ON -DWITH_BLAS=ON "
+
+moduleclass = 'numlib'
diff --git a/c/CORALbenchmark/CORALbenchmark-1.00-foss-2016a.eb b/c/CORALbenchmark/CORALbenchmark-1.00-foss-2016a.eb
new file mode 100644
index 00000000..613b4b6f
--- /dev/null
+++ b/c/CORALbenchmark/CORALbenchmark-1.00-foss-2016a.eb
@@ -0,0 +1,16 @@
+easyblock = 'Toolchain'
+
+name = 'CORALbenchmark'
+version = '1.00'
+
+homepage = 'https://asc.llnl.gov/CORAL-benchmarks'
+description = 'Benchmark Codes'
+
+toolchain = {'name': 'foss', 'version': '2016a'}
+
+dependencies = [
+    ('QBOX', 'r140b'),
+    ('LSMS', '3_rev237'),
+]
+
+moduleclass = 'tools'
diff --git a/c/cURL/cURL-7.53.1.eb b/c/cURL/cURL-7.53.1.eb
new file mode 100644
index 00000000..96a3b1be
--- /dev/null
+++ b/c/cURL/cURL-7.53.1.eb
@@ -0,0 +1,21 @@
+easyblock = 'ConfigureMake'
+
+name = 'cURL'
+version = '7.53.1'
+
+homepage = 'http://curl.haxx.se'
+description = 'libcurl is a free and easy-to-use client-side URL transfer library'
+
+toolchain = {'name': 'dummy', 'version': ''}
+
+sources = [SOURCELOWER_TAR_GZ]
+source_urls = ['http://curl.haxx.se/download/']
+
+osdependencies = [('openssl-devel', 'libssl-dev', 'libopenssl-devel')]
+
+sanity_check_paths = {
+    'files': ['bin/curl', 'lib/libcurl.a', 'lib/libcurl.%s' % SHLIB_EXT],
+    'dirs': ['lib/pkgconfig'],
+}
+
+moduleclass = 'tools'
diff --git a/e/EasyBuild/EasyBuild-3.1.1-test.eb b/e/EasyBuild/EasyBuild-3.1.1-test.eb
new file mode 100644
index 00000000..1874c44e
--- /dev/null
+++ b/e/EasyBuild/EasyBuild-3.1.1-test.eb
@@ -0,0 +1,39 @@
+easyblock = 'EB_EasyBuildMeta'
+
+name = 'EasyBuild'
+version = '3.1.1'
+versionsuffix = 'test-python'
+
+homepage = 'http://hpcugent.github.com/easybuild/'
+description = """EasyBuild is a software build and installation framework
+ written in Python that allows you to install software in a structured,
+ repeatable and robust way."""
+
+toolchain = {'name': 'dummy', 'version': 'dummy'}
+
+source_urls = [
+    # vsc-install
+    'https://pypi.python.org/packages/ef/c7/640c6d791ba452321c0d1371b6626486bb495e0645bb896d33c78a09f810',
+    # vsc-base
+    'https://pypi.python.org/packages/da/90/ee40b1a6a5bfed24139042c737500a9b45db0373a6735e76481fc860fe37',
+    # easybuild-framework
+    'https://pypi.python.org/packages/f2/19/1c79b1ad24f0004e9507f12d4222367611f42ac479abd6315a50a23c52f5',
+    # easybuild-easyblocks
+    'https://pypi.python.org/packages/87/aa/2a19f05c78dd2550f7bd42ef0964b9c51c5626c1e715c2ee0a4f778780b8',
+    # easybuild-easyconfigs
+    'https://pypi.python.org/packages/e6/68/5e977f549bf04b8cd87cdc5179d8b36c1eb971cfe3c43f98053f2dbe9c64',
+]
+# order matters a lot, to avoid having dependencies auto-resolved (--no-deps easy_install option doesn't work?)
+sources = [
+    'vsc-install-0.10.25.tar.gz',
+    'vsc-base-2.5.7.tar.gz',
+    'easybuild-framework-%(version)s.tar.gz',
+    'easybuild-easyblocks-%(version)s.tar.gz',
+    'easybuild-easyconfigs-%(version)s.tar.gz',
+]
+
+# EasyBuild is a (set of) Python packages, so it depends on Python
+# usually, we want to use the system Python, so no actual Python dependency is listed
+allow_system_deps = [('Python', SYS_PYTHON_VERSION)]
+
+moduleclass = 'tools'
diff --git a/e/EasyBuild/EasyBuild-3.1.1-test2.eb b/e/EasyBuild/EasyBuild-3.1.1-test2.eb
new file mode 100644
index 00000000..ba7fa7a7
--- /dev/null
+++ b/e/EasyBuild/EasyBuild-3.1.1-test2.eb
@@ -0,0 +1,39 @@
+easyblock = 'EB_EasyBuildMeta'
+
+name = 'EasyBuild'
+version = '3.1.1'
+versionsuffix = '-test-python2'
+
+homepage = 'http://hpcugent.github.com/easybuild/'
+description = """EasyBuild is a software build and installation framework
+ written in Python that allows you to install software in a structured,
+ repeatable and robust way."""
+
+toolchain = {'name': 'dummy', 'version': 'dummy'}
+
+source_urls = [
+    # vsc-install
+    'https://pypi.python.org/packages/ef/c7/640c6d791ba452321c0d1371b6626486bb495e0645bb896d33c78a09f810',
+    # vsc-base
+    'https://pypi.python.org/packages/da/90/ee40b1a6a5bfed24139042c737500a9b45db0373a6735e76481fc860fe37',
+    # easybuild-framework
+    'https://pypi.python.org/packages/f2/19/1c79b1ad24f0004e9507f12d4222367611f42ac479abd6315a50a23c52f5',
+    # easybuild-easyblocks
+    'https://pypi.python.org/packages/87/aa/2a19f05c78dd2550f7bd42ef0964b9c51c5626c1e715c2ee0a4f778780b8',
+    # easybuild-easyconfigs
+    'https://pypi.python.org/packages/e6/68/5e977f549bf04b8cd87cdc5179d8b36c1eb971cfe3c43f98053f2dbe9c64',
+]
+# order matters a lot, to avoid having dependencies auto-resolved (--no-deps easy_install option doesn't work?)
+sources = [
+    'vsc-install-0.10.25.tar.gz',
+    'vsc-base-2.5.7.tar.gz',
+    'easybuild-framework-%(version)s.tar.gz',
+    'easybuild-easyblocks-%(version)s.tar.gz',
+    'easybuild-easyconfigs-%(version)s.tar.gz',
+]
+
+# EasyBuild is a (set of) Python packages, so it depends on Python
+# usually, we want to use the system Python, so no actual Python dependency is listed
+allow_system_deps = [('Python', SYS_PYTHON_VERSION)]
+
+moduleclass = 'tools'
diff --git a/e/Eigen/Eigen-3.2.9.eb b/e/Eigen/Eigen-3.2.9.eb
new file mode 100644
index 00000000..6f0a11f1
--- /dev/null
+++ b/e/Eigen/Eigen-3.2.9.eb
@@ -0,0 +1,13 @@
+name = 'Eigen'
+version = '3.2.9'
+
+homepage = 'http://eigen.tuxfamily.org/index.php?title=Main_Page'
+description = """Eigen is a C++ template library for linear algebra:
+ matrices, vectors, numerical solvers, and related algorithms."""
+
+toolchain = {'name': 'dummy', 'version': ''}
+
+source_urls = ['http://bitbucket.org/%(namelower)s/%(namelower)s/get']
+sources = ['%(version)s.tar.bz2']
+
+moduleclass = 'math'
diff --git a/g/GEOS/GEOS-3.5.0.eb b/g/GEOS/GEOS-3.5.0.eb
new file mode 100644
index 00000000..90e7396d
--- /dev/null
+++ b/g/GEOS/GEOS-3.5.0.eb
@@ -0,0 +1,14 @@
+easyblock = 'ConfigureMake'
+
+name = 'GEOS'
+version = '3.5.0'
+
+homepage = 'http://trac.osgeo.org/geos'
+description = """GEOS (Geometry Engine - Open Source) is a C++ port of the  Java Topology Suite (JTS)"""
+
+source_urls = [ 'http://download.osgeo.org/geos/' ]
+sources = [SOURCELOWER_TAR_BZ2]
+
+toolchain = {'name': 'dummy', 'version': ''}
+
+moduleclass = 'math'
diff --git a/g/GNU/GNU-6.3.0-2.27.eb b/g/GNU/GNU-6.3.0-2.27.eb
new file mode 100644
index 00000000..584edd6b
--- /dev/null
+++ b/g/GNU/GNU-6.3.0-2.27.eb
@@ -0,0 +1,20 @@
+easyblock = 'Toolchain'
+
+name = 'GNU'
+gccver = '6.3.0'
+binutilsver = '2.27'
+version = '%s-%s' % (gccver, binutilsver)
+
+homepage = 'http://www.gnu.org/software/'
+description = "Compiler-only toolchain with GCC and binutils."
+
+toolchain = {'name': 'dummy', 'version': 'dummy'}
+
+dependencies = [
+    # GCC built on top of (dummy-built) binutils
+    ('GCC', gccver, '-%s' % binutilsver),
+    # binutils built on top of GCC, which was built on top of (dummy-built) binutils
+    ('binutils', binutilsver, '', ('GCCcore', '%s' % gccver)),
+]
+
+moduleclass = 'toolchain'
diff --git a/g/GROMACS/GROMACS-5.1.4-foss-2016a-hybrid-single-PLUMED.eb b/g/GROMACS/GROMACS-5.1.4-foss-2016a-hybrid-single-PLUMED.eb
index 2cc82d43..5ca7c6c1 100644
--- a/g/GROMACS/GROMACS-5.1.4-foss-2016a-hybrid-single-PLUMED.eb
+++ b/g/GROMACS/GROMACS-5.1.4-foss-2016a-hybrid-single-PLUMED.eb
@@ -12,7 +12,7 @@ toolchainopts = {'openmp': True, 'usempi': True}
 source_urls = ['ftp://ftp.gromacs.org/pub/gromacs/']
 sources = [SOURCELOWER_TAR_GZ]
 
-preconfigopts = 'plumed patch -p -e gromacs-5.1.4 --shared &&'
+preconfigopts = 'plumed patch -p -e gromacs-5.1.4 &&'
 
 configopts = ' -DGMX_GPU=OFF  -DBUILD_SHARED_LIBS=OFF  -DGMX_PREFER_STATIC_LIBS=ON -DGMX_DOUBLE=OFF  -DGMX_SIMD=AVX2_256  -DGMX_BUILD_OWN_FFTW=ON  -DGMX_MPI=ON'
 
diff --git a/g/git/git-2.12.0.eb b/g/git/git-2.12.0.eb
new file mode 100644
index 00000000..d86dd4ed
--- /dev/null
+++ b/g/git/git-2.12.0.eb
@@ -0,0 +1,37 @@
+easyblock = 'ConfigureMake'
+
+name = 'git'
+version = '2.12.0'
+
+homepage = 'http://git-scm.com/'
+description = """Git is a free and open source distributed version control system designed
+to handle everything from small to very large projects with speed and efficiency."""
+
+toolchain = {'name': 'dummy', 'version': ''}
+
+source_urls = ['https://www.kernel.org/pub/software/scm/git/']
+sources = ['%(name)s-%(version)s.tar.gz']
+
+builddependencies = [
+    ('Autoconf', '2.69')
+]
+
+dependencies = [
+    ('cURL', '7.53.1'),
+    ('expat', '2.1.0'),
+    ('gettext','0.19.8'),
+    ('Perl', '5.20.2', '-bare'),
+]
+
+preconfigopts = 'make configure && '
+
+# Work around git build system bug.  If LIBS contains -lpthread, then configure
+# will not append -lpthread to LDFLAGS, but Makefile ignores LIBS.
+configopts = "--with-perl=${EBROOTPERL}/bin/perl --enable-pthreads='-lpthread'"
+
+sanity_check_paths = {
+    'files': ['bin/git'],
+    'dirs': [],
+}
+
+moduleclass = 'tools'
diff --git a/l/LSMS/LSMS-3_rev237-foss-2015g.eb b/l/LSMS/LSMS-3_rev237-foss-2015g.eb
new file mode 100644
index 00000000..54e8542a
--- /dev/null
+++ b/l/LSMS/LSMS-3_rev237-foss-2015g.eb
@@ -0,0 +1,32 @@
+easyblock = 'MakeCp'
+
+name = 'LSMS'
+version = '3_rev237'
+
+homepage = 'https://asc.llnl.gov/CORAL-benchmarks/#lsms'
+description = "LSMS benchmark, part of CORAL suite"
+
+toolchain = {'name': 'foss', 'version': '2015g' }
+
+source_urls = ['https://asc.llnl.gov/CORAL-benchmarks/Science/']
+sources = ['%(name)s_%(version)s.tar.bz2']
+
+checksums = ['8c864c9223b93488663815557e61cd0b']
+
+patches = ['LSMS-Makefiles.patch']
+
+#files_to_copy = ['bin/lsms', 'bin/wl-lsms']
+files_to_copy = ['bin']
+
+buildopts = '-j 1'
+
+dependencies = [ 
+    ('HDF5', '1.8.16'), 
+]
+
+sanity_check_paths = {
+    'files': ['bin/lsms', 'bin/wl-lsms'],
+    'dirs': [],
+}
+                                                                                                                                                   
+moduleclass = 'tools'
diff --git a/l/LSMS/LSMS-3_rev237-foss-2016a.eb b/l/LSMS/LSMS-3_rev237-foss-2016a.eb
new file mode 100644
index 00000000..fa65d19e
--- /dev/null
+++ b/l/LSMS/LSMS-3_rev237-foss-2016a.eb
@@ -0,0 +1,31 @@
+easyblock = 'MakeCp'
+
+name = 'LSMS'
+version = '3_rev237'
+
+homepage = 'https://asc.llnl.gov/CORAL-benchmarks/#lsms'
+description = "LSMS benchmark, part of CORAL suite"
+
+toolchain = {'name': 'foss', 'version': '2016a' }
+
+source_urls = ['https://asc.llnl.gov/CORAL-benchmarks/Science/']
+sources = ['%(name)s_%(version)s.tar.bz2']
+
+checksums = ['8c864c9223b93488663815557e61cd0b']
+
+patches = ['LSMS-Makefiles.patch']
+
+files_to_copy = ['bin']
+
+buildopts = '-j 1'
+
+dependencies = [ 
+    ('HDF5', '1.8.16'), 
+]
+
+sanity_check_paths = {
+    'files': ['bin/lsms', 'bin/wl-lsms'],
+    'dirs': [],
+}
+                                                                                                                                                   
+moduleclass = 'tools'
diff --git a/l/LSMS/LSMS-Makefiles.patch b/l/LSMS/LSMS-Makefiles.patch
new file mode 100644
index 00000000..5c1f5e59
--- /dev/null
+++ b/l/LSMS/LSMS-Makefiles.patch
@@ -0,0 +1,106 @@
+--- LSMS_3_rev237/CBLAS/Makefile	2012-02-09 20:17:00.000000000 +0100
++++ LSMS_3_rev237_working/CBLAS/Makefile	2017-03-09 15:44:39.524649760 +0100
+@@ -1,6 +1,29 @@
+ dlvl = ./.
+ include $(dlvl)/Makefile.in
+-include ../architecture.h
++
++# export USE_GPTL=1
++export USE_OPENMP=1
++
++export ADD_LIBS += -L$(TOP_DIR)/lua/lib -L$(TOP_DIR)/CBLAS/lib/ -lcblas_LINUX -lmpi -lmpi_cxx -lhdf5 -lgfortran -lopenblas $(FPMPI_POST_LINK_OPTS)
++
++export INC_PATH += -I $(TOP_DIR)/CBLAS/include -I $(TOP_DIR)/lua/include
++
++export ADDITIONAL_TARGETS = CBLAS_target
++
++export BOOST_ROOT=$(TOP_DIR)
++
++
++ifdef USE_OPENMP
++  export CXX += -g -std=c++11 -I$(BOOST_ROOT) -fopenmp
++  #export CXX=CC -I$(BOOST_ROOT) -DUSE_PAPI -fopenmp
++  #export F77=ftn  -fopenmp
++  export F77 += -fopenmp
++else
++  export CXX += -std=c++11 -I$(BOOST_ROOT)
++  #export CXX=CC -I$(BOOST_ROOT) -DUSE_PAPI
++  #export F77=ftn 
++endif
++export LUACXX = $(CXX)
+ 
+ all: alllib alltst 
+ 
+--- LSMS_3_rev237/src/Test/buildKKRMatrixTest/Makefile	2012-02-15 19:41:17.000000000 +0100
++++ LSMS_3_rev237_working/src/Test/buildKKRMatrixTest/Makefile	2017-03-09 15:47:04.088863802 +0100
+@@ -3,7 +3,29 @@
+ export INC_PATH =
+ export LIBS :=
+ 
+-include $(TOP_DIR)/architecture.h
++# export USE_GPTL=1
++export USE_OPENMP=1
++
++export ADD_LIBS += -L$(TOP_DIR)/lua/lib -L$(TOP_DIR)/CBLAS/lib/ -lcblas_LINUX -lmpi -lmpi_cxx -lhdf5 -lgfortran -lopenblas $(FPMPI_POST_LINK_OPTS)
++
++export INC_PATH += -I $(TOP_DIR)/CBLAS/include -I $(TOP_DIR)/lua/include
++
++export ADDITIONAL_TARGETS = CBLAS_target
++
++export BOOST_ROOT=$(TOP_DIR)
++
++
++ifdef USE_OPENMP
++  export CXX += -g -std=c++11 -I$(BOOST_ROOT) -fopenmp
++  #export CXX=CC -I$(BOOST_ROOT) -DUSE_PAPI -fopenmp
++  #export F77=ftn  -fopenmp
++  export F77 += -fopenmp
++else
++  export CXX += -std=c++11 -I$(BOOST_ROOT)
++  #export CXX=CC -I$(BOOST_ROOT) -DUSE_PAPI
++  #export F77=ftn 
++endif
++export LUACXX = $(CXX)
+ 
+ export INC_PATH += -I $(TOP_DIR)/include -I $(TOP_DIR)/src
+ export MISC = $(TOP_DIR)/src/Misc
+--- LSMS_3_rev237/Makefile	2017-03-09 15:47:50.699882415 +0100
++++ LSMS_3_rev237_working/Makefile	2017-03-09 14:58:44.845436772 +0100
+@@ -1,10 +1,35 @@
+ 
+ export TOP_DIR = $(shell pwd)
+-export INC_PATH =
+ # export LIBS := -L$(TOP_DIR)/lua/lib -llua $(TOP_DIR)/mjson/mjson.a
+ export LIBS := $(TOP_DIR)/lua/lib/liblua.a $(TOP_DIR)/mjson/mjson.a
+ 
+-include architecture.h 
++export CC = gcc
++export CXX = g++
++export F77 = gfortran
++
++# export USE_GPTL=1
++export USE_OPENMP=1
++
++export ADD_LIBS += -L$(TOP_DIR)/lua/lib -L$(TOP_DIR)/CBLAS/lib/ -lcblas_LINUX -lmpi -lmpi_cxx -lhdf5 -lgfortran -lopenblas $(FPMPI_POST_LINK_OPTS)
++
++export INC_PATH += -I $(TOP_DIR)/CBLAS/include -I $(TOP_DIR)/lua/include
++
++export ADDITIONAL_TARGETS = CBLAS_target
++
++export BOOST_ROOT=$(TOP_DIR)
++
++
++ifdef USE_OPENMP
++  export CXX += -g -std=c++11 -I$(BOOST_ROOT) -fopenmp
++  #export CXX=CC -I$(BOOST_ROOT) -DUSE_PAPI -fopenmp
++  #export F77=ftn  -fopenmp
++  export F77 += -fopenmp
++else
++  export CXX += -std=c++11 -I$(BOOST_ROOT)
++  #export CXX=CC -I$(BOOST_ROOT) -DUSE_PAPI
++  #export F77=ftn 
++endif
++export LUACXX = $(CXX)
+ 
+ 
+ all: liblua $(ADDITIONAL_TARGETS) libmjson LSMS
diff --git a/l/Lmod/Lmod-7.3.28.eb b/l/Lmod/Lmod-7.3.28.eb
new file mode 100644
index 00000000..23d8386f
--- /dev/null
+++ b/l/Lmod/Lmod-7.3.28.eb
@@ -0,0 +1,28 @@
+easyblock = 'ConfigureMake'
+
+name = "Lmod"
+version = "7.3.28"
+
+homepage = "http://sourceforge.net/projects/lmod/"
+description = """Lmod is a Lua based module system. Modules allow for dynamic modification
+ of a user's environment under Unix systems. See www.tacc.utexas.edu/tacc-projects/lmod
+ for a complete description. Lmod is a new implementation that easily handles the MODULEPATH
+ Hierarchical problem. It is drop-in replacement for TCL/C modules and reads TCL modulefiles directly."""
+
+toolchain = {'name': 'dummy', 'version': ''}
+
+sources = ['%(version)s.tar.gz']
+source_urls = [
+    'https://github.com/TACC/Lmod/archive',
+    'http://sourceforge.net/projects/lmod/files/',
+    'http://sourceforge.net/projects/lmod/files/Testing'
+]
+
+dependencies = [("Lua", "5.1.4-8")]
+
+sanity_check_paths = {
+    'files': ["lmod/%(version)s/libexec/lmod", "lmod/%(version)s/init/profile"],
+    'dirs': []
+}
+
+moduleclass = "tools"
diff --git a/l/libGLU/libGLU-9.0.0-intel-2017a.eb b/l/libGLU/libGLU-9.0.0-intel-2017a.eb
new file mode 100644
index 00000000..3a15334c
--- /dev/null
+++ b/l/libGLU/libGLU-9.0.0-intel-2017a.eb
@@ -0,0 +1,24 @@
+easyblock = 'ConfigureMake'
+
+name = 'libGLU'
+version = '9.0.0'
+
+homepage = 'ftp://ftp.freedesktop.org/pub/mesa/glu/'
+description = """The OpenGL Utility Library (GLU) is a computer graphics library for OpenGL. """
+
+toolchain = {'name': 'intel', 'version': '2017a'}
+toolchainopts = {'pic': True}
+
+source_urls = ['ftp://ftp.freedesktop.org/pub/mesa/glu/']
+sources = ['glu-%(version)s.tar.bz2']
+
+dependencies = [
+    ('Mesa', '11.1.2'),
+]
+
+sanity_check_paths = {
+    'files': ['lib/libGLU.so.1'],
+    'dirs': [],
+}
+
+moduleclass = 'vis'
diff --git a/m/METIS/METIS-5.1.0.eb b/m/METIS/METIS-5.1.0.eb
new file mode 100644
index 00000000..28604b45
--- /dev/null
+++ b/m/METIS/METIS-5.1.0.eb
@@ -0,0 +1,24 @@
+name = 'METIS'
+version = '5.1.0'
+
+homepage = 'http://glaros.dtc.umn.edu/gkhome/metis/metis/overview'
+description = """METIS is a set of serial programs for partitioning graphs, partitioning finite element meshes,
+ and producing fill reducing orderings for sparse matrices. The algorithms implemented in METIS are based on the
+ multilevel recursive-bisection, multilevel k-way, and multi-constraint partitioning schemes."""
+
+toolchain = {'name': 'dummy', 'version': ''}
+toolchainopts = {'optarch': True, 'pic': True}
+
+sources = [SOURCELOWER_TAR_GZ]
+source_urls = [
+    'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis',
+    'http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/OLD',
+]
+
+builddependencies = [
+    ('CMake', '3.7.2')
+]
+
+configopts = ['', 'shared=1']
+
+moduleclass = 'math'
diff --git a/m/MPFR/MPFR-3.1.4-intel-2017a.eb b/m/MPFR/MPFR-3.1.4-intel-2017a.eb
new file mode 100644
index 00000000..882accac
--- /dev/null
+++ b/m/MPFR/MPFR-3.1.4-intel-2017a.eb
@@ -0,0 +1,28 @@
+easyblock = 'ConfigureMake'
+
+name = 'MPFR'
+version = '3.1.4'
+
+homepage = 'http://www.mpfr.org'
+description = """The MPFR library is a C library for multiple-precision 
+ floating-point computations with correct rounding."""
+
+toolchain = {'name': 'intel', 'version': '2017a'}
+
+source_urls = ['http://www.mpfr.org/mpfr-%(version)s/']
+sources = [SOURCELOWER_TAR_BZ2]
+
+patches = ['MPFR_ictce_remove-deprecated-mp.patch']
+
+dependencies = [
+    ('GMP', '6.1.1', '' , True)
+]
+
+runtest = 'check'
+
+sanity_check_paths = {
+    'files': ['lib/libmpfr.%s' % SHLIB_EXT, 'include/mpfr.h'],
+    'dirs': []
+}
+
+moduleclass = 'math'
diff --git a/m/Mesa/Mesa-11.1.2-intel-2017a.eb b/m/Mesa/Mesa-11.1.2-intel-2017a.eb
new file mode 100644
index 00000000..6f7f3a57
--- /dev/null
+++ b/m/Mesa/Mesa-11.1.2-intel-2017a.eb
@@ -0,0 +1,68 @@
+easyblock = 'ConfigureMake'
+
+name = 'Mesa'
+version = '11.1.2'
+
+homepage = 'http://www.mesa3d.org/'
+description = """Mesa is an open-source implementation of the OpenGL specification -
+ a system for rendering interactive 3D graphics."""
+
+toolchain = {'name': 'intel', 'version': '2017a'}
+toolchainopts = {'optarch': True}
+
+sources = [SOURCELOWER_TAR_GZ]
+source_urls = [
+    'ftp://ftp.freedesktop.org/pub/mesa/%(version)s',
+    'ftp://ftp.freedesktop.org/pub/mesa/older-versions/%(version_major)s.x/%(version)s',
+]
+
+builddependencies = [
+    ('flex', '2.6.0'),
+    ('Bison', '3.0.4'),
+    ('Autotools', '20150215'),
+    ('pkg-config', '0.29'),
+    ('glproto', '1.4.17'),
+    ('kbproto', '1.0.7'),
+    ('libpthread-stubs', '0.3'),
+    ('xextproto', '7.3.0'),
+    ('xproto', '7.0.28'),
+    ('makedepend', '1.0.5'),
+]
+
+dependencies = [
+    ('libxml2', '2.9.3'),
+    ('libdrm', '2.4.67'),
+    ('libX11', '1.6.3',),
+    ('libXext', '1.3.3'),
+    ('libXfixes', '5.0.1'),
+    ('libXdamage', '1.1.4'),
+    ('libXfont', '1.5.1'),
+    ('LLVM', '3.7.1'),
+    ('eudev', '3.1.5'),
+]
+
+# Use the os provided libudev or the EB provided eudev
+#osdependencies = ['libudev']
+
+# GLU is not part anymore of Mesa package!
+configopts = " --disable-osmesa --enable-gallium-osmesa --enable-gallium-llvm --enable-glx --disable-dri"
+configopts += " --enable-xlib-glx --disable-driglx-direct --with-gallium-drivers='swrast' --disable-egl"
+configopts += " --with-osmesa-bits=32 --enable-texture-float "
+
+# package-config files for os dependencies are in an os specific place
+#preconfigopts = 'libtoolize && PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib64/pkgconfig/:/usr/share/pkgconfig" '
+preconfigopts = ' libtoolize &&  '
+
+prebuildopts = 'env CPATH="$EBROOTLIBDRM/include/libdrm:$CPATH" '
+
+sanity_check_paths = {
+    'files': ['lib/libGL.%s' % SHLIB_EXT, 'lib/libOSMesa.%s' % SHLIB_EXT, 'lib/libGLESv1_CM.%s' % SHLIB_EXT,
+              'lib/libGLESv2.%s' %SHLIB_EXT, 'include/GL/glext.h', 'include/GL/gl_mangle.h', 'include/GL/glx.h',
+              'include/GL/osmesa.h', 'include/GL/wglext.h', 'include/GL/gl.h', 'include/GL/glxext.h',
+              'include/GL/glx_mangle.h', 'include/GLES/gl.h', 'include/GLES2/gl2.h', 'include/GLES3/gl3.h'],
+    'dirs': []
+}
+
+maxparallel = 1
+
+moduleclass = 'vis'
diff --git a/o/ORCA/ORCA-4_0_0-linux_x86-64.eb b/o/ORCA/ORCA-4_0_0-linux_x86-64.eb
new file mode 100644
index 00000000..2575f813
--- /dev/null
+++ b/o/ORCA/ORCA-4_0_0-linux_x86-64.eb
@@ -0,0 +1,39 @@
+easyblock = "PackedBinary"
+
+name = "ORCA"
+version = '4_0_0-linux_x86-64'
+
+homepage = 'http://cec.mpg.de/forum/'
+description = """ORCA is a flexible, efficient and easy-to-use general purpose tool for quantum chemistry
+ with specific emphasis on spectroscopic properties of open-shell molecules.
+  It features a wide variety of standard quantum chemical methods ranging from semiempirical methods to DFT to single-
+ and multireference correlated ab initio methods.
+ It can also treat environmental and relativistic effects."""
+
+toolchain = {'name': 'dummy', 'version': ''}
+
+sources = ['%%(namelower)s_%s_%s.tbz' % (version.split('-')[0], '-'.join(version.split('-')[1:]))]
+
+# ORCA 4.0.0 is compiled only against OpenMPI 2.0.2 for Linux
+dependencies = [
+    ('OpenMPI', '2.0.2', '-GCC-6.3.0-2.27')
+]
+
+sanity_check_paths = {
+    'files': ['orca_%s%s' % (x, y) for x in ['anoint', 'casscf', 'cis', 'cleanup', 'cpscf',
+                                             'eprnmr', 'gtoint', 'mdci', 'mp2', 'mrci', 'pc',
+                                             'rocis', 'scf', 'scfgrad', 'soc']
+              for y in ["", "_mpi"]] +
+    ['orca_%s' % x for x in ['2mkl', 'asa', 'chelpg', 'ciprep', 'eca', 'ecplib',
+                             'euler', 'fci', 'fitpes', 'gstep', 'loc', 'mapspc',
+                                      'md', 'mergefrag', 'ndoint', 'numfreq', 'plot',
+                                      'pltvib', 'pop', 'rel', 'vib', 'vpot']], 
+    'dirs': [],
+}
+
+modextravars = {
+    "SLURM_CPU_BIND" : "none",
+    "RSH_COMMAND"    : "ssh -x",
+}
+
+moduleclass = 'chem'
diff --git a/o/OpenFOAM/OpenFOAM-4.1-cleanup.patch b/o/OpenFOAM/OpenFOAM-4.1-cleanup.patch
new file mode 100644
index 00000000..76297bd6
--- /dev/null
+++ b/o/OpenFOAM/OpenFOAM-4.1-cleanup.patch
@@ -0,0 +1,291 @@
+# This patch removes all need for the ThirdParty files of OpenFOAM:
+# we use EB dependencies for everything. It adjusts the paths, variables, etc
+# We also let the install dir, compiler, etc be set by EB.
+# Lastly, we also fix a small compile issue in 'ptscotchDecomp.C'
+# Ward Poelmans <wpoely86@gmail.com>
+diff -ur OpenFOAM-4.1.orig/applications/utilities/mesh/manipulation/setSet/Allwmake OpenFOAM-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake
+--- OpenFOAM-4.1.orig/applications/utilities/mesh/manipulation/setSet/Allwmake	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/applications/utilities/mesh/manipulation/setSet/Allwmake	2016-09-02 15:44:36.305512075 +0200
+@@ -9,11 +9,11 @@
+ #
+ # use readline if available
+ #
+-if [ -f /usr/include/readline/readline.h ]
++if [ -f $EBROOTLIBREADLINE/include/readline/readline.h ]
+ then
+     echo "Found <readline/readline.h>  --  enabling readline support."
+     export COMP_FLAGS="-DHAS_READLINE"
+-    export LINK_FLAGS="-lreadline"
++    export LINK_FLAGS="-L$EBROOTLIBREADLINE/lib -lreadline -L$EBROOTNCURSES -lncurses"
+ fi
+
+ wmake
+diff -ur OpenFOAM-4.1.orig/applications/utilities/postProcessing/graphics/PVReaders/Allwmake OpenFOAM-4.1/applications/utilities/postProcessing/graphics/PVReaders/Allwmake
+--- OpenFOAM-4.1.orig/applications/utilities/postProcessing/graphics/PVReaders/Allwmake	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/applications/utilities/postProcessing/graphics/PVReaders/Allwmake	2016-09-02 15:44:36.305512075 +0200
+@@ -16,7 +16,7 @@
+         }
+
+         # ensure CMake gets the correct C++ compiler
+-        [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
++#        [ -n "$WM_CXX" ] && export CXX="$WM_CXX"
+
+         wmake $targetType vtkPVReaders
+         PVblockMeshReader/Allwmake $*
+diff -ur OpenFOAM-4.1.orig/etc/bashrc OpenFOAM-4.1/etc/bashrc
+--- OpenFOAM-4.1.orig/etc/bashrc	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/etc/bashrc	2016-09-02 15:43:37.773220097 +0200
+@@ -42,9 +42,8 @@
+ #
+ # Please set to the appropriate path if the default is not correct.
+ #
+-[ $BASH_SOURCE ] && \
+-export FOAM_INST_DIR=${BASH_SOURCE%/*/*/*} || \
+-export FOAM_INST_DIR=$HOME/$WM_PROJECT
++# For Easybuild: set by the module
++#
+ # export FOAM_INST_DIR=~$WM_PROJECT
+ # export FOAM_INST_DIR=/opt/$WM_PROJECT
+ # export FOAM_INST_DIR=/usr/local/$WM_PROJECT
+diff -ur OpenFOAM-4.1.orig/etc/config.sh/CGAL OpenFOAM-4.1/etc/config.sh/CGAL
+--- OpenFOAM-4.1.orig/etc/config.sh/CGAL	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/etc/config.sh/CGAL	2016-09-02 15:43:37.773220097 +0200
+@@ -36,37 +36,7 @@
+ #
+ #------------------------------------------------------------------------------
+
+-boost_version=boost-system
+-cgal_version=cgal-system
+-#cgal_version=CGAL-4.8
+-
+-if [ -z "$SOURCE_CGAL_VERSIONS_ONLY" ]
+-then
+-
+-    common_path=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
+-
+-    export BOOST_ARCH_PATH=$common_path/$boost_version
+-    export CGAL_ARCH_PATH=$common_path/$cgal_version
+-
+-    if [ "$FOAM_VERBOSE" -a "$PS1" ]
+-    then
+-        echo "Using CGAL and boost" 1>&2
+-        echo "    $cgal_version at $CGAL_ARCH_PATH" 1>&2
+-        echo "    $boost_version at $BOOST_ARCH_PATH" 1>&2
+-    fi
+-
+-    if [ -d "$CGAL_ARCH_PATH" -a "$cgal_version" != "cgal-system" ]
+-    then
+-        _foamAddLib $CGAL_ARCH_PATH/lib
+-    fi
+-
+-    if [ -d "$BOOST_ARCH_PATH" -a "$boost_version" != "boost-system" ]
+-    then
+-        _foamAddLib $BOOST_ARCH_PATH/lib
+-    fi
+-
+-    unset boost_version cgal_version common_path
+-
+-fi
++export CGAL_ARCH_PATH=$EBROOTCGAL
++export BOOST_ARCH_PATH=$EBROOTBOOST
+
+ #------------------------------------------------------------------------------
+diff -ur OpenFOAM-4.1.orig/etc/config.sh/gperftools OpenFOAM-4.1/etc/config.sh/gperftools
+--- OpenFOAM-4.1.orig/etc/config.sh/gperftools	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/etc/config.sh/gperftools	2016-09-02 15:43:37.773220097 +0200
+@@ -29,13 +29,7 @@
+ #
+ #------------------------------------------------------------------------------
+
+-version=svn
+-gperftools_install=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER
+-
+-GPERFTOOLS_VERSION=gperftools-$version
+-GPERFTOOLS_ARCH_PATH=$gperftools_install/$GPERFTOOLS_VERSION
+-
+-export PATH=$GPERFTOOLS_ARCH_PATH/bin:$PATH
+-export LD_LIBRARY_PATH=$GPERFTOOLS_ARCH_PATH/lib:$LD_LIBRARY_PATH
++GPERFTOOLS_VERSION=gperftools-$EBVERSIONGPERFTOOLS
++GPERFTOOLS_ARCH_PATH=$EBROOTGPERFTOOLS
+
+ #------------------------------------------------------------------------------
+diff -ur OpenFOAM-4.1.orig/etc/config.sh/metis OpenFOAM-4.1/etc/config.sh/metis
+--- OpenFOAM-4.1.orig/etc/config.sh/metis	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/etc/config.sh/metis	2016-09-02 15:43:37.773220097 +0200
+@@ -34,7 +34,7 @@
+ #
+ #------------------------------------------------------------------------------
+
+-export METIS_VERSION=metis-5.1.0
+-export METIS_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$METIS_VERSION
++export METIS_VERSION=metis-$EBVERSIONMETIS
++export METIS_ARCH_PATH=$EBROOTMETIS
+
+ #------------------------------------------------------------------------------
+diff -ur OpenFOAM-4.1.orig/etc/config.sh/mpi OpenFOAM-4.1/etc/config.sh/mpi
+--- OpenFOAM-4.1.orig/etc/config.sh/mpi	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/etc/config.sh/mpi	2016-09-02 15:43:37.773220097 +0200
+@@ -243,6 +243,9 @@
+     _foamAddPath    $MPI_ARCH_PATH/bin64
+     _foamAddLib     $MPI_ARCH_PATH/lib64
+     ;;
++EASYBUILDMPI)
++    export FOAM_MPI=mpi
++    ;;
+ *)
+     export FOAM_MPI=dummy
+     ;;
+diff -ur OpenFOAM-4.1.orig/etc/config.sh/paraview OpenFOAM-4.1/etc/config.sh/paraview
+--- OpenFOAM-4.1.orig/etc/config.sh/paraview	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/etc/config.sh/paraview	2016-09-02 15:43:37.773220097 +0200
+@@ -41,21 +41,6 @@
+         ) \
+         && PATH="$cleaned"
+
+-# Determine the cmake to be used
+-unset CMAKE_HOME
+-for cmake in cmake-3.2.1 cmake-2.8.12.1 cmake-2.8.8 cmake-2.8.4 cmake-2.8.3 \
+-             cmake-2.8.1
+-do
+-    cmake=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$cmake
+-    if [ -r $cmake ]
+-    then
+-        export CMAKE_HOME=$cmake
+-        export CMAKE_ROOT=$cmake
+-        export PATH=$CMAKE_HOME/bin:$PATH
+-        break
+-    fi
+-done
+-
+
+ #- ParaView version, automatically determine major version
+ #export ParaView_VERSION=3.12.0
+@@ -64,7 +49,7 @@
+ #export ParaView_VERSION=4.3.1
+ #export ParaView_VERSION=4.4.0
+ #export ParaView_VERSION=5.0.0
+-export ParaView_VERSION=5.0.1
++export ParaView_VERSION=$EBVERSIONPARAVIEW
+ export ParaView_MAJOR=detect
+
+
+@@ -105,21 +90,15 @@
+ paraviewInstDir=$WM_THIRD_PARTY_DIR/ParaView-$ParaView_VERSION
+ paraviewArchName=ParaView-$ParaView_VERSION
+
+-export ParaView_DIR=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER/$paraviewArchName
++export ParaView_DIR=$EBROOTPARAVIEW
+
+ # Set paths if binaries or source are present
+ if [ -r $ParaView_DIR -o -r $paraviewInstDir ]
+ then
+     export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-$ParaView_MAJOR
+-    if [ ! -d $ParaView_INCLUDE_DIR -a -d $ParaView_DIR/include/paraview-3.0 ]
+-    then
+-        export ParaView_INCLUDE_DIR=$ParaView_DIR/include/paraview-3.0
+-    fi
+
+     ParaView_LIB_DIR=$ParaView_DIR/lib/paraview-$ParaView_MAJOR
+
+-    export PATH=$ParaView_DIR/bin:$PATH
+-    export LD_LIBRARY_PATH=$ParaView_LIB_DIR:$LD_LIBRARY_PATH
+     export PV_PLUGIN_PATH=$FOAM_LIBBIN/paraview-$ParaView_MAJOR
+
+     if [ "$FOAM_VERBOSE" -a "$PS1" ]
+@@ -131,17 +110,6 @@
+         echo "    PV_PLUGIN_PATH       : $PV_PLUGIN_PATH"
+     fi
+
+-    # Add in python libraries if required
+-    paraviewPython=$ParaView_DIR/Utilities/VTKPythonWrapping
+-    if [ -r $paraviewPython ]
+-    then
+-        if [ "$PYTHONPATH" ]
+-        then
+-            export PYTHONPATH=$PYTHONPATH:$paraviewPython:$ParaView_LIB_DIR
+-        else
+-            export PYTHONPATH=$paraviewPython:$ParaView_LIB_DIR
+-        fi
+-    fi
+ else
+     unset PV_PLUGIN_PATH
+ fi
+diff -ur OpenFOAM-4.1.orig/etc/config.sh/scotch OpenFOAM-4.1/etc/config.sh/scotch
+--- OpenFOAM-4.1.orig/etc/config.sh/scotch	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/etc/config.sh/scotch	2016-09-02 15:43:37.773220097 +0200
+@@ -37,7 +37,7 @@
+ #
+ #------------------------------------------------------------------------------
+
+-export SCOTCH_VERSION=scotch_6.0.3
+-export SCOTCH_ARCH_PATH=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER$WM_PRECISION_OPTION$WM_LABEL_OPTION/$SCOTCH_VERSION
++export SCOTCH_VERSION=scotch_$EBVERSIONSCOTCH
++export SCOTCH_ARCH_PATH=$EBROOTSCOTCH
+
+ #------------------------------------------------------------------------------
+diff -ur OpenFOAM-4.1.orig/etc/config.sh/settings OpenFOAM-4.1/etc/config.sh/settings
+--- OpenFOAM-4.1.orig/etc/config.sh/settings	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/etc/config.sh/settings	2016-09-02 15:43:37.773220097 +0200
+@@ -56,11 +56,11 @@
+         64)
+             WM_ARCH=linux64
+             export WM_COMPILER_LIB_ARCH=64
+-            export WM_CC='gcc'
+-            export WM_CXX='g++'
+-            export WM_CFLAGS='-m64 -fPIC'
+-            export WM_CXXFLAGS='-m64 -fPIC -std=c++0x'
+-            export WM_LDFLAGS='-m64'
++            export WM_CC=$CC
++            export WM_CXX=$CXX
++            export WM_CFLAGS=$CFLAGS
++            export WM_CXXFLAGS=$CXXFLAGS
++            export WM_LDFLAGS=$LDFLAGS
+             ;;
+         *)
+             echo "Unknown WM_ARCH_OPTION '$WM_ARCH_OPTION', should be 32 or 64"\
+diff -ur OpenFOAM-4.1.orig/src/parallel/decompose/ptscotchDecomp/Make/options OpenFOAM-4.1/src/parallel/decompose/ptscotchDecomp/Make/options
+--- OpenFOAM-4.1.orig/src/parallel/decompose/ptscotchDecomp/Make/options	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/src/parallel/decompose/ptscotchDecomp/Make/options	2016-09-02 15:44:36.305512075 +0200
+@@ -3,10 +3,8 @@
+
+ EXE_INC = \
+     $(PFLAGS) $(PINC) \
+-    -I$(SCOTCH_ROOT)/include \
+     -I$(SCOTCH_ARCH_PATH)/include/$(FOAM_MPI) \
+-    -I/usr/include/scotch \
+     -I../decompositionMethods/lnInclude
+
+ LIB_LIBS = \
+-    -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt
++    -L$(SCOTCH_ARCH_PATH)/lib -L$(FOAM_EXT_LIBBIN)/$(FOAM_MPI) -lptscotch -lptscotcherrexit -lscotch ${LINK_FLAGS} -lrt
+diff -ur OpenFOAM-4.1.orig/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C OpenFOAM-4.1/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C
+--- OpenFOAM-4.1.orig/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/src/parallel/decompose/ptscotchDecomp/ptscotchDecomp.C	2016-09-02 15:45:13.376950242 +0200
+@@ -30,10 +30,11 @@
+ #include "globalIndex.H"
+ #include "SubField.H"
+
++#include <mpi.h>
++
+ extern "C"
+ {
+     #include <stdio.h>
+-    #include <mpi.h>
+     #include "ptscotch.h"
+ }
+
+diff -ur OpenFOAM-4.1.orig/src/parallel/decompose/scotchDecomp/Make/options OpenFOAM-4.1/src/parallel/decompose/scotchDecomp/Make/options
+--- OpenFOAM-4.1.orig/src/parallel/decompose/scotchDecomp/Make/options	2016-06-24 23:33:52.000000000 +0200
++++ OpenFOAM-4.1/src/parallel/decompose/scotchDecomp/Make/options	2016-09-02 15:44:36.305512075 +0200
+@@ -7,10 +7,8 @@
+
+ EXE_INC = \
+     $(PFLAGS) $(PINC) \
+-    -I$(SCOTCH_ROOT)/include \
+     -I$(SCOTCH_ARCH_PATH)/include \
+-    -I/usr/include/scotch \
+     -I../decompositionMethods/lnInclude
+
+ LIB_LIBS = \
+-    -L$(SCOTCH_ROOT)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt
++    -L$(SCOTCH_ARCH_PATH)/lib -L$(FOAM_EXT_LIBBIN) -lscotch -lscotcherrexit -lrt
diff --git a/o/OpenFOAM/OpenFOAM-4.1-intel-2017a.eb b/o/OpenFOAM/OpenFOAM-4.1-intel-2017a.eb
new file mode 100644
index 00000000..fcf08777
--- /dev/null
+++ b/o/OpenFOAM/OpenFOAM-4.1-intel-2017a.eb
@@ -0,0 +1,36 @@
+name = 'OpenFOAM'
+version = '4.1'
+
+homepage = 'http://www.openfoam.com/'
+description = """OpenFOAM is a free, open source CFD software package.
+ OpenFOAM has an extensive range of features to solve anything from complex fluid flows
+ involving chemical reactions, turbulence and heat transfer,
+ to solid dynamics and electromagnetics."""
+
+toolchain = {'name': 'intel', 'version': '2017a'}
+toolchainopts = {'cstd': 'c++11'}
+
+source_urls = ['https://github.com/OpenFOAM/OpenFOAM-%(version_major)s.x/archive']
+sources = ['version-%(version)s.tar.gz']
+
+checksums = ['318a446c4ae6366c7296b61184acd37c']
+
+patches = ['OpenFOAM-%(version)s-cleanup.patch']
+
+dependencies = [
+    ('libreadline', '6.3'),
+    ('ncurses', '6.0'),
+    # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes)
+    ('METIS', '5.1.0', '', True),
+    ('SCOTCH', '6.0.4'),
+    ('CGAL', '4.8.1'),
+    ('ParaView', '5.1.2', '-mpi'),
+]
+
+builddependencies = [
+    ('Bison', '3.0.4'),
+    ('CMake', '3.7.2'),
+    ('flex', '2.6.3', '', ('GCCcore', '6.3.0')),
+]
+
+moduleclass = 'cae'
diff --git a/o/OpenMPI/OpenMPI-1.10.2-GCC-4.9.3-2.25.eb b/o/OpenMPI/OpenMPI-1.10.2-GCC-4.9.3-2.25.eb
index 02098bfd..a78adbf7 100644
--- a/o/OpenMPI/OpenMPI-1.10.2-GCC-4.9.3-2.25.eb
+++ b/o/OpenMPI/OpenMPI-1.10.2-GCC-4.9.3-2.25.eb
@@ -13,11 +13,16 @@ source_urls = ['http://www.open-mpi.org/software/ompi/v%(version_major_minor)s/d
 
 dependencies = [('hwloc', '1.11.2')]
 
+builddependencies = [
+            ('Java', '1.8.0_51', '', True)
+]
+
 configopts = '--with-threads=posix --enable-shared --enable-mpi-thread-multiple --with-verbs '
 configopts += '--enable-mpirun-prefix-by-default '  # suppress failure modes in relation to mpirun path
 configopts += '--with-hwloc=$EBROOTHWLOC '  # hwloc support
 configopts += '--disable-dlopen '  # statically link component, don't do dynamic loading
 configopts += '--with-tm=/opt/pbs/default '  # Enable PBS
+configopts += '--enable-mpi-java ' # Java support RT#4090
 
 # for PBS Pro 13
 preconfigopts = 'export LIBS="-ldl" && '
diff --git a/o/osm2pgsql/osm2pgsql-0.92.0-intel-2017a.eb b/o/osm2pgsql/osm2pgsql-0.92.0-intel-2017a.eb
new file mode 100644
index 00000000..5995330b
--- /dev/null
+++ b/o/osm2pgsql/osm2pgsql-0.92.0-intel-2017a.eb
@@ -0,0 +1,42 @@
+easyblock = 'CMakeMake'
+
+name = 'osm2pgsql'
+version = '0.92.0'
+
+homepage = 'http://wiki.openstreetmap.org/wiki/Osm2pgsql'
+description = "osm2pgsql is a command-line based program that converts OpenStreetMap data to postGIS-enabled PostgreSQL databases"
+
+toolchain = {'name': 'intel', 'version': '2017a' }
+
+source_urls = ['https://github.com/openstreetmap/osm2pgsql/archive/']
+sources = ['%(version)s.tar.gz']
+
+checksums = ['1aee8d5fcea0e51662640a886a6818c7']
+
+patches = ['osm2pgsql-%(version)s_fix.patch']
+
+files_to_copy = ['%(builddir)s/osm2pgsql']
+
+configopts = '-DCMAKE_CXX_COMPILER=icpc -DCMAKE_CXX_FLAGS=-std=c++11'
+
+separate_build_dir = True
+
+builddependencies = [
+  ('CMake', '3.7.2', '', True)
+]
+
+dependencies = [ 
+    ('expat', '2.1.0', '', True), 
+    ('PROJ_4', '4.9.2', '', True), 
+    ('GEOS', '3.5.0', '', True), 
+    ('zlib', '1.2.11', '', True), 
+    ('Boost', '1.63.0'),
+    ('Lua', '5.1.4-8', '', True)
+]
+
+sanity_check_paths = {
+    'files': ['bin/osm2pgsql'],
+    'dirs': [],
+}
+                                                                                                                                                   
+moduleclass = 'tools'
diff --git a/o/osm2pgsql/osm2pgsql-0.92.0_fix.patch b/o/osm2pgsql/osm2pgsql-0.92.0_fix.patch
new file mode 100644
index 00000000..8c7de3fb
--- /dev/null
+++ b/o/osm2pgsql/osm2pgsql-0.92.0_fix.patch
@@ -0,0 +1,13 @@
+# Set prefix path to include required libraries from easybuild paths
+diff -ru osm2pgsql-0.92.0/CMakeLists.txt osm2pgsql-0.92.0_patched/CMakeLists.txt
+--- osm2pgsql-0.92.0/CMakeLists.txt	2016-12-16 10:43:19.000000000 +0100
++++ osm2pgsql-0.92.0_patched/CMakeLists.txt	2017-03-13 15:33:11.939403214 +0100
+@@ -6,6 +6,8 @@
+ 
+ project(osm2pgsql)
+ 
++set(CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};$ENV{EBROOTGEOS};$ENV{EBROOTPROJ_4};$ENV{EBROOTLUA};$ENV{EBROOTZLIB};$ENV{EBROOTBOOST};$ENV{EBROOTEXPATH}")
++
+ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
+ 
+ set(DATA_DIR \"${CMAKE_INSTALL_PREFIX}/share/osm2pgsql\")
diff --git a/p/PROJ_4/PROJ_4-4.9.2.eb b/p/PROJ_4/PROJ_4-4.9.2.eb
new file mode 100644
index 00000000..b5ce5c63
--- /dev/null
+++ b/p/PROJ_4/PROJ_4-4.9.2.eb
@@ -0,0 +1,15 @@
+name = 'PROJ_4'
+version = '4.9.2'
+
+easyblock = 'ConfigureMake'
+
+homepage = 'http://proj.osgeo.org'
+description = """PROJ.4 - Cartographic Projections Library originally written by Gerald Evenden then of the USGS.
+"""
+
+toolchain = {'name': 'dummy', 'version': ''}
+
+sources = ['%(version)s.tar.gz']
+source_urls = ['https://github.com/OSGeo/proj.4/archive/']
+
+moduleclass = 'geo'
diff --git a/p/ParaView/ParaView-5.1.2-intel-2017a-mpi.eb b/p/ParaView/ParaView-5.1.2-intel-2017a-mpi.eb
new file mode 100644
index 00000000..6d85b172
--- /dev/null
+++ b/p/ParaView/ParaView-5.1.2-intel-2017a-mpi.eb
@@ -0,0 +1,50 @@
+easyblock = 'CMakeMake'
+
+name = 'ParaView'
+version = '5.1.2'
+versionsuffix = '-mpi'
+
+homepage = "http://www.paraview.org"
+description = "ParaView is a scientific parallel visualizer."
+
+toolchain = {'name': 'intel', 'version': '2017a'}
+toolchainopts = {'pic': True, 'usempi': True}
+
+download_suffix = 'download.php?submit=Download&version=v%(version_major_minor)s&type=source&os=all&downloadFile='
+source_urls = ['http://www.paraview.org/paraview-downloads/%s' % download_suffix]
+sources = ["ParaView-v%(version)s.tar.gz"]
+
+dependencies = [
+    ('X11', '20160819'),
+    ('Mesa', '12.0.2'),
+    ('libGLU', '9.0.0'),
+    ('Qt', '4.8.7'),
+    ('zlib', '1.2.11', '', True),
+    ('HDF5', '1.8.17'),
+    ('Python', '2.7.12'),
+]
+
+builddependencies = [('CMake', '3.7.2', '', True)]
+
+separate_build_dir = True
+
+configopts = '-DPARAVIEW_INSTALL_DEVELOPMENT_FILES=ON -DVTK_OPENGL_HAS_OSMESA=ON -DPARAVIEW_USE_MPI=ON '
+configopts += '-DOPENGL_INCLUDE_DIR=$EBROOTMESA/include -DOPENGL_gl_LIBRARY=$EBROOTMESA/lib/libGL.%s ' % SHLIB_EXT
+configopts += '-DOSMESA_INCLUDE_DIR=$EBROOTMESA/include -DOSMESA_LIBRARY=$EBROOTMESA/lib/libOSMesa.%s ' % SHLIB_EXT
+configopts += '-DOPENGL_glu_LIBRARY=$EBROOTLIBGLU/lib/libGLU.%s ' % SHLIB_EXT
+configopts += '-DVTK_USE_SYSTEM_HDF5=ON -DPARAVIEW_ENABLE_PYTHON=ON -DBUILD_SHARED_LIBS=ON '
+# if you want to build server only Paraview, uncomment the following line:
+# configopts += '-DVTK_USE_X=OFF '
+
+# Without internet connection turn off testing (uncomment the following line)
+configopts += '-DBUILD_TESTING=OFF '
+# Or consult https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/data.md
+# and download ExternalData to $EASYBUILD_SOURCEPATH and adjust -DExternalData_OBJECT_STORES accordingly
+# Without internet connection, comment the following two lines (configopts and prebuildopts)
+configopts += '-DExternalData_OBJECT_STORES=%(builddir)s/ExternalData '
+# The ParaView server can be cranky, test downloads are quite often failing, especially in the case
+# of parallel downloads. Using ; insted of && gives a second chance to download the test files, if the
+# first serial attempt would fail.
+prebuildopts = 'make VTKData ;'
+
+moduleclass = 'vis'
diff --git a/q/QBOX/QBOX-r140b-foss-2016a.eb b/q/QBOX/QBOX-r140b-foss-2016a.eb
new file mode 100644
index 00000000..52460586
--- /dev/null
+++ b/q/QBOX/QBOX-r140b-foss-2016a.eb
@@ -0,0 +1,28 @@
+easyblock = 'MakeCp'
+
+name = 'QBOX'
+version = 'r140b'
+
+homepage = 'https://asc.llnl.gov/CORAL-benchmarks/#qbox'
+description = 'QBOX benchmark, part of CORAL suite'
+
+toolchain = {'name': 'foss', 'version': '2016a' }
+toolchainopts = {'usempi': True}
+
+source_urls = ['https://asc.llnl.gov/CORAL-benchmarks/Science/']
+sources = ['qball_%(version)s.tgz']
+
+checksums = ['3eef50f376b02f9d569e0d6e761847ce']
+
+patches = ['QBOX-%(version)s_fix.patch']
+
+files_to_copy = [(['trunk/src/qb-linux_x86_64_intel'], 'bin')]
+
+start_dir = 'trunk/src'
+
+sanity_check_paths = {
+    'files': ['bin/qb-linux_x86_64_intel'],
+    'dirs': [],
+}
+
+moduleclass = 'tools'
diff --git a/q/QBOX/QBOX-r140b_fix.patch b/q/QBOX/QBOX-r140b_fix.patch
new file mode 100644
index 00000000..3497d775
--- /dev/null
+++ b/q/QBOX/QBOX-r140b_fix.patch
@@ -0,0 +1,40 @@
+# MPI_Comm is a typedef struct ompi_communicator_t *MPI_Comm.
+# Csys2blacs_handle is called only here and returns a hardcoded zero
+# this patch does not alter the behavior 
+# Martin Golasowski, martin.golasowski@vsb.cz, IT4Innovations 2017
+diff -ru qball_r140/trunk/src/Context.C qball_r140_working/trunk/src/Context.C
+--- qball_r140/trunk/src/Context.C	2013-04-18 20:31:13.000000000 +0200
++++ qball_r140_working/trunk/src/Context.C	2017-03-14 19:36:35.998218396 +0100
+@@ -613,7 +613,7 @@
+   char order = 'C';
+   MPI_Comm_size(comm_,&nprocs);
+   MPI_Comm_rank(comm_,&mype_);
+-  int bhandle = Csys2blacs_handle(comm_);
++  int bhandle = 0;
+   ictxt_ = bhandle;
+   Cblacs_gridinit( &ictxt_, &order, nprow, npcol );
+ 
+diff -ru qball_r140/trunk/src/Makefile qball_r140_working/trunk/src/Makefile
+--- qball_r140/trunk/src/Makefile	2013-07-03 22:10:55.000000000 +0200
++++ qball_r140_working/trunk/src/Makefile	2017-03-14 19:15:26.870687572 +0100
+@@ -7,7 +7,19 @@
+ 
+ # If defined, use architecture file set with ARCH variable
+ ARCH ?= $(ARCHGUESS)
+-include $(ARCH).mk
++PLT=LINUX_X86_64_GNU
++FFTWDIR=${EBROOTFFTW}
++FFTWLIB=$(FFTWDIR)/lib/libfftw.a
++SCALAPACK_DIR = ${EBROOTSCALAPACK}
++SCALAPACKLIB  = $(SCALAPACK_DIR)/lib/libscalapack.a
++BLASDIR = ${EBROOTOPENBLAS}
++DFLAGS += -DUSE_CSTDIO_LFS -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
++INCLUDE = -I$(FFTWDIR)/include
++CXXFLAGS= -DUSE_MPI -DSCALAPACK -DADD_ -D$(PLT) $(INCLUDE) $(DFLAGS)
++LD = ${CXX}
++LIBPATH = -L$(FFTWDIR) -L$(BLASDIR) -L$(EBROOTOPENMPI) -L$(SCALAPACK_DIR)/lib
++LIBS =  -lscalapack -fopenmp -lopenblas -lgfortran
++LDFLAGS = $(LIBPATH) $(LIBS) 
+ #------------------------------------------------------------------------------
+ #
+ TESTEXECS=testMatrix testFTGrid testGridFunction testBasis \
diff --git a/q/Qt5/Qt5-5.7.0-intel-2017a.eb b/q/Qt5/Qt5-5.7.0-intel-2017a.eb
new file mode 100644
index 00000000..afe0a334
--- /dev/null
+++ b/q/Qt5/Qt5-5.7.0-intel-2017a.eb
@@ -0,0 +1,56 @@
+easyblock = 'EB_Qt'
+
+name = 'Qt5'
+version = '5.7.0'
+
+homepage = 'http://qt.io/'
+description = "Qt is a comprehensive cross-platform C++ application framework."
+
+toolchain = {'name': 'intel', 'version': '2017a'}
+
+source_urls = [
+    'http://download.qt.io/official_releases/qt/%(version_major_minor)s/%(version)s/single/',
+    'http://download.qt.io/archive/qt/%(version_major_minor)s/%(version)s/single/'
+]
+sources = ['qt-everywhere-opensource-src-%(version)s.tar.xz']
+
+builddependencies = [
+    ('fixesproto', '5.0'),
+    ('glproto', '1.4.17'),
+    ('inputproto', '2.3.1'),
+    ('kbproto', '1.0.7'),
+    ('libpthread-stubs', '0.3'),
+    ('pkg-config', '0.29.1'),
+    ('xcb-proto', '1.11', '', True),
+    ('xextproto', '7.3.0'),
+    ('xorg-macros', '1.19.0'),
+    ('xproto', '7.0.28'),
+    ('xtrans', '1.3.5'),
+]
+
+dependencies = [
+    ('GLib', '2.48.0'),
+    ('libX11', '1.6.3'),
+    ('libXt', '1.1.5'),
+    ('libXi', '1.7.6'),
+    ('xcb-util', '0.4.0'),
+    ('xcb-util-image', '0.4.0'),
+    ('xcb-util-keysyms', '0.4.0'),
+    ('xcb-util-renderutil', '0.3.9'),
+    ('xcb-util-wm', '0.4.1'),
+    ('libxkbcommon', '0.6.1'),
+    ('libXrender', '0.9.9'),
+    ('fontconfig', '2.11.95'),
+    ('freetype', '2.6.3'),
+    ('libXfixes', '5.0.1'),
+    ('libXcursor', '1.1.14'),
+    ('libXinerama', '1.1.3'),
+    ('libXrandr', '1.5.0'),
+    ('libpng', '1.6.21'),
+    ('libGLU', '9.0.0', '-Mesa-11.2.1'),
+]
+
+# qtgamepad needs recent kernel/libevdev (fails on RHEL 6.x)
+configopts = '-skip qtgamepad'
+
+moduleclass = 'devel'