From cd045ddeefc129813553c3edc27b1b86d96f82d4b6c18a663497b72d9946355f Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Thu, 30 Jan 2025 22:47:08 +0000 Subject: [PATCH] - Update to 1.1.0 https://ghostty.org/docs/install/release-notes/1-1-0 - drop https://github.com/ghostty-org/ghostty/commit/f60068eabd94e6784f3b557c7287c49dd36bb24c.diff - new subpackage for nautilus plugin new BuildRequires python3-nautilus-devel python3-gobject OBS-URL: https://build.opensuse.org/package/show/X11:terminals/ghostty?expand=0&rev=18 --- .gitattributes | 23 ++ .gitignore | 1 + f60068eabd94e6784f3b557c7287c49dd36bb24c.diff | 50 ++++ ghostty-1.0.1.tar.gz | 3 + ghostty-1.0.1.tar.gz.minisig | 4 + ghostty-1.1.0.tar.gz | 3 + ghostty-1.1.0.tar.gz.minisig | 4 + ghostty.changes | 118 ++++++++ ghostty.spec | 265 ++++++++++++++++++ series | 0 vendor.sh | 15 + vendor.tar.zst | 3 + 12 files changed, 489 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 f60068eabd94e6784f3b557c7287c49dd36bb24c.diff create mode 100644 ghostty-1.0.1.tar.gz create mode 100644 ghostty-1.0.1.tar.gz.minisig create mode 100644 ghostty-1.1.0.tar.gz create mode 100644 ghostty-1.1.0.tar.gz.minisig create mode 100644 ghostty.changes create mode 100644 ghostty.spec create mode 100644 series create mode 100644 vendor.sh create mode 100644 vendor.tar.zst diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/f60068eabd94e6784f3b557c7287c49dd36bb24c.diff b/f60068eabd94e6784f3b557c7287c49dd36bb24c.diff new file mode 100644 index 0000000..7a029dc --- /dev/null +++ b/f60068eabd94e6784f3b557c7287c49dd36bb24c.diff @@ -0,0 +1,50 @@ +diff --git a/build.zig b/build.zig +index 414b668049..2287a6a650 100644 +--- a/build.zig ++++ b/build.zig +@@ -158,6 +158,16 @@ pub fn build(b: *std.Build) !void { + "Build a Position Independent Executable. Default true for system packages.", + ) orelse system_package; + ++ const strip = b.option( ++ bool, ++ "strip", ++ "Strip the final executable. Default true for fast and small releases", ++ ) orelse switch (optimize) { ++ .Debug => false, ++ .ReleaseSafe => false, ++ .ReleaseFast, .ReleaseSmall => true, ++ }; ++ + const conformance = b.option( + []const u8, + "conformance", +@@ -342,11 +352,7 @@ pub fn build(b: *std.Build) !void { + .root_source_file = b.path("src/main.zig"), + .target = target, + .optimize = optimize, +- .strip = switch (optimize) { +- .Debug => false, +- .ReleaseSafe => false, +- .ReleaseFast, .ReleaseSmall => true, +- }, ++ .strip = strip, + }) else null; + + // Exe +@@ -690,6 +696,7 @@ pub fn build(b: *std.Build) !void { + .root_source_file = b.path("src/main_c.zig"), + .optimize = optimize, + .target = target, ++ .strip = strip, + }); + _ = try addDeps(b, lib, config); + +@@ -707,6 +714,7 @@ pub fn build(b: *std.Build) !void { + .root_source_file = b.path("src/main_c.zig"), + .optimize = optimize, + .target = target, ++ .strip = strip, + }); + _ = try addDeps(b, lib, config); + diff --git a/ghostty-1.0.1.tar.gz b/ghostty-1.0.1.tar.gz new file mode 100644 index 0000000..9a320c5 --- /dev/null +++ b/ghostty-1.0.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:273d9885d4434a01c8ecb4f6517019254aa3e499239f69e228d4032944701a42 +size 24255389 diff --git a/ghostty-1.0.1.tar.gz.minisig b/ghostty-1.0.1.tar.gz.minisig new file mode 100644 index 0000000..f8c579b --- /dev/null +++ b/ghostty-1.0.1.tar.gz.minisig @@ -0,0 +1,4 @@ +untrusted comment: signature from minisign secret key +RUQlAjJC23149Vj6PUvgtOuT+1pP+lW+q7ckry1ymPwDw384cpl7Y4sctgzCfREqKJq1vuIwcre0+6V2nQcyDL+IkSYkGUnW8wE= +trusted comment: timestamp:1735678186 file:ghostty-1.0.1.tar.gz hashed +VkKz7JEUGWuoy+C5PK9crgD94ZfqsBT1PQ4flIHcLkgJDjYjJri9dKhB+yxYrEyoUb7odXsI5biM0PQ8Xx1JDg== diff --git a/ghostty-1.1.0.tar.gz b/ghostty-1.1.0.tar.gz new file mode 100644 index 0000000..09056a6 --- /dev/null +++ b/ghostty-1.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61111e2f013b36d1e3facfeb6c56c834db752a19ac8a075c0cd0ac140469fd42 +size 24307038 diff --git a/ghostty-1.1.0.tar.gz.minisig b/ghostty-1.1.0.tar.gz.minisig new file mode 100644 index 0000000..b72ef98 --- /dev/null +++ b/ghostty-1.1.0.tar.gz.minisig @@ -0,0 +1,4 @@ +untrusted comment: signature from minisign secret key +RUQlAjJC23149SsLdYgFjyMWbKYrwy01XmDgKQMNjIBz+XHipXFVEpxiysFgzNUAWVvGQJjIzPOA/Sd1afrwnN5ggySiAjBzKgM= +trusted comment: timestamp:1738273632 file:ghostty-1.1.0.tar.gz hashed +IitftYlagmBV/p27z7G9f5S2/r9EEc+8VrIKBmDOhbKyi+dGody88C4jHF2u3PXCVGH6PMmDtpV7xdKQTRXRAA== diff --git a/ghostty.changes b/ghostty.changes new file mode 100644 index 0000000..f245afb --- /dev/null +++ b/ghostty.changes @@ -0,0 +1,118 @@ +------------------------------------------------------------------- +Thu Jan 30 22:14:55 UTC 2025 - Marcus Rueckert + +- Update to 1.1.0 + https://ghostty.org/docs/install/release-notes/1-1-0 +- drop https://github.com/ghostty-org/ghostty/commit/f60068eabd94e6784f3b557c7287c49dd36bb24c.diff +- new subpackage for nautilus plugin + new BuildRequires python3-nautilus-devel python3-gobject + +------------------------------------------------------------------- +Thu Jan 16 10:44:40 UTC 2025 - Marcus Rueckert + +- testing shows that we can not rely on the terminfo files coming + from the ncurses package. reenable the terminfo-ghostty package + - we drop the conflicts with the terminfo package as the ghostty + files should be dropped from that package now. + +------------------------------------------------------------------- +Mon Jan 13 11:49:23 UTC 2025 - Marcus Rueckert + +- now that we have the proper files in the terminfo we can switch + to using the distro provided terminfo files again. + +------------------------------------------------------------------- +Sun Jan 12 12:04:10 UTC 2025 - Marcus Rueckert + +- As we actually have a file conflict we should also have a + conflict for the package. (boo#1235689) + +------------------------------------------------------------------- +Sun Jan 12 11:39:10 UTC 2025 - Marcus Rueckert + +- reenable the the standalone terminfo package. the ghostty + terminfo file in the main terminfo package is broken. + (boo#1235689) + +------------------------------------------------------------------- +Sun Jan 12 11:19:32 UTC 2025 - Marcus Rueckert + +- Disable the standalone terminfo package as the same file is now + in the default terminfo package. + +------------------------------------------------------------------- +Mon Jan 6 21:21:49 UTC 2025 - Avindra Goolcharan + +- refetch f60068eabd94e6784f3b557c7287c49dd36bb24c.diff + +------------------------------------------------------------------- +Fri Jan 3 00:45:13 UTC 2025 - Marcus Rueckert + +- replace no-strip.patch with the official patch, which also covers + more cases: + https://github.com/ghostty-org/ghostty/commit/f60068eabd94e6784f3b557c7287c49dd36bb24c.diff + +------------------------------------------------------------------- +Wed Jan 1 22:44:31 UTC 2025 - Marcus Rueckert + +- switch to the official tarball for 1.0.1 and add minisign file + plus verification step. + +------------------------------------------------------------------- +Wed Jan 1 21:41:42 UTC 2025 - Marcus Rueckert + +- lock zig dependency to the same limits as upstream. + +------------------------------------------------------------------- +Wed Jan 1 16:52:54 UTC 2025 - Marcus Rueckert + +- Add no-strip.patch + disable strip for the binary + +------------------------------------------------------------------- +Wed Jan 1 16:42:44 UTC 2025 - Marcus Rueckert + +- move trim-deps.sh to vendor.sh and make it do all the steps to + cache the dependencies into vendor/zig +- make the test file cleanup more robust + +------------------------------------------------------------------- +Wed Jan 1 16:39:59 UTC 2025 - Marcus Rueckert + +- Update to 1.0.1 + https://github.com/ghostty-org/ghostty/compare/v1.0.0...v1.0.1 +- drop 3426.patch + +------------------------------------------------------------------- +Wed Jan 1 16:00:57 UTC 2025 - Marcus Rueckert + +- simplify filelist + +------------------------------------------------------------------- +Wed Jan 1 15:55:05 UTC 2025 - Marcus Rueckert + +- add https://patch-diff.githubusercontent.com/raw/ghostty-org/ghostty/pull/3426.patch + Fix missing DESTDIR handling for the terminfo step. + +------------------------------------------------------------------- +Wed Jan 1 15:33:13 UTC 2025 - Marcus Rueckert + +- set the build option to have a clean version string +- set the cpu=baseline define so we get the more portable binary +- refactor out common build options into a define to ease + maintenance + +------------------------------------------------------------------- +Wed Jan 1 14:29:33 UTC 2025 - Marcus Rueckert + +- also split out the neovim files + +------------------------------------------------------------------- +Wed Jan 1 13:53:55 UTC 2025 - Marcus Rueckert + +- split out the terminfo files + +------------------------------------------------------------------- +Thu Dec 26 21:00:05 UTC 2024 - Avindra Goolcharan + +- initial package @v1.0.0 diff --git a/ghostty.spec b/ghostty.spec new file mode 100644 index 0000000..0a16bd1 --- /dev/null +++ b/ghostty.spec @@ -0,0 +1,265 @@ +# +# spec file for package ghostty +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global common_build_flags --system %{_builddir}/%{name}-%{version}/vendor/zig/p -Doptimize=ReleaseFast -Dcpu=baseline -Dpie=true -Dversion-string=%{version} %{?_smp_mflags} + +%bcond_without standalone_terminfo + +Name: ghostty +Version: 1.1.0 +Release: 0 +Summary: Cross-platform terminal emulator +License: MIT +URL: https://github.com/ghostty-org/ghostty +# can be verified with: +# minisign -V -P 'RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV' -m ghostty-%{version}.tar.gz +Source0: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz +Source2: https://release.files.ghostty.org/%{version}/ghostty-%{version}.tar.gz.minisig +Source1: vendor.tar.zst +Source98: series +Source99: vendor.sh +BuildRequires: hicolor-icon-theme +BuildRequires: pandoc +BuildRequires: pkgconfig +BuildRequires: zig = 0.13.0 +BuildRequires: zstd +BuildRequires: pkgconfig(bash-completion) +# +# In theory it should be able to use those as well but the build is not picking them up +# +# BuildRequires: cmake(glslang) +# BuildRequires: pkgconfig(spirv-cross-c-shared) +# +BuildRequires: pkgconfig(bzip2) +BuildRequires: python3-gobject +BuildRequires: python3-nautilus-devel +BuildRequires: pkgconfig(fontconfig) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(gtk4) +BuildRequires: pkgconfig(libadwaita-1) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(ncurses) +BuildRequires: pkgconfig(oniguruma) +BuildRequires: pkgconfig(pixman-1) +BuildRequires: pkgconfig(zlib) +%if %{with standalone_terminfo} +Requires: terminfo-ghostty = %{version} +%else +BuildRequires: terminfo +Requires: terminfo >= %{terminfo_with_ghostty_version} +%endif + +%description +Ghostty is a fast, feature-rich, and cross-platform terminal +emulator that uses platform-native UI and GPU acceleration. + +%package bash-completion +Summary: Bash Completion for %{name} +Group: System/Shells +Requires: %{name} = %{version} +Requires: bash-completion +Supplements: (%{name} and bash-completion) +BuildArch: noarch + +%description bash-completion +Bash command-line completion support for %{name}. + +%package fish-completion +Summary: Fish Completion for %{name} +Group: System/Shells +Requires: %{name} = %{version} +Requires: fish +Supplements: (%{name} and fish) +BuildArch: noarch + +%description fish-completion +Fish command-line completion support for %{name}. + +%package zsh-completion +Summary: Zsh Completion for %{name} +Group: System/Shells +Requires: %{name} = %{version} +Requires: zsh +Supplements: (%{name} and zsh) +BuildArch: noarch + +%description zsh-completion +Zsh command-line completion support for %{name}. + +%package doc +Summary: Documentation for %{name} +Group: Documentation/HTML +BuildArch: noarch + +%description doc +This package provides documentation for %{name} + +%package neovim +Summary: Neovim syntax highlighting for %{name} data files +Requires: %{name} = %{version} +Requires: neovim +Supplements: (%{name} and neovim) +BuildArch: noarch + +%description neovim +Optional files for syntax highlighting for %{name} data files in neovim. + +%package vim +Summary: Vim syntax highlighting for %{name} data files +Requires: %{name} = %{version} +Requires: neovim +Supplements: (%{name} and vim) +BuildArch: noarch + +%description vim +Optional files for syntax highlighting for %{name} data files in vim. + +%description +Ghostty is a fast, feature-rich, and cross-platform terminal +emulator that uses platform-native UI and GPU acceleration. + +%package -n nautilus-extension-ghostty +Summary: Nautilus extension for ghostty +Requires: %{name} = %{version} +Requires: nautilus +Requires: python3-gobject +Requires: python3-nautilus +Supplements: (%{name} and nautilus) +BuildArch: noarch + +%description -n nautilus-extension-ghostty +Nautilus extension for ghostty. + +%package -n terminfo-ghostty +Summary: Terminfo files for ghostty +BuildArch: noarch + +%description -n terminfo-ghostty +Ghostty is a fast, feature-rich, and cross-platform terminal +emulator that uses platform-native UI and GPU acceleration. + +This holds the terminfo files for ghostty. + +%prep +%autosetup -p1 -a1 + +%build +# Run `./nix/build-support/fetch-zig-cache.sh` locally to +# prep deps for offline install +zig build %{common_build_flags} + +%install +export DESTDIR=%{buildroot} +zig build %{common_build_flags} --prefix %{_prefix} +%if %{without standalone_terminfo} +rm -rv %{buildroot}%{_datadir}/terminfo/ +%endif + +%files +%license LICENSE +%{_bindir}/%{name} +%{_datadir}/applications/com.mitchellh.ghostty.desktop +%{_mandir}/man1/ghostty.1%{?ext_man} +%{_mandir}/man5/ghostty.5%{?ext_man} +%{_datadir}/icons/hicolor/128x128/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/128x128@2/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/16x16/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/16x16@2/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/256x256@2/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/32x32/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/32x32@2/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/512x512/apps/com.mitchellh.ghostty.png +%{_datadir}/icons/hicolor/1024x1024/apps/com.mitchellh.ghostty.png +%dir %{_datadir}/icons/hicolor/128x128@2 +%dir %{_datadir}/icons/hicolor/128x128@2/apps +%dir %{_datadir}/icons/hicolor/16x16@2 +%dir %{_datadir}/icons/hicolor/16x16@2/apps +%dir %{_datadir}/icons/hicolor/256x256@2 +%dir %{_datadir}/icons/hicolor/256x256@2/apps +%dir %{_datadir}/icons/hicolor/32x32@2 +%dir %{_datadir}/icons/hicolor/32x32@2/apps + +%dir %{_datadir}/ghostty +%dir %{_datadir}/ghostty/shell-integration +%{_datadir}/ghostty/shell-integration/elvish/ +%{_datadir}/ghostty/themes/ + +%dir %{_datadir}/bat +%dir %{_datadir}/bat/syntaxes +%{_datadir}/bat/syntaxes/ghostty.sublime-syntax + +%dir %{_datadir}/kio +%dir %{_datadir}/kio/servicemenus +%{_datadir}/kio/servicemenus/com.mitchellh.ghostty.desktop + +%files -n nautilus-extension-ghostty +%{_datadir}/nautilus-python/extensions/com.mitchellh.ghostty.py + +%files neovim +%{_datadir}/nvim/site/ftdetect/ghostty.vim +%{_datadir}/nvim/site/ftplugin/ghostty.vim +%{_datadir}/nvim/site/syntax/ghostty.vim +%{_datadir}/nvim/site/compiler/ghostty.vim +%dir %{_datadir}/nvim +%dir %{_datadir}/nvim/site +%dir %{_datadir}/nvim/site/ftdetect +%dir %{_datadir}/nvim/site/ftplugin +%dir %{_datadir}/nvim/site/syntax +%dir %{_datadir}/nvim/site/compiler/ + +%files doc +%dir %{_datadir}/ghostty/doc +%{_datadir}/ghostty/doc/ghostty.1.html +%{_datadir}/ghostty/doc/ghostty.1.md +%{_datadir}/ghostty/doc/ghostty.5.html +%{_datadir}/ghostty/doc/ghostty.5.md + +%files bash-completion +%{_datadir}/bash-completion/completions/ghostty.bash +%{_datadir}/ghostty/shell-integration/bash/ + +%files fish-completion +%dir %{_datadir}/fish +%dir %{_datadir}/fish/vendor_completions.d +%{_datadir}/fish/vendor_completions.d/ghostty.fish +%{_datadir}/ghostty/shell-integration/fish/ + +%files zsh-completion +%{_datadir}/zsh/site-functions/_ghostty +%{_datadir}/ghostty/shell-integration/zsh/ + +%files vim +%dir %{_datadir}/vim +%dir %{_datadir}/vim/vimfiles +%dir %{_datadir}/vim/vimfiles/ftdetect +%dir %{_datadir}/vim/vimfiles/ftplugin +%dir %{_datadir}/vim/vimfiles/syntax +%dir %{_datadir}/vim/vimfiles/compiler +%{_datadir}/vim/vimfiles/ftdetect/ghostty.vim +%{_datadir}/vim/vimfiles/ftplugin/ghostty.vim +%{_datadir}/vim/vimfiles/syntax/ghostty.vim +%{_datadir}/vim/vimfiles/compiler/ghostty.vim + +%if %{with standalone_terminfo} +%files -n terminfo-ghostty +%{_datadir}/terminfo/g/ghostty +%{_datadir}/terminfo/x/xterm-ghostty +%endif + +%changelog diff --git a/series b/series new file mode 100644 index 0000000..473a0f4 diff --git a/vendor.sh b/vendor.sh new file mode 100644 index 0000000..1b91d69 --- /dev/null +++ b/vendor.sh @@ -0,0 +1,15 @@ +#!/bin/sh +set -x +# The dependencies tarball is quite large, so we +# reduce it here by removing unecessary files for +# building (e.g, test files). + +export SUBDIR="vendor/zig/" +export ZIG_GLOBAL_CACHE_DIR="${PWD}/${SUBDIR}" +export ZSTD_CLEVEL="9" + +./nix/build-support/fetch-zig-cache.sh + +find "${SUBDIR}" -type d -iname test -print0 | xargs -r0 rm -rv + +tar --zstd -cvf ../vendor.tar.zst "${SUBDIR}" diff --git a/vendor.tar.zst b/vendor.tar.zst new file mode 100644 index 0000000..fa6ad67 --- /dev/null +++ b/vendor.tar.zst @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:72789e992e0b58421b954d1588d8eb1f7eb98b77e2be4cf4c1a4983d38c360b6 +size 95593156