squashfs: new version, deprecated older versions (#30361)

This commit is contained in:
Harmen Stoppels 2022-04-29 11:17:44 +02:00 committed by GitHub
parent dbe2c44a25
commit 9ed37742e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -13,11 +13,13 @@ class Squashfs(MakefilePackage):
url = 'https://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.3/squashfs4.3.tar.gz'
# version sha1
version('4.4', sha256='a981b3f3f2054b5a2e658851a3c06a2460ad04a9a8a645e0afe063a63fdbb07e')
version('4.3', sha256='0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6')
version('4.2', sha256='d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96')
version('4.1', sha256='3a870d065a25b3f5467bc6d9ed34340befab51a3f9e4b7e3792ea0ff4e06046a')
version('4.0', sha256='18948edbe06bac2c4307eea99bfb962643e4b82e5b7edd541b4d743748e12e21')
version('4.5.1', sha256='277b6e7f75a4a57f72191295ae62766a10d627a4f5e5f19eadfbc861378deea7', url='https://downloads.sourceforge.net/project/squashfs/squashfs/squashfs4.5.1/squashfs-tools-4.5.1.tar.gz')
version('4.5', sha256='c493b29c3d152789d04fae5e6532499d96ce3f79256bc6df4f97b5170c88e979', deprecated=True)
version('4.4', sha256='a981b3f3f2054b5a2e658851a3c06a2460ad04a9a8a645e0afe063a63fdbb07e', deprecated=True)
version('4.3', sha256='0d605512437b1eb800b4736791559295ee5f60177e102e4d4ccd0ee241a5f3f6', deprecated=True)
version('4.2', sha256='d9e0195aa922dbb665ed322b9aaa96e04a476ee650f39bbeadb0d00b24022e96', deprecated=True)
version('4.1', sha256='3a870d065a25b3f5467bc6d9ed34340befab51a3f9e4b7e3792ea0ff4e06046a', deprecated=True)
version('4.0', sha256='18948edbe06bac2c4307eea99bfb962643e4b82e5b7edd541b4d743748e12e21', deprecated=True)
variant('gzip', default=True, description='Enable gzip compression support')
variant('lz4', default=False, description='Enable LZ4 compression support')
@ -41,8 +43,8 @@ class Squashfs(MakefilePackage):
# patch from
# https://github.com/plougher/squashfs-tools/commit/fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5.patch
patch('gcc-10.patch', when="%gcc@10:")
patch('gcc-10.patch', when="%clang@11:")
patch('gcc-10.patch', when="@:4.4 %gcc@10:")
patch('gcc-10.patch', when="@:4.4 %clang@11:")
def make_options(self, spec):
default = spec.variants['default_compression'].value
@ -58,9 +60,13 @@ def make_options(self, spec):
def build(self, spec, prefix):
options = self.make_options(spec)
with working_dir('squashfs-tools'):
make(*options, parallel=False)
make(*options)
def install(self, spec, prefix):
options = self.make_options(spec)
if '@4.5.1:' in spec:
prefix_arg = 'INSTALL_PREFIX={}'.format(prefix)
else:
prefix_arg = 'INSTALL_DIR={}'.format(prefix.bin)
with working_dir('squashfs-tools'):
make('install', 'INSTALL_DIR=%s' % prefix.bin, *options, parallel=False)
make('install', prefix_arg, *options)