From 7e0359847f79a3ec120ccf9937f9735e2c6fc4ba Mon Sep 17 00:00:00 2001 From: Ehsan Moravveji Date: Wed, 12 Jun 2024 17:12:00 +0200 Subject: [PATCH] Replace sed in Brunsli by proper patch Allows to see more easily what is done and remove when it is fixed upstream. --- .../b/Brunsli/Brunsli-0.1-GCCcore-13.2.0.eb | 8 ++++-- ...-0.1-fix-Brotli-static-library-names.patch | 25 +++++++++++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-fix-Brotli-static-library-names.patch 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 249b1170411..6ebb9eb8deb 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 @@ -13,7 +13,12 @@ toolchain = {'name': 'GCCcore', 'version': '13.2.0'} source_urls = ['https://github.com/google/brunsli/archive/'] sources = ['v%(version)s.tar.gz'] -checksums = ['62762dc740f9fcc9706449c078f12c2a366416486d2882be50a9f201f99ac0bc'] +patches = ['Brunsli-0.1-fix-Brotli-static-library-names.patch'] +checksums = [ + {'v0.1.tar.gz': '62762dc740f9fcc9706449c078f12c2a366416486d2882be50a9f201f99ac0bc'}, + {'Brunsli-0.1-fix-Brotli-static-library-names.patch': + '0b921fb4839f0b0223c1bf08499e84afd5d428f448664fd1337173f45a815704'}, +] builddependencies = [ ('CMake', '3.27.6'), @@ -27,7 +32,6 @@ 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" ' diff --git a/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-fix-Brotli-static-library-names.patch b/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-fix-Brotli-static-library-names.patch new file mode 100644 index 00000000000..c95cd2e6023 --- /dev/null +++ b/easybuild/easyconfigs/b/Brunsli/Brunsli-0.1-fix-Brotli-static-library-names.patch @@ -0,0 +1,25 @@ +# Author: Ehsan Moravveji (VSC - KU Leuven) +# Purpose: Brunsli searches for libbrotli*-static.a, which is no longer +# created in Brotli v1.1.0. This patch just adapts the names of +# expected static libraries +diff -ruN brunsli-orig/brunsli.cmake brunsli/brunsli.cmake +--- brunsli-orig/brunsli.cmake 2024-06-12 15:45:01.042655000 +0200 ++++ brunsli/brunsli.cmake 2024-06-12 15:46:39.369617000 +0200 +@@ -64,7 +64,7 @@ + ${BRUNSLI_DEC_HEADERS} + ) + target_link_libraries(brunslidec-static PRIVATE +- brotlidec-static ++ brotlidec + brunslicommon-static + ) + +@@ -73,7 +73,7 @@ + ${BRUNSLI_ENC_HEADERS} + ) + target_link_libraries(brunslienc-static PRIVATE +- brotlienc-static ++ brotlienc + brunslicommon-static + ) +