pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/x11/kitty



Module Name:    pkgsrc
Committed By:   ktnb
Date:           Mon Mar 30 16:55:13 UTC 2026

Modified Files:
        pkgsrc/x11/kitty: Makefile PLIST distinfo
Added Files:
        pkgsrc/x11/kitty/patches: patch-setup.py

Log Message:
kitty: fixed build issues on Darwin


To generate a diff of this commit:
cvs rdiff -u -r1.84 -r1.85 pkgsrc/x11/kitty/Makefile
cvs rdiff -u -r1.36 -r1.37 pkgsrc/x11/kitty/PLIST
cvs rdiff -u -r1.39 -r1.40 pkgsrc/x11/kitty/distinfo
cvs rdiff -u -r0 -r1.4 pkgsrc/x11/kitty/patches/patch-setup.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/x11/kitty/Makefile
diff -u pkgsrc/x11/kitty/Makefile:1.84 pkgsrc/x11/kitty/Makefile:1.85
--- pkgsrc/x11/kitty/Makefile:1.84      Thu Mar 26 23:44:25 2026
+++ pkgsrc/x11/kitty/Makefile   Mon Mar 30 16:55:13 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.84 2026/03/26 23:44:25 ktnb Exp $
+# $NetBSD: Makefile,v 1.85 2026/03/30 16:55:13 ktnb Exp $
 
 DISTNAME=      kitty-0.46.2
 CATEGORIES=    x11
@@ -38,24 +38,71 @@ USE_NCURSES=        yes
 
 CHECK_INTERPRETER_SKIP=        lib/kitty/shell-integration/ssh/askpass.py
 
-INSTALLATION_DIRS+=    ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
 
 PYTHON_VERSIONS_INCOMPATIBLE=  27
 PY_PATCHPLIST=                 yes
 
+SUBST_CLASSES+=                prefix
+SUBST_STAGE.prefix=            pre-configure
+SUBST_MESSAGE.prefix=  Point to pkgsrc fonts always
+SUBST_FILES.prefix+=   setup.py
+SUBST_VARS.prefix+=            PREFIX
+
+
+.include "../../mk/bsd.prefs.mk"
+
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
+
+.if ${OPSYS} == "Darwin"
+INSTALLATION_DIRS+=    ${PREFIX}/share/doc/kitty/html
+INSTALLATION_DIRS+=    ${PREFIX}/share/icons/hicolor/256x256/apps
+INSTALLATION_DIRS+=    ${PREFIX}/share/icons/hicolor/scalable/apps
+.endif
+
+
+PLIST_VARS+=           x11
+
+# regardless if you build for wayland, kitty will still build the x11
+# stuff. kitty will never build x11 stuff on darwin.
+.if ${OPSYS} != "Darwin"
+PLIST.x11=     yes
+.endif
+
 pre-configure:
        cd ${BUILDLINK_DIR}/bin && ${LN} -s ${PREFIX}/bin/go126 go
 
 do-build:
+.if ${OPSYS} == "Darwin"
+       cd ${WRKSRC} && ${MAKE_ENV} ${PYTHONBIN} setup.py kitty.app
+.else
        cd ${WRKSRC} && ${MAKE_ENV} ${PYTHONBIN} setup.py linux-package
+.endif
 
 do-install:
        cd ${WRKSRC} && ${MAKE_ENV} ${PYTHONBIN} setup.py linux-package \
            --prefix ${DESTDIR}${PREFIX}
+.if ${OPSYS} == "Darwin"
+       ${MV} ${WRKSRC}/docs/_build/man/*.1 \
+           ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ || ${TRUE}
+       ${MV} ${WRKSRC}/docs/_build/man/*.5 \
+           ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/ || ${TRUE}
+       ${MV} ${WRKSRC}/docs/_build/html \
+           ${DESTDIR}${PREFIX}/share/doc/kitty/ || ${TRUE}
+       ${INSTALL_PROGRAM} \
+           ${WRKSRC}/kitty.app/Contents/Resources/kitty/kitty/launcher/kitty \
+           ${DESTDIR}${PREFIX}/lib/kitty/kitty/launcher/
+       ${MV} ${WRKSRC}/logo/kitty.svg \
+           ${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/ || ${TRUE}
+       ${MV} ${WRKSRC}/logo/kitty.png \
+           ${DESTDIR}${PREFIX}/share/icons/hicolor/256x256/apps/ || ${TRUE}
+# we don't want to override existing fonts
+       ${RM} -rf ${DESTDIR}${PREFIX}/share/fonts
+.else
        ${MV} ${DESTDIR}${PREFIX}/share/man/man1/* \
            ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/ || ${TRUE}
        ${MV} ${DESTDIR}${PREFIX}/share/man/man5/* \
            ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5/ || ${TRUE}
+.endif
 # pkgsrc framwork only handles optimization level 1 files correctly
        ${FIND} ${DESTDIR} -type f -name *.opt-2.pyc -print0 | ${XARGS} -0 ${RM} -rf
        ${FIND} ${DESTDIR} -name '*.orig' -exec rm -rf '{}' ';'
@@ -63,8 +110,6 @@ do-install:
 
 .include "go-modules.mk"
 
-.include "../../mk/bsd.prefs.mk"
-
 .if ${OPSYS} != "Darwin"
 .include "../../graphics/freetype2/buildlink3.mk"
 .include "../../fonts/fontconfig/buildlink3.mk"

Index: pkgsrc/x11/kitty/PLIST
diff -u pkgsrc/x11/kitty/PLIST:1.36 pkgsrc/x11/kitty/PLIST:1.37
--- pkgsrc/x11/kitty/PLIST:1.36 Sat Mar 21 01:50:53 2026
+++ pkgsrc/x11/kitty/PLIST      Mon Mar 30 16:55:13 2026
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.36 2026/03/21 01:50:53 ktnb Exp $
+@comment $NetBSD: PLIST,v 1.37 2026/03/30 16:55:13 ktnb Exp $
 bin/kitten
 bin/kitty
 lib/kitty/__main__.py
@@ -292,7 +292,7 @@ lib/kitty/kitty/fonts/render.py
 lib/kitty/kitty/fonts/render.pyc
 lib/kitty/kitty/fonts/render.pyo
 ${PLIST.wayland}lib/kitty/kitty/glfw-wayland.so
-lib/kitty/kitty/glfw-x11.so
+${PLIST.x11}lib/kitty/kitty/glfw-x11.so
 lib/kitty/kitty/graphics_fragment.glsl
 lib/kitty/kitty/graphics_vertex.glsl
 lib/kitty/kitty/guess_mime_type.py
@@ -588,7 +588,7 @@ lib/kitty/shell-integration/zsh/kitty-in
 lib/kitty/shell-integration/zsh/kitty.zsh
 lib/kitty/terminfo/kitty.termcap
 lib/kitty/terminfo/kitty.terminfo
-lib/kitty/terminfo/x/xterm-kitty
+${PLIST.x11}lib/kitty/terminfo/x/xterm-kitty
 man/man1/kitten-@-action.1
 man/man1/kitten-@-close-tab.1
 man/man1/kitten-@-close-window.1
@@ -657,8 +657,8 @@ man/man1/kitten-update-self.1
 man/man1/kitten.1
 man/man1/kitty.1
 man/man5/kitty.conf.5
-share/applications/kitty-open.desktop
-share/applications/kitty.desktop
+${PLIST.x11}share/applications/kitty-open.desktop
+${PLIST.x11}share/applications/kitty.desktop
 share/doc/kitty/html/.buildinfo
 share/doc/kitty/html/.nojekyll
 share/doc/kitty/html/_downloads/055e3591463099e42785a872ce39996a/quick_access_terminal.conf
@@ -926,6 +926,6 @@ share/doc/kitty/html/unscroll.html
 share/doc/kitty/html/wide-gamut-colors.html
 share/icons/hicolor/256x256/apps/kitty.png
 share/icons/hicolor/scalable/apps/kitty.svg
-share/terminfo/x/xterm-kitty
+${PLIST.x11}share/terminfo/x/xterm-kitty
 @pkgdir share/man/man5
 @pkgdir share/man/man1

Index: pkgsrc/x11/kitty/distinfo
diff -u pkgsrc/x11/kitty/distinfo:1.39 pkgsrc/x11/kitty/distinfo:1.40
--- pkgsrc/x11/kitty/distinfo:1.39      Thu Mar 26 23:44:25 2026
+++ pkgsrc/x11/kitty/distinfo   Mon Mar 30 16:55:13 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.39 2026/03/26 23:44:25 ktnb Exp $
+$NetBSD: distinfo,v 1.40 2026/03/30 16:55:13 ktnb Exp $
 
 BLAKE2s (github.com__a_l_tree_bigfloat_@v_v0.2.0.mod) = ed554d44b1070ae79986f3ff61e6ad4ed12060fb78fe6f2273733f762721d1e0
 SHA512 (github.com__a_l_tree_bigfloat_@v_v0.2.0.mod) = 09bbd28b9ce42a919f22339bdeb2b798a728cf3b7f5f7fd61bec418fa360893c4ebd72f0957be4c855621f96d9a146ef8f0074f5ac4154c04f537ae3ad3592c4
@@ -218,3 +218,4 @@ SHA1 (patch-glfw_wl__init.c) = 3dc143fba
 SHA1 (patch-kitty_binary.h) = e8e6e9b16a1bd7d0304bca919ad10dd932142da5
 SHA1 (patch-kitty_data-types.h) = 1def5a8b129a7d25fdf98bd1d7b15b214b7c4960
 SHA1 (patch-kitty_threading.h) = 04886ab09ac2ab6f4925cd20e739e6b634299d55
+SHA1 (patch-setup.py) = 1a15e1dc4487c436b456957ce45404610663e4a1

Added files:

Index: pkgsrc/x11/kitty/patches/patch-setup.py
diff -u /dev/null pkgsrc/x11/kitty/patches/patch-setup.py:1.4
--- /dev/null   Mon Mar 30 16:55:13 2026
+++ pkgsrc/x11/kitty/patches/patch-setup.py     Mon Mar 30 16:55:13 2026
@@ -0,0 +1,16 @@
+$NetBSD: patch-setup.py,v 1.4 2026/03/30 16:55:13 ktnb Exp $
+
+Only point to the pkgsrc fonts for darwin
+
+--- setup.py.orig      2026-03-27 19:19:48.618708465 +0000
++++ setup.py
+@@ -924,7 +924,8 @@ def add_builtin_fonts(args: Options) ->
+         font_file = ''
+         if is_macos:
+             candidates = (
+-                os.path.expanduser('~/Library/Fonts'), '/Library/Fonts', '/System/Library/Fonts', '/Network/Library/Fonts')
++                '@PREFIX@/share/fonts/'
++            )
+             for candidate in candidates:
+                 q = os.path.join(candidate, filename)
+                 if os.path.exists(q):



Home | Main Index | Thread Index | Old Index