Skip to content

Commit a25afdb

Browse files
Add: GLFW Builds of Ghostty, Changes to Main Specs For Compatibility (#2788) (#2797)
* Add: GLFW builds of Ghostty, edit existing builds for shared deps, add build deps to be explicitly called (just in case), some cleanup * Add: Add warning about GLFW builds possibly being unstable * Fix: Removed duplicate text (thanks mouse) * Update ghostty-nightly.spec Signed-off-by: Gil <[email protected]> * Cleanup: Removed unused build deps, removed unused patches (for now?) * Fix: New icon size in Tip GTK (will need to be done in stable in 1.0.1), minor changes to summaries * Resolve: Date conflict --------- Signed-off-by: Gil <[email protected]> (cherry picked from commit d990cae) Co-authored-by: Gil <[email protected]>
1 parent 4bef00a commit a25afdb

14 files changed

+255
-97
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
project pkg {
2+
rpm {
3+
spec = "ghostty-glfw-nightly.spec"
4+
}
5+
labels {
6+
nightly = 1
7+
}
8+
}
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
%global commit 478fe3917c2882a1c321f9d1eec808b71698974d
2+
%global shortcommit %(c=%{commit}; echo ${c:0:7})
3+
%global commit_date 20241231
4+
5+
Name: ghostty-glfw-nightly
6+
Version: %{commit_date}.%{shortcommit}
7+
Release: 1%{?dist}
8+
Summary: A fast, native terminal emulator written in Zig; this is the Tip (nightly) build using the GLFW rendering library.
9+
License: MIT
10+
URL: https://ghostty.org/
11+
Source0: https://github.com/ghostty-org/ghostty/archive/%{commit}/ghostty-%{commit}.tar.gz
12+
Patch0: no-strip.diff
13+
BuildRequires: glfw-devel
14+
BuildRequires: ncurses
15+
BuildRequires: ncurses-devel
16+
BuildRequires: pandoc-cli
17+
BuildRequires: zig
18+
Requires: ghostty-nightly-terminfo = %{version}-%{release}
19+
Requires: ghostty-nightly-shell-integration = %{version}-%{release}
20+
Requires: fontconfig
21+
Requires: freetype
22+
Requires: glib2
23+
Requires: glfw
24+
Requires: harfbuzz
25+
Requires: libpng
26+
Requires: oniguruma
27+
Requires: pixman
28+
Requires: zlib-ng
29+
Conflicts: ghostty
30+
Conflicts: ghostty-nightly
31+
Conflicts: ghostty-glfw
32+
Provides: ghostty-tip-glfw = %{version}-%{release}
33+
Provides: ghostty-glfw-tip = %{version}-%{release}
34+
Packager: ShinyGil <[email protected]>
35+
36+
%description
37+
👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.
38+
39+
Please note GLFW builds are intended for developer use, they may be buggy and lack features. Use at your own risk.
40+
41+
%prep
42+
%autosetup -n ghostty-%{commit} -p1
43+
44+
%build
45+
46+
%install
47+
zig build \
48+
--summary all \
49+
-Doptimize=ReleaseFast --release=fast \
50+
--prefix %{buildroot}%{_prefix} --verbose \
51+
-Dpie=true \
52+
-Dapp-runtime=glfw \
53+
-Demit-docs
54+
rm -rf %{buildroot}%{bash_completions_dir}/ghostty.bash \
55+
%{buildroot}%{fish_completions_dir}/ghostty.fish \
56+
%{buildroot}%{zsh_completions_dir}/_ghostty \
57+
%{buildroot}%{_datadir}/ghostty/shell-integration \
58+
%{buildroot}%{_datadir}/terminfo/*
59+
60+
%files
61+
%doc README.md
62+
%license LICENSE
63+
%_bindir/ghostty
64+
%_datadir/applications/com.mitchellh.ghostty.desktop
65+
%_datadir/bat/syntaxes/ghostty.sublime-syntax
66+
%_datadir/ghostty/
67+
%_datadir/kio/servicemenus/com.mitchellh.ghostty.desktop
68+
%_datadir/nvim/site/ftdetect/ghostty.vim
69+
%_datadir/nvim/site/ftplugin/ghostty.vim
70+
%_datadir/nvim/site/syntax/ghostty.vim
71+
%_datadir/vim/vimfiles/ftdetect/ghostty.vim
72+
%_datadir/vim/vimfiles/ftplugin/ghostty.vim
73+
%_datadir/vim/vimfiles/syntax/ghostty.vim
74+
%_iconsdir/hicolor/16x16/apps/com.mitchellh.ghostty.png
75+
%_iconsdir/hicolor/16x16@2/apps/com.mitchellh.ghostty.png
76+
%_iconsdir/hicolor/32x32/apps/com.mitchellh.ghostty.png
77+
%_iconsdir/hicolor/32x32@2/apps/com.mitchellh.ghostty.png
78+
%_iconsdir/hicolor/128x128/apps/com.mitchellh.ghostty.png
79+
%_iconsdir/hicolor/128x128@2/apps/com.mitchellh.ghostty.png
80+
%_iconsdir/hicolor/256x256/apps/com.mitchellh.ghostty.png
81+
%_iconsdir/hicolor/256x256@2/apps/com.mitchellh.ghostty.png
82+
%_iconsdir/hicolor/512x512/apps/com.mitchellh.ghostty.png
83+
%_mandir/man1/ghostty.1.gz
84+
%_mandir/man5/ghostty.5.gz
85+
86+
%changelog
87+
* Sun Dec 29 2024 ShinyGil <[email protected]>
88+
- Initial package
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/build.zig b/build.zig
2+
index c3f7302..a0ecf25 100644
3+
--- a/build.zig
4+
+++ b/build.zig
5+
@@ -295,11 +295,7 @@ pub fn build(b: *std.Build) !void {
6+
.root_source_file = b.path("src/main.zig"),
7+
.target = target,
8+
.optimize = optimize,
9+
- .strip = switch (optimize) {
10+
- .Debug => false,
11+
- .ReleaseSafe => false,
12+
- .ReleaseFast, .ReleaseSmall => true,
13+
- },
14+
+ .strip = false,
15+
}) else null;
16+
17+
// Exe
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
rpm.global("commit", gh_commit("ghostty-org/ghostty"));
2+
if rpm.changed() {
3+
rpm.release();
4+
rpm.global("commit_date", date());
5+
}

anda/devs/ghostty/nightly/ghostty-nightly.spec

Lines changed: 17 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,19 @@
33
%global commit_date 20241228
44

55
Name: ghostty-nightly
6-
Version: %commit_date.%shortcommit
7-
Release: 1%?dist
8-
Summary: A fast, native terminal emulator written in Zig; this is the Tip (nightly) build
6+
Version: %{commit_date}.%{shortcommit}
7+
Release: 1%{?dist}
8+
Summary: A fast, native terminal emulator written in Zig; this is the Tip (nightly) build.
99
License: MIT
1010
URL: https://ghostty.org/
1111
Source0: https://github.com/ghostty-org/ghostty/archive/%{commit}/ghostty-%{commit}.tar.gz
12-
#Patch0: pkgconfig-libadwaita-1.diff
13-
#Patch1: use-pkg-config.diff
14-
Patch2: no-strip.diff
15-
BuildRequires: zig
16-
BuildRequires: gtk4-devel libadwaita-devel
12+
Patch0: no-strip.diff
13+
BuildRequires: gtk4-devel
14+
BuildRequires: libadwaita-devel
15+
BuildRequires: ncurses
16+
BuildRequires: ncurses-devel
1717
BuildRequires: pandoc-cli
18-
#BuildRequires: pkg-config
19-
#BuildRequires: pkgconfig(harfbuzz)
20-
#BuildRequires: pkgconfig(fontconfig)
21-
#BuildRequires: pkgconfig(libpng)
22-
#BuildRequires: pkgconfig(zlib)
23-
#BuildRequires: pkgconfig(oniguruma)
24-
#BuildRequires: pkgconfig(glslang)
25-
# Not in Fedora
26-
#BuildRequires: pkgconfig(spirv-cross)
27-
#BuildRequires: pkgconfig(simdutf)
28-
#BuildRequires: pkgconfig(libxml-2.0)
18+
BuildRequires: zig
2919
Requires: %{name}-terminfo = %{version}-%{release}
3020
Requires: %{name}-shell-integration = %{version}-%{release}
3121
Requires: fontconfig
@@ -39,6 +29,8 @@ Requires: pixman
3929
Requires: zlib-ng
4030
Suggests: libadwaita
4131
Conflicts: ghostty
32+
Conflicts: ghostty-glfw
33+
Conflicts: ghostty-glfw-nightly
4234
Provides: ghostty-tip = %{version}-%{release}
4335
Packager: ShinyGil <[email protected]>
4436

@@ -47,43 +39,43 @@ Packager: ShinyGil <[email protected]>
4739

4840
%package bash-completion
4941
Summary: Ghostty Bash completion
50-
Requires: %{name}
5142
Requires: bash-completion
5243
Supplements: (%{name} and bash-completion)
44+
Supplements: (ghostty-glfw-nightly and bash-completion)
5345

5446
%description bash-completion
5547
%summary.
5648

5749
%package fish-completion
5850
Summary: Ghostty Fish completion
59-
Requires: %{name}
6051
Requires: fish
6152
Supplements: (%{name} and fish)
53+
Supplements: (ghostty-glfw-nightly and fish)
6254

6355
%description fish-completion
6456
%summary.
6557

6658
%package zsh-completion
6759
Summary: Ghostty Zsh completion
68-
Requires: %{name}
6960
Requires: zsh
7061
Supplements: (%{name} and zsh)
62+
Supplements: (ghostty-glfw-nightly and zsh)
7163

7264
%description zsh-completion
7365
%summary.
7466

7567
%package shell-integration
7668
Summary: Ghostty shell integration
77-
Requires: %{name}
7869
Supplements: %{name}
70+
Supplements: ghostty-glfw-nightly
7971

8072
%description shell-integration
8173
%summary.
8274

8375
%package terminfo
8476
Summary: Ghostty terminfo
85-
Requires: %{name}
8677
Supplements: %{name}
78+
Supplements: ghostty-glfw-nightly
8779

8880
%description terminfo
8981
%summary.
@@ -124,6 +116,7 @@ zig build \
124116
%_iconsdir/hicolor/256x256/apps/com.mitchellh.ghostty.png
125117
%_iconsdir/hicolor/256x256@2/apps/com.mitchellh.ghostty.png
126118
%_iconsdir/hicolor/512x512/apps/com.mitchellh.ghostty.png
119+
%_iconsdir/hicolor/1024x1024/apps/com.mitchellh.ghostty.png
127120
%_mandir/man1/ghostty.1.gz
128121
%_mandir/man5/ghostty.5.gz
129122

anda/devs/ghostty/nightly/pkgconfig-libadwaita-1.diff

Lines changed: 0 additions & 13 deletions
This file was deleted.

anda/devs/ghostty/nightly/use-pkg-config.diff

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
project pkg {
2+
rpm {
3+
spec = "ghostty-glfw.spec"
4+
}
5+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
Name: ghostty-glfw
2+
Version: 1.0.0
3+
Release: 1%{?dist}
4+
Summary: A fast, native terminal emulator written in Zig; this version uses the GLFW rendering library.
5+
License: MIT
6+
URL: https://ghostty.org/
7+
Source0: https://release.files.ghostty.org/%{version}/ghostty-source.tar.gz
8+
Patch0: no-strip.diff
9+
BuildRequires: glfw-devel
10+
BuildRequires: ncurses
11+
BuildRequires: ncurses-devel
12+
BuildRequires: pandoc-cli
13+
BuildRequires: zig
14+
Requires: ghostty-terminfo = %{version}-%{release}
15+
Requires: ghostty-shell-integration = %{version}-%{release}
16+
Requires: fontconfig
17+
Requires: freetype
18+
Requires: glib2
19+
Requires: glfw
20+
Requires: harfbuzz
21+
Requires: libpng
22+
Requires: oniguruma
23+
Requires: pixman
24+
Requires: zlib-ng
25+
Conflicts: ghostty
26+
Conflicts: ghostty-nightly
27+
Conflicts: ghostty-glfw-nightly
28+
Packager: ShinyGil <[email protected]>
29+
30+
%description
31+
👻 Ghostty is a fast, feature-rich, and cross-platform terminal emulator that uses platform-native UI and GPU acceleration.
32+
33+
Please note GLFW builds are intended for developer use, they may be buggy and lack features. Use at your own risk.
34+
35+
%prep
36+
%autosetup -n ghostty-source -p1
37+
38+
%build
39+
40+
%install
41+
zig build \
42+
--summary all \
43+
-Doptimize=ReleaseFast --release=fast \
44+
--prefix %{buildroot}%{_prefix} --verbose \
45+
-Dpie=true \
46+
-Dapp-runtime=glfw \
47+
-Demit-docs
48+
rm -rf %{buildroot}%{bash_completions_dir}/ghostty.bash \
49+
%{buildroot}%{fish_completions_dir}/ghostty.fish \
50+
%{buildroot}%{zsh_completions_dir}/_ghostty \
51+
%{buildroot}%{_datadir}/ghostty/shell-integration \
52+
%{buildroot}%{_datadir}/terminfo/*
53+
54+
%files
55+
%doc README.md
56+
%license LICENSE
57+
%_bindir/ghostty
58+
%_datadir/applications/com.mitchellh.ghostty.desktop
59+
%_datadir/bat/syntaxes/ghostty.sublime-syntax
60+
%_datadir/ghostty/
61+
%_datadir/kio/servicemenus/com.mitchellh.ghostty.desktop
62+
%_datadir/nvim/site/ftdetect/ghostty.vim
63+
%_datadir/nvim/site/ftplugin/ghostty.vim
64+
%_datadir/nvim/site/syntax/ghostty.vim
65+
%_datadir/vim/vimfiles/ftdetect/ghostty.vim
66+
%_datadir/vim/vimfiles/ftplugin/ghostty.vim
67+
%_datadir/vim/vimfiles/syntax/ghostty.vim
68+
%_iconsdir/hicolor/16x16/apps/com.mitchellh.ghostty.png
69+
%_iconsdir/hicolor/16x16@2/apps/com.mitchellh.ghostty.png
70+
%_iconsdir/hicolor/32x32/apps/com.mitchellh.ghostty.png
71+
%_iconsdir/hicolor/32x32@2/apps/com.mitchellh.ghostty.png
72+
%_iconsdir/hicolor/128x128/apps/com.mitchellh.ghostty.png
73+
%_iconsdir/hicolor/128x128@2/apps/com.mitchellh.ghostty.png
74+
%_iconsdir/hicolor/256x256/apps/com.mitchellh.ghostty.png
75+
%_iconsdir/hicolor/256x256@2/apps/com.mitchellh.ghostty.png
76+
%_iconsdir/hicolor/512x512/apps/com.mitchellh.ghostty.png
77+
%_mandir/man1/ghostty.1.gz
78+
%_mandir/man5/ghostty.5.gz
79+
80+
%changelog
81+
* Sun Dec 29 2024 ShinyGil <[email protected]>
82+
- Initial package
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/build.zig b/build.zig
2+
index c3f7302..a0ecf25 100644
3+
--- a/build.zig
4+
+++ b/build.zig
5+
@@ -295,11 +295,7 @@ pub fn build(b: *std.Build) !void {
6+
.root_source_file = b.path("src/main.zig"),
7+
.target = target,
8+
.optimize = optimize,
9+
- .strip = switch (optimize) {
10+
- .Debug => false,
11+
- .ReleaseSafe => false,
12+
- .ReleaseFast, .ReleaseSmall => true,
13+
- },
14+
+ .strip = false,
15+
}) else null;
16+
17+
// Exe
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
rpm.version(gh_tag("ghostty-org/ghostty"));

0 commit comments

Comments
 (0)