View | Details | Raw Unified | Return to bug 233010 | Differences between
and this patch

Collapse All | Expand All

(-)b/x11/Makefile (+1 lines)
Lines 129-134 Link Here
129
    SUBDIR += kf5-kwayland
129
    SUBDIR += kf5-kwayland
130
    SUBDIR += kf5-kwindowsystem
130
    SUBDIR += kf5-kwindowsystem
131
    SUBDIR += kf5-plasma-framework
131
    SUBDIR += kf5-plasma-framework
132
    SUBDIR += kitty
132
    SUBDIR += konsole
133
    SUBDIR += konsole
133
    SUBDIR += leechcraft
134
    SUBDIR += leechcraft
134
    SUBDIR += lemonbar
135
    SUBDIR += lemonbar
(-)b/x11/kitty/Makefile (+69 lines)
Added Link Here
1
# Created by: Ben Widawsky <bwidawsk@FreeBSD.org>
2
# $FreeBSD$
3
4
PORTNAME= kitty
5
PORTVERSION= 0.13.3
6
DISTVERSIONPREFIX= v
7
CATEGORIES= x11
8
9
MAINTAINER= bwidawsk@FreeBSD.org
10
COMMENT= Cross-platform, fast, feature full, GPU based terminal emulator
11
12
LICENSE= GPLv3
13
LICENSE_FILE= ${WRKSRC}/LICENSE
14
15
LIB_DEPENDS= libdbus-1.so:devel/dbus \
16
  libfontconfig.so:x11-fonts/fontconfig \
17
  libfreetype.so:print/freetype2 \
18
  libglfw.so:graphics/glfw \
19
  libharfbuzz.so:print/harfbuzz \
20
  libpng.so:graphics/png \
21
  libxkbcommon.so:x11/libxkbcommon \
22
  libncursesw.so:devel/ncurses \
23
  libdbus-1.so:devel/dbus \
24
  libwayland-egl.so:graphics/wayland \
25
  libepoll-shim.so:devel/libepoll-shim \
26
  libpng.so:graphics/png
27
28
USES=  gl gmake pkgconfig:build python:3.5+ shebangfix terminfo
29
USE_GL=  gl
30
USE_XORG= x11 xft xrandr xinerama xcb xcursor
31
USE_GITHUB= yes
32
GH_ACCOUNT= kovidgoyal
33
34
SHEBANG_FILES= kitty/launcher/kitty
35
BINARY_ALIAS= python3=${PYTHON_CMD}
36
37
OPTIONS_DEFINE= ICAT DOCS BELL NLS
38
OPTIONS_DEFAULT= NLS
39
40
ICAT_DESC= tool to display images in the terminal
41
ICAT_LIB_DEPENDS= libMagickCore-6.so:graphics/ImageMagick
42
43
DOCS_BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}sphinx>=1.7:textproc/py-sphinx@${PY_FLAVOR}
44
DOCS_EXTRA_PATCHES= ${PATCHDIR}/docs-on-patch-setup.py
45
DOCS_EXTRA_PATCHES_OFF= ${PATCHDIR}/docs-off-patch-setup.py
46
47
BELL_DESC= disable audio bell by default (can be changed in kitty.conf)
48
BELL_EXTRA_PATCHES_OFF= ${PATCHDIR}/bell-off-patch-kitty_config__data.py
49
50
NLS_USES= gettext
51
52
post-patch-DOCS-on:
53
	${REINPLACE_CMD} -e 's|python3|${PYTHON_CMD}|g' ${WRKSRC}/docs/Makefile
54
	${REINPLACE_CMD} -e 's|sphinx-build|&-${PYTHON_VER}|' ${WRKSRC}/docs/Makefile
55
56
do-build:
57
	cd ${WRKSRC} && CC=clang ${PYTHON_CMD} setup.py --prefix ${STAGEDIR}${PREFIX} linux-package
