Filecmd 5.43 => 5.44 (#7789)

Add lzlib package
This commit is contained in:
Ed Reel
2022-12-30 23:06:14 -06:00
committed by GitHub
parent 582582bd66
commit 9b5cd5eae5
3 changed files with 78 additions and 32 deletions

View File

@@ -3,37 +3,39 @@ require 'package'
class Filecmd < Package
description 'file and libmagic determine file type'
homepage 'http://ftp.astron.com/'
@_ver = '5.43'
version @_ver
version '5.44'
license 'BSD-2 and GPL-3+' # Chromebrew's filefix is GPL-3+, file itself is BSD-2
compatibility 'all'
source_url "http://ftp.astron.com/pub/file/file-#{@_ver}.tar.gz"
source_sha256 '8c8015e91ae0e8d0321d94c78239892ef9dbc70c4ade0008c0e95894abfb1991'
source_url "http://ftp.astron.com/pub/file/file-#{@version}.tar.gz"
source_sha256 '3751c7fba8dbc831cb8d7cc8aff21035459b8ce5155ef8b0880a27d028475f3b'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/filecmd/5.43_armv7l/filecmd-5.43-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/filecmd/5.43_armv7l/filecmd-5.43-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/filecmd/5.43_i686/filecmd-5.43-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/filecmd/5.43_x86_64/filecmd-5.43-chromeos-x86_64.tar.zst'
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/filecmd/5.44_armv7l/filecmd-5.44-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/filecmd/5.44_armv7l/filecmd-5.44-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/filecmd/5.44_i686/filecmd-5.44-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/filecmd/5.44_x86_64/filecmd-5.44-chromeos-x86_64.tar.zst'
})
binary_sha256({
aarch64: '634ba594f8b8a78b7c3ba134f179539ca0d87b5c7355a5a5c069a10d02e387de',
armv7l: '634ba594f8b8a78b7c3ba134f179539ca0d87b5c7355a5a5c069a10d02e387de',
i686: '53bf9164ab73378121cebc675e5ea33e8926280a8a995f1e11b8690aa4952273',
x86_64: '87e990a2889f889b9e3f5c77b28b6d80b3b9b79b824d8c4d2ffab0c63caf9c15'
aarch64: 'f443367c293f3f88ac2f4c69bd9f9a6422b9554a191bf57596ef5e1399209ffd',
armv7l: 'f443367c293f3f88ac2f4c69bd9f9a6422b9554a191bf57596ef5e1399209ffd',
i686: 'e1d75ecf5436d9985e13e8f4be0231accea5cdfbede4e92659814455823ba64e',
x86_64: '20f661a859cfbc87b0847ed3b98a46d8bc618c05df8e0c08ff4468d8fc403753'
})
depends_on 'bz2' # R
depends_on 'glibc' # R
depends_on 'lzlib' # R Fixes checking lzlib.h usability... no
depends_on 'xzutils' # R
depends_on 'zlibpkg' # R
depends_on 'gcc' # R
depends_on 'zstd' # R
def self.prebuild
# The filefix command changes the full path of the file command in configure scripts
# Execute this command from your source code root directory
# This may be needed in older autotools tarballs due to an old libtool bug
# It's better to run filefix if unsure
# See https://savannah.gnu.org/support/?func=detailitem&item_id=110550 for more information
# The filefix command changes the full path of the file command in configure scripts.
# Execute this command from your source code root directory.
# This may be needed in older autotools tarballs due to an old libtool bug.
# It's better to run filefix if unsure.
# See https://savannah.gnu.org/support/?func=detailitem&item_id=110550 for more information.
@filefix = <<~EOF
#!/usr/bin/env bash
@@ -44,19 +46,21 @@ class Filecmd < Package
File.write('filefix', @filefix)
end
@filecmd_config_opts = "--enable-static \
--enable-shared \
--enable-zlib \
--enable-bzlib \
--enable-xzlib \
--enable-fsect-man5 \
--disable-libseccomp" # libseccomp is disabled because
# it causes file to return "Bad system call" errors when
# not run with root
def self.patch
# Fix Error: /usr/bin/file file not found.
system 'filefix'
end
def self.build
# This tarball was built with a buggy version of libtool. This shouldn't be the case for file 5.44
system 'filefix'
@filecmd_config_opts = "--enable-static \
--enable-shared \
--enable-zlib \
--enable-bzlib \
--enable-xzlib \
--enable-fsect-man5 \
--disable-libseccomp" # libseccomp is disabled because
# it causes file to return "Bad system call" errors when
# not run with root.
# Build a static file binary for use in case needed with glibc brokenness.
Dir.mkdir 'builddir-static'
@@ -68,7 +72,7 @@ class Filecmd < Package
system 'make'
end
# Build libmagic and everything else (dynamically linked)
# Build libmagic and everything else (dynamically linked).
Dir.mkdir 'builddir-dynamic'
Dir.chdir 'builddir-dynamic' do
system "../configure \
@@ -84,14 +88,14 @@ class Filecmd < Package
end
def self.install
# Install dynamically linked package
# Install dynamically linked package.
system "make -C builddir-dynamic DESTDIR='#{CREW_DEST_DIR}' install"
# Install statically linked package to local directory and copy binary
# DESTDIR must be a full path, hence running pwd
# DESTDIR must be a full path, hence running pwd.
system "make -C builddir-static DESTDIR='#{Dir.pwd}/dest-static' install"
FileUtils.rm "#{CREW_DEST_PREFIX}/bin/file"
FileUtils.install 'dest-static/usr/local/bin/file', "#{CREW_DEST_PREFIX}/bin/file", mode: 0o755
# Install filefix
# Install filefix.
FileUtils.install 'filefix', "#{CREW_DEST_PREFIX}/bin/filefix", mode: 0o755
end
end

