From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 38D91158090 for ; Thu, 19 May 2022 02:03:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0832CE0848; Thu, 19 May 2022 02:03:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8F66CE0837 for ; Thu, 19 May 2022 02:03:57 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 38EE434174C for ; Thu, 19 May 2022 02:03:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA738445 for ; Thu, 19 May 2022 02:03:54 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1652925448.75ea56ddb2052f91951e83b4d5e80ed1fc611f6f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-editors/kakoune/, app-editors/kakoune/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-editors/kakoune/files/kakoune-2021.11.08-gcc12.patch app-editors/kakoune/kakoune-2021.11.08-r1.ebuild X-VCS-Directories: app-editors/kakoune/ app-editors/kakoune/files/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 75ea56ddb2052f91951e83b4d5e80ed1fc611f6f X-VCS-Branch: master Date: Thu, 19 May 2022 02:03:54 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: efc8fce8-1e28-4f2a-a62b-58f78fc6e8e9 X-Archives-Hash: 411e6b79e2666fe2acaa74c309a78e57 commit: 75ea56ddb2052f91951e83b4d5e80ed1fc611f6f Author: Ian Hixson sdf org> AuthorDate: Wed May 18 18:10:13 2022 +0000 Commit: Sam James gentoo org> CommitDate: Thu May 19 01:57:28 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=75ea56dd app-editors/kakoune: Bump to 2021.11.08-r1 Fix build with gcc-12.1.0 bug #840647 Patch taken from upstream and will no longer be needed once there is a new release. See https://github.com/mawww/kakoune/issues/4544 and https://github.com/mawww/kakoune/pull/4549 for additional details. Closes: https://bugs.gentoo.org/840647 Signed-off-by: Ian Hixson sdf.org> Closes: https://github.com/gentoo/gentoo/pull/25551 Signed-off-by: Sam James gentoo.org> .../kakoune/files/kakoune-2021.11.08-gcc12.patch | 58 ++++++++++++++++++++++ app-editors/kakoune/kakoune-2021.11.08-r1.ebuild | 44 ++++++++++++++++ 2 files changed, 102 insertions(+) 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 +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 +}