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:18:00 +0000
commitadf824b09c349ee00ac25189c2f98e3fc2c48953 (patch)
tree7f930a02c41a65418f3d8d3d995eef60bd0364a4
parent7f1e06f3466565d862485be7d1e6142940bc0d18 (diff)
downloadports-adf824b09c349ee00ac25189c2f98e3fc2c48953.tar.gz
ports-adf824b09c349ee00ac25189c2f98e3fc2c48953.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
-rw-r--r--x11/kitty/Makefile6
-rw-r--r--x11/kitty/files/extra-patch-kitty_data-types.h13
-rw-r--r--x11/kitty/files/patch-kitty_data-types.h19
3 files changed, 19 insertions, 19 deletions
diff --git a/x11/kitty/Makefile b/x11/kitty/Makefile
index 1fbe8ffb4a5b..13b8eb83bcc7 100644
--- a/x11/kitty/Makefile
+++ b/x11/kitty/Makefile
@@ -1,5 +1,6 @@
PORTNAME= kitty
DISTVERSION= 0.25.2
+PORTREVISION= 1
CATEGORIES= x11 wayland
MASTER_SITES= https://github.com/kovidgoyal/${PORTNAME}/releases/download/v${DISTVERSION}/
@@ -69,6 +70,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_data-types.h b/x11/kitty/files/patch-kitty_data-types.h
deleted file mode 100644
index fecb5ab2d450..000000000000
--- a/x11/kitty/files/patch-kitty_data-types.h
+++ /dev/null
@@ -1,19 +0,0 @@
---- kitty/data-types.h.orig 2022-08-13 20:17:56 UTC
-+++ kitty/data-types.h
-@@ -164,14 +164,14 @@ typedef struct {
- sprite_index sprite_x, sprite_y, sprite_z;
- CellAttrs attrs;
- } GPUCell;
--static_assert(sizeof(GPUCell) == 20, "Fix the ordering of GPUCell");
-+_Static_assert(sizeof(GPUCell) == 20, "Fix the ordering of GPUCell");
-
- typedef struct {
- char_type ch;
- hyperlink_id_type hyperlink_id;
- combining_type cc_idx[3];
- } CPUCell;
--static_assert(sizeof(CPUCell) == 12, "Fix the ordering of CPUCell");
-+_Static_assert(sizeof(CPUCell) == 12, "Fix the ordering of CPUCell");
-
- typedef enum { UNKNOWN_PROMPT_KIND = 0, PROMPT_START = 1, SECONDARY_PROMPT = 2, OUTPUT_START = 3 } PromptKind;
- typedef union LineAttrs {