blob: ffe5fc139fbc87f6b86c59b341ff445e4b1b5e86 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
# 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')
# error: implicit declaration of function 'mkdir' is invalid in C99
patch('implicit.patch', when='%apple-clang@12:')
# statically link to libz.a
# https://github.com/Homebrew/homebrew-core/blob/master/Formula/minizip.rb
patch('static.patch')
# 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)
|