summaryrefslogtreecommitdiff
path: root/app-editors/kakoune
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-06-29 12:04:12 +0100
commit0f558761aa2dee1017b4751e4017205e015a9560 (patch)
tree037df795519468a25d9362b4e95cdaeb84eb1cf9 /app-editors/kakoune
parent752d6256e5204b958b0ef7905675a940b5e9172f (diff)
gentoo resync : 29.12.2022
Diffstat (limited to 'app-editors/kakoune')
-rw-r--r--app-editors/kakoune/Manifest2
-rw-r--r--app-editors/kakoune/files/kakoune-2021.11.08-gcc12.patch58
-rw-r--r--app-editors/kakoune/kakoune-2021.11.08-r1.ebuild44
3 files changed, 104 insertions, 0 deletions
diff --git a/app-editors/kakoune/Manifest b/app-editors/kakoune/Manifest
index e4f51ffdaa4c..3cfdf9b7d673 100644
--- a/app-editors/kakoune/Manifest
+++ b/app-editors/kakoune/Manifest
@@ -1,3 +1,5 @@
+AUX kakoune-2021.11.08-gcc12.patch 1543 BLAKE2B 5ddac65c8143ea581e30df3f7d5685dc0319a683d1b64d4ab5c538a79d8ab404ee3ce82aaa8cab8b8f53c854d2727a8568c2616914ab14f46dd2aa9b4b9fec6c SHA512 4c09b60141dc47fedebe1040fee888bd594f964df08040b0edfa27448cd1219078e50618ba6c9538a48cd5acbd0d7ad08968c1649d2b97447bf4fb332df0181b
DIST kakoune-2021.11.08.tar.bz2 538466 BLAKE2B 30cb80c971c065610a8b40d9df0af2d3c1650baa065f14c22557b3c22e3cd2832e227a3a167d10d3892579eee30a70b5e3b62ad502dac7bdbb1c252b71c66e99 SHA512 429e11ff51fce18394e0a8fc55cd58a346b91dbe41b842b96c31a984bc92ea67b186c9f819d2d3ee88422ba453347281b0416a5bc4b1e7816240b9aba688a7e5
+EBUILD kakoune-2021.11.08-r1.ebuild 814 BLAKE2B dda37f636a19dc45d4fa25076679e70afdde5c7d1d65b339baff06a99a66a73fc4c03457d31df1f509d829cd21b9185b2ffedf85a91d304f3a97e125fa8e40b5 SHA512 c4d1ee2d54551dd37a66f5cc7cd897c261e1a5ec8205ebe7e50810fed1ccf910051ffbe43f6b139b17ed24cf5029ebb43ce0acbf860702aa78183b1402254ef4
EBUILD kakoune-2021.11.08.ebuild 769 BLAKE2B 4df909a0a7ededeee6bde50cd7402758959926c686225ba3729bd244549b1e411849867ab2609a0d59223ead319202fb66c813d37eb191312092ee4ce690e0e5 SHA512 68a63728ef642e07549e8ddc94a7ff054d29b5130155ec8ab3582452dee8cbc2c9ffc3a2cadc78b82a9ae1595d5a2f08f91192e74275dcfebdd06375b2fd1033
MISC metadata.xml 512 BLAKE2B afa8631f092bca6c3307dcd610340b39e41da979781f0f1ac391e873ae063088599cfc96c99bc81cca0c1244905ced51e3736b1fc387d0d9fdb8233be2810427 SHA512 a7e4da11480bc3f8bd09253901d9528235ce9a4f00a418cd5f58c898244850cafe944d6a828e1b871a2d98faba179fd9f4ddab99695a6762a4a7a290f1311a2f
diff --git a/app-editors/kakoune/files/kakoune-2021.11.08-gcc12.patch b/app-editors/kakoune/files/kakoune-2021.11.08-gcc12.patch
new file mode 100644
index 000000000000..7f1101cdbf49
--- /dev/null
+++ b/app-editors/kakoune/files/kakoune-2021.11.08-gcc12.patch
@@ -0,0 +1,58 @@
+https://bugs.gentoo.org/840647
+https://github.com/mawww/kakoune/issues/4544
+https://github.com/mawww/kakoune/pull/4549
+https://github.com/mawww/kakoune/commit/d1ea2ffa600fd2a7b14e415b68ceedba3325c5db
+
+commit d1ea2ffa600fd2a7b14e415b68ceedba3325c5db
+Author: Tim Allen <screwtape@froup.com>
+Date: Sat Feb 12 21:35:33 2022 +1100
+
+ Make Color::validate_alpha() a constexpr function.
+
+ We call it from a constexpr constructor, so it needs to be constexpr itself.
+
+ Fixes #4544.
+
+diff --git a/src/color.cc b/src/color.cc
+index b355b9cf..dfe2e955 100644
+--- a/src/color.cc
++++ b/src/color.cc
+@@ -34,13 +34,6 @@ bool is_color_name(StringView color)
+ return contains(color_names, color);
+ }
+
+-void Color::validate_alpha()
+-{
+- static_assert(RGB == 17);
+- if (a < RGB)
+- throw runtime_error("Colors alpha must be > 16");
+-}
+-
+ Color str_to_color(StringView color)
+ {
+ auto it = find_if(color_names, [&](const char* c){ return color == c; });
+diff --git a/src/color.hh b/src/color.hh
+index 943678ed..85babd98 100644
+--- a/src/color.hh
++++ b/src/color.hh
+@@ -1,6 +1,7 @@
+ #ifndef color_hh_INCLUDED
+ #define color_hh_INCLUDED
+
++#include "exception.hh"
+ #include "hash.hh"
+ #include "meta.hh"
+ #include "assert.hh"
+@@ -55,7 +56,11 @@ struct Color
+ }
+
+ private:
+- void validate_alpha();
++ constexpr void validate_alpha() {
++ static_assert(RGB == 17);
++ if (a < RGB)
++ throw runtime_error("Colors alpha must be > 16");
++ }
+ };
+
+ constexpr bool operator==(Color lhs, Color rhs)
diff --git a/app-editors/kakoune/kakoune-2021.11.08-r1.ebuild b/app-editors/kakoune/kakoune-2021.11.08-r1.ebuild
new file mode 100644
index 000000000000..37633ce21f75
--- /dev/null
+++ b/app-editors/kakoune/kakoune-2021.11.08-r1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 2020-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="Modal editor inspired by vim"
+HOMEPAGE="http://kakoune.org/ https://github.com/mawww/kakoune"
+SRC_URI="https://github.com/mawww/kakoune/releases/download/v${PV}/${P}.tar.bz2"
+
+LICENSE="Unlicense"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86"
+
+BDEPEND="virtual/pkgconfig"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-gcc12.patch
+)
+
+src_prepare() {
+ sed -i '/CXXFLAGS += -O3/d' src/Makefile || die
+ default
+}
+
+src_configure() {
+ tc-export CXX
+}
+
+src_compile() {
+ emake -C src all
+}
+
+src_test() {
+ emake -C src test
+}
+
+src_install() {
+ emake PREFIX="${D}"/usr docdir="${ED}/usr/share/doc/${PF}" install
+
+ rm "${ED}/usr/share/man/man1/kak.1.gz" || die
+ doman doc/kak.1
+}