mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-08 23:18:10 -05:00
upx -> 4.0.1 (#7825)
This commit is contained in:
@@ -6,44 +6,45 @@ require 'package'
|
||||
class Upx < Package
|
||||
description 'Extendable, high-performance executable packer for several executable formats'
|
||||
homepage 'https://github.com/upx/upx'
|
||||
version '4.0.0-0108'
|
||||
version '4.0.1'
|
||||
license 'custom GPL2'
|
||||
compatibility 'all'
|
||||
source_url 'https://github.com/upx/upx.git'
|
||||
git_hashtag '0108c1c34ef7fbcea99f6071dbd691670e43635f'
|
||||
git_hashtag "v#{version}"
|
||||
|
||||
binary_url({
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/upx/4.0.0-0108_armv7l/upx-4.0.0-0108-chromeos-armv7l.tpxz',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/upx/4.0.0-0108_armv7l/upx-4.0.0-0108-chromeos-armv7l.tpxz',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/upx/4.0.0-0108_i686/upx-4.0.0-0108-chromeos-i686.tpxz',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/upx/4.0.0-0108_x86_64/upx-4.0.0-0108-chromeos-x86_64.tpxz'
|
||||
aarch64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/upx/4.0.1_armv7l/upx-4.0.1-chromeos-armv7l.tar.zst',
|
||||
armv7l: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/upx/4.0.1_armv7l/upx-4.0.1-chromeos-armv7l.tar.zst',
|
||||
i686: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/upx/4.0.1_i686/upx-4.0.1-chromeos-i686.tar.zst',
|
||||
x86_64: 'https://gitlab.com/api/v4/projects/26210301/packages/generic/upx/4.0.1_x86_64/upx-4.0.1-chromeos-x86_64.tar.zst'
|
||||
})
|
||||
binary_sha256({
|
||||
aarch64: 'e10c5ea814b6983525a0ac4b6c108999157dcd5d50b7fafd22c924fab451696d',
|
||||
armv7l: 'e10c5ea814b6983525a0ac4b6c108999157dcd5d50b7fafd22c924fab451696d',
|
||||
i686: 'b40da75e3bc758432029f18625ed3439997f8e5f81d536996c326eee58c6dc20',
|
||||
x86_64: '05d13bf22d83b16e8037d1f744b601bada2821e09990bd6f00b5e99248f3e19a'
|
||||
aarch64: 'c7d3497ad54f327ae9cd8de79fe00c6515dae6e57c80beb247cf5165f3498397',
|
||||
armv7l: 'c7d3497ad54f327ae9cd8de79fe00c6515dae6e57c80beb247cf5165f3498397',
|
||||
i686: '2b7b9b0ceeafd6393741abbaf693465e632759a690e5dedebd84ccf882b8b2ff',
|
||||
x86_64: '1d60d569bffecf477e82a58e6285bfdc62c673c8b5329075d776a548e89d65ac'
|
||||
})
|
||||
|
||||
depends_on 'ucl'
|
||||
|
||||
def self.patch
|
||||
# Disable a warning. upx believes this is not a release version if the git revision is set.
|
||||
system "sed -i 's/bool warn = true/bool warn = false/' src/main.cpp"
|
||||
end
|
||||
# depends_on 'ucl'
|
||||
depends_on 'gcc' # R
|
||||
depends_on 'glibc' # R
|
||||
|
||||
def self.build
|
||||
system "#{CREW_ENV_OPTIONS} make \
|
||||
CHECK_WHITESPACE=/bin/true \
|
||||
UPX_LZMA_VERSION=0x465 \
|
||||
UPX_LZMADIR=`pwd` \
|
||||
all"
|
||||
FileUtils.mkdir('builddir')
|
||||
Dir.chdir('builddir') do
|
||||
system "cmake #{CREW_CMAKE_OPTIONS} \
|
||||
-DUPX_CONFIG_DISABLE_GITREV=true \
|
||||
../ -G Ninja"
|
||||
end
|
||||
system 'samu -C builddir'
|
||||
end
|
||||
|
||||
def self.check
|
||||
# samu does not work here.
|
||||
system 'ninja test -C builddir'
|
||||
end
|
||||
|
||||
def self.install
|
||||
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
|
||||
FileUtils.mkdir_p "#{CREW_DEST_MAN_PREFIX}/man1"
|
||||
FileUtils.install 'src/upx.out', "#{CREW_DEST_PREFIX}/bin/upx", mode: 0o755
|
||||
FileUtils.install 'doc/upx.1', "#{CREW_DEST_MAN_PREFIX}/man1/upx.1", mode: 0o644
|
||||
system "DESTDIR=#{CREW_DEST_DIR} samu -C builddir install"
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user