diff options
| author | Romain GARBAGE <romain.garbage@inria.fr> | 2025-08-18 11:41:26 +0200 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2025-08-21 12:35:25 +0200 |
| commit | a670acfe5c59db81f086fec23fa30fdabaec2ca6 (patch) | |
| tree | 523b5682629df8797c737d28657b581c0d5c6096 | |
| parent | badabf053805b28bb4409bbadc6304bcd485ba37 (diff) | |
gnu: hdf5: Remove references to gcc/gfortran/binutils.
* gnu/packages/maths.scm (hdf5)[arguments]<#:phases>{remove-referencess,
remove-gcc-references, remove-gfortran-references}: New phases.
Change-Id: I367b95a85aaf36928f94ef329e839dfb4d24b285
Signed-off-by: Andreas Enge <andreas@enge.fr>
| -rw-r--r-- | gnu/packages/maths.scm | 38 |
1 files changed, 37 insertions, 1 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 0c36a609484..8015fa16ca8 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm | |||
| @@ -2008,7 +2008,43 @@ extremely large and complex data collections.") | |||
| 2008 | (lambda _ | 2008 | (lambda _ |
| 2009 | (invoke "perl" "bin/make_err" "src/H5err.txt") | 2009 | (invoke "perl" "bin/make_err" "src/H5err.txt") |
| 2010 | (invoke "perl" "bin/make_vers" "src/H5vers.txt") | 2010 | (invoke "perl" "bin/make_vers" "src/H5vers.txt") |
| 2011 | (invoke "perl" "bin/make_overflow" "src/H5overflow.txt")))))) | 2011 | (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) |
| 2012 | ;; Remove references to GCC/GFortran/binutils in order to decrease | ||
| 2013 | ;; package size. | ||
| 2014 | (add-before 'generate-headers 'remove-referencess | ||
| 2015 | (lambda _ | ||
| 2016 | (substitute* '("src/libhdf5.settings.cmake.in" | ||
| 2017 | "src/H5build_settings.cmake.c.in") | ||
| 2018 | (("@CMAKE_AR@") "ar") | ||
| 2019 | (("@CMAKE_RANLIB@") "ranlib") | ||
| 2020 | (("@CMAKE_C_COMPILER@") "gcc") | ||
| 2021 | (("@CMAKE_CXX_COMPILER") "g++") | ||
| 2022 | (("@CMAKE_Fortran_COMPILER@") "gfortran")) | ||
| 2023 | (substitute* '("src/libhdf5.settings.autotools.in" | ||
| 2024 | "src/H5build_settings.autotools.c.in") | ||
| 2025 | (("@AR@") "ar") | ||
| 2026 | (("@RANLIB@") "ranlib") | ||
| 2027 | (("@CXX_VERSION@") "g++") | ||
| 2028 | (("@@CC_VERSION@") "gcc") | ||
| 2029 | (("@FC_VERSION@") "gfortran")))) | ||
| 2030 | (add-after 'install 'remove-gcc-references | ||
| 2031 | (lambda _ | ||
| 2032 | (substitute* (map (lambda (f) | ||
| 2033 | (string-append #$output "/" f)) | ||
| 2034 | '("bin/h5hlcc" | ||
| 2035 | "bin/h5hlc++" | ||
| 2036 | "bin/h5cc" | ||
| 2037 | "bin/h5c++")) | ||
| 2038 | (("/gnu/store/[a-z0-9]*-gcc-[0-9.]*/bin/") | ||
| 2039 | "")))) | ||
| 2040 | (add-after 'install 'remove-gfortran-references | ||
| 2041 | (lambda _ | ||
| 2042 | (substitute* (map (lambda (f) | ||
| 2043 | (string-append #$output "/" f)) | ||
| 2044 | '("bin/h5hlfc" | ||
| 2045 | "bin/h5fc")) | ||
| 2046 | (("/gnu/store/[a-z0-9]*-gfortran-[0-9.]*/bin/") | ||
| 2047 | ""))))))) | ||
| 2012 | (inputs (list libaec zlib)) | 2048 | (inputs (list libaec zlib)) |
| 2013 | (native-inputs | 2049 | (native-inputs |
| 2014 | (list bison | 2050 | (list bison |
