<commit_before>if(BUILD_SHARED_LIBS)
    set(_build_shared ON)
    set(_build_static OFF)
else()
    set(_build_shared OFF)
    set(_build_static ON)
endif()

prusaslicer_add_cmake_project(Blosc
    # GIT_REPOSITORY https://github.com/Blosc/c-blosc.git
    # GIT_TAG e63775855294b50820ef44d1b157f4de1cc38d3e #v1.17.0
    URL https://github.com/Blosc/c-blosc/archive/refs/tags/v1.17.0.zip
    URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
    DEPENDS ${ZLIB_PKG}
    PATCH_COMMAND       #${GIT_EXECUTABLE} reset --hard && ${GIT_EXECUTABLE} clean -df &&
                        #${GIT_EXECUTABLE} apply --whitespace=nowarn ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
                        ${GIT_EXECUTABLE} apply --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
    CMAKE_ARGS
        -DCMAKE_POSITION_INDEPENDENT_CODE=ON
        -DBUILD_SHARED=${_build_shared} 
        -DBUILD_STATIC=${_build_static}
        -DBUILD_TESTS=OFF 
        -DBUILD_BENCHMARKS=OFF 
        -DPREFER_EXTERNAL_ZLIB=ON
)

if (MSVC)
    add_debug_dep(dep_Blosc)
endif ()<commit_msg>Get Blosc from patched mirror<commit_after>if(BUILD_SHARED_LIBS)
    set(_build_shared ON)
    set(_build_static OFF)
else()
    set(_build_shared OFF)
    set(_build_static ON)
endif()

prusaslicer_add_cmake_project(Blosc
    #URL https://github.com/Blosc/c-blosc/archive/refs/tags/v1.17.0.zip
    #URL_HASH SHA256=7463a1df566704f212263312717ab2c36b45d45cba6cd0dccebf91b2cc4b4da9
    URL https://github.com/tamasmeszaros/c-blosc/archive/refs/heads/v1.17.0_tm.zip
    URL_HASH SHA256=b69a0f8a66e420b3b57e159cc56e3ced803d5de8dbe35dcebb4c54671fdc2e7a
    DEPENDS ${ZLIB_PKG}
    # Patching upstream does not work this way with git version 2.28 installed on mac worker
    # PATCH_COMMAND  ${GIT_EXECUTABLE} apply --ignore-space-change --whitespace=fix ${CMAKE_CURRENT_LIST_DIR}/blosc-mods.patch
    CMAKE_ARGS
        -DCMAKE_POSITION_INDEPENDENT_CODE=ON
        -DBUILD_SHARED=${_build_shared} 
        -DBUILD_STATIC=${_build_static}
        -DBUILD_TESTS=OFF 
        -DBUILD_BENCHMARKS=OFF 
        -DPREFER_EXTERNAL_ZLIB=ON
)

if (MSVC)
    add_debug_dep(dep_Blosc)
endif ()
{'fraction_non_alphanumeric': 0.0971843778383288, 'fraction_numerical': 0.07447774750227067, 'mean_word_length': 3.7376344086021507, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5179361', 'n_tokens_mistral': 992, 'n_tokens_neox': 899, 'n_words': 108}