From 8c29963581daf3828cdb15d21df08083dc81bda2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Tue, 28 May 2024 18:02:21 +0000 Subject: [PATCH 1/2] adding easyconfigs: Brunsli-0.1-GCCcore-13.2.0.eb, GDAL-3.9.0-foss-2023b.eb, libgeotiff-1.7.3-GCCcore-13.2.0.eb, GEOS-3.12.1-GCC-13.2.0.eb --- .../b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb | 53 ++++++++++++ .../g/GDAL/GDAL-3.9.0-foss-2023b.eb | 81 +++++++++++++++++++ .../g/GEOS/GEOS-3.12.1-GCC-13.2.0.eb | 26 ++++++ .../libgeotiff-1.7.3-GCCcore-13.2.0.eb | 36 +++++++++ 4 files changed, 196 insertions(+) create mode 100644 easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb create mode 100644 easybuild/easyconfigs/g/GDAL/GDAL-3.9.0-foss-2023b.eb create mode 100644 easybuild/easyconfigs/g/GEOS/GEOS-3.12.1-GCC-13.2.0.eb create mode 100644 easybuild/easyconfigs/l/libgeotiff/libgeotiff-1.7.3-GCCcore-13.2.0.eb diff --git a/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb b/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb new file mode 100644 index 00000000000..75ccfd09cea --- /dev/null +++ b/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb @@ -0,0 +1,53 @@ +# This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild +# Author: Denis Kristak +# update: Thomas Hoffmann (EMBL) +easyblock = 'CMakeMake' + +name = 'Brunsli' +version = '0.1' + +homepage = 'https://github.com/google/brunsli/' +description = """Brunsli is a lossless JPEG repacking library.""" + +toolchain = {'name': 'GCCcore', 'version': '13.2.0'} + +source_urls = ['https://github.com/google/brunsli/archive/'] +sources = ['v%(version)s.tar.gz'] +checksums = ['62762dc740f9fcc9706449c078f12c2a366416486d2882be50a9f201f99ac0bc'] + +builddependencies = [ + ('CMake', '3.27.6'), + ('binutils', '2.40'), +] + +dependencies = [ + ('Brotli', '1.1.0'), + ('Highway', '1.0.7'), +] + +# skip use of third_party directory, since we provide Brotli via a proper dependency +preconfigopts = "sed -i 's/add_subdirectory(third_party)//g' ../brunsli-%(version)s/CMakeLists.txt && " + +configopts = '-DCMAKE_CXX_FLAGS="$CXXFLAGS -lbrotlienc -lbrotlidec -lbrotlicommon" ' + +# make sure that libraries end up in /lib (not lib64) +configopts += "-DCMAKE_INSTALL_LIBDIR=lib " + +buildopts = "BROTLI_DIR=$EBROOTBROTLI BROTLI_INCLUDE=$EBROOTBROTLI/include" + +# also install dbrunsli binary and missing libraries +postinstallcmds = [ + "mkdir %(installdir)s/bin", + "cp dbrunsli %(installdir)s/bin/", + "cp libbrunsli*.a %(installdir)s/lib/", + "cp libbrunsli*.%s %%(installdir)s/lib/" % SHLIB_EXT, +] + +sanity_check_paths = { + 'files': ['bin/dbrunsli'], + 'dirs': ['include/brunsli', 'lib'], +} + +sanity_check_commands = ['dbrunsli 2>&1 | grep Usage'] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/g/GDAL/GDAL-3.9.0-foss-2023b.eb b/easybuild/easyconfigs/g/GDAL/GDAL-3.9.0-foss-2023b.eb new file mode 100644 index 00000000000..05c6ee60dab --- /dev/null +++ b/easybuild/easyconfigs/g/GDAL/GDAL-3.9.0-foss-2023b.eb @@ -0,0 +1,81 @@ +easyblock = 'CMakeMake' + +name = 'GDAL' +version = '3.9.0' + +homepage = 'https://www.gdal.org' +description = """GDAL is a translator library for raster geospatial data formats that is released under an X/MIT style + Open Source license by the Open Source Geospatial Foundation. As a library, it presents a single abstract data model + to the calling application for all supported formats. It also comes with a variety of useful commandline utilities for + data translation and processing.""" + +toolchain = {'name': 'foss', 'version': '2023b'} +toolchainopts = {'usempi': True} + +source_urls = ['https://download.osgeo.org/%(namelower)s/%(version)s/'] +sources = [SOURCELOWER_TAR_XZ] +patches = ['%(name)s-3.6.2_fix-python-CC-CXX.patch'] +checksums = [ + {'gdal-3.9.0.tar.xz': '577f80e9d14ff7c90b6bfbc34201652b4546700c01543efb4f4c3050e0b3fda2'}, + {'GDAL-3.6.2_fix-python-CC-CXX.patch': '859b874b0c8ff7626a76d51f008bf05b7f89a35b325bdd1d126d2364154acc63'}, +] + +builddependencies = [ + ('CMake', '3.27.6'), + ('pkgconf', '2.0.3'), + ('Bison', '3.8.2'), +] +dependencies = [ + ('Python', '3.11.5'), + ('netCDF', '4.9.2'), + ('expat', '2.5.0'), + ('GEOS', '3.12.1'), + ('SQLite', '3.43.1'), + ('libarchive', '3.7.2'), + ('libxml2', '2.11.5'), + ('libpng', '1.6.40'), + ('libjpeg-turbo', '3.0.1'), + ('LibTIFF', '4.6.0'), + ('zlib', '1.2.13'), + ('cURL', '8.3.0'), + ('PCRE', '8.45'), + ('PROJ', '9.3.1'), + ('libgeotiff', '1.7.3'), + ('SciPy-bundle', '2023.11'), + ('HDF5', '1.14.3'), + ('HDF', '4.2.16-2'), + ('Armadillo', '12.8.0'), + ('CFITSIO', '4.3.1'), + ('zstd', '1.5.5'), + ('giflib', '5.2.1'), + ('json-c', '0.17'), + ('Xerces-C++', '3.2.5'), + ('PCRE2', '10.42'), + ('OpenEXR', '3.2.0'), + ('Brunsli', '0.1'), + ('Qhull', '2020.2'), + ('LERC', '4.0.0'), + ('OpenJPEG', '2.5.0'), + ('SWIG', '4.1.1'), +] + +# iterative build for both static and shared libraries +local_configopts_common = "-DGDAL_USE_INTERNAL_LIBS=OFF -DArrow_DIR=$EBROOTARROW " +local_configopts_common += "-DGEOTIFF_INCLUDE_DIR=$EBROOTLIBGEOTIFF/include -DPython_ROOT=$EBROOTPYTHON " + +configopts = [ + local_configopts_common + "-DBUILD_SHARED_LIBS=OFF", + local_configopts_common +] + + +sanity_check_paths = { + 'files': ['lib/libgdal.a', 'lib/libgdal.%s' % SHLIB_EXT], + 'dirs': ['bin', 'include', 'lib/python%(pyshortver)s/site-packages'], +} + +sanity_check_commands = ["python -c 'import osgeo.%(namelower)s'"] + +modextrapaths = {'PYTHONPATH': 'lib/python%(pyshortver)s/site-packages'} + +moduleclass = 'data' diff --git a/easybuild/easyconfigs/g/GEOS/GEOS-3.12.1-GCC-13.2.0.eb b/easybuild/easyconfigs/g/GEOS/GEOS-3.12.1-GCC-13.2.0.eb new file mode 100644 index 00000000000..8dc235ab95c --- /dev/null +++ b/easybuild/easyconfigs/g/GEOS/GEOS-3.12.1-GCC-13.2.0.eb @@ -0,0 +1,26 @@ +easyblock = 'CMakeMake' + +name = 'GEOS' +version = '3.12.1' + +homepage = 'https://trac.osgeo.org/geos' +description = """GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS)""" + +toolchain = {'name': 'GCC', 'version': '13.2.0'} +toolchainopts = {'pic': True} + +source_urls = ['https://download.osgeo.org/geos/'] +sources = [SOURCELOWER_TAR_BZ2] +checksums = ['d6ea7e492224b51193e8244fe3ec17c4d44d0777f3c32ca4fb171140549a0d03'] + +builddependencies = [('CMake', '3.27.6')] + +# Build static and shared libraries +configopts = ['', '-DBUILD_SHARED_LIBS=OFF'] + +sanity_check_paths = { + 'files': ['bin/geos-config', 'lib/libgeos.%s' % SHLIB_EXT, 'lib/libgeos.a', 'include/geos.h'], + 'dirs': [], +} + +moduleclass = 'math' diff --git a/easybuild/easyconfigs/l/libgeotiff/libgeotiff-1.7.3-GCCcore-13.2.0.eb b/easybuild/easyconfigs/l/libgeotiff/libgeotiff-1.7.3-GCCcore-13.2.0.eb new file mode 100644 index 00000000000..ce66887030e --- /dev/null +++ b/easybuild/easyconfigs/l/libgeotiff/libgeotiff-1.7.3-GCCcore-13.2.0.eb @@ -0,0 +1,36 @@ +easyblock = 'ConfigureMake' + +name = 'libgeotiff' +version = '1.7.3' + +homepage = 'https://directory.fsf.org/wiki/Libgeotiff' +description = """Library for reading and writing coordinate system information from/to GeoTIFF files""" + +toolchain = {'name': 'GCCcore', 'version': '13.2.0'} + +source_urls = ['https://download.osgeo.org/geotiff/libgeotiff'] +sources = [SOURCE_TAR_GZ] +checksums = ['ba23a3a35980ed3de916e125c739251f8e3266be07540200125a307d7cf5a704'] + +builddependencies = [ + ('binutils', '2.40'), +] + +dependencies = [ + ('PROJ', '9.3.1'), + ('libjpeg-turbo', '3.0.1'), + ('zlib', '1.2.13'), + ('SQLite', '3.43.1'), + ('LibTIFF', '4.6.0'), + ('cURL', '8.3.0'), +] + +configopts = ' --with-libtiff=$EBROOTLIBTIFF --with-proj=$EBROOTPROJ --with-zlib=$EBROOTZLIB' +configopts += ' --with-jpeg=$EBROOTLIBJPEGMINTURBO' + +sanity_check_paths = { + 'files': ['bin/listgeo', 'lib/libgeotiff.a', 'lib/libgeotiff.%s' % SHLIB_EXT], + 'dirs': ['include', 'share'], +} + +moduleclass = 'lib' From c582ec88fa3f1964016629fe4211d76e19036a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikael=20=C3=96hman?= Date: Wed, 19 Jun 2024 10:47:30 +0000 Subject: [PATCH 2/2] Fix linking to static brotli --- easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb | 1 + 1 file changed, 1 insertion(+) diff --git a/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb b/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb index 75ccfd09cea..249b1170411 100644 --- a/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb +++ b/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb @@ -27,6 +27,7 @@ dependencies = [ # skip use of third_party directory, since we provide Brotli via a proper dependency preconfigopts = "sed -i 's/add_subdirectory(third_party)//g' ../brunsli-%(version)s/CMakeLists.txt && " +preconfigopts += "sed -i 's/\\(brotli...\\)-static/\\1/g' ../brunsli-%(version)s/brunsli.cmake && " configopts = '-DCMAKE_CXX_FLAGS="$CXXFLAGS -lbrotlienc -lbrotlidec -lbrotlicommon" '