mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-07 22:54:11 -05:00
Build: zed started at 2025-07-28-04UTC. (#12281)
* move zed to rust build Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust rust buildsystem Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add cargo_about Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Updating package files for linux/386 to branch zed. * Adjust ruby buildsystem Signed-off-by: Satadru Pramanik <satadru@gmail.com> * add solargraph dep to zed Signed-off-by: Satadru Pramanik <satadru@gmail.com> * adjust rust buildsystem Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust rust flags. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust build Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust zed and build scripts Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust zed build... Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust rust build. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Build on linux/amd64 to branch zed. * Updating package files for linux/386 to branch zed. * lint Signed-off-by: Satadru Pramanik <satadru@gmail.com> * reorder deps Signed-off-by: Satadru Pramanik <satadru@gmail.com> * lint Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust zed build. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * zed: Package File Update Run on linux/386 container. * Add back png files to build Signed-off-by: Satadru Pramanik <satadru@gmail.com> * zed: Package File Update Run on linux/386 container. * Adjust zed package file. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * zed: Build Run on linux/amd64. * zed: Package File Update Run on linux/386 container. --------- 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: Ed Reel <edreel@gmail.com>
This commit is contained in:
committed by
GitHub
parent
c6d20d5803
commit
d74c42954e
@@ -10,6 +10,7 @@ class Autotools < Package
|
||||
def self.build
|
||||
@autotools_build_relative_dir ||= '.'
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
Dir.chdir(@autotools_build_relative_dir) do
|
||||
|
||||
@@ -10,6 +10,7 @@ class CMake < Package
|
||||
@crew_cmake_options = @no_lto ? CREW_CMAKE_OPTIONS.gsub('-ffat-lto-objects', '').gsub('-flto=auto', '').sub('-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=TRUE', '') : CREW_CMAKE_OPTIONS
|
||||
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
system "#{@pre_cmake_options} cmake -S #{@cmake_build_relative_dir} -B #{@cmake_build_relative_dir}/builddir -G Ninja #{@crew_cmake_options} #{@cmake_options}"
|
||||
|
||||
@@ -10,6 +10,7 @@ class Meson < Package
|
||||
@crew_meson_options = @no_lto ? CREW_MESON_OPTIONS.sub('-Db_lto=true', '-Db_lto=false') : CREW_MESON_OPTIONS
|
||||
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
system "#{@pre_meson_options} meson setup #{@crew_meson_options} #{@meson_options} #{@meson_build_relative_dir}/builddir #{@meson_build_relative_dir}"
|
||||
|
||||
@@ -7,6 +7,7 @@ class PERL < Package
|
||||
|
||||
def self.prebuild
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
system "#{@pre_perl_options} perl Makefile.PL"
|
||||
|
||||
@@ -39,6 +39,7 @@ class Pip < Package
|
||||
|
||||
def self.install
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
@pip_cache_dir = `pip cache dir`.chomp
|
||||
|
||||
@@ -7,6 +7,7 @@ class Python < Package
|
||||
|
||||
def self.build
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
@python_build_relative_dir ||= '.'
|
||||
|
||||
@@ -7,6 +7,7 @@ class Qmake < Package
|
||||
|
||||
def self.build
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
system "QMAKE_CXX='g++ #{File.join(CREW_LIB_PREFIX, 'libC.so.6').to_s if ARCH == 'x86_64' && Gem::Version.new(LIBC_VERSION.to_s) >= Gem::Version.new('2.35')}' qmake"
|
||||
|
||||
@@ -110,6 +110,7 @@ class RUBY < Package
|
||||
return unless !no_compile_needed? || @gem_binary_build_needed
|
||||
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
Kernel.system "gem fetch #{@ruby_gem_name} --platform=ruby --version=#{@ruby_gem_version}"
|
||||
|
||||
@@ -3,21 +3,25 @@ require_relative '../require_gem'
|
||||
require_relative '../report_buildsystem_methods'
|
||||
|
||||
class RUST < Package
|
||||
property :rust_channel, :rust_features, :rust_install_path, :rust_options, :rust_release_profile, :rust_targets, :pre_rust_options, :rust_build_extras, :rust_install_extras
|
||||
property :rust_channel, :rust_flags, :rust_features, :rust_install_path, :rust_options, :rust_packages, :rust_release_profile, :rust_targets, :pre_rust_options, :rust_build_extras, :rust_install_extras
|
||||
|
||||
def self.build
|
||||
@rustflags = "#{ENV.fetch('RUSTFLAGS', nil)} #{@rust_flags}"
|
||||
rust_env =
|
||||
{
|
||||
LD: 'mold',
|
||||
LIBRARY_PATH: CREW_LIB_PREFIX,
|
||||
PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil)
|
||||
PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil),
|
||||
RUSTFLAGS: @rustflags
|
||||
}.transform_keys(&:to_s)
|
||||
|
||||
@channel_flag = @rust_channel.to_s.empty? ? '' : "+#{@rust_channel}"
|
||||
@features = @rust_features.to_s.empty? ? '' : "--features #{@rust_features}"
|
||||
@profile = @rust_release_profile.to_s.empty? ? 'release' : @rust_release_profile
|
||||
@rust_install_path ||= '.'
|
||||
@packages = @rust_packages.to_s.empty? ? '' : @rust_packages.split.map { |p| "--package #{p}" }.join(' ')
|
||||
extend ReportBuildsystemMethods
|
||||
|
||||
print_buildsystem_methods
|
||||
|
||||
unless @rust_channel.to_s.empty?
|
||||
@@ -28,6 +32,7 @@ class RUST < Package
|
||||
system rust_env, "#{@pre_rust_options} cargo #{@channel_flag} fetch"
|
||||
system rust_env, "#{@pre_rust_options} cargo #{@channel_flag} build \
|
||||
--profile=#{@profile} \
|
||||
#{@packages} \
|
||||
#{@features} \
|
||||
#{@rust_options}"
|
||||
@rust_build_extras&.call
|
||||
@@ -38,13 +43,13 @@ class RUST < Package
|
||||
{
|
||||
LD: 'mold',
|
||||
LIBRARY_PATH: CREW_LIB_PREFIX,
|
||||
PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil)
|
||||
PATH: "#{CREW_PREFIX}/share/cargo/bin:" + ENV.fetch('PATH', nil),
|
||||
RUSTFLAGS: @rustflags
|
||||
}.transform_keys(&:to_s)
|
||||
|
||||
@rust_install_path.split.each do |path|
|
||||
system rust_env, "cargo #{@channel_flag} install \
|
||||
--profile=#{@profile} \
|
||||
--offline \
|
||||
--no-track \
|
||||
--path #{path} \
|
||||
#{@features} \
|
||||
|
||||
2
manifest/armv7l/c/cargo_about.filelist
Normal file
2
manifest/armv7l/c/cargo_about.filelist
Normal file
@@ -0,0 +1,2 @@
|
||||
/usr/local/bin/about
|
||||
/usr/local/bin/cargo-about
|
||||
2
manifest/i686/c/cargo_about.filelist
Normal file
2
manifest/i686/c/cargo_about.filelist
Normal file
@@ -0,0 +1,2 @@
|
||||
/usr/local/bin/about
|
||||
/usr/local/bin/cargo-about
|
||||
2
manifest/x86_64/c/cargo_about.filelist
Normal file
2
manifest/x86_64/c/cargo_about.filelist
Normal file
@@ -0,0 +1,2 @@
|
||||
/usr/local/bin/about
|
||||
/usr/local/bin/cargo-about
|
||||
@@ -1,5 +1,4 @@
|
||||
/usr/local/bin/zed
|
||||
/usr/local/libexec/zed-editor
|
||||
/usr/local/share/applications/zed.desktop
|
||||
/usr/local/share/icons/hicolor/1024x1024/apps/zed.png
|
||||
/usr/local/share/icons/hicolor/512x512/apps/zed.png
|
||||
|
||||
32
packages/cargo_about.rb
Normal file
32
packages/cargo_about.rb
Normal file
@@ -0,0 +1,32 @@
|
||||
# Adapted from Arch Linux cargo-about PKGBUILD at:
|
||||
# https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=cargo-about
|
||||
|
||||
require 'buildsystems/rust'
|
||||
|
||||
class Cargo_about < RUST
|
||||
description 'Cargo plugin to generate list of all licenses for a crate'
|
||||
homepage 'https://github.com/EmbarkStudios/cargo-about'
|
||||
version '0.7.1'
|
||||
license 'Apache MIT'
|
||||
compatibility 'all'
|
||||
source_url 'https://github.com/EmbarkStudios/cargo-about.git'
|
||||
git_hashtag version
|
||||
binary_compression 'tar.zst'
|
||||
|
||||
binary_sha256({
|
||||
aarch64: '0c74f01d9c6327ffd3c7971a56447e7c83df5f14ed1e40a60452795747e3aadb',
|
||||
armv7l: '0c74f01d9c6327ffd3c7971a56447e7c83df5f14ed1e40a60452795747e3aadb',
|
||||
i686: '8038a9cfaf806775f03ab9bf02d8caab93758508be712caa82a0a171eeca2ae8',
|
||||
x86_64: '64646e7fca526ae51f654c15d85ab0156b2dfbdc33a9a5b77e4ccc1d639d4984'
|
||||
})
|
||||
|
||||
depends_on 'gcc_lib' # R
|
||||
depends_on 'glibc' # R
|
||||
depends_on 'rust' => :build
|
||||
|
||||
rust_install_extras do
|
||||
Dir.chdir("#{CREW_DEST_PREFIX}/bin") do
|
||||
FileUtils.ln_s 'cargo-about', 'about'
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,33 +1,51 @@
|
||||
require 'package'
|
||||
require 'buildsystems/rust'
|
||||
|
||||
class Zed < Package
|
||||
class Zed < RUST
|
||||
description 'Zed is a high-performance, multiplayer code editor'
|
||||
homepage 'https://zed.dev/'
|
||||
version '0.186.12'
|
||||
version '0.196.6'
|
||||
license 'GPL-3, AGPL-3, Apache-2.0'
|
||||
compatibility 'x86_64'
|
||||
min_glibc '2.28'
|
||||
source_url "https://github.com/zed-industries/zed/releases/download/v#{version}/zed-linux-x86_64.tar.gz"
|
||||
source_sha256 '9c0abca37319d96bf8ba03653a93413011210a338acc386ddaf88d68013c1a6d'
|
||||
source_url 'https://github.com/zed-industries/zed.git'
|
||||
git_hashtag "v#{version}"
|
||||
binary_compression 'tar.zst'
|
||||
|
||||
depends_on 'alsa_lib'
|
||||
depends_on 'libbsd'
|
||||
depends_on 'libxau'
|
||||
depends_on 'libxcb'
|
||||
depends_on 'libxdmcp'
|
||||
depends_on 'libxkbcommon'
|
||||
depends_on 'openssl'
|
||||
depends_on 'zlib'
|
||||
depends_on 'zstd'
|
||||
binary_sha256({
|
||||
x86_64: '8320adf4460453f9e1d2baa2f7acf9326d4f0a8d011c223715dcfd1424957c76'
|
||||
})
|
||||
|
||||
no_compile_needed
|
||||
no_shrink
|
||||
depends_on 'alsa_lib' # R
|
||||
depends_on 'cargo_about' => :build
|
||||
depends_on 'gcc_lib' # R
|
||||
depends_on 'glibc' # R
|
||||
depends_on 'libbsd' # R
|
||||
depends_on 'libx11' # R
|
||||
depends_on 'libxau' # R
|
||||
depends_on 'libxcb' # R
|
||||
depends_on 'libxdmcp' # R
|
||||
depends_on 'libxkbcommon' # R
|
||||
depends_on 'llvm_dev' => :build
|
||||
depends_on 'openssl' # R
|
||||
depends_on 'ruby_solargraph' # L
|
||||
depends_on 'rust' => :build
|
||||
depends_on 'zlib' # R
|
||||
depends_on 'zstd' # R
|
||||
|
||||
rust_flags '-C link-args=-Wl,--disable-new-dtags,-rpath,$ORIGIN/../lib -C symbol-mangling-version=v0 --cfg tokio_unstable'
|
||||
rust_packages 'zed'
|
||||
|
||||
def self.prebuild
|
||||
system 'script/generate-licenses'
|
||||
end
|
||||
|
||||
def self.install
|
||||
FileUtils.mkdir_p CREW_DEST_PREFIX.to_s
|
||||
FileUtils.mv 'bin/', CREW_DEST_PREFIX.to_s
|
||||
FileUtils.mv 'share/', CREW_DEST_PREFIX.to_s
|
||||
FileUtils.mv 'libexec/', CREW_DEST_PREFIX.to_s
|
||||
system "DO_STARTUP_NOTIFY=true APP_CLI=zed APP_ICON=zed \
|
||||
APP_ARGS='%U' APP_NAME=Zed \
|
||||
envsubst < 'crates/zed/resources/zed.desktop.in' > zed.desktop"
|
||||
FileUtils.install 'target/release/zed', "#{CREW_DEST_PREFIX}/bin/zed", mode: 0o755
|
||||
FileUtils.install 'zed.desktop', "#{CREW_DEST_PREFIX}/share/applications/zed.desktop", mode: 0o644
|
||||
FileUtils.install 'crates/zed/resources/app-icon.png', "#{CREW_DEST_PREFIX}/share/icons/hicolor/512x512/apps/zed.png", mode: 0o644
|
||||
FileUtils.install 'crates/zed/resources/app-icon@2x.png', "#{CREW_DEST_PREFIX}/share/icons/hicolor/1024x1024/apps/zed.png", mode: 0o644
|
||||
end
|
||||
|
||||
def self.postinstall
|
||||
|
||||
@@ -825,6 +825,11 @@ url: https://github.com/sindresorhus/caprine/releases
|
||||
activity: low
|
||||
---
|
||||
kind: url
|
||||
name: cargo_about
|
||||
url: https://github.com/EmbarkStudios/cargo-about/releases
|
||||
activity: medium
|
||||
---
|
||||
kind: url
|
||||
name: cargo_c
|
||||
url: https://github.com/lu-zero/cargo-c/releases
|
||||
activity: high
|
||||
|
||||
Reference in New Issue
Block a user