mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-10 07:57:59 -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>
104 lines
4.1 KiB
Ruby
104 lines
4.1 KiB
Ruby
require 'package'
|
|
|
|
class Filecmd < Package
|
|
description 'file and libmagic determine file type'
|
|
homepage 'https://darwinsys.com/file/'
|
|
version '5.46-1'
|
|
license 'BSD-2 and GPL-3+' # Chromebrew's filefix is GPL-3+, file itself is BSD-2
|
|
compatibility 'all'
|
|
source_url 'https://github.com/file/file.git'
|
|
git_hashtag "FILE#{version.split('-').first.gsub('.', '_')}"
|
|
binary_compression 'tar.zst'
|
|
|
|
binary_sha256({
|
|
aarch64: 'a9356b92cc06dfe05adf0df04dc157af9b37a668c164714658fffa05d15120b4',
|
|
armv7l: 'a9356b92cc06dfe05adf0df04dc157af9b37a668c164714658fffa05d15120b4',
|
|
i686: '17f1ca5965430ed9913af2c0747a6924ffb171103c36a1b76255317c47bdb87c',
|
|
x86_64: '8b4302f3b0c151193d1c176a02d0efa0a3db93f4ffee956ba14f984957c1cd66'
|
|
})
|
|
|
|
depends_on 'bzip2' # R
|
|
depends_on 'glibc' # R
|
|
depends_on 'lzlib' # R Fixes checking lzlib.h usability... no
|
|
depends_on 'xzutils' # R
|
|
depends_on 'zlib' # 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.
|
|
|
|
File.write 'filefix', <<~FILEFIX_EOF
|
|
#!/usr/bin/env bash
|
|
# Fix Error: /usr/bin/file file not found.
|
|
echo "filefix: Checking for scripts using: '/usr/bin/file' ..."
|
|
while IFS= read -r -d '' f; do
|
|
sed -i 's,/usr/bin/file,#{CREW_PREFIX}/bin/file,g' "${f}"
|
|
done < <(find . -name configure -print0)
|
|
# Make sure we are using the Chromebrew bash shell instead of
|
|
# /bin/sh which in ChromeOS is actually dash.
|
|
echo "filefix: Checking for scripts using: '/bin/sh ' ..."
|
|
grep -rlZ '/bin/sh ' . | xargs -r -0 sed -i 's,/bin/sh ,#{CREW_PREFIX}/bin/sh ,g'
|
|
echo "filefix: Checking for scripts using: '/bin/sh \\\"' ..."
|
|
grep -rlZ "/bin/sh\\\"" . | xargs -r -0 sed -i 's,/bin/sh",#{CREW_PREFIX}/bin/sh",g'
|
|
echo "filefix: Checking for scripts using: \\\"'/bin/sh '\\\" ..."
|
|
grep -rlZ "/bin/sh\\\'" . | xargs -r -0 sed -i "s,/bin/sh',#{CREW_PREFIX}/bin/sh',g"
|
|
FILEFIX_EOF
|
|
end
|
|
|
|
def self.patch
|
|
# Fix Error: /usr/bin/file file not found.
|
|
system 'filefix'
|
|
end
|
|
|
|
def self.build
|
|
system 'autoreconf -fiv' unless File.executable? './configure'
|
|
@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'
|
|
Dir.chdir 'builddir-static' do
|
|
system "env LDFLAGS+=' -static' \
|
|
../configure \
|
|
#{CREW_CONFIGURE_OPTIONS} \
|
|
#{@filecmd_config_opts}"
|
|
system 'make'
|
|
end
|
|
|
|
# Build libmagic and everything else (dynamically linked).
|
|
Dir.mkdir 'builddir-dynamic'
|
|
Dir.chdir 'builddir-dynamic' do
|
|
system "../configure \
|
|
#{CREW_CONFIGURE_OPTIONS} \
|
|
#{@filecmd_config_opts}"
|
|
system 'make'
|
|
end
|
|
end
|
|
|
|
def self.check
|
|
system 'make -C builddir-static check || true'
|
|
system 'make -C builddir-dynamic check || true'
|
|
end
|
|
|
|
def self.install
|
|
# 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.
|
|
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.
|
|
FileUtils.install 'filefix', "#{CREW_DEST_PREFIX}/bin/filefix", mode: 0o755
|
|
end
|
|
end
|