mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -05:00
gzip -> 1.12 (#7104)
* gzip -> 1.12 * add x86_64 binaries (i686 broken) * Update binaries * fix i686 gzip build * adjust if i686 logic Co-authored-by: Satadru Pramanik <satadru@gmail.com>
This commit is contained in:
committed by
GitHub
parent
17e5805ada
commit
20f3552b50
@@ -3,28 +3,61 @@ require 'package'
|
||||
class Gzip < Package
|
||||
description 'GNU Gzip is a popular data compression program originally written by Jean-loup Gailly for the GNU project.'
|
||||
homepage 'https://www.gnu.org/software/gzip/'
|
||||
version '1.11'
|
||||
license 'GPL-3'
|
||||
version '1.12'
|
||||
compatibility 'all'
|
||||
source_url 'https://ftpmirror.gnu.org/gzip/gzip-1.11.tar.xz'
|
||||
source_sha256 '9b9a95d68fdcb936849a4d6fada8bf8686cddf58b9b26c9c4289ed0c92a77907'
|
||||
license 'GPL-3'
|
||||
source_url 'https://ftpmirror.gnu.org/gzip/gzip-1.12.tar.xz'
|
||||
source_sha256 'ce5e03e519f637e1f814011ace35c4f87b33c0bbabeec35baf5fbd3479e91956'
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gzip/1.11_armv7l/gzip-1.11-chromeos-armv7l.tpxz',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gzip/1.11_armv7l/gzip-1.11-chromeos-armv7l.tpxz',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gzip/1.11_i686/gzip-1.11-chromeos-i686.tar.xz',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gzip/1.11_x86_64/gzip-1.11-chromeos-x86_64.tpxz'
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gzip/1.12_armv7l/gzip-1.12-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gzip/1.12_armv7l/gzip-1.12-chromeos-armv7l.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gzip/1.12_x86_64/gzip-1.12-chromeos-x86_64.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/gzip/1.12_i686/gzip-1.12-chromeos-i686.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: 'c9350be0932de35f6988748842ea5bb939b133add7f194f3b0d37f6ff55816bc',
|
||||
armv7l: 'c9350be0932de35f6988748842ea5bb939b133add7f194f3b0d37f6ff55816bc',
|
||||
i686: 'dd638a8e748003937fb955f97c2112affe77ba7c4a041b89778abce0ccd81794',
|
||||
x86_64: '605605a9eb7f26b799b07b8246f80a82b7ab8a16a3749a393763a4401497bfda'
|
||||
aarch64: '2a699b3eba6ff714a780e8c2c32131c842f2960d2eb04de280268c54d111aed1',
|
||||
armv7l: '2a699b3eba6ff714a780e8c2c32131c842f2960d2eb04de280268c54d111aed1',
|
||||
x86_64: 'bd27a2c304c111cd4983416745ff83c210f15773f2dc5fd864369d7617ef904a',
|
||||
i686: '9beef9bcb1bbd34f2c476e1412854a72181104b4d7db79ffec815818b93a8e81'
|
||||
})
|
||||
|
||||
def self.patch
|
||||
return unless ARCH == 'i686'
|
||||
|
||||
# Patch from https://git.savannah.gnu.org/cgit/gnulib.git/diff/?id=84863a1c4dc8cca8fb0f6f670f67779cdd2d543b
|
||||
@gnulibpatch = <<~'PATCH_EOF'
|
||||
diff --git a/lib/string.in.h b/lib/string.in.h
|
||||
index b6840fa..33160b2 100644
|
||||
--- a/lib/string.in.h
|
||||
+++ b/lib/string.in.h
|
||||
@@ -583,7 +583,7 @@ _GL_FUNCDECL_RPL (strndup, char *,
|
||||
_GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE);
|
||||
_GL_CXXALIAS_RPL (strndup, char *, (char const *__s, size_t __n));
|
||||
# else
|
||||
-# if !@HAVE_DECL_STRNDUP@ || __GNUC__ >= 11
|
||||
+# if !@HAVE_DECL_STRNDUP@ || (__GNUC__ >= 11 && !defined strndup)
|
||||
_GL_FUNCDECL_SYS (strndup, char *,
|
||||
(char const *__s, size_t __n)
|
||||
_GL_ARG_NONNULL ((1))
|
||||
@@ -593,7 +593,7 @@ _GL_CXXALIAS_SYS (strndup, char *, (char const *__s, size_t __n));
|
||||
# endif
|
||||
_GL_CXXALIASWARN (strndup);
|
||||
#else
|
||||
-# if __GNUC__ >= 11
|
||||
+# if __GNUC__ >= 11 && !defined strndup
|
||||
/* For -Wmismatched-dealloc: Associate strndup with free or rpl_free. */
|
||||
_GL_FUNCDECL_SYS (strndup, char *,
|
||||
(char const *__s, size_t __n)
|
||||
PATCH_EOF
|
||||
File.write('gnulib.patch', @gnulibpatch)
|
||||
system 'patch -p 1 -i gnulib.patch'
|
||||
end
|
||||
|
||||
def self.build
|
||||
system "#{CREW_ENV_OPTIONS} ./configure #{CREW_OPTIONS}"
|
||||
system 'make'
|
||||
system "./configure #{CREW_OPTIONS} \
|
||||
--enable-threads=posix"
|
||||
system "mold -run make -j #{CREW_NPROC}"
|
||||
end
|
||||
|
||||
def self.install
|
||||
|
||||
Reference in New Issue
Block a user