<commit_before># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class Minizip(AutotoolsPackage):
    """C library for zip/unzip via zLib."""

    homepage = "http://www.winimage.com/zLibDll/minizip.html"
    url      = "https://zlib.net/fossils/zlib-1.2.11.tar.gz"

    version('1.2.11', sha256='c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1')

    configure_directory = 'contrib/minizip'

    depends_on('automake', type='build')
    depends_on('autoconf', type='build')
    depends_on('libtool', type='build')
    depends_on('m4', type='build')
    depends_on('zlib')<commit_msg>minizip: support minizip and miniunz building (#17925)<commit_after># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *


class Minizip(AutotoolsPackage):
    """C library for zip/unzip via zLib."""

    homepage = "http://www.winimage.com/zLibDll/minizip.html"
    url      = "https://zlib.net/fossils/zlib-1.2.11.tar.gz"

    version('1.2.11', sha256='c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1')

    configure_directory = 'contrib/minizip'

    depends_on('automake', type='build')
    depends_on('autoconf', type='build')
    depends_on('libtool', type='build')
    depends_on('m4', type='build')
    depends_on('zlib')

    # build minizip and miniunz
    @run_before('autoreconf')
    def build_minizip_binary(self):
        configure()
        make()
        with working_dir(self.configure_directory):
            make()

    # install minizip and miniunz
    @run_after('install')
    def install_minizip_binary(self):
        mkdirp(self.prefix.bin)
        with working_dir(self.configure_directory):
            install('minizip', self.prefix.bin)
            install('miniunz', self.prefix.bin)
{'fraction_non_alphanumeric': 0.12868892114175132, 'fraction_numerical': 0.05466860183841316, 'mean_word_length': 3.8658823529411763, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4818321', 'n_tokens_mistral': 786, 'n_tokens_neox': 732, 'n_words': 135}