1 |
commit: 9df975d888eae65bd65a4aeb553ab9b2fb6ad48c |
2 |
Author: Tim Harder <radhermit <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Feb 5 12:04:09 2018 +0000 |
4 |
Commit: Tim Harder <radhermit <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Feb 5 12:09:36 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9df975d8 |
7 |
|
8 |
x11-terms/kitty: initial import |
9 |
|
10 |
x11-terms/kitty/Manifest | 1 + |
11 |
x11-terms/kitty/files/kitty-0.7.1-flags.patch | 43 +++++++++++++ |
12 |
x11-terms/kitty/files/kitty-0.7.1-svg-icon.patch | 16 +++++ |
13 |
x11-terms/kitty/kitty-0.7.1.ebuild | 79 ++++++++++++++++++++++++ |
14 |
x11-terms/kitty/metadata.xml | 14 +++++ |
15 |
5 files changed, 153 insertions(+) |
16 |
|
17 |
diff --git a/x11-terms/kitty/Manifest b/x11-terms/kitty/Manifest |
18 |
new file mode 100644 |
19 |
index 00000000000..d6aa2678430 |
20 |
--- /dev/null |
21 |
+++ b/x11-terms/kitty/Manifest |
22 |
@@ -0,0 +1 @@ |
23 |
+DIST kitty-0.7.1.tar.gz 2535007 BLAKE2B 13c5506b30e54b190d1cec2c2bb5b3b8c76ba3492a065fccae84c84606842b717dc33f74a7b3abf4c0ffec8564c5dd9be4b6ed3972c24cf95662aec594359bc9 SHA512 595e64e49ac940b37ff88d6152006ebfe2722682a8ff6c8bc2514c150a5b51934b9de5b8c99130910e5638f9c1db566abf4adb65f3fdce893708787d1ded59c1 |
24 |
|
25 |
diff --git a/x11-terms/kitty/files/kitty-0.7.1-flags.patch b/x11-terms/kitty/files/kitty-0.7.1-flags.patch |
26 |
new file mode 100644 |
27 |
index 00000000000..6352ae93f63 |
28 |
--- /dev/null |
29 |
+++ b/x11-terms/kitty/files/kitty-0.7.1-flags.patch |
30 |
@@ -0,0 +1,43 @@ |
31 |
+--- kitty-0.7.1/setup.py |
32 |
++++ kitty-0.7.1/setup.py |
33 |
+@@ -163,12 +163,12 @@ |
34 |
+ df = '-g3' |
35 |
+ if ccver >= (5, 0): |
36 |
+ df += ' -Og' |
37 |
+- optimize = df if debug or sanitize else '-O3' |
38 |
++ optimize = '' |
39 |
+ sanitize_args = get_sanitize_args(cc, ccver) if sanitize else set() |
40 |
+ cflags = os.environ.get( |
41 |
+ 'OVERRIDE_CFLAGS', ( |
42 |
+ '-Wextra -Wno-missing-field-initializers -Wall -std=c99 -D_XOPEN_SOURCE=700' |
43 |
+- ' -pedantic-errors -Werror {} {} -D{}DEBUG -fwrapv {} {} -pipe {} -fvisibility=hidden' |
44 |
++ ' -pedantic {} {} -D{}DEBUG -fwrapv {} {} {} -fvisibility=hidden' |
45 |
+ ).format( |
46 |
+ optimize, |
47 |
+ ' '.join(sanitize_args), |
48 |
+@@ -183,7 +183,7 @@ |
49 |
+ ) |
50 |
+ ldflags = os.environ.get( |
51 |
+ 'OVERRIDE_LDFLAGS', |
52 |
+- '-Wall ' + ' '.join(sanitize_args) + ('' if debug else ' -O3') |
53 |
++ '-Wall ' + ' '.join(sanitize_args) |
54 |
+ ) |
55 |
+ ldflags = shlex.split(ldflags) |
56 |
+ ldflags.append('-shared') |
57 |
+@@ -455,13 +455,13 @@ |
58 |
+ |
59 |
+ |
60 |
+ def build_linux_launcher(args, launcher_dir='.', for_bundle=False, sh_launcher=False): |
61 |
+- cflags = '-Wall -Werror -fpie'.split() |
62 |
++ cflags = '-Wall -fpie'.split() |
63 |
+ libs = [] |
64 |
+ if args.profile: |
65 |
+ cflags.append('-DWITH_PROFILER'), cflags.append('-g') |
66 |
+ libs.append('-lprofiler') |
67 |
+- else: |
68 |
+- cflags.append('-O3') |
69 |
++ #else: |
70 |
++ # cflags.append('-O3') |
71 |
+ if for_bundle: |
72 |
+ cflags.append('-DFOR_BUNDLE') |
73 |
+ cflags.append('-DPYVER="{}"'.format(sysconfig.get_python_version())) |
74 |
|
75 |
diff --git a/x11-terms/kitty/files/kitty-0.7.1-svg-icon.patch b/x11-terms/kitty/files/kitty-0.7.1-svg-icon.patch |
76 |
new file mode 100644 |
77 |
index 00000000000..345ba99a89d |
78 |
--- /dev/null |
79 |
+++ b/x11-terms/kitty/files/kitty-0.7.1-svg-icon.patch |
80 |
@@ -0,0 +1,16 @@ |
81 |
+Use SVG icon instead of PNG. |
82 |
+ |
83 |
+--- kitty-0.7.1/setup.py |
84 |
++++ kitty-0.7.1/setup.py |
85 |
+@@ -507,9 +507,9 @@ |
86 |
+ safe_makedirs(launcher_dir) |
87 |
+ build_linux_launcher(args, launcher_dir, for_bundle, sh_launcher) |
88 |
+ if not is_macos: # {{{ linux desktop gunk |
89 |
+- icdir = os.path.join(ddir, 'share', 'icons', 'hicolor', '256x256', 'apps') |
90 |
++ icdir = os.path.join(ddir, 'share', 'icons', 'hicolor', 'scalable', 'apps') |
91 |
+ safe_makedirs(icdir) |
92 |
+- shutil.copy2('logo/kitty.png', icdir) |
93 |
++ shutil.copy2('logo/kitty.svg', icdir) |
94 |
+ deskdir = os.path.join(ddir, 'share', 'applications') |
95 |
+ safe_makedirs(deskdir) |
96 |
+ with open(os.path.join(deskdir, 'kitty.desktop'), 'w') as f: |
97 |
|
98 |
diff --git a/x11-terms/kitty/kitty-0.7.1.ebuild b/x11-terms/kitty/kitty-0.7.1.ebuild |
99 |
new file mode 100644 |
100 |
index 00000000000..4a24fd5abf5 |
101 |
--- /dev/null |
102 |
+++ b/x11-terms/kitty/kitty-0.7.1.ebuild |
103 |
@@ -0,0 +1,79 @@ |
104 |
+# Copyright 1999-2018 Gentoo Foundation |
105 |
+# Distributed under the terms of the GNU General Public License v2 |
106 |
+ |
107 |
+EAPI=6 |
108 |
+PYTHON_COMPAT=( python3_{5,6} ) |
109 |
+ |
110 |
+inherit python-single-r1 toolchain-funcs |
111 |
+ |
112 |
+DESCRIPTION="a cross-platform, fast, featureful, GPU-based terminal emulator" |
113 |
+HOMEPAGE="https://github.com/kovidgoyal/kitty" |
114 |
+SRC_URI="https://github.com/kovidgoyal/kitty/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
115 |
+ |
116 |
+LICENSE="GPL-3" |
117 |
+SLOT="0" |
118 |
+KEYWORDS="~amd64 ~x86" |
119 |
+IUSE="debug imagemagick wayland" |
120 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
121 |
+ |
122 |
+COMMON_DEPS=" |
123 |
+ ${PYTHON_DEPS} |
124 |
+ >=media-libs/harfbuzz-1.5.0:= |
125 |
+ sys-libs/zlib |
126 |
+ media-libs/libpng:0= |
127 |
+ media-libs/freetype:2 |
128 |
+ media-libs/fontconfig |
129 |
+ x11-libs/libXcursor |
130 |
+ x11-libs/libXrandr |
131 |
+ x11-libs/libXinerama |
132 |
+ x11-libs/libxkbcommon |
133 |
+ wayland? ( |
134 |
+ dev-libs/wayland |
135 |
+ >=dev-libs/wayland-protocols-1.12 |
136 |
+ ) |
137 |
+" |
138 |
+RDEPEND=" |
139 |
+ ${COMMON_DEPS} |
140 |
+ imagemagick? ( virtual/imagemagick-tools ) |
141 |
+" |
142 |
+DEPEND="${RDEPEND} |
143 |
+ virtual/pkgconfig |
144 |
+" |
145 |
+ |
146 |
+PATCHES=( |
147 |
+ "${FILESDIR}"/${P}-flags.patch |
148 |
+ "${FILESDIR}"/${P}-svg-icon.patch) |
149 |
+ |
150 |
+src_prepare() { |
151 |
+ default |
152 |
+ |
153 |
+ # respect libdir |
154 |
+ sed -i "/libdir =/s/'lib'/'$(get_libdir)'/" setup.py || die |
155 |
+ |
156 |
+ # disable wayland as required |
157 |
+ if ! use wayland; then |
158 |
+ sed -i "/'x11 wayland'/s/ wayland//" setup.py || die |
159 |
+ fi |
160 |
+ |
161 |
+ tc-export CC |
162 |
+} |
163 |
+ |
164 |
+doecho() { |
165 |
+ echo "$@" |
166 |
+ "$@" || die |
167 |
+} |
168 |
+ |
169 |
+src_compile() { |
170 |
+ doecho "${EPYTHON}" setup.py --verbose $(usex debug --debug "") linux-package |
171 |
+} |
172 |
+ |
173 |
+src_test() { |
174 |
+ "${EPYTHON}" test.py || die |
175 |
+} |
176 |
+ |
177 |
+src_install() { |
178 |
+ mkdir -p "${ED}"usr || die |
179 |
+ cp -r linux-package/* "${ED}usr" || die |
180 |
+ |
181 |
+ dodoc CHANGELOG.rst *.asciidoc |
182 |
+} |
183 |
|
184 |
diff --git a/x11-terms/kitty/metadata.xml b/x11-terms/kitty/metadata.xml |
185 |
new file mode 100644 |
186 |
index 00000000000..9289a618728 |
187 |
--- /dev/null |
188 |
+++ b/x11-terms/kitty/metadata.xml |
189 |
@@ -0,0 +1,14 @@ |
190 |
+<?xml version='1.0' encoding='UTF-8'?> |
191 |
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
192 |
+<pkgmetadata> |
193 |
+ <maintainer type="person"> |
194 |
+ <email>radhermit@g.o</email> |
195 |
+ <name>Tim Harder</name> |
196 |
+ </maintainer> |
197 |
+ <use> |
198 |
+ <flag name="imagemagick">Support displaying images in the terminal with icat</flag> |
199 |
+ </use> |
200 |
+ <upstream> |
201 |
+ <remote-id type="github">kovidgoyal/kitty</remote-id> |
202 |
+ </upstream> |
203 |
+</pkgmetadata> |