From 4faf77b74afaa084f05addae28cbf714b9dd57db Mon Sep 17 00:00:00 2001 From: Julio Galvan Date: Thu, 24 May 2018 18:51:07 -0700 Subject: [PATCH] New package: kitty-0.10.1 --- srcpkgs/kitty-terminfo | 1 + srcpkgs/kitty/patches/comparison.patch | 11 +++++ .../patches/python-compile-workers.patch | 11 +++++ srcpkgs/kitty/template | 41 +++++++++++++++++++ 4 files changed, 64 insertions(+) create mode 120000 srcpkgs/kitty-terminfo create mode 100644 srcpkgs/kitty/patches/comparison.patch create mode 100644 srcpkgs/kitty/patches/python-compile-workers.patch create mode 100644 srcpkgs/kitty/template diff --git a/srcpkgs/kitty-terminfo b/srcpkgs/kitty-terminfo new file mode 120000 index 0000000000..659fb6b426 --- /dev/null +++ b/srcpkgs/kitty-terminfo @@ -0,0 +1 @@ +kitty \ No newline at end of file diff --git a/srcpkgs/kitty/patches/comparison.patch b/srcpkgs/kitty/patches/comparison.patch new file mode 100644 index 0000000000..9251655c1b --- /dev/null +++ b/srcpkgs/kitty/patches/comparison.patch @@ -0,0 +1,11 @@ +--- kitty/keys.c 2018-05-05 06:33:02.268283599 -0700 ++++ kitty/keys.c 2018-05-05 06:32:45.995284267 -0700 +@@ -77,7 +77,7 @@ + } + + static inline bool +-is_ascii_control_char(char c) { ++is_ascii_control_char(signed char c) { + return c == 0 || (1 <= c && c <= 31) || c == 127; + } + diff --git a/srcpkgs/kitty/patches/python-compile-workers.patch b/srcpkgs/kitty/patches/python-compile-workers.patch new file mode 100644 index 0000000000..7c09927032 --- /dev/null +++ b/srcpkgs/kitty/patches/python-compile-workers.patch @@ -0,0 +1,11 @@ +--- setup.py 2018-05-04 21:16:28.000000000 -0700 ++++ setup.py 2018-05-05 06:30:39.111289470 -0700 +@@ -559,7 +559,7 @@ + shutil.copytree('kitty', os.path.join(libdir, 'kitty'), ignore=src_ignore) + shutil.copytree('kittens', os.path.join(libdir, 'kittens'), ignore=src_ignore) + import compileall +- compileall.compile_dir(libdir, quiet=1, workers=4) ++ compileall.compile_dir(libdir, quiet=1, workers=1) + for root, dirs, files in os.walk(libdir): + for f in files: + path = os.path.join(root, f) diff --git a/srcpkgs/kitty/template b/srcpkgs/kitty/template new file mode 100644 index 0000000000..f6d7d7bf71 --- /dev/null +++ b/srcpkgs/kitty/template @@ -0,0 +1,41 @@ +# Template file for 'kitty' +pkgname=kitty +version=0.10.1 +revision=1 +python_version=3 +hostmakedepends="ncurses pkg-config python3-devel wayland-devel wayland-protocols" +makedepends="gettext-devel glfw-devel harfbuzz-devel libxkbcommon-devel + python3-devel wayland-devel wayland-protocols" +depends="kitty-terminfo" +conf_files="/etc/kitty/kitty.conf" +short_desc="Modern, hackable, featureful, OpenGL based terminal emulator" +maintainer="Julio Galvan " +license="GPL-3.0-or-later" +homepage="https://github.com/kovidgoyal/kitty" +distfiles="https://github.com/kovidgoyal/kitty/archive/v${version}.tar.gz" +checksum=ef22208497a76e2f88ebe56c176e4608f049b056252cf1bf122c9c1ec711cfa6 + +do_build() { + if [ -n "$CROSS_BUILD" ]; then + export CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python3.6m" + sed -i "s|-fpie|-fpie ${CFLAGS}|g" setup.py + fi + case "$XBPS_TARGET_MACHINE" in + *-musl) + sed -i 's/pow10/pow_10/g' kitty/parser.c;; + esac + python3 setup.py linux-package --prefix=${DESTDIR}/usr --verbose +} + +do_install() { + vmkdir etc/kitty + cp ${DESTDIR}/usr/lib/kitty/kitty/kitty.conf ${DESTDIR}/etc/kitty/ +} + +kitty-terminfo_package() { + short_desc+=" - terminfo data" + noarch=yes + pkg_install() { + vmove usr/share/terminfo + } +}