Skip to content

Commit fcd7ce3

Browse files
alacritty: fixes in the kernel to make it show a window :^)
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent a3ce15f commit fcd7ce3

File tree

21 files changed

+649
-204
lines changed

21 files changed

+649
-204
lines changed

bootstrap/xorg.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,78 @@ packages:
431431
environ:
432432
DESTDIR: '@THIS_COLLECT_DIR@'
433433

434+
- name: glu
435+
source:
436+
subdir: 'bundled'
437+
git: 'https://gitlab.freedesktop.org/mesa/glu.git'
438+
tag: 'glu-9.0.2'
439+
version: '9.0.2'
440+
tools_required:
441+
- host-autoconf-v2.69
442+
- host-automake-v1.16
443+
- host-libtool
444+
- host-pkg-config
445+
regenerate:
446+
- args: ['./autogen.sh']
447+
environ:
448+
NOCONFIGURE: '1'
449+
tools_required:
450+
- host-gcc
451+
pkgs_required:
452+
- mlibc
453+
- gcc # Actually requires libstdc++.so in the system root, otherwise it links against the host libstdc++.so.6
454+
- mesa
455+
configure:
456+
- args:
457+
- '@THIS_SOURCE_DIR@/configure'
458+
- '--host=x86_64-aero'
459+
- '--prefix=/usr'
460+
- '--disable-static'
461+
build:
462+
- args: ['make', '-j@PARALLELISM@']
463+
- args: ['make', 'install']
464+
environ:
465+
DESTDIR: '@THIS_COLLECT_DIR@'
466+
467+
- name: mesa-utils
468+
source:
469+
subdir: 'bundled'
470+
git: 'https://github.com/freedesktop/mesa-demos'
471+
branch: 'master'
472+
tools_required:
473+
- host-autoconf-v2.69
474+
- host-automake-v1.16
475+
- host-libtool
476+
- host-pkg-config
477+
- host-xorg-macros
478+
regenerate:
479+
- args: ['./autogen.sh']
480+
environ:
481+
'NOCONFIGURE': 'yes'
482+
tools_required:
483+
- host-gcc
484+
pkgs_required:
485+
- mlibc
486+
- mesa
487+
configure:
488+
- args:
489+
- '@THIS_SOURCE_DIR@/configure'
490+
- '--host=x86_64-aero'
491+
- '--prefix=/usr'
492+
- '--sysconfdir=/etc'
493+
- '--localstatedir=/var'
494+
- '--disable-static'
495+
- '--disable-gles1' # Requires some linux header that we don't have
496+
- '--disable-vg'
497+
- '--disable-osmesa'
498+
- '--disable-rbug'
499+
- '--with-system-data-files'
500+
build:
501+
- args: ['make', '-j@PARALLELISM@']
502+
- args: ['make', 'install']
503+
environ:
504+
DESTDIR: '@THIS_COLLECT_DIR@'
505+
434506
- name: mesa
435507
source:
436508
subdir: 'bundled'

