aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuno Teixeira <eduardo@FreeBSD.org>2022-08-22 22:11:38 +0000
committerNuno Teixeira <eduardo@FreeBSD.org>2022-08-22 22:25:45 +0000
commit9051f0ba8e211de002a1571417ea6cc302c9db44 (patch)
treeedbbfda4baf0ae0455a4627ea0d3dafcf4f1ff94
parent08a37e52dd4a2ab2f2058a150ae422f8a436b1f4 (diff)
downloadports-9051f0ba8e211de002a1571417ea6cc302c9db44.tar.gz
ports-9051f0ba8e211de002a1571417ea6cc302c9db44.zip
x11/kitty: Use upstream patch fix build on 12.x Release
- Use upstream patch instead of workaround fix https://github.com/kovidgoyal/kitty/pull/5398 - Bump PORTREVISION PR: 265393 MFH: 2022Q3 (cherry picked from commit adf824b09c349ee00ac25189c2f98e3fc2c48953)
-rw-r--r--x11/kitty/Makefile8
-rw-r--r--x11/kitty/files/extra-patch-kitty_data-types.h13
-rw-r--r--x11/kitty/files/patch-kitty_child.py11
3 files changed, 20 insertions, 12 deletions
diff --git a/x11/kitty/Makefile b/x11/kitty/Makefile
index 88118c0bbe89..a5812e7129f0 100644
--- a/x11/kitty/Makefile
+++ b/x11/kitty/Makefile
@@ -1,5 +1,6 @@
PORTNAME= kitty
-DISTVERSION= 0.25.0
+DISTVERSION= 0.25.2
+PORTREVISION= 1
CATEGORIES= x11 wayland
MASTER_SITES= https://github.com/${GH_ACCOUNT}/${PORTNAME}/releases/download/v${DISTVERSION}/
@@ -66,6 +67,11 @@ USES+=ncurses:port
USES+=ncurses
.endif
+# fix clang static_assert on 12.x releases, https://github.com/kovidgoyal/kitty/pull/5398
+.if ${OPSYS} == FreeBSD && ${OSVERSION} < 1300000
+EXTRA_PATCHES= ${PATCHDIR}/extra-patch-kitty_data-types.h
+.endif
+
# For librsync, we need to set header and library path
do-build:
(cd ${WRKSRC} && \
diff --git a/x11/kitty/files/extra-patch-kitty_data-types.h b/x11/kitty/files/extra-patch-kitty_data-types.h
new file mode 100644
index 000000000000..3926ab024c92
--- /dev/null
+++ b/x11/kitty/files/extra-patch-kitty_data-types.h
@@ -0,0 +1,13 @@
+--- kitty/data-types.h.orig 2022-08-22 11:08:26 UTC
++++ kitty/data-types.h
+@@ -159,6 +159,10 @@ typedef union CellAttrs {
+ #define NUM_UNDERLINE_STYLES (5u)
+ #define SGR_MASK (~(((CellAttrs){.width=WIDTH_MASK, .mark=MARK_MASK}).val))
+
++#ifndef static_assert
++#define static_assert _Static_assert
++#endif
++
+ typedef struct {
+ color_type fg, bg, decoration_fg;
+ sprite_index sprite_x, sprite_y, sprite_z;
diff --git a/x11/kitty/files/patch-kitty_child.py b/x11/kitty/files/patch-kitty_child.py
deleted file mode 100644
index dfae47085879..000000000000
--- a/x11/kitty/files/patch-kitty_child.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- kitty/child.py.orig 2021-11-10 21:33:51 UTC
-+++ kitty/child.py
-@@ -45,7 +45,7 @@ else:
- return list(filter(None, f.read().decode('utf-8').split('\0')))
-
- def cwd_of_process(pid: int) -> str:
-- ans = f'/proc/{pid}/cwd'
-+ ans = subprocess.run(["pwdx", pid], capture_output=True).stdout.split()[1].decode("utf-8")
- return os.path.realpath(ans)
-
- def _environ_of_process(pid: int) -> str: