ghostty: fix cross build, use more system libraries

Co-authored-by: tranzystorekk <tranzystorek.io@protonmail.com>
This commit is contained in:
Duncaen 2024-12-27 01:19:20 +01:00
parent 3f232d127f
commit 6234908d0c
No known key found for this signature in database
GPG key ID: 335C1D17EC3D6E35
3 changed files with 47 additions and 6 deletions

1
srcpkgs/ghostty-terminfo Symbolic link
View file

@ -0,0 +1 @@
ghostty

View file

@ -0,0 +1,26 @@
diff --git a/build.zig b/build.zig
index c3f7302..9fa73e9 100644
--- a/build.zig
+++ b/build.zig
@@ -1494,7 +1494,7 @@ fn addUnicodeTables(
.root_source_file = b.path("src/unicode/props.zig"),
.target = b.host,
});
- exe.linkLibC();
+ // exe.linkLibC();
if (step_ == null) b.installArtifact(exe);
const ziglyph_dep = b.dependency("ziglyph", .{
diff --git a/src/unicode/props.zig b/src/unicode/props.zig
index d77bf4c..994cf36 100644
--- a/src/unicode/props.zig
+++ b/src/unicode/props.zig
@@ -131,7 +131,7 @@ pub fn get(cp: u21) Properties {
/// Runnable binary to generate the lookup tables and output to stdout.
pub fn main() !void {
- const alloc = std.heap.c_allocator;
+ const alloc = std.heap.page_allocator;
const gen: lut.Generator(
Properties,

View file

@ -1,11 +1,18 @@
# Template file for 'ghostty'
pkgname=ghostty
version=1.0.0
revision=1
revision=2
build_style=zig-build
configure_args="-Doptimize=ReleaseFast -Dpie"
hostmakedepends="pkg-config"
makedepends="gtk4-devel libadwaita-devel"
configure_args="
-Doptimize=ReleaseFast
-Dpie
-Dversion-string=${version}
-fsys=freetype
-fsys=fontconfig
-fsys=harfbuzz"
hostmakedepends="pkg-config glib-devel pandoc"
makedepends="fontconfig-devel freetype-devel harfbuzz-devel gtk4-devel libadwaita-devel"
depends="ghostty-terminfo-${version}_${revision}"
short_desc="Fast and feature-rich terminal emulator that uses GPU acceleration"
maintainer="Duncaen <duncaen@voidlinux.org>"
license="MIT"
@ -15,6 +22,13 @@ checksum=bd12953c8bbe7149e2f94e7e578a88e981932a69aa483f5ce9a2cfba726e0015
post_install() {
vlicense LICENSE
rm -f "${DESTDIR}/usr/share/man/.placeholder"
tic -o "${DESTDIR}/usr/share/terminfo" -x "${DESTDIR}/usr/share/terminfo/ghostty.terminfo"
tic -sx -o ${DESTDIR}/usr/share/terminfo ${DESTDIR}/usr/share/terminfo/ghostty.terminfo
rm -f ${DESTDIR}/usr/share/man/.placeholder ${DESTDIR}/usr/share/terminfo/ghostty.{terminfo,termcap}
}
ghostty-terminfo_package() {
short_desc+=" - terminfo data"
pkg_install() {
vmove usr/share/terminfo
}
}