58
59
do-install:
60
	@${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/kitty/kitty/fast_data_types.so \
61
		${STAGEDIR}${PREFIX}/lib/kitty/kitty/glfw-x11.so \
62
		${STAGEDIR}${PREFIX}/lib/kitty/kittens/diff/diff_speedup.so \
63
		${STAGEDIR}${PREFIX}/lib/kitty/kittens/unicode_input/unicode_names.so \
64
		${STAGEDIR}${PREFIX}/lib/kitty/kitty/glfw-wayland.so \
65
		${STAGEDIR}${PREFIX}/bin/kitty
66
	${INSTALL_DATA} ${WRKSRC}/terminfo/kitty.terminfo \
67
		${STAGEDIR}${PREFIX}/share/misc/
68
69
.include <bsd.port.mk>
(-)b/x11/kitty/distinfo (+3 lines)
Added Link Here
1
TIMESTAMP = 1549088378
2
SHA256 (kovidgoyal-kitty-v0.13.3_GH0.tar.gz) = b6f48404349ca99049de40e7bb55511de9ea04a6b1567068997d3fddb2c20f08
3
SIZE (kovidgoyal-kitty-v0.13.3_GH0.tar.gz) = 3510975
(-)b/x11/kitty/files/bell-off-patch-kitty_config__data.py (+11 lines)
Added Link Here
1
--- kitty/config_data.py.orig 2018-11-06 01:20:16 UTC
2
+++ kitty/config_data.py
3
@@ -426,7 +426,7 @@ If so, set this to no.'''))
4
 
5
 g('bell')  # {{{
6
 
7
-o('enable_audio_bell', True, long_text=_('''
8
+o('enable_audio_bell', False, long_text=_('''
9
 Enable/disable the audio bell. Useful in environments that require silence.'''))
10
 
11
 o('visual_bell_duration', 0.0, option_type=positive_float, long_text=_('''
(-)b/x11/kitty/files/docs-off-patch-setup.py (+37 lines)
Added Link Here
1
--- setup.py.orig 2018-12-06 05:19:25 UTC
2
+++ setup.py
3
@@ -600,16 +600,6 @@ def package(args, for_bundle=False, sh_launcher=False)
4
     if os.path.exists(libdir):
5
         shutil.rmtree(libdir)
6
     os.makedirs(os.path.join(libdir, 'logo'))
7
-    for x in (libdir, os.path.join(ddir, 'share')):
8
-        odir = os.path.join(x, 'terminfo')
9
-        safe_makedirs(odir)
10
-        proc = subprocess.run(['tic', '-x', '-o' + odir, 'terminfo/kitty.terminfo'], check=True, stderr=subprocess.PIPE)
11
-        regex = '^"terminfo/kitty.terminfo", line [0-9]+, col [0-9]+, terminal \'xterm-kitty\': older tic versions may treat the description field as an alias$'
12
-        for error in proc.stderr.decode('utf-8').splitlines():
13
-            if not re.match(regex, error):
14
-                print(error, file=sys.stderr)
15
-        if not glob.glob(os.path.join(odir, '*/xterm-kitty')):
16
-            raise SystemExit('tic failed to output the compiled kitty terminfo file')
17
     shutil.copy2('__main__.py', libdir)
18
     shutil.copy2('logo/kitty.rgba', os.path.join(libdir, 'logo'))
19
     shutil.copy2('logo/beam-cursor.png', os.path.join(libdir, 'logo'))
20
@@ -634,8 +624,6 @@ def package(args, for_bundle=False, sh_launcher=False)
21
     safe_makedirs(launcher_dir)
22
     build_linux_launcher(args, launcher_dir, for_bundle, sh_launcher, args.for_freeze)
23
     if not is_macos:  # {{{ linux desktop gunk
24
-        copy_man_pages(ddir)
25
-        copy_html_docs(ddir)
26
         icdir = os.path.join(ddir, 'share', 'icons', 'hicolor', '256x256', 'apps')
27
         safe_makedirs(icdir)
28
         shutil.copy2('logo/kitty.png', icdir)
29
@@ -822,8 +810,6 @@ def main():
30
         )
31
     elif args.action == 'linux-package':
32
         build(args, native_optimizations=False)
33
-        if not os.path.exists(os.path.join(base, 'docs/_build/html')):
34
-            run_tool(['make', 'docs'])
35
         package(args)
36
     elif args.action == 'osx-bundle':
37
         build(args, native_optimizations=False)
(-)b/x11/kitty/files/docs-on-patch-setup.py (+28 lines)
Added Link Here
1
--- setup.py.orig 2018-12-06 05:25:15 UTC
2
+++ setup.py
3
@@ -600,16 +600,6 @@ def package(args, for_bundle=False, sh_launcher=False)
4
     if os.path.exists(libdir):
5
         shutil.rmtree(libdir)
6
     os.makedirs(os.path.join(libdir, 'logo'))
7
-    for x in (libdir, os.path.join(ddir, 'share')):
8
-        odir = os.path.join(x, 'terminfo')
9
-        safe_makedirs(odir)
10
-        proc = subprocess.run(['tic', '-x', '-o' + odir, 'terminfo/kitty.terminfo'], check=True, stderr=subprocess.PIPE)
11
-        regex = '^"terminfo/kitty.terminfo", line [0-9]+, col [0-9]+, terminal \'xterm-kitty\': older tic versions may treat the description field as an alias$'
12
-        for error in proc.stderr.decode('utf-8').splitlines():
13
-            if not re.match(regex, error):
14
-                print(error, file=sys.stderr)
15
-        if not glob.glob(os.path.join(odir, '*/xterm-kitty')):
16
-            raise SystemExit('tic failed to output the compiled kitty terminfo file')
17
     shutil.copy2('__main__.py', libdir)
18
     shutil.copy2('logo/kitty.rgba', os.path.join(libdir, 'logo'))
19
     shutil.copy2('logo/beam-cursor.png', os.path.join(libdir, 'logo'))
20
@@ -823,7 +813,7 @@ def main():
21
     elif args.action == 'linux-package':
22
         build(args, native_optimizations=False)
23
         if not os.path.exists(os.path.join(base, 'docs/_build/html')):
24
-            run_tool(['make', 'docs'])
25
+            run_tool(['gmake', 'docs'])
26
         package(args)
27
     elif args.action == 'osx-bundle':
28
         build(args, native_optimizations=False)
(-)b/x11/kitty/files/patch-glfw_memfd.h (+14 lines)
Added Link Here
1
--- glfw/memfd.h.orig 2019-01-01 18:01:01 UTC
2
+++ glfw/memfd.h
3
@@ -6,7 +6,9 @@
4
5
 #pragma once
6
7
-#ifdef HAS_MEMFD_CREATE
8
+#ifdef __FreeBSD__
9
+// use SHM_ANON
10
+#elif HAS_MEMFD_CREATE
11
12
 #include <unistd.h>
13
 #include <sys/syscall.h>
14
(-)b/x11/kitty/files/patch-glfw_wl__init.c (+11 lines)
Added Link Here
1
--- glfw/wl_init.c.orig	2019-02-17 23:49:36 UTC
2
+++ glfw/wl_init.c
3
@@ -31,7 +31,7 @@
4
 #include <assert.h>
5
 #include <errno.h>
6
 #include <limits.h>
7
-#include <linux/input.h>
8
+#include <dev/evdev/input.h>
9
 #include <stdio.h>
10
 #include <stdlib.h>
11
 #include <string.h>
(-)b/x11/kitty/files/patch-glfw_wl__window.c (+26 lines)
Added Link Here
1
--- glfw/wl_window.c.orig 2019-01-01 17:59:15 UTC
2
+++ glfw/wl_window.c
3
@@ -140,7 +140,9 @@ static int
4
 createAnonymousFile(off_t size)
5
 {
6
     int ret;
7
-#ifdef HAS_MEMFD_CREATE
8
+#ifdef __FreeBSD__
9
+    int fd = shm_open(SHM_ANON, O_RDWR | O_CLOEXEC, 0600);
10
+#elif HAS_MEMFD_CREATE
11
     int fd = memfd_create("glfw-shared", MFD_CLOEXEC | MFD_ALLOW_SEALING);
12
     if (fd < 0) return -1;
13
     // We can add this seal before calling posix_fallocate(), as the file
14
@@ -173,7 +175,11 @@ createAnonymousFile(off_t size)
15
     if (fd < 0)
16
         return -1;
17
 #endif
18
+#ifdef __FreeBSD__
19
+    ret = ftruncate(fd, size);
20
+#else
21
     ret = posix_fallocate(fd, 0, size);
22
+#endif
23
     if (ret != 0)
24
     {
25
         close(fd);
26
(-)b/x11/kitty/files/patch-kitty_child.c (+22 lines)
Added Link Here
1
--- kitty/child.c.orig 2018-11-06 00:56:31 UTC
2
+++ kitty/child.c
3
@@ -12,6 +12,7 @@
4
 #include <errno.h>
5
 #include <string.h>
6
 #include <signal.h>
7
+#include <sys/ioctl.h>
8
 
9
 static inline char**
10
 serialize_string_tuple(PyObject *src) {
11
@@ -87,10 +88,9 @@ spawn(PyObject *self UNUSED, PyObject *args) {
12
             // Establish the controlling terminal (see man 7 credentials)
13
             int tfd = open(name, O_RDWR);
14
             if (tfd == -1) exit_on_err("Failed to open controlling terminal");
15
-#ifdef TIOCSTTY
16
+
17
             // On BSD open() does not establish the controlling terminal
18
             if (ioctl(tfd, TIOCSCTTY, 0) == -1) exit_on_err("Failed to set controlling terminal with TIOCSCTTY");
19
-#endif
20
             close(tfd);
21
 
22
             // Redirect stdin/stdout/stderr to the pty
(-)b/x11/kitty/files/patch-kitty_child.py (+19 lines)
Added Link Here
1
--- kitty/child.py.orig	2019-02-18 00:01:25 UTC
2
+++ kitty/child.py
3
@@ -4,6 +4,7 @@
4
 
5
 import fcntl
6
 import os
7
+import pty
8
 from collections import defaultdict
9
 from contextlib import contextmanager
10
 
11
@@ -153,7 +154,7 @@ class Child:
12
         if self.forked:
13
             return
14
         self.forked = True
15
-        master, slave = os.openpty()  # Note that master and slave are in blocking mode
16
+        master, slave = pty.openpty()  # Note that master and slave are in blocking mode
17
         remove_cloexec(slave)
18
         fast_data_types.set_iutf8(master, True)
19
         stdin, self.stdin = self.stdin, None
(-)b/x11/kitty/pkg-descr (+20 lines)
Added Link Here
1
Kitty is the fast, featureful, GPU based terminal emulator
2
 :
3
kitty is designed for power keyboard users. To that end all its controls work
4
with the keyboard (although it fully supports mouse interactions as well). Its
5
configuration is a simple, human editable, single file for easy reproducibility
6
(I like to store configuration in source control).
7
8
The code in kitty is designed to be simple, modular and hackable. It is written
9
in a mix of C (for performance sensitive parts) and Python (for easy hackability
10
of the UI). It does not depend on any large and complex UI toolkit, using only
11
OpenGL for rendering everything.
12
13
Finally, kitty is designed from the ground up to support all modern terminal
14
features, such as unicode, true color, bold/italic fonts, text formatting, etc.
15
It even extends existing text formatting escape codes, to add support for
16
features not available elsewhere, such as colored and styled (curly) underlines.
17
One of the design goals of kitty is to be easily extensible so that new features
18
can be added in the future with relatively less effort.
19
20
WWW: https://sw.kovidgoyal.net/kitty/
(-)b/x11/kitty/pkg-plist (-1 / +90 lines)
Added Link Here
0
- 
1
bin/kitty
2
lib/kitty/__main__.py
3
lib/kitty/kittens/__init__.py
4
lib/kitty/kittens/ask/__init__.py
5
lib/kitty/kittens/ask/main.py
6
lib/kitty/kittens/clipboard/__init__.py
7
lib/kitty/kittens/clipboard/main.py
8
lib/kitty/kittens/diff/__init__.py
9
lib/kitty/kittens/diff/collect.py
10
lib/kitty/kittens/diff/config.py
11
lib/kitty/kittens/diff/config_data.py
12
lib/kitty/kittens/diff/diff_speedup.so
13
lib/kitty/kittens/diff/highlight.py
14
lib/kitty/kittens/diff/main.py
15
lib/kitty/kittens/diff/patch.py
16
lib/kitty/kittens/diff/render.py
17
lib/kitty/kittens/diff/search.py
18
lib/kitty/kittens/hints/__init__.py
19
lib/kitty/kittens/hints/main.py
20
lib/kitty/kittens/hints/url_regex.py
21
lib/kitty/kittens/icat/__init__.py
22
lib/kitty/kittens/icat/main.py
23
lib/kitty/kittens/panel/__init__.py
24
lib/kitty/kittens/panel/main.py
25
lib/kitty/kittens/resize_window/__init__.py
26
lib/kitty/kittens/resize_window/main.py
27
lib/kitty/kittens/runner.py
28
lib/kitty/kittens/show_error/__init__.py
29
lib/kitty/kittens/show_error/main.py
30
lib/kitty/kittens/ssh/__init__.py
31
lib/kitty/kittens/ssh/main.py
32
lib/kitty/kittens/tui/__init__.py
33
lib/kitty/kittens/tui/handler.py
34
lib/kitty/kittens/tui/images.py
35
lib/kitty/kittens/tui/line_edit.py
36
lib/kitty/kittens/tui/loop.py
37
lib/kitty/kittens/tui/operations.py
38
lib/kitty/kittens/unicode_input/__init__.py
39
lib/kitty/kittens/unicode_input/main.py
40
lib/kitty/kittens/unicode_input/unicode_names.so
41
lib/kitty/kitty/__init__.py
42
lib/kitty/kitty/blit_fragment.glsl
43
lib/kitty/kitty/blit_vertex.glsl
44
lib/kitty/kitty/border_fragment.glsl
45
lib/kitty/kitty/border_vertex.glsl
46
lib/kitty/kitty/borders.py
47
lib/kitty/kitty/boss.py
48
lib/kitty/kitty/cell_fragment.glsl
49
lib/kitty/kitty/cell_vertex.glsl
50
lib/kitty/kitty/child.py
51
lib/kitty/kitty/cli.py
52
lib/kitty/kitty/client.py
53
lib/kitty/kitty/cmds.py
54
lib/kitty/kitty/complete.py
55
lib/kitty/kitty/conf/__init__.py
56
lib/kitty/kitty/conf/definition.py
57
lib/kitty/kitty/conf/utils.py
58
lib/kitty/kitty/config.py
59
lib/kitty/kitty/config_data.py
60
lib/kitty/kitty/constants.py
61
lib/kitty/kitty/fast_data_types.so
62
lib/kitty/kitty/fonts/__init__.py
63
lib/kitty/kitty/fonts/box_drawing.py
64
lib/kitty/kitty/fonts/core_text.py
65
lib/kitty/kitty/fonts/fontconfig.py
66
lib/kitty/kitty/fonts/list.py
67
lib/kitty/kitty/fonts/render.py
68
lib/kitty/kitty/glfw-x11.so
69
lib/kitty/kitty/graphics_fragment.glsl
70
lib/kitty/kitty/graphics_vertex.glsl
71
lib/kitty/kitty/key_encoding.py
72
lib/kitty/kitty/keys.py
73
lib/kitty/kitty/launcher/kitty
74
lib/kitty/kitty/layout.py
75
lib/kitty/kitty/main.py
76
lib/kitty/kitty/remote_control.py
77
lib/kitty/kitty/rgb.py
78
lib/kitty/kitty/session.py
79
lib/kitty/kitty/shell.py
80
lib/kitty/kitty/tab_bar.py
81
lib/kitty/kitty/tabs.py
82
lib/kitty/kitty/terminfo.py
83
lib/kitty/kitty/utils.py
84
lib/kitty/kitty/window.py
85
lib/kitty/logo/beam-cursor.png
86
lib/kitty/logo/beam-cursor@2x.png
87
lib/kitty/logo/kitty.rgba
88
share/applications/kitty.desktop
89
share/icons/hicolor/256x256/apps/kitty.png
90
share/misc/kitty.terminfo

Return to bug 233010