Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Ismael Luceno (592696590abcd4bfe5e08ba49f5f90470c09d2b1)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Ismael Luceno <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Ismael Luceno (592696590abcd4bfe5e08ba49f5f90470c09d2b1)
  • Date: Sat, 30 Jul 2022 21:44:25 +0000

GIT changes to master grimoire by Ismael Luceno <ismael AT sourcemage.org>:

editors/kakoune/BUILD
| 5
editors/kakoune/DETAILS
| 4
editors/kakoune/HISTORY
| 7
editors/kakoune/INSTALL
| 3
editors/kakoune/PRE_BUILD
| 1

editors/kakoune/patches/0001-Make-Color-validate_alpha-a-constexpr-function.patch
| 57 +++
editors/kakoune/patches/0001-Stop-using-deprecated-std-iterator.patch
| 146 ++++++++++
7 files changed, 216 insertions(+), 7 deletions(-)

New commits:
commit 592696590abcd4bfe5e08ba49f5f90470c09d2b1
Author: Ismael Luceno <ismael AT sourcemage.org>
Commit: Ismael Luceno <ismael AT sourcemage.org>

kakoune 2021.11.08

diff --git a/editors/kakoune/BUILD b/editors/kakoune/BUILD
index 9200297..1486852 100755
--- a/editors/kakoune/BUILD
+++ b/editors/kakoune/BUILD
@@ -1,3 +1,2 @@
-OPTS="$OPTS PREFIX=${INSTALL_ROOT}/usr" &&
-cd ${SOURCE_DIRECTORY}/src &&
-make $OPTS
+OPTS+=" PREFIX=$INSTALL_ROOT/usr" &&
+make -C "$SOURCE_DIRECTORY"/src $OPTS
diff --git a/editors/kakoune/DETAILS b/editors/kakoune/DETAILS
index a50cf37..7928c2e 100755
--- a/editors/kakoune/DETAILS
+++ b/editors/kakoune/DETAILS
@@ -1,9 +1,9 @@
SPELL=kakoune
- VERSION=2020.09.01
+ VERSION=2021.11.08
SOURCE=${SPELL}-${VERSION}.tar.bz2
SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"

SOURCE_URL[0]=https://github.com/mawww/kakoune/releases/download/v$VERSION/$SOURCE
-
SOURCE_HASH=sha512:0a85fe6304dd8c4097a345c6605bd246775655c8fa489f8cac047056fcf71c6bcb650201ffcfcacb1b9efb854da0c036eb1f87d1dbe42d3123ff011550011845
+
SOURCE_HASH=sha512:429e11ff51fce18394e0a8fc55cd58a346b91dbe41b842b96c31a984bc92ea67b186c9f819d2d3ee88422ba453347281b0416a5bc4b1e7816240b9aba688a7e5
WEB_SITE=https://github.com/mawww/kakoune
LICENSE[0]=UNLICENSE
ENTERED=20190605
diff --git a/editors/kakoune/HISTORY b/editors/kakoune/HISTORY
index 46b0fe4..b0fb487 100644
--- a/editors/kakoune/HISTORY
+++ b/editors/kakoune/HISTORY
@@ -1,3 +1,10 @@
+2022-07-30 Ismael Luceno <ismael AT sourcemage.org>
+ * BUILD, INSTALL: simplified
+ * DETAILS, PRE_BUILD,
+ patches/0001-Make-Color-validate_alpha-a-constexpr-function.patch,
+ patches/0001-Stop-using-deprecated-std-iterator.patch:
+ updated spell to 2021.11.08
+
2021-08-23 Ismael Luceno <ismael AT sourcemage.org>
* DETAILS: updated spell to 2020.09.01
* PRE_BUILD: fixed CXXFLAGS
diff --git a/editors/kakoune/INSTALL b/editors/kakoune/INSTALL
index b29c7e8..2a2f611 100755
--- a/editors/kakoune/INSTALL
+++ b/editors/kakoune/INSTALL
@@ -1,2 +1 @@
-cd ${SOURCE_DIRECTORY}/src &&
-make $OPTS install
+make -C "$SOURCE_DIRECTORY"/src $OPTS install
diff --git a/editors/kakoune/PRE_BUILD b/editors/kakoune/PRE_BUILD
index b964768..0f21d6c 100755
--- a/editors/kakoune/PRE_BUILD
+++ b/editors/kakoune/PRE_BUILD
@@ -1,4 +1,5 @@
default_pre_build &&
cd "$SOURCE_DIRECTORY" &&
+apply_patch_dir patches &&
# Fix overriding of -On in CXXFLAGS; use -Og instead of -On for debugging
sedit '/^ *CXXFLAGS *[+]= -O.$/ {s/0$/g/; t; d}' src/Makefile
diff --git
a/editors/kakoune/patches/0001-Make-Color-validate_alpha-a-constexpr-function.patch

