mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-26 12:45:20 +03:00
51 lines
1.8 KiB
Diff
51 lines
1.8 KiB
Diff
From: Jakub Jirutka <jakub@jirutka.cz>
|
|
Date: Sat, 15 Jul 2023 21:30:26 +0200
|
|
Subject: [PATCH] Build rusty_v8 with system ICU
|
|
|
|
--- a/vendor/v8/src/icu.rs
|
|
+++ b/vendor/v8/src/icu.rs
|
|
@@ -5,7 +5,7 @@
|
|
extern "C" {
|
|
fn icu_get_default_locale(output: *mut char, output_len: usize) -> usize;
|
|
fn icu_set_default_locale(locale: *const char);
|
|
- fn udata_setCommonData_73(this: *const u8, error_code: *mut i32);
|
|
+ fn udata_setCommonData_74(this: *const u8, error_code: *mut i32);
|
|
}
|
|
|
|
/// This function bypasses the normal ICU data loading process and allows you to force ICU's system
|
|
@@ -45,7 +45,7 @@
|
|
pub fn set_common_data_72(data: &'static [u8]) -> Result<(), i32> {
|
|
let mut error_code = 0i32;
|
|
unsafe {
|
|
- udata_setCommonData_73(data.as_ptr(), &mut error_code);
|
|
+ udata_setCommonData_74(data.as_ptr(), &mut error_code);
|
|
}
|
|
if error_code == 0 {
|
|
Ok(())
|
|
--- a/vendor/v8/src/binding.cc
|
|
+++ b/vendor/v8/src/binding.cc
|
|
@@ -3338,8 +3338,8 @@
|
|
extern "C" {
|
|
|
|
size_t icu_get_default_locale(char* output, size_t output_len) {
|
|
- const icu_73::Locale& default_locale = icu::Locale::getDefault();
|
|
- icu_73::CheckedArrayByteSink sink(output, static_cast<uint32_t>(output_len));
|
|
+ const icu::Locale& default_locale = icu::Locale::getDefault();
|
|
+ icu::CheckedArrayByteSink sink(output, static_cast<uint32_t>(output_len));
|
|
UErrorCode status = U_ZERO_ERROR;
|
|
default_locale.toLanguageTag(sink, status);
|
|
assert(status == U_ZERO_ERROR);
|
|
--- a/vendor/v8/build.rs
|
|
+++ b/vendor/v8/build.rs
|
|
@@ -511,6 +511,11 @@
|
|
|
|
// Link with system-provided zlib.
|
|
println!("cargo:rustc-link-lib=z");
|
|
+
|
|
+ // Link with system-provided ICU libraries.
|
|
+ println!("cargo:rustc-link-lib=icui18n");
|
|
+ println!("cargo:rustc-link-lib=icuuc");
|
|
+ println!("cargo:rustc-link-lib=icudata");
|
|
}
|
|
|
|
// Chromium depot_tools contains helpers
|