diff --git a/fix-librsync-leap.patch b/fix-librsync-leap.diff similarity index 100% rename from fix-librsync-leap.patch rename to fix-librsync-leap.diff diff --git a/go-buildmode-pie.diff b/go-buildmode-pie.diff new file mode 100644 index 0000000..c17d642 --- /dev/null +++ b/go-buildmode-pie.diff @@ -0,0 +1,11 @@ +--- setup.py 2023-04-21 03:40:01.000000000 -0400 ++++ setup.py.smb 2023-06-29 16:46:28.129796837 -0400 +@@ -914,7 +914,7 @@ + raise SystemExit(f'The version of go on this system ({current_go_version}) is too old. go >= {required_go_version} is needed') + if not for_platform: + update_go_generated_files(args, os.path.join(launcher_dir, appname)) +- cmd = [go, 'build', '-v'] ++ cmd = [go, 'build', '-buildmode=pie', '-v'] + vcs_rev = args.vcs_rev or get_vcs_rev() + ld_flags = [f"-X 'kitty.VCSRevision={vcs_rev}'"] + if for_freeze: diff --git a/kitty.changes b/kitty.changes index ea7899f..9a1e5af 100644 --- a/kitty.changes +++ b/kitty.changes @@ -1,3 +1,38 @@ +------------------------------------------------------------------- +Thu Jul 6 16:47:05 UTC 2023 - Scott Bradnick + +- Adding wayland-protocols-1.32.diff patch to account for 'compiler crashes' + from wayland-protocols-devel update (#6422) + * This is patched upstream via 95d1564 and 7d2dc25 +- Removing -Wno-error=switch flag as this was a workaround to deal with + scenario from above + +------------------------------------------------------------------- +Tue Jul 4 20:51:36 UTC 2023 - Scott Bradnick + +- Renaming the following files: + * fix-librsync-leap.{.patch -> .diff} + * optional-disable-docs.{.patch -> diff} + +------------------------------------------------------------------- +Tue Jul 4 19:58:53 UTC 2023 - Simon Vogl + +- Set -Wno-error=switch flag to prevent compiler crashes for RISCV + and ARM + +------------------------------------------------------------------- +Thu Jun 29 20:22:40 UTC 2023 - Scott Bradnick + +- Cleaning up "wayland-devel obsoletes libwayland-egl-devel" +- Adding 'Recommends: python3-importlib_resources' + +------------------------------------------------------------------- +Tue May 9 09:23:45 UTC 2023 - Max Lin + +- Use python3.11 on Leap 15.5 + * python3.11 is the only python3 > 3.6 version would be shipped + in Leap 15.5 + ------------------------------------------------------------------- Fri Apr 21 09:59:52 UTC 2023 - Simon Vogl diff --git a/kitty.spec b/kitty.spec index e1710fb..3479005 100644 --- a/kitty.spec +++ b/kitty.spec @@ -27,10 +27,12 @@ Group: System/X11/Terminals URL: https://github.com/kovidgoyal/kitty Source: https://github.com/kovidgoyal/kitty/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: vendor.tar.gz -# PATCH-FIX-OPENSUSE optional-disable-docs.patch -- Optionally disable building documentation files -Patch0: optional-disable-docs.patch -# PATCH-FIX-OPENSUSE fix-librsync-leap.patch -- Fix for Leap, as librsync header is missing the stdio.h header for FILE* -Patch1: fix-librsync-leap.patch +# PATCH-FIX-OPENSUSE optional-disable-docs.diff -- Optionally disable building documentation files +Patch0: optional-disable-docs.diff +# PATCH-FIX-OPENSUSE fix-librsync-leap.diff -- Fix for Leap, as librsync header is missing the stdio.h header for FILE* +Patch1: fix-librsync-leap.diff +Patch2: go-buildmode-pie.diff +Patch3: wayland-protocols-1.32.diff BuildRequires: ImageMagick-devel BuildRequires: Mesa-libGL-devel BuildRequires: fdupes @@ -46,7 +48,7 @@ BuildRequires: libcanberra-devel BuildRequires: liblcms2-devel BuildRequires: libpng16-compat-devel BuildRequires: librsync-devel -BuildRequires: libwayland-egl-devel +#BuildRequires: libwayland-egl-devel BuildRequires: libxkbcommon-devel BuildRequires: libxkbcommon-x11-devel BuildRequires: openssl-devel @@ -64,8 +66,16 @@ BuildRequires: python3-devel >= 3.7 BuildRequires: python3-sphinxext-opengraph %else # Leap still provides python3.6 kitty requires at least 3.7 +%if 0%{?sle_version} > 150400 +BuildRequires: python311-devel +%else +%if 0%{?sle_version} > 150300 +BuildRequires: python310-devel +%else BuildRequires: python39-devel %endif +%endif +%endif # Optional documentation requirements %if %{with docs} BuildRequires: python3-Sphinx >= 1.7 @@ -74,6 +84,9 @@ BuildRequires: python3-readthedocs-sphinx-ext BuildRequires: python3-sphinx-inline-tabs BuildRequires: python3-sphinxcontrib-copybutton %endif +Recommends: %{name}-shell-integration +Recommends: %{name}-terminfo +Recommends: python3-importlib_resources %description A terminal emulator that uses OpenGL for rendering. @@ -81,25 +94,69 @@ Supports terminal features like: graphics, Unicode, true-color, OpenType ligatures, mouse protocol, focus tracking, bracketed paste and so on, and which can be controlled by scripts. +%package terminfo +Summary: The terminfo file for the Kitty terminal +BuildArch: noarch + +%description terminfo +Provides 'xterm-kitty' terminfo file(s) for the Kitty terminal; this package can be installed on its own to provide file(s) instead of the full kitty package on remote systems. + +%package shell-integration +Summary: The shell-integation file(s) for the Kitty terminal + +%description shell-integration +shell-integration [bash,fish,zsh] file(s) for the Kitty terminal; this package can be installed on its own to provide file(s) instead of the full kitty package on remote systems. + %prep -%autosetup -p1 -a 1 +#%%autosetup -p1 -a 1 +%setup -a 1 +%patch0 -p1 +%patch1 -p1 +%patch2 +%patch3 %if 0%{?suse_version} > 1500 find . -type f -exec sed -i 's@#!/usr/bin/env python3$@#!%{_bindir}/python3@' {} + find . -type f -exec sed -i 's@#!/usr/bin/env python$@#!%{_bindir}/python@' {} + %else +%if 0%{?sle_version} > 150400 +find . -type f -exec sed -i 's@#!/usr/bin/env python3$@#!%{_bindir}/python3.11@' {} + +find . -type f -exec sed -i 's@#!/usr/bin/env python$@#!%{_bindir}/python3.11@' {} + +%else +%if 0%{?sle_version} > 150300 +find . -type f -exec sed -i 's@#!/usr/bin/env python3$@#!%{_bindir}/python3.10@' {} + +find . -type f -exec sed -i 's@#!/usr/bin/env python$@#!%{_bindir}/python3.10@' {} + +%else find . -type f -exec sed -i 's@#!/usr/bin/env python3$@#!%{_bindir}/python3.9@' {} + find . -type f -exec sed -i 's@#!/usr/bin/env python$@#!%{_bindir}/python3.9@' {} + %endif +%endif +%endif + +%build %install # yes they have a makefile, no they dont use it properly # no they dont have a make install # we used to have this in the build section but since rpm 4.16 buildroot is cleaned +# +# See: https://build.opensuse.org/request/show/1096854 +# Set -Wno-error=switch flag to prevent compiler crashes +#export CFLAGS="${CFLAGS:-%%optflags} -Wno-error=switch" +#export CXXFLAGS="${CXXFLAGS:-%%optflags} -Wno-error=switch" +# %if 0%{?suse_version} > 1500 python3 \ %else +%if 0%{?sle_version} > 150400 +python3.11 -B \ +%else +%if 0%{?sle_version} > 150300 +python3.10 -B \ +%else python3.9 -B \ +%endif +%endif %endif setup.py --verbose \ %if !%{with docs} @@ -117,13 +174,23 @@ python3.9 -B \ %{_bindir}/%{name} %{_bindir}/kitten %{_libdir}/%{name} +%exclude %{_libdir}/%{name}/shell-integration %{_datadir}/applications/%{name}{,-open}.desktop %{_datadir}/icons/hicolor/ -%{_datadir}/terminfo/x/xterm-%{name} %if %{with docs} %{_mandir}/man1/%{name}.1%{?ext_man} %{_datadir}/doc/%{name} %{_mandir}/man5/kitty.conf.5%{?ext_man} %endif +%files terminfo +%license LICENSE +%doc CHANGELOG.rst README.asciidoc +%{_datadir}/terminfo/x/xterm-%{name} + +%files shell-integration +%license LICENSE +%doc CHANGELOG.rst README.asciidoc +%{_libdir}/%{name}/shell-integration + %changelog diff --git a/optional-disable-docs.patch b/optional-disable-docs.diff similarity index 100% rename from optional-disable-docs.patch rename to optional-disable-docs.diff diff --git a/wayland-protocols-1.32.diff b/wayland-protocols-1.32.diff new file mode 100644 index 0000000..b61721a --- /dev/null +++ b/wayland-protocols-1.32.diff @@ -0,0 +1,22 @@ +--- glfw/wl_platform.h.smb 2023-07-06 12:27:14.522040038 -0400 ++++ glfw/wl_platform.h 2023-07-06 12:28:00.202071997 -0400 +@@ -125,6 +125,7 @@ + TOPLEVEL_STATE_TILED_RIGHT = 32, + TOPLEVEL_STATE_TILED_TOP = 64, + TOPLEVEL_STATE_TILED_BOTTOM = 128, ++ TOPLEVEL_STATE_SUSPENDED = 256, + } WaylandWindowState; + + typedef struct glfw_wl_xdg_activation_request { +--- glfw/wl_window.c.smb 2023-07-06 12:29:16.262125204 -0400 ++++ glfw/wl_window.c 2023-07-06 12:30:46.422188255 -0400 +@@ -529,6 +529,9 @@ + C(TOPLEVEL_STATE_TILED_RIGHT); + C(TOPLEVEL_STATE_TILED_TOP); + C(TOPLEVEL_STATE_TILED_BOTTOM); ++#ifdef XDG_TOPLEVEL_STATE_SUSPENDED_SINCE_VERSION ++ C(TOPLEVEL_STATE_SUSPENDED); ++#endif + #undef C + } + }