patches/alacritty/alacritty.patch

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
From b194e3d72903f677f2aacf9293706ff2027a413b Mon Sep 17 00:00:00 2001
2+
From: Andy-Python-Programmer <[email protected]>
3+
Date: Sun, 11 Dec 2022 18:43:18 +1100
4+
Subject: [PATCH] <xxx>
5+
6+
---
7+
alacritty/src/display/window.rs | 8 ++++----
8+
alacritty_terminal/src/tty/unix.rs | 17 +++++++++--------
9+
2 files changed, 13 insertions(+), 12 deletions(-)
10+
11+
diff --git a/alacritty/src/display/window.rs b/alacritty/src/display/window.rs
12+
index ee2e74f..d75996b 100644
13+
--- a/alacritty/src/display/window.rs
14+
+++ b/alacritty/src/display/window.rs
15+
@@ -128,9 +128,9 @@ fn create_gl_window<E>(
16+
}
17+
18+
let windowed_context = ContextBuilder::new()
19+
- .with_srgb(srgb)
20+
- .with_vsync(vsync)
21+
- .with_hardware_acceleration(None)
22+
+ // .with_srgb(srgb)
23+
+ // .with_vsync(vsync)
24+
+ // .with_hardware_acceleration(None)
25+
.build_windowed(window, event_loop)?;
26+
27+
// Make the context current so OpenGL operations can run.
28+
@@ -292,7 +292,7 @@ impl Window {
29+
let builder = WindowBuilder::new()
30+
.with_title(&identity.title)
31+
.with_visible(false)
32+
- .with_transparent(true)
33+
+ .with_transparent(false)
34+
.with_decorations(window_config.decorations != Decorations::None)
35+
.with_maximized(window_config.maximized())
36+
.with_fullscreen(window_config.fullscreen());
37+
diff --git a/alacritty_terminal/src/tty/unix.rs b/alacritty_terminal/src/tty/unix.rs
38+
index 206dbe8..cb172ab 100644
39+
--- a/alacritty_terminal/src/tty/unix.rs
40+
+++ b/alacritty_terminal/src/tty/unix.rs
41+
@@ -90,18 +90,19 @@ fn get_pw_entry(buf: &mut [i8; 1024]) -> Passwd<'_> {
42+
die!("getpwuid_r failed");
43+
}
44+
45+
- if res.is_null() {
46+
- die!("pw not found");
47+
- }
48+
+ // if res.is_null() {
49+
+ // die!("pw not found");
50+
+ // }
51+
52+
- // Sanity check.
53+
- assert_eq!(entry.pw_uid, uid);
54+
+ // // Sanity check.
55+
+ // assert_eq!(entry.pw_uid, uid);
56+
57+
// Build a borrowed Passwd struct.
58+
+ // FIXME(mlibc): Assertion '!"slab_pool corruption. Possible write to unallocated object"' failed!
59+
Passwd {
60+
- name: unsafe { CStr::from_ptr(entry.pw_name).to_str().unwrap() },
61+
- dir: unsafe { CStr::from_ptr(entry.pw_dir).to_str().unwrap() },
62+
- shell: unsafe { CStr::from_ptr(entry.pw_shell).to_str().unwrap() },
63+
+ name: "root",
64+
+ dir: "/",
65+
+ shell: "/usr/bin/bash",
66+
}
67+
}
68+
69+
--
70+
2.38.1
71+

patches/dwm/dwm.patch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From c709d9f916f71104f658e1b8bba922dc66a3523e Mon Sep 17 00:00:00 2001
1+
From 003f47ada9dd8f0ec6deedebeba2b7bdcc15030f Mon Sep 17 00:00:00 2001
22
From: Andy-Python-Programmer <[email protected]>
3-
Date: Sun, 20 Nov 2022 13:43:15 +1100
3+
Date: Sun, 11 Dec 2022 19:36:22 +1100
44
Subject: [PATCH] <xxx>
55

66
---

patches/mesa-utils/mesa-utils.patch

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From 212ebc20ae9724fb6b69980170a5527fbd9f312e Mon Sep 17 00:00:00 2001
2+
From: Andy-Python-Programmer <[email protected]>
3+
Date: Sun, 11 Dec 2022 15:18:55 +1100
4+
Subject: [PATCH] <xxx>
5+
6+
---
7+
configure.ac | 6 +++---
8+
1 file changed, 3 insertions(+), 3 deletions(-)
9+
10+
diff --git a/configure.ac b/configure.ac
11+
index ddc68b5..373e51b 100644
12+
--- a/configure.ac
13+
+++ b/configure.ac
14+
@@ -93,9 +93,9 @@ AC_EGREP_HEADER([glutInitContextProfile],
15+
[])
16+
17+
dnl Check for GLEW
18+
-PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4])
19+
-DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
20+
-DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
21+
+dnl PKG_CHECK_MODULES(GLEW, [glew >= 1.5.4])
22+
+dnl DEMO_CFLAGS="$DEMO_CFLAGS $GLEW_CFLAGS"
23+
+dnl DEMO_LIBS="$DEMO_LIBS $GLEW_LIBS"
24+
25+
# LIBS was set by AC_CHECK_LIB above
26+
LIBS=""
27+
--
28+
2.38.1
29+

0 commit comments

Comments
 (0)