total_size_fix — less → 679 (#12536)

* Use CREW_DEST_DIR for total_size calculation.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* less => 679

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* total_size_fix: Build Run on linux/arm/v7.

* total_size_fix: Build Run on linux/amd64.

* total_size_fix: Package File Update Run on linux/386 container.

* Remove less patch.

Signed-off-by: Satadru Pramanik <satadru@gmail.com>

* total_size_fix: Package File Update Run on linux/386 container.

---------

Signed-off-by: Satadru Pramanik <satadru@gmail.com>
Co-authored-by: satmandu <satmandu@users.noreply.github.com>
Co-authored-by: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
This commit is contained in:
Satadru Pramanik, DO, MPH, MEng
2025-08-17 20:31:24 -04:00
committed by GitHub
parent e8912388ae
commit 39e9ecdeb1
6 changed files with 12 additions and 15 deletions

View File

@@ -834,7 +834,7 @@ def prepare_package(destdir)
# create file list
filelist = Dir[".{#{CREW_PREFIX},#{HOME}}/**/{*,.?*}"].filter_map { |e| File.file?(e) || File.symlink?(e) ? e[1..] : nil }.sort
total_size = filelist.sum { |file| File.file?(file) ? File.size(file) : 0 }
total_size = filelist.sum { |file| File.file?(File.join(CREW_DEST_DIR, file)) ? File.size(File.join(CREW_DEST_DIR, file)) : 0 }
File.write 'filelist', <<~EOF
# Total size: #{total_size}

View File

@@ -4,7 +4,7 @@ require 'etc'
require 'open3'
OLD_CREW_VERSION ||= defined?(CREW_VERSION) ? CREW_VERSION : '1.0'
CREW_VERSION ||= '1.65.0' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
CREW_VERSION ||= '1.65.1' unless defined?(CREW_VERSION) && CREW_VERSION == OLD_CREW_VERSION
# Kernel architecture.
KERN_ARCH ||= Etc.uname[:machine]

View File

@@ -1,3 +1,4 @@
# Total size: 442504
/usr/local/bin/less
/usr/local/bin/lessecho
/usr/local/bin/lesskey

View File

@@ -1,3 +1,4 @@
# Total size: 418972
/usr/local/bin/less
/usr/local/bin/lessecho
/usr/local/bin/lesskey

View File

@@ -1,3 +1,4 @@
# Total size: 444984
/usr/local/bin/less
/usr/local/bin/lessecho
/usr/local/bin/lesskey

View File

@@ -3,33 +3,27 @@ require 'buildsystems/autotools'
class Less < Autotools
description 'GNU less is a program similar to more, but which allows backward movement in the file as well as forward movement.'
homepage 'https://www.gnu.org/software/less/'
version '668'
version '679'
license 'GPL-3 or BSD-2'
compatibility 'all'
source_url "https://www.greenwoodsoftware.com/less/less-#{version}.tar.gz"
source_sha256 '2819f55564d86d542abbecafd82ff61e819a3eec967faa36cd3e68f1596a44b8'
source_sha256 '9b68820c34fa8a0af6b0e01b74f0298bcdd40a0489c61649b47058908a153d78'
binary_compression 'tar.zst'
binary_sha256({
aarch64: 'b83aeaa88a4efb9f11f8adb5003c2f74ccc1f86a26ec87987106385bf1216b46',
armv7l: 'b83aeaa88a4efb9f11f8adb5003c2f74ccc1f86a26ec87987106385bf1216b46',
i686: '3a09e33e0e0f02ac98b4eb4e36ebece968f3f9b3f2eda0a0659f018e252cafdc',
x86_64: 'a0a9254cb229835653abaaae2b8f14991b97051affb2fa060161eb8b39c9832e'
aarch64: '5dfafc18d4e38ed36f87f8e58a1203e8e7e91aa38f706d8440ba7a46b9e103c0',
armv7l: '5dfafc18d4e38ed36f87f8e58a1203e8e7e91aa38f706d8440ba7a46b9e103c0',
i686: '2d8081377113c05240aa8142be8420faf8ebdfc4aecbfd9eb3332416cd1658c4',
x86_64: 'cacc7cae985e67d78c35aa7b51e1d98612b57fa9b83e36e52220d6ab07e84d00'
})
depends_on 'gcc_lib' # R
depends_on 'glibc' # R
depends_on 'ncurses' # R
depends_on 'gcc_lib' # R
depends_on 'patch' => :build
autotools_configure_options '--with-regex=posix'
def self.patch
downloader 'https://patch-diff.githubusercontent.com/raw/gwsw/less/pull/412.diff',
'feb65b74b27a58e4acdf4efa27d65ab4f79cb5e8a02b9ddffb33b3571828c131'
system 'patch -Np1 -i 412.diff'
end
def self.install
system 'make', "DESTDIR=#{CREW_DEST_DIR}", 'install'
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/env.d"