37
packages/lzlib.rb Normal file
View File

@@ -0,0 +1,37 @@
require 'package'
class Lzlib < Package
description 'Lzlib is a data compression library providing in-memory LZMA compression and decompression functions, including integrity checking of the decompressed data.'
homepage 'https://www.nongnu.org/lzip/lzlib.html'
version '1.13'
license 'BSD-2'
compatibility 'all'
source_url 'https://download.savannah.gnu.org/releases/lzip/lzlib/lzlib-1.13.tar.lz'
source_sha256 'dde6bd5b32535f17b28c9ac24b66607e0250506ac1432a4112ca3c73f5d662c3'
binary_url({
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lzlib/1.13_armv7l/lzlib-1.13-chromeos-armv7l.tar.zst',
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lzlib/1.13_armv7l/lzlib-1.13-chromeos-armv7l.tar.zst',
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lzlib/1.13_i686/lzlib-1.13-chromeos-i686.tar.zst',
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/lzlib/1.13_x86_64/lzlib-1.13-chromeos-x86_64.tar.zst'
})
binary_sha256({
aarch64: '46a6b8e451aba864ef2fea40b97288fa04a3cf69a90bfe0aed5a6d3eaa4bc33e',
armv7l: '46a6b8e451aba864ef2fea40b97288fa04a3cf69a90bfe0aed5a6d3eaa4bc33e',
i686: 'b6735c811d2dae672ad0309071f3563aa4ebcf0f3956c6d721955ae0b5c9f687',
x86_64: '87e3ac042df3ab14d50fe64d548a28ed9bd59cb36a4720345eaaa2a802970934'
})
def self.build
system "./configure #{CREW_OPTIONS} --enable-shared"
system 'make'
end
def self.check
system 'make check'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
end
end

View File

@@ -5050,6 +5050,11 @@ url: http://download.savannah.gnu.org/releases/lzip
activity: low
---
kind: url
name: lzlib
url: http://download.savannah.gnu.org/releases/lzip/lzlib
activity: low
---
kind: url
name: lzo
url: http://www.oberhumer.com/opensource/lzo/download
activity: none