Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump alacritty: 0.14.0 #21973

Merged
merged 1 commit into from
Oct 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 6 additions & 16 deletions x11-packages/alacritty/0001-disable-clipboard.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
diff --git a/alacritty/src/clipboard.rs b/alacritty/src/clipboard.rs
index 7853de47..5bdfc81b 100644
--- a/alacritty/src/clipboard.rs
+++ b/alacritty/src/clipboard.rs
@@ -3,13 +3,13 @@

@@ -4,11 +4,11 @@ use winit::raw_window_handle::RawDisplayHandle;
use alacritty_terminal::term::ClipboardType;

-#[cfg(any(test, not(any(feature = "x11", target_os = "macos", windows))))]
+#[cfg(any(test, not(any(feature = "x11", target_os = "android", target_os = "macos", windows))))]
use copypasta::nop_clipboard::NopClipboardContext;
-#[cfg(all(feature = "wayland", not(any(target_os = "macos", windows))))]
+#[cfg(all(feature = "wayland", not(any(target_os = "android", target_os = "macos", windows))))]
Expand All @@ -18,25 +17,16 @@
use copypasta::ClipboardContext;
use copypasta::ClipboardProvider;

@@ -21,7 +21,7 @@
@@ -20,7 +20,7 @@ pub struct Clipboard {
impl Clipboard {
pub unsafe fn new(display: RawDisplayHandle) -> Self {
match display {
- #[cfg(all(feature = "wayland", not(any(target_os = "macos", windows))))]
+ #[cfg(all(feature = "wayland", not(any(target_os = "android", target_os = "macos", windows))))]
RawDisplayHandle::Wayland(display) => {
let (selection, clipboard) =
wayland_clipboard::create_clipboards_from_external(display.display);
@@ -33,7 +33,7 @@

/// Used for tests and to handle missing clipboard provider when built without the `x11`
/// feature.
- #[cfg(any(test, not(any(feature = "x11", target_os = "macos", windows))))]
+ #[cfg(any(test, not(any(feature = "x11", target_os = "android", target_os = "macos", windows))))]
pub fn new_nop() -> Self {
Self { clipboard: Box::new(NopClipboardContext::new().unwrap()), selection: None }
}
@@ -41,16 +41,16 @@
wayland_clipboard::create_clipboards_from_external(display.display.as_ptr());
@@ -39,16 +39,16 @@ impl Clipboard {

impl Default for Clipboard {
fn default() -> Self {
Expand Down
10 changes: 5 additions & 5 deletions x11-packages/alacritty/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ TERMUX_PKG_HOMEPAGE=https://alacritty.org/
TERMUX_PKG_DESCRIPTION="A fast, cross-platform, OpenGL terminal emulator"
TERMUX_PKG_LICENSE="Apache-2.0, MIT"
TERMUX_PKG_MAINTAINER="Joshua Kahn @TomJo2000"
TERMUX_PKG_VERSION=0.13.2
TERMUX_PKG_REVISION=1
TERMUX_PKG_VERSION=0.14.0
TERMUX_PKG_SRCURL=https://github.com/alacritty/alacritty/archive/refs/tags/v${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=e9a54aabc92bbdc25ab1659c2e5a1e9b76f27d101342c8219cc98a730fd46d90
TERMUX_PKG_SHA256=2919767177c010339502085b4ac5d3f9f15ca27e6befc39aa9d20fefb93ebcdf
TERMUX_PKG_DEPENDS="fontconfig, freetype, libxi, libxcursor, libxrandr"
TERMUX_PKG_BUILD_DEPENDS="libxcb, libxkbcommon, ncurses"
TERMUX_PKG_BUILD_IN_SRC=true
Expand Down Expand Up @@ -34,7 +33,7 @@ termux_step_pre_configure() {
__cargo_fetch_dep_source_for_rust_windowing "glutin"

patch="$TERMUX_PKG_BUILDER_DIR/patch-root-Cargo.diff"
patch --silent -p1 -d "$TERMUX_PKG_SRCDIR" < "$patch"
patch -p1 -d "$TERMUX_PKG_SRCDIR" < "$patch"

cat "$TERMUX_PKG_BUILDER_DIR"/winit-*.diff | patch -p1 -d "$TERMUX_PKG_SRCDIR/winit-source"
cat "$TERMUX_PKG_BUILDER_DIR"/glutin-*.diff | patch -p1 -d "$TERMUX_PKG_SRCDIR/glutin-source"
Expand Down Expand Up @@ -63,7 +62,8 @@ termux_step_pre_configure() {
rm -rf "$dir"/src/backend/libc/shm/*
cp "$dir"/src/backend/linux_raw/shm/* "$dir"/src/backend/libc/shm/
fi
patch --silent -p1 -d "$dir" < "${patch}"
echo "Applying patch for '$crate'"
patch -p1 -d "$dir" < "${patch}"
done
done
}
Expand Down
12 changes: 7 additions & 5 deletions x11-packages/alacritty/freetype-sys.diff
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
diff --git a/build.rs b/build.rs
index 4948cf1..363299d 100644
--- a/build.rs
+++ b/build.rs
@@ -6,7 +6,7 @@ use std::env;

@@ -13,7 +13,7 @@ fn add_sources(build: &mut cc::Build, root: &str, files: &[&str]) {
fn main() {
let target = env::var("TARGET").unwrap();
- if !target.contains("android")
+ if true
&& pkg_config::Config::new().atleast_version("18.5.12").find("freetype2").is_ok()
{
return
&& !target.contains("ohos")
&& pkg_config::Config::new()
.atleast_version("24.3.18")
68 changes: 40 additions & 28 deletions x11-packages/alacritty/glutin-treat-android-as-linux.diff
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
--- a/glutin/build.rs
+++ b/glutin/build.rs
@@ -4,7 +4,7 @@
diff --git a/glutin-winit/build.rs b/glutin-winit/build.rs
index 32078de..bc32b33 100644
--- a/glutin-winit/build.rs
+++ b/glutin-winit/build.rs
@@ -6,7 +6,7 @@ fn main() {
// Setup alias to reduce `cfg` boilerplate.
cfg_aliases! {
// Systems.
Expand All @@ -9,40 +11,61 @@
wasm_platform: { target_family = "wasm" },
macos_platform: { target_os = "macos" },
ios_platform: { target_os = "ios" },
diff --git a/glutin/Cargo.toml b/glutin/Cargo.toml
index ecc9499..c58e938 100644
--- a/glutin/Cargo.toml
+++ b/glutin/Cargo.toml
@@ -40,10 +40,10 @@
@@ -40,10 +40,10 @@ features = [
]
optional = true

-[target.'cfg(target_os = "android")'.dependencies]
+[target.'cfg(target_os = "dummy")'.dependencies]
glutin_egl_sys = { version = "0.6.0", path = "../glutin_egl_sys" }
glutin_egl_sys = { version = "0.7.0", path = "../glutin_egl_sys" }

-[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
+[target.'cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd", target_os = "openbsd"))'.dependencies]
glutin_egl_sys = { version = "0.6.0", path = "../glutin_egl_sys", optional = true }
glutin_glx_sys = { version = "0.5.0", path = "../glutin_glx_sys", optional = true }
glutin_egl_sys = { version = "0.7.0", path = "../glutin_egl_sys", optional = true }
glutin_glx_sys = { version = "0.6.0", path = "../glutin_glx_sys", optional = true }
wayland-sys = { version = "0.31.1", default-features = false, features = ["egl", "client", "dlopen"], optional = true }
diff --git a/glutin/build.rs b/glutin/build.rs
index c8eab1b..6acca1a 100644
--- a/glutin/build.rs
+++ b/glutin/build.rs
@@ -4,7 +4,7 @@ fn main() {
// Setup alias to reduce `cfg` boilerplate.
cfg_aliases! {
// Systems.
- android_platform: { target_os = "android" },
+ android_platform: { target_os = "dummy" },
wasm_platform: { target_family = "wasm" },
macos_platform: { target_os = "macos" },
ios_platform: { target_os = "ios" },
diff --git a/glutin_glx_sys/Cargo.toml b/glutin_glx_sys/Cargo.toml
index 682c69c..d44ad2e 100644
--- a/glutin_glx_sys/Cargo.toml
+++ b/glutin_glx_sys/Cargo.toml
@@ -12,5 +12,5 @@ edition = "2021"
[build-dependencies]
gl_generator = "0.14"

-[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os="dragonfly", target_os="netbsd", target_os="openbsd"))'.dependencies]
+[target.'cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd", target_os="dragonfly", target_os="netbsd", target_os="openbsd"))'.dependencies]
x11-dl = "2.18.3"
diff --git a/glutin_glx_sys/build.rs b/glutin_glx_sys/build.rs
index c9ce54b..47b7ad2 100644
--- a/glutin_glx_sys/build.rs
+++ b/glutin_glx_sys/build.rs
@@ -10,6 +10,7 @@
@@ -10,6 +10,7 @@ fn main() {
println!("cargo:rerun-if-changed=build.rs");

if target.contains("linux")
+ || target.contains("android")
|| target.contains("dragonfly")
|| target.contains("freebsd")
|| target.contains("netbsd")
--- a/glutin_glx_sys/Cargo.toml
+++ b/glutin_glx_sys/Cargo.toml
@@ -12,5 +12,5 @@
[build-dependencies]
gl_generator = "0.14"

-[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os="dragonfly", target_os="netbsd", target_os="openbsd"))'.dependencies]
+[target.'cfg(any(target_os = "android", target_os = "linux", target_os = "freebsd", target_os="dragonfly", target_os="netbsd", target_os="openbsd"))'.dependencies]
x11-dl = "2.18.3"
diff --git a/glutin_glx_sys/src/lib.rs b/glutin_glx_sys/src/lib.rs
index 5bec303..9f904b9 100644
--- a/glutin_glx_sys/src/lib.rs
+++ b/glutin_glx_sys/src/lib.rs
@@ -1,4 +1,5 @@
Expand All @@ -51,14 +74,3 @@
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
--- a/glutin-winit/build.rs
+++ b/glutin-winit/build.rs
@@ -6,7 +6,7 @@
// Setup alias to reduce `cfg` boilerplate.
cfg_aliases! {
// Systems.
- android_platform: { target_os = "android" },
+ android_platform: { target_os = "dummy" },
wasm_platform: { target_family = "wasm" },
macos_platform: { target_os = "macos" },
ios_platform: { target_os = "ios" },
39 changes: 25 additions & 14 deletions x11-packages/alacritty/winit-treat-android-as-linux.diff
Original file line number Diff line number Diff line change
@@ -1,42 +1,53 @@
diff --git a/Cargo.toml b/Cargo.toml
index 4bdbc736..7ba90b92 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -76,10 +76,10 @@
simple_logger = { version = "4.2.0", default_features = false }
@@ -94,7 +94,7 @@ tracing = { version = "0.1.40", default-features = false, features = ["log"] }
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
winit = { path = ".", features = ["rwh_05"] }

-[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dev-dependencies]
+[target.'cfg(not(any(target_os = "ios")))'.dev-dependencies]
softbuffer = "0.3.0"
softbuffer = { version = "0.4.0", default-features = false, features = [
"x11",
"x11-dlopen",
@@ -102,7 +102,7 @@ softbuffer = { version = "0.4.0", default-features = false, features = [
"wayland-dlopen",
] }

-[target.'cfg(target_os = "android")'.dependencies]
+[target.'cfg(target_os = "dummy")'.dependencies]
android-activity = "0.5.0"
ndk = { version = "0.8.0", default-features = false }
ndk-sys = "0.5.0"
@@ -151,7 +151,7 @@
android-activity = "0.6.0"
ndk = { version = "0.9.0", default-features = false }

@@ -236,7 +236,7 @@ features = [
"Win32_UI_WindowsAndMessaging",
]

-[target.'cfg(all(unix, not(any(target_os = "redox", target_family = "wasm", target_os = "android", target_os = "ios", target_os = "macos"))))'.dependencies]
+[target.'cfg(all(unix, not(any(target_os = "redox", target_family = "wasm", target_os = "ios", target_os = "macos"))))'.dependencies]
ahash = { version = "0.8.3", features = ["no-rng"], optional = true }
ahash = { version = "0.8.7", features = ["no-rng"], optional = true }
bytemuck = { version = "1.13.1", default-features = false, optional = true }
calloop = "0.12.3"
calloop = "0.13.0"
diff --git a/build.rs b/build.rs
index 6a4528b3..8cb34cc1 100644
--- a/build.rs
+++ b/build.rs
@@ -7,7 +7,7 @@
// Setup cfg aliases
@@ -7,7 +7,7 @@ fn main() {
// Setup cfg aliases.
cfg_aliases! {
// Systems.
- android_platform: { target_os = "android" },
+ android_platform: { target_os = "dummy" },
wasm_platform: { all(target_family = "wasm", not(target_os = "emscripten")) },
web_platform: { all(target_family = "wasm", target_os = "unknown") },
macos_platform: { target_os = "macos" },
ios_platform: { target_os = "ios" },
diff --git a/src/platform_impl/linux/mod.rs b/src/platform_impl/linux/mod.rs
index 6cb99fee..bc1c507b 100644
--- a/src/platform_impl/linux/mod.rs
+++ b/src/platform_impl/linux/mod.rs
@@ -958,7 +958,7 @@
})
@@ -1013,7 +1013,7 @@ fn min_timeout(a: Option<Duration>, b: Option<Duration>) -> Option<Duration> {
a.map_or(b, |a_timeout| b.map_or(Some(a_timeout), |b_timeout| Some(a_timeout.min(b_timeout))))
}

-#[cfg(target_os = "linux")]
Expand Down