b/editors/kakoune/patches/0001-Make-Color-validate_alpha-a-constexpr-function.patch
new file mode 100644
index 0000000..283cddf
--- /dev/null
+++
b/editors/kakoune/patches/0001-Make-Color-validate_alpha-a-constexpr-function.patch
@@ -0,0 +1,57 @@
+From d1ea2ffa600fd2a7b14e415b68ceedba3325c5db Mon Sep 17 00:00:00 2001
+From: Tim Allen <screwtape AT froup.com>
+Date: Sat, 12 Feb 2022 21:35:33 +1100
+Subject: [PATCH] Make Color::validate_alpha() a constexpr function.
+
+We call it from a constexpr constructor, so it needs to be constexpr itself.
+
+Fixes #4544.
+Upstream-Status: Backported
+---
+ src/color.cc | 7 -------
+ src/color.hh | 7 ++++++-
+ 2 files changed, 6 insertions(+), 8 deletions(-)
+
+diff --git a/src/color.cc b/src/color.cc
+index b355b9cf1..dfe2e955b 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 943678edf..85babd980 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/editors/kakoune/patches/0001-Stop-using-deprecated-std-iterator.patch
b/editors/kakoune/patches/0001-Stop-using-deprecated-std-iterator.patch
new file mode 100644
index 0000000..ed67c9c
--- /dev/null
+++ b/editors/kakoune/patches/0001-Stop-using-deprecated-std-iterator.patch
@@ -0,0 +1,146 @@
+From 1529cfb2c2ce2247747cce5eadcc93dcee570e0e Mon Sep 17 00:00:00 2001
+From: Johannes Altmanninger <aclopte AT gmail.com>
+Date: Thu, 19 May 2022 18:15:20 +0200
+Subject: [PATCH] Stop using deprecated std::iterator
+
+As reported in #4615 and others, GCC 12.1 emits deprecation warnings
+because we use std::iterator. Replace it with the modern equivalent.
+
+Closes #4615
+Upstream-Status: Backported
+---
+ src/parameters_parser.hh | 8 +++++++-
+ src/ranges.hh | 34 ++++++++++++++++++++++++++++------
+ src/regex.hh | 7 ++++++-
+ src/string_utils.hh | 8 +++++++-
+ 4 files changed, 48 insertions(+), 9 deletions(-)
+
+diff --git a/src/parameters_parser.hh b/src/parameters_parser.hh
+index afc2c7dc6..69fa88eb7 100644
+--- a/src/parameters_parser.hh
++++ b/src/parameters_parser.hh
+@@ -80,8 +80,14 @@ struct ParametersParser
+ // a non empty StringView value if the switch took an argument.
+ Optional<StringView> get_switch(StringView name) const;
+
+- struct iterator : std::iterator<std::forward_iterator_tag, String>
++ struct iterator
+ {
++ using difference_type = ptrdiff_t;
++ using value_type = String;
++ using pointer = String*;
++ using reference = String&;
++ using iterator_category = std::forward_iterator_tag;
++
+ iterator(const ParametersParser& parser, size_t index)
+ : m_parser(parser), m_index(index) {}
+
+diff --git a/src/ranges.hh b/src/ranges.hh
+index a86b9e2ba..2f9e9a210 100644
+--- a/src/ranges.hh
++++ b/src/ranges.hh
+@@ -122,9 +122,14 @@ struct FilterView
+ {
+ using RangeIt = IteratorOf<Range>;
+
+- struct Iterator : std::iterator<std::forward_iterator_tag,
+- typename
std::iterator_traits<RangeIt>::value_type>
++ struct Iterator
+ {
++ using difference_type = ptrdiff_t;
++ using value_type = typename
std::iterator_traits<RangeIt>::value_type;
++ using pointer = value_type*;
++ using reference = value_type&;
++ using iterator_category = std::forward_iterator_tag;
++
+ Iterator(Filter& filter, RangeIt it, RangeIt end)
+ : m_it{std::move(it)}, m_end{std::move(end)}, m_filter{&filter}
+ {
+@@ -180,9 +185,14 @@ struct EnumerateView
+ {
+ using RangeIt = IteratorOf<Range>;
+
+- struct Iterator : std::iterator<std::forward_iterator_tag,
+- typename
std::iterator_traits<RangeIt>::value_type>
++ struct Iterator
+ {
++ using difference_type = ptrdiff_t;
++ using value_type = typename
std::iterator_traits<RangeIt>::value_type;
++ using pointer = value_type*;
++ using reference = value_type&;
++ using iterator_category = std::forward_iterator_tag;
++
+ Iterator(size_t index, RangeIt it)
+ : m_index{index}, m_it{std::move(it)} {}
+
+@@ -317,8 +327,14 @@ struct SplitView
+ std::pair<IteratorOf<Range>,
IteratorOf<Range>>,
+ ValueTypeParam>;
+
+- struct Iterator : std::iterator<std::forward_iterator_tag, ValueType>
++ struct Iterator
+ {
++ using difference_type = ptrdiff_t;
++ using value_type = ValueType;
++ using pointer = ValueType*;
++ using reference = ValueType&;
++ using iterator_category = std::forward_iterator_tag;
++
+ Iterator(RangeIt pos, const RangeIt& end, Element separator,
Element escaper)
+ : done{pos == end}, pos{pos}, sep{pos}, end(end),
separator{std::move(separator)}, escaper{std::move(escaper)}
+ {
+@@ -486,8 +502,14 @@ struct ConcatView
+ using ValueType = typename std::common_type_t<typename
std::iterator_traits<RangeIt1>::value_type,
+ typename
std::iterator_traits<RangeIt2>::value_type>;
+
+- struct Iterator : std::iterator<std::forward_iterator_tag, ValueType>
++ struct Iterator
+ {
++ using difference_type = ptrdiff_t;
++ using value_type = ValueType;
++ using pointer = ValueType*;
++ using reference = ValueType&;
++ using iterator_category = std::forward_iterator_tag;
++
+ static_assert(std::is_convertible<typename
std::iterator_traits<RangeIt1>::value_type, ValueType>::value, "");
+ static_assert(std::is_convertible<typename
std::iterator_traits<RangeIt2>::value_type, ValueType>::value, "");
+
+diff --git a/src/regex.hh b/src/regex.hh
+index bd32f2d8c..5b0ab7fc6 100644
+--- a/src/regex.hh
++++ b/src/regex.hh
+@@ -45,8 +45,13 @@ struct MatchResults
+ bool matched = false;
+ };
+
+- struct iterator : std::iterator<std::bidirectional_iterator_tag,
SubMatch, size_t, SubMatch*, SubMatch>
++ struct iterator
+ {
++ using difference_type = size_t;
++ using value_type = SubMatch;
++ using pointer = SubMatch*;
++ using reference = SubMatch;
++ using iterator_category = std::bidirectional_iterator_tag;
+ using It = typename Vector<Iterator,
MemoryDomain::Regex>::const_iterator;
+
+ iterator() = default;
+diff --git a/src/string_utils.hh b/src/string_utils.hh
+index 1c2d40767..b2dc3d300 100644
+--- a/src/string_utils.hh
++++ b/src/string_utils.hh
+@@ -68,8 +68,14 @@ String expand_tabs(StringView line, ColumnCount tabstop,
ColumnCount col = 0);
+
+ struct WrapView
+ {
+- struct Iterator : std::iterator<std::forward_iterator_tag, StringView>
++ struct Iterator
+ {
++ using difference_type = ptrdiff_t;
++ using value_type = StringView;
++ using pointer = StringView*;
++ using reference = StringView&;
++ using iterator_category = std::forward_iterator_tag;
++
+ Iterator(StringView text, ColumnCount max_width);
+
+ Iterator& operator++();



  • [SM-Commit] GIT changes to master grimoire by Ismael Luceno (592696590abcd4bfe5e08ba49f5f90470c09d2b1), Ismael Luceno, 07/30/2022

Archive powered by MHonArc 2.6.24.

Top of Page