forked from mirrors/nixpkgs
Merge pull request #62095 from rvolosatovs/update/kitty
kitty: 0.13.3 -> 0.14.0
This commit is contained in:
commit
a257789f7b
|
@ -21,14 +21,14 @@
|
|||
with python3Packages;
|
||||
buildPythonApplication rec {
|
||||
pname = "kitty";
|
||||
version = "0.13.3";
|
||||
version = "0.14.0";
|
||||
format = "other";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kovidgoyal";
|
||||
repo = "kitty";
|
||||
rev = "v${version}";
|
||||
sha256 = "1y0vd75j8g61jdj8miml79w5ri3pqli5rv9iq6zdrxvzfa4b2rmb";
|
||||
sha256 = "122573l7xirs9dsi5p8gra47qpgxb3vahqp2r0c043pgz4i22v5z";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
@ -67,18 +67,6 @@ buildPythonApplication rec {
|
|||
libstartup_notification = "${libstartup_notification}/lib/libstartup-notification-1.so";
|
||||
})
|
||||
] ++ stdenv.lib.optionals stdenv.isDarwin [
|
||||
(fetchpatch {
|
||||
name = "macos-symlink-1";
|
||||
url = https://github.com/kovidgoyal/kitty/commit/bdeec612667f6976109247fe1750b10dda9c24c0.patch;
|
||||
sha256 = "1d18x260w059qag80kgb2cgi2h4rricvqhwpbrw79s8yxzs7jhxk";
|
||||
})
|
||||
(fetchpatch {
|
||||
# fixup of previous patch
|
||||
name = "macos-symlink-2";
|
||||
url = https://github.com/kovidgoyal/kitty/commit/af2c9a49b1ad31e94242295d88598591623fbf11.patch;
|
||||
sha256 = "0k3dmgbvmh66j8k3h8dw6la6ma6f20fng6jjypy982kxvracsnl5";
|
||||
})
|
||||
./macos-10.11.patch
|
||||
./no-lto.patch
|
||||
./no-werror.patch
|
||||
./png2icns.patch
|
||||
|
|
|
@ -12,15 +12,15 @@
|
|||
--- a/docs/Makefile
|
||||
+++ b/docs/Makefile
|
||||
@@ -3,7 +3,7 @@
|
||||
# Patching is needed here for the following reasons:
|
||||
# * `sphinx-build` in nixpkgs is not a Python file but a wrapper shell script
|
||||
# Patching is needed here for the following reason:
|
||||
# * importing the `constants` package from Kitty has a side effect that it
|
||||
# creates the user configuration directory. This package gets imported
|
||||
# while sphinx scans the code for documentation strings.
|
||||
#
|
||||
|
||||
# You can set these variables from the command line.
|
||||
SPHINXOPTS = -T $(FAIL_WARN)
|
||||
-SPHINXBUILD = python3 .. +launch :sphinx-build
|
||||
SPHINXOPTS = -j auto -T $(FAIL_WARN)
|
||||
-SPHINXBUILD = sphinx-build
|
||||
+SPHINXBUILD = PYTHONPATH=${PYTHONPATH}:.. HOME=${TMPDIR}/kitty-build-home sphinx-build
|
||||
SPHINXPROJ = kitty
|
||||
SOURCEDIR = .
|
||||
|
|
|
@ -1,116 +0,0 @@
|
|||
commit 749772b8b8179eb3b71e542fd9ed5621feb578f5
|
||||
Author: Matthew Glazar <strager.nds@gmail.com>
|
||||
Date: Thu Feb 28 22:01:32 2019 -0800
|
||||
|
||||
Support macOS 10.11
|
||||
|
||||
Allow Kitty to run on macOS 10.11 El Capitan.
|
||||
|
||||
diff --git a/glfw/cocoa_init.m b/glfw/cocoa_init.m
|
||||
index 1e719d2e..05a680e4 100644
|
||||
--- a/glfw/cocoa_init.m
|
||||
+++ b/glfw/cocoa_init.m
|
||||
@@ -30,6 +30,10 @@
|
||||
#define NSEventMaskKeyUp NSKeyUpMask
|
||||
#define NSEventMaskKeyDown NSKeyDownMask
|
||||
#define NSEventModifierFlagCommand NSCommandKeyMask
|
||||
+ #define NSEventModifierFlagControl NSControlKeyMask
|
||||
+ #define NSEventModifierFlagDeviceIndependentFlagsMask NSDeviceIndependentModifierFlagsMask
|
||||
+ #define NSEventModifierFlagShift NSShiftKeyMask
|
||||
+ #define NSEventTypeApplicationDefined NSApplicationDefined
|
||||
#endif
|
||||
|
||||
// Change to our application bundle's resources directory, if present
|
||||
diff --git a/glfw/cocoa_window.m b/glfw/cocoa_window.m
|
||||
index 1ce79b56..fd2255fc 100644
|
||||
--- a/glfw/cocoa_window.m
|
||||
+++ b/glfw/cocoa_window.m
|
||||
@@ -41,6 +41,7 @@
|
||||
#define NSWindowStyleMaskTitled NSTitledWindowMask
|
||||
#define NSEventModifierFlagCommand NSCommandKeyMask
|
||||
#define NSEventModifierFlagControl NSControlKeyMask
|
||||
+ #define NSEventModifierFlagNumericPad NSNumericPadKeyMask
|
||||
#define NSEventModifierFlagOption NSAlternateKeyMask
|
||||
#define NSEventModifierFlagShift NSShiftKeyMask
|
||||
#define NSEventModifierFlagCapsLock NSAlphaShiftKeyMask
|
||||
diff --git a/kitty/cocoa_window.m b/kitty/cocoa_window.m
|
||||
index 5e9252ba..99eb3352 100644
|
||||
--- a/kitty/cocoa_window.m
|
||||
+++ b/kitty/cocoa_window.m
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <objc/runtime.h>
|
||||
|
||||
#if (MAC_OS_X_VERSION_MAX_ALLOWED < 101200)
|
||||
+typedef NSUInteger NSWindowStyleMask;
|
||||
+#define NSWindowStyleMaskBorderless NSBorderlessWindowMask
|
||||
+#define NSWindowStyleMaskFullScreen NSFullScreenWindowMask
|
||||
#define NSWindowStyleMaskResizable NSResizableWindowMask
|
||||
#define NSEventModifierFlagOption NSAlternateKeyMask
|
||||
#define NSEventModifierFlagCommand NSCommandKeyMask
|
||||
diff --git a/kitty/logging.c b/kitty/logging.c
|
||||
index 45c88174..1ec9f1b0 100644
|
||||
--- a/kitty/logging.c
|
||||
+++ b/kitty/logging.c
|
||||
@@ -5,12 +5,21 @@
|
||||
* Distributed under terms of the GPL3 license.
|
||||
*/
|
||||
|
||||
+#ifdef __APPLE__
|
||||
+#include <AvailabilityMacros.h>
|
||||
+#endif
|
||||
+#if defined(__APPLE__) && defined(MAC_OS_X_VERSION_10_12) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_12
|
||||
+#define USE_APPLE_OS_LOG 1
|
||||
+#else
|
||||
+#define USE_APPLE_OS_LOG 0
|
||||
+#endif
|
||||
+
|
||||
#include "data-types.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <time.h>
|
||||
#include <sys/time.h>
|
||||
-#ifdef __APPLE__
|
||||
+#if USE_APPLE_OS_LOG
|
||||
#include <os/log.h>
|
||||
#endif
|
||||
|
||||
@@ -21,7 +30,7 @@ void
|
||||
log_error(const char *fmt, ...) {
|
||||
va_list ar;
|
||||
struct timeval tv;
|
||||
-#ifdef __APPLE__
|
||||
+#if USE_APPLE_OS_LOG
|
||||
// Apple does not provide a varargs style os_logv
|
||||
char logbuf[16 * 1024] = {0};
|
||||
#else
|
||||
@@ -44,7 +53,7 @@ log_error(const char *fmt, ...) {
|
||||
if (use_os_log) { bufprint(vsnprintf, fmt, ar); }
|
||||
else vfprintf(stderr, fmt, ar);
|
||||
va_end(ar);
|
||||
-#ifdef __APPLE__
|
||||
+#if USE_APPLE_OS_LOG
|
||||
if (use_os_log) os_log(OS_LOG_DEFAULT, "%{public}s", logbuf);
|
||||
#endif
|
||||
if (!use_os_log) fprintf(stderr, "\n");
|
||||
@@ -66,7 +75,7 @@ static PyMethodDef module_methods[] = {
|
||||
bool
|
||||
init_logging(PyObject *module) {
|
||||
if (PyModule_AddFunctions(module, module_methods) != 0) return false;
|
||||
-#ifdef __APPLE__
|
||||
+#if USE_APPLE_OS_LOG
|
||||
if (getenv("KITTY_LAUNCHED_BY_LAUNCH_SERVICES") != NULL) use_os_log = true;
|
||||
#endif
|
||||
return true;
|
||||
diff --git a/setup.py b/setup.py
|
||||
index f8643fce..55a96e73 100755
|
||||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -711,7 +711,7 @@ Categories=System;TerminalEmulator;
|
||||
CFBundlePackageType='APPL',
|
||||
CFBundleSignature='????',
|
||||
CFBundleExecutable=appname,
|
||||
- LSMinimumSystemVersion='10.12.0',
|
||||
+ LSMinimumSystemVersion='10.11.0',
|
||||
LSRequiresNativeExecution=True,
|
||||
NSAppleScriptEnabled=False,
|
||||
# Needed for dark mode in Mojave when linking against older SDKs
|
|
@ -1,6 +1,6 @@
|
|||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -223,9 +223,6 @@ def init_env(
|
||||
@@ -233,9 +233,6 @@ def init_env(
|
||||
cppflags += shlex.split(os.environ.get('CPPFLAGS', ''))
|
||||
cflags += shlex.split(os.environ.get('CFLAGS', ''))
|
||||
ldflags += shlex.split(os.environ.get('LDFLAGS', ''))
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
--- a/setup.py
|
||||
+++ b/setup.py
|
||||
@@ -202,7 +202,7 @@ def init_env(
|
||||
@@ -212,7 +212,7 @@
|
||||
cflags = os.environ.get(
|
||||
'OVERRIDE_CFLAGS', (
|
||||
'-Wextra -Wno-missing-field-initializers -Wall -std=c11'
|
||||
'-Wextra -Wno-missing-field-initializers -Wall -Wstrict-prototypes -std=c11'
|
||||
- ' -pedantic-errors -Werror {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
|
||||
+ ' {} {} -fwrapv {} {} -pipe {} -fvisibility=hidden'
|
||||
).format(
|
||||
|
|
Loading…
Reference in a new issue