1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-17 19:39:43 +00:00

x11/kitty: Update to 0.35.2

- Pet portfmt
- Add a couple of patches to fix these compilation errors:

1)

glfw/wl_init.c:653:5: error: use of undeclared identifier errno
    errno = ENOSYS;
    ^
glfw/wl_init.c:653:13: error: use of undeclared identifier ENOSYS
    errno = ENOSYS;
            ^
glfw/wl_init.c:639:25: error: unused parameter fd [-Werror,-Wunused-parameter]
get_socket_peer_pid(int fd) {
                        ^
3 errors generated.
 done
Compiling [wayland] glfw/wl_init.c ...
cc -MMD -DNDEBUG -DEPOLL_SHIM_DISABLE_WRAPPER_MACROS -I/usr/local/include/libepoll-shim -D_GLFW_WAYLAND -D_GLFW_BUILD_DLL -Wextra -Wfloat-conversion -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11 -pedantic-errors -Werror -O3 -fwrapv -fstack-pro
tector-strong -pipe -fvisibility=hidden -fno-plt -fPIC -O2 -pipe -Wno-error=invalid-utf8 -Winvalid-utf8 -fstack-protector-strong -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -flto -I/usr/local/include -fcf-protection=full -fPIC -pthread -I/usr/local/include -I/usr/loc
al/include/libepoll-shim -I/usr/local/include -I/usr/local/include/libepoll-shim -I/usr/local/include -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -c glfw/wl_init.c -o build/glfw-wayland-glfw-wl_init.c.o
*** Error code 1

2)

[21/120] Compiling kitty/line.c ...
glfw/wl_client_side_decorations.c:809:19: error: use of undeclared identifier BTN_LEFT
    if (button == BTN_LEFT) {
                  ^
glfw/wl_client_side_decorations.c:846:24: error: use of undeclared identifier BTN_RIGHT
    else if (button == BTN_RIGHT) {
                       ^
2 errors generated.
 done
Compiling [wayland] glfw/wl_client_side_decorations.c ...
cc -MMD -DNDEBUG -DEPOLL_SHIM_DISABLE_WRAPPER_MACROS -I/usr/local/include/libepoll-shim -D_GLFW_WAYLAND -D_GLFW_BUILD_DLL -Wextra -Wfloat-conversion -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11 -pedantic-errors -Werror -O3 -fwrapv -fstack-pro
tector-strong -pipe -fvisibility=hidden -fno-plt -fPIC -O2 -pipe -Wno-error=invalid-utf8 -Winvalid-utf8 -fstack-protector-strong -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -flto -I/usr/local/include -fcf-protection=full -fPIC -pthread -I/usr/local/include -I/usr/loc
al/include/libepoll-shim -I/usr/local/include -I/usr/local/include/libepoll-shim -I/usr/local/include -I/usr/local/include/dbus-1.0 -I/usr/local/lib/dbus-1.0/include -c glfw/wl_client_side_decorations.c -o build/glfw-wayland-glfw-wl_client_side_decorations.c.o
*** Error code 1

Release changes:	https://sw.kovidgoyal.net/kitty/changelog/#detailed-list-of-changes
Reported by:	portscout
This commit is contained in:
Nicola Vitale 2024-07-03 17:51:11 +02:00
parent 13b8f36ca8
commit 859d9a5a49
No known key found for this signature in database
GPG Key ID: A51E190C4C0808D0
8 changed files with 65 additions and 63 deletions

View File

@ -1,7 +1,7 @@
PORTNAME= kitty
DISTVERSIONPREFIX= v
DISTVERSION= 0.33.1
PORTREVISION= 4
DISTVERSION= 0.35.2
PORTREVISION= 0
CATEGORIES= x11 wayland
MAINTAINER= nivit@FreeBSD.org
@ -17,8 +17,8 @@ BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}furo>0:textproc/py-furo@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinx-inline-tabs>0:textproc/py-sphinx-inline-tabs@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}sphinxext-opengraph>0:textproc/py-sphinxext-opengraph@${PY_FLAVOR} \
roboto-fonts-ttf>0:x11-fonts/roboto-fonts-ttf \
sphinx-build:textproc/py-sphinx@${PY_FLAVOR} \
simde>=0.7.6:devel/simde \
sphinx-build:textproc/py-sphinx@${PY_FLAVOR} \
wayland-protocols>=0:graphics/wayland-protocols
LIB_DEPENDS= libcanberra.so:audio/libcanberra \
libdbus-1.so:devel/dbus \
@ -42,8 +42,7 @@ CPE_VENDOR= kitty_project
USE_GL= gl
USE_XORG= x11 xcb xcursor xi xinerama xrandr
SHEBANG_FILES= build-terminfo count-lines-of-code mypy-editor-integration \
update-on-ox
SHEBANG_FILES= build-terminfo count-lines-of-code update-on-ox
SHEBANG_GLOB= *.py
GO_MODULE= github.com/kovidgoyal/kitty

View File

@ -1,5 +1,5 @@
TIMESTAMP = 1711028602
SHA256 (go/x11_kitty/kitty-v0.33.1/v0.33.1.mod) = 97db06cc839bf036265de51b099813c47d974135cef9afc02fb502571581c7b7
SIZE (go/x11_kitty/kitty-v0.33.1/v0.33.1.mod) = 1049
SHA256 (go/x11_kitty/kitty-v0.33.1/v0.33.1.zip) = aaf429874de0afa15461f895fbaa59f19e963e110994f9c02521e9a66f7b48f1
SIZE (go/x11_kitty/kitty-v0.33.1/v0.33.1.zip) = 8586033
TIMESTAMP = 1719230646
SHA256 (go/x11_kitty/kitty-v0.35.2/v0.35.2.mod) = 949b79c576c4ea1338d9eceae3e964bfa281d66d33a5c9c2978ff71ab6ea5372
SIZE (go/x11_kitty/kitty-v0.35.2/v0.35.2.mod) = 1237
SHA256 (go/x11_kitty/kitty-v0.35.2/v0.35.2.zip) = a3a19216e0445658cbef63761508afeef61e1ac5dfd21ed9f6638a6d2137d3bf
SIZE (go/x11_kitty/kitty-v0.35.2/v0.35.2.zip) = 8549754

View File

@ -1,6 +1,6 @@
--- docs/changelog.rst.orig 1979-11-29 23:00:00 UTC
+++ docs/changelog.rst
@@ -3187,7 +3187,7 @@ - A :doc:`new kitten <kittens/panel>` to create dock p
@@ -3391,7 +3391,7 @@ - A :doc:`new kitten <kittens/panel>` to create dock p
- A :doc:`new kitten <kittens/panel>` to create dock panels on X11 desktops
showing the output from arbitrary terminal programs.
@ -9,7 +9,7 @@
- Implement changing the font size for individual top level (OS) windows
(:iss:`408`)
@@ -3302,7 +3302,7 @@ - Implement support for the SGR *faint* escape code to
@@ -3506,7 +3506,7 @@ - Implement support for the SGR *faint* escape code to
- Implement support for the SGR *faint* escape code to make text blend
into the background (:iss:`446`).
@ -18,7 +18,7 @@
so that URLs that stretch over multiple lines are detected. Also improve
detection of surrounding brackets/quotes.
@@ -3314,7 +3314,7 @@ - Expand environment variables in config file include
@@ -3518,7 +3518,7 @@ - Expand environment variables in config file include
- Expand environment variables in config file include directives

View File

@ -0,0 +1,26 @@
--- glfw/wl_client_side_decorations.c.orig 1979-11-29 23:00:00 UTC
+++ glfw/wl_client_side_decorations.c
@@ -8,10 +8,23 @@
#include "wl_client_side_decorations.h"
#include "backend_utils.h"
+#include <sys/param.h>
+#include <sys/ucred.h>
#include <sys/mman.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
+
+// Needed for the BTN_* definitions
+#ifdef __has_include
+#if __has_include(<linux/input.h>)
+#include <linux/input.h>
+#elif __has_include(<dev/evdev/input.h>)
+#include <dev/evdev/input.h>
+#endif
+#else
+#include <linux/input.h>
+#endif
#define decs window->wl.decorations
#define debug debug_rendering

View File

@ -0,0 +1,18 @@
--- glfw/wl_init.c.orig 1979-11-29 23:00:00 UTC
+++ glfw/wl_init.c
@@ -36,6 +36,7 @@
#include "wayland-text-input-unstable-v3-client-protocol.h"
#include <stdio.h>
+#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
@@ -637,6 +638,7 @@ get_socket_peer_pid(int fd) {
static pid_t
get_socket_peer_pid(int fd) {
+ (void)fd;
#ifdef __linux__
struct ucred ucred;
socklen_t len = sizeof(struct ucred);

View File

@ -1,35 +1,6 @@
--- setup.py.orig 1979-11-29 23:00:00 UTC
+++ setup.py
@@ -218,25 +218,10 @@ def libcrypto_flags() -> Tuple[List[str], List[str]]:
# Apple use their special snowflake TLS libraries and additionally
# have an ancient broken system OpenSSL, so we need to check for one
# installed by all the various macOS package managers.
- extra_pc_dir = ''
+ cflags = [f"-I{sys.prefix}/include"]
+ libs = [f"-L{sys.prefix}/lib", "-lcrypto"]
- try:
- cflags = pkg_config('libcrypto', '--cflags-only-I', fatal=False)
- except subprocess.CalledProcessError:
- if is_macos:
- import ssl
- v = ssl.OPENSSL_VERSION_INFO
- pats = f'{v[0]}.{v[1]}', f'{v[0]}'
- for pat in pats:
- q = f'opt/openssl@{pat}/lib/pkgconfig'
- openssl_dirs = glob.glob(f'/opt/homebrew/{q}') + glob.glob(f'/usr/local/{q}')
- if openssl_dirs:
- break
- if not openssl_dirs:
- raise SystemExit(f'Failed to find OpenSSL version {v[0]}.{v[1]} on your system')
- extra_pc_dir = os.pathsep.join(openssl_dirs)
- cflags = pkg_config('libcrypto', '--cflags-only-I', extra_pc_dir=extra_pc_dir)
- return cflags, pkg_config('libcrypto', '--libs', extra_pc_dir=extra_pc_dir)
+ return cflags, libs
def at_least_version(package: str, major: int, minor: int = 0) -> None:
@@ -1170,8 +1155,8 @@ def create_linux_bundle_gunk(ddir: str, args: Options)
@@ -1333,8 +1333,8 @@ def create_linux_bundle_gunk(ddir: str, args: Options)
base = Path(ddir)
in_src_launcher = base / (f'{libdir_name}/kitty/kitty/launcher/kitty')
launcher = base / 'bin/kitty'

View File

@ -1,28 +1,11 @@
--- shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish.orig 1979-11-29 23:00:00 UTC
+++ shell-integration/fish/vendor_conf.d/kitty-shell-integration.fish
@@ -112,12 +112,12 @@ function __ksi_schedule --on-event fish_prompt -d "Set
@@ -126,7 +126,7 @@ function __ksi_schedule --on-event fish_prompt -d "Set
# for sudo it will be clobbered by us, so only install this if sudo is not already function
if not contains "no-sudo" $_ksi
and test -n "$TERMINFO" -a "file" = (type -t sudo 2> /dev/null || echo "x")
- and not test -r "/usr/share/terminfo/x/xterm-kitty" -o -r "/usr/share/terminfo/78/xterm-kitty"
- and not test -r "/usr/share/terminfo/x/xterm-kitty" -o -r "/usr/share/terminfo/78/xterm-kitty"
+ and not test -r "%%DATADIR%%/terminfo/x/xterm-kitty" -o -r "/usr/share/terminfo/x/xterm-kitty" -o -r "/usr/share/terminfo/78/xterm-kitty"
# Ensure terminfo is available in sudo
function sudo
set --local is_sudoedit "n"
for arg in $argv
- if string match -q -- "-e" "$arg" or string match -q -- "--edit" "$arg"
+ if string match -q -- "-e" "$arg" or string match -q -- "--edit" "$arg"
set is_sudoedit "y"
break
end
@@ -145,8 +145,8 @@ function __ksi_schedule --on-event fish_prompt -d "Set
and return 0
return 1
end
- if _ksi_s_is_ok "venv"
- and test -n "$VIRTUAL_ENV" -a -r "$venv"
+ if _ksi_s_is_ok "venv"
+ and test -n "$VIRTUAL_ENV" -a -r "$venv"
set _ksi_sourced "y"
set --erase VIRTUAL_ENV _OLD_FISH_PROMPT_OVERRIDE # activate.fish stupidly exports _OLD_FISH_PROMPT_OVERRIDE
source "$venv"

View File

@ -15,6 +15,7 @@ share/applications/kitty.desktop
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_actions_1745a1bd.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_binary_478594b0.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_build_7ee1e14e.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_changelog_0413c894.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_clipboard_673291d1.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_color-stack_587105f7.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_conf_6d817f14.png
@ -41,7 +42,7 @@ share/applications/kitty.desktop
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_kittens_hyperlinked_grep_bce050dc.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_kittens_icat_8f870112.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_kittens_intro_2aa247aa.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_kittens_panel_60319d79.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_kittens_panel_acc427d1.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_kittens_query_terminal_bcf6bdb9.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_kittens_remote_file_c5782e6e.png
%%PORTDOCS%%%%DOCSDIR%%/_images/social_previews/summary_kittens_ssh_d0cb65fa.png
@ -769,6 +770,9 @@ share/icons/hicolor/scalable/apps/kitty.svg
%%DATADIR%%/kitty/rc/__pycache__/resize_window%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%DATADIR%%/kitty/rc/__pycache__/resize_window%%PYTHON_EXT_SUFFIX%%.opt-2.pyc
%%DATADIR%%/kitty/rc/__pycache__/resize_window%%PYTHON_EXT_SUFFIX%%.pyc
%%DATADIR%%/kitty/rc/__pycache__/run%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%DATADIR%%/kitty/rc/__pycache__/run%%PYTHON_EXT_SUFFIX%%.opt-2.pyc
%%DATADIR%%/kitty/rc/__pycache__/run%%PYTHON_EXT_SUFFIX%%.pyc
%%DATADIR%%/kitty/rc/__pycache__/scroll_window%%PYTHON_EXT_SUFFIX%%.opt-1.pyc
%%DATADIR%%/kitty/rc/__pycache__/scroll_window%%PYTHON_EXT_SUFFIX%%.opt-2.pyc
%%DATADIR%%/kitty/rc/__pycache__/scroll_window%%PYTHON_EXT_SUFFIX%%.pyc
@ -840,6 +844,7 @@ share/icons/hicolor/scalable/apps/kitty.svg
%%DATADIR%%/kitty/rc/remove_marker.py
%%DATADIR%%/kitty/rc/resize_os_window.py
%%DATADIR%%/kitty/rc/resize_window.py
%%DATADIR%%/kitty/rc/run.py
%%DATADIR%%/kitty/rc/scroll_window.py
%%DATADIR%%/kitty/rc/select_window.py
%%DATADIR%%/kitty/rc/send_key.py