mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-07 22:54:11 -05:00
* build gcc 15.1 RC Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add rust build dep to gcc. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * back out rust Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add conflicts_ok. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add built packages for linux/386 to gcc15 * Add built packages for linux/amd64 to gcc15 * Add built packages for linux/arm/v7 to gcc15 * remove gcc_lib dep from gcc_build. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add back rust. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add more binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * cleanup Signed-off-by: Satadru Pramanik <satadru@gmail.com> * update hashes Signed-off-by: Satadru Pramanik <satadru@gmail.com> * add no_shrink to llvm20_build Signed-off-by: Satadru Pramanik <satadru@gmail.com> * alphabetize Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Testing changes Signed-off-by: Satadru Pramanik <satadru@gmail.com> * more gcc build adjustments Signed-off-by: Satadru Pramanik <satadru@gmail.com> * rust adjustments Signed-off-by: Satadru Pramanik <satadru@gmail.com> * binutils, gcc_build adjustments Signed-off-by: Satadru Pramanik <satadru@gmail.com> * add binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * add binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust crew to handle adding hashes for remote binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add binaries, adjust getrealdeps Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Revert BASH_ENV changes Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add some gdb builds Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add more arm binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add arm binaries for gdb Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust rustflags. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * update rust package, add rust buildsystem, add zellij Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update packages/gcc_dev.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/gcc_dev.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/gcc_lib.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/gcc_lib.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/libssp.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/libssp.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/libssp.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/libssp.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Add CREW_GCC_VER case binaries for binutils. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Move valid buildsystems list into const.rb Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add zellij to packages.yaml. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add gcc14 build hashes for gdb Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add glibc 2.37 compat Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update gcc 15.1 RC version to 15.1.0-RC-20250423. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add update gcc_build builds Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update uutils_coreutils build to use rust buildsystem Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update uutils package Signed-off-by: Satadru Pramanik <satadru@gmail.com> * rust fixes... Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add built packages for linux/386 to gcc15 * Add built packages for linux/amd64 to gcc15 * Add built packages for linux/arm/v7 to gcc15 * Add final gcc15.1 version Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add gcc 15.1 binaries. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update packages/gcc_build.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/gcc_build.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/libssp.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/libssp.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/gcc_lib.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/gcc_lib.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/gcc_dev.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update packages/gcc_dev.rb Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update crew * Update rust for new glibc. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Remove glibc versioning from gcc builds, adjust crew to add CREW_GLIBC_PREFIX to existing rpaths during installs. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update bin/crew Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Fix crew lint garbage. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * rejigger gcc build Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust gcc build args. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * sync with master Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add WIP gcc_build package. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * iterate on gcc_build Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust gcc_build... Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Rationalize env variable names. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * lint Signed-off-by: Satadru Pramanik <satadru@gmail.com> * More gcc_build adjustments. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust fixup to not break existing rpaths. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update gcc_build.rb for new Chromebrew glibc. * Sync gcc_build.rb with master. * Sync binutils.rb with master. * remove core Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add shell replacement to filefix. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * update rubygems Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update crew_profile_base to 0.0.27 Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update crew_profile_base again. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Always run filefix in autotools buildsystem. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add packages, make adjustments. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * cleanup binutils Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust fixup and gcc_build Signed-off-by: Satadru Pramanik <satadru@gmail.com> --------- Signed-off-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: Satadru Pramanik <satadru@gmail.com> Co-authored-by: satmandu <satmandu@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ed Reel <edreel@gmail.com>
96 lines
3.2 KiB
Ruby
96 lines
3.2 KiB
Ruby
require 'package'
|
|
|
|
class Crew_profile_base < Package
|
|
description 'Crew-profile-base sets up Chromebrew\'s environment capabilities.'
|
|
homepage 'https://github.com/chromebrew/crew-profile-base'
|
|
version '0.0.28'
|
|
license 'GPL-3+'
|
|
compatibility 'all'
|
|
source_url "https://github.com/chromebrew/crew-profile-base/archive/refs/tags/#{version}.tar.gz"
|
|
source_sha256 'f89b428b9ae7539bc9b10c91f8db4aaac11284ae3364a3e287e07d9fb64a0d25'
|
|
|
|
no_compile_needed
|
|
print_source_bashrc
|
|
|
|
def self.install
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/env.d"
|
|
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/etc/profile.d"
|
|
|
|
# Don't overwrite custom changes
|
|
%w[01-locale 02-editor 03-pager 99-custom].each do |custom_files|
|
|
FileUtils.rm "./src/env.d/#{custom_files}" if File.exist?("#{CREW_PREFIX}/etc/env.d/#{custom_files}")
|
|
end
|
|
|
|
FileUtils.cp_r Dir['./src/*'], "#{CREW_DEST_PREFIX}/etc/"
|
|
end
|
|
|
|
def self.postinstall
|
|
# Write our rc files
|
|
crew_rc_source_line = "source #{CREW_PREFIX}/etc/profile"
|
|
crew_rcfile = <<~CREW_PROFILE_EOF
|
|
# DO NOT DELETE THIS LINE
|
|
# See #{CREW_PREFIX}/etc/profile for further details
|
|
#{crew_rc_source_line}
|
|
|
|
# Put your stuff under this comment
|
|
|
|
CREW_PROFILE_EOF
|
|
|
|
# append our #{crew_rcfile} to shell rc files (if exist)
|
|
['.bashrc', '.zshrc'].each do |rc|
|
|
rc_path = File.join(HOME, rc)
|
|
|
|
FileUtils.touch rc_path
|
|
# next unless File.exist?(rc_path)
|
|
|
|
rc_file = File.readlines(rc_path, chomp: true)
|
|
|
|
# remove duplicated `source` lines (if any)
|
|
if rc_file.count(crew_rc_source_line) > 1
|
|
puts "Removing duplicated `source` lines in #{rc_path}...".yellow
|
|
first_source_line_index = rc_file.find_index(crew_rc_source_line)
|
|
|
|
# delete all `source` lines
|
|
rc_file.delete(crew_rc_source_line)
|
|
|
|
# re-add the first `source` line
|
|
rc_file.insert(first_source_line_index, crew_rc_source_line)
|
|
end
|
|
|
|
# append our rc string to the beginning of the rc file (if not exist)
|
|
if rc_file.none? { |line| line == "source #{CREW_PREFIX}/etc/profile" }
|
|
puts "Appending `#{crew_rc_source_line}` to the beginning of #{rc_path}...".yellow
|
|
rc_file.unshift(crew_rcfile.lines(chomp: true))
|
|
end
|
|
|
|
# save changes
|
|
File.write rc_path, rc_file.join("\n")
|
|
end
|
|
puts 'Choose your default pager:'.yellow
|
|
@pager_options = [
|
|
{ value: 'most', description: 'Most Pager' },
|
|
{ value: 'more', description: 'More Pager' },
|
|
{ value: 'less', description: 'Less Pager' }
|
|
]
|
|
|
|
@pager_default = Selector.new(@pager_options).show_prompt
|
|
Dir.chdir CREW_DEST_DIR do
|
|
File.write 'pagerenv', <<~PAGER_ENV_EOF
|
|
# The user's preferred pager is set here by the crew_profile_base
|
|
# postinstall.
|
|
|
|
# PAGER from container PAGER variable is passed through into the
|
|
# CONTAINER_PAGER variable.
|
|
if [ -z "$CONTAINER_PAGER" ]; then
|
|
PAGER="#{@pager_default}"
|
|
else
|
|
PAGER="$CONTAINER_PAGER"
|
|
fi
|
|
PAGER_ENV_EOF
|
|
FileUtils.install 'pagerenv', "#{CREW_PREFIX}/etc/env.d/03-pager", mode: 0o644
|
|
end
|
|
puts "The default PAGER has been set to #{@pager_default}.".lightblue
|
|
end
|
|
end
|