mirror of
https://github.com/chromebrew/chromebrew.git
synced 2026-01-07 22:54:11 -05:00
* Add js140 Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add cbindgen dep to js140. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add js140 to packages.yaml. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust upstream update settings to match specific mozjs anitya versions. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add embed-bitcode error workaround. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Adjust arm build as per https://bugzilla.mozilla.org/show_bug.cgi?id=1786621 Signed-off-by: Satadru Pramanik <satadru@gmail.com> * js140: Package File Update Run on linux/386 container. * js140: Package File Update Run on linux/amd64 container. * js140: Package File Update Run on linux/arm/v7 container. * Update gjs. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Add gtk4 dep to gjs. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update js140 build, add gjs binaries Signed-off-by: Satadru Pramanik <satadru@gmail.com> * cleanup and add binaries. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Update cbindgen Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Fix cbindgen git version. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * js140: Package File Update Run on linux/386 container. * js140: Package File Update Run on linux/amd64 container. * js140: Package File Update Run on linux/arm/v7 container. * Adjust icu4c mozjs exclusion. Signed-off-by: Satadru Pramanik <satadru@gmail.com> * Suggessted changes. 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: chromebrew-actions[bot] <chromebrew-actions[bot]@users.noreply.github.com>
96 lines
3.7 KiB
Ruby
96 lines
3.7 KiB
Ruby
# Adapted from Arch Linux js115 PKGBUILD at:
|
|
# https://gitlab.archlinux.org/archlinux/packaging/packages/js115/-/blob/main/PKGBUILD?ref_type=heads
|
|
|
|
require 'package'
|
|
|
|
class Js140 < Package
|
|
description 'JavaScript interpreter and libraries - Version 140'
|
|
homepage 'https://spidermonkey.dev/'
|
|
version '140.4.0-1'
|
|
license 'MPL-2.0'
|
|
compatibility 'aarch64 armv7l x86_64'
|
|
source_url "https://archive.mozilla.org/pub/firefox/releases/#{version.split('-').first}esr/source/firefox-#{version.split('-').first}esr.source.tar.xz"
|
|
source_sha256 '49f20673171046bc7b64f4caa340c46e1e105b9107f0ef68b7a94f379bcea4f7'
|
|
binary_compression 'tar.zst'
|
|
|
|
binary_sha256({
|
|
aarch64: '20cc7045e2f2d41d8db93eaf8e7b78ce5ff77c51557e0a8e365bf4855751d4cd',
|
|
armv7l: '20cc7045e2f2d41d8db93eaf8e7b78ce5ff77c51557e0a8e365bf4855751d4cd',
|
|
x86_64: '733f2b3cf638515f8236465372e8d69585666dfbc46e48b4bc8a6d30072f92d4'
|
|
})
|
|
|
|
depends_on 'autoconf213' => :build
|
|
depends_on 'cbindgen' => :build
|
|
depends_on 'gcc_lib' # R
|
|
depends_on 'glibc' # R
|
|
depends_on 'icu4c' # R
|
|
depends_on 'libnotify' => :build
|
|
depends_on 'llvm_dev' => :build # llvm-objdump is needed.
|
|
depends_on 'ncurses' # R
|
|
depends_on 'nss' # R
|
|
depends_on 'py3_maturin' => :build
|
|
depends_on 'py3_pre_commit' => :build
|
|
depends_on 'py3_pycairo' => :build
|
|
depends_on 'readline' # R
|
|
depends_on 'rust' => :build
|
|
depends_on 'wget2' => :build
|
|
depends_on 'zlib' # R
|
|
|
|
def self.patch
|
|
# As per https://bugzilla.mozilla.org/show_bug.cgi?id=1973994
|
|
system "sed -i '/* js_config_h */i #undef XP_UNIX' js/src/js-config.h.in"
|
|
system "sed -i '/* js_config_h */i #undef XP_WIN' js/src/js-config.h.in"
|
|
end
|
|
|
|
def self.build
|
|
File.write '.mozconfig', <<~MOZCONFIG_EOF
|
|
ac_add_options --disable-bootstrap
|
|
ac_add_options --disable-debug
|
|
ac_add_options --disable-debug-symbols
|
|
ac_add_options --disable-jemalloc
|
|
ac_add_options --disable-strip
|
|
ac_add_options --enable-application=js
|
|
ac_add_options --enable-hardening
|
|
ac_add_options --enable-linker=#{CREW_LINKER}
|
|
ac_add_options --enable-optimize
|
|
ac_add_options --enable-readline
|
|
ac_add_options --enable-release
|
|
ac_add_options --enable-shared-js
|
|
ac_add_options --enable-tests
|
|
ac_add_options --libdir=#{CREW_LIB_PREFIX}
|
|
ac_add_options --prefix=#{CREW_PREFIX}
|
|
ac_add_options --with-intl-api
|
|
ac_add_options --with-system-icu
|
|
ac_add_options --with-system-nspr
|
|
ac_add_options --with-system-zlib
|
|
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj
|
|
MOZCONFIG_EOF
|
|
FileUtils.mkdir_p 'obj'
|
|
Dir.chdir 'obj' do
|
|
# error: Cannot set `RUSTC_BOOTSTRAP=1` from build script of `packed_simd v0.3.4 (https://github.com/hsivonen/packed_simd?rev=0917fe780032a6bbb23d71be545f9c1834128d75#0917fe78)`.
|
|
# note: Crates cannot set `RUSTC_BOOTSTRAP` themselves, as doing so would subvert the stability guarantees of Rust for your project.
|
|
# help: If you're sure you want to do this in your project, set the environment variable `RUSTC_BOOTSTRAP=packed_simd` before running cargo instead.
|
|
#
|
|
ENV['RUSTC_BOOTSTRAP'] = 'packed_simd,packed_simd_2,encoding_rs'
|
|
system "CFLAGS='-fcf-protection=none' \
|
|
CXXFLAGS='-fcf-protection=none' \
|
|
CC=gcc \
|
|
CXX=g++ \
|
|
LD=#{CREW_LINKER} \
|
|
RUSTUP_HOME='#{CREW_PREFIX}/share/rustup' \
|
|
CARGO_HOME='#{CREW_PREFIX}/share/cargo' \
|
|
LDFLAGS='-lreadline -ltinfo' \
|
|
MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=pip \
|
|
MOZCONFIG=../.mozconfig \
|
|
../mach build"
|
|
end
|
|
end
|
|
|
|
def self.install
|
|
Dir.chdir 'obj' do
|
|
system "DESTDIR=#{CREW_DEST_DIR} make install"
|
|
FileUtils.rm Dir.glob("#{CREW_DEST_LIB_PREFIX}/*.ajs")
|
|
end
|
|
end
|
|
end
|