vte3: update to 0.80.0.

This commit is contained in:
oreo639 2025-03-26 06:43:28 -07:00 committed by oreo639
parent 1431b4991e
commit 215baca984
3 changed files with 110 additions and 4 deletions

1
srcpkgs/vte3-profile Symbolic link
View file

@ -0,0 +1 @@
vte3

View file

@ -0,0 +1,96 @@
Source: https://src.fedoraproject.org/rpms/vte291/blob/1a02863e6076133efc38e9ce9e469010ff593c0d/f/0001-Only-use-fast_float-when-std-from_chars-is-insuffici.patch
Upstream: https://gitlab.gnome.org/GNOME/vte/-/merge_requests/2
From 39557ba02e67af3d6585da96560459bc3b922ca3 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Wed, 19 Feb 2025 13:43:15 -0500
Subject: [PATCH] Only use fast_float when std::from_chars is insufficient
When the default C++ standard library provides the necessary support, it
should be preferred over any supplementary library. This restores the
status quo for recent g++ while still supporting clang -stdlib=libc++ and
older g++.
---
meson.build | 25 +++++++++++++++++++++++++
src/color-parser.cc | 4 ++++
src/termprops.hh | 4 ++++
3 files changed, 33 insertions(+)
diff --git a/meson.build b/meson.build
index 7b590c33..ab02880a 100644
--- a/meson.build
+++ b/meson.build
@@ -675,6 +675,29 @@ config_h.set10('WITH_SYSTEMD', systemd_dep.found())
# try compiling a test programme to see if the version is new enough.
if cxx.compiles('''
+ #include <charconv>
+ #include <cstdint>
+ #include <cstring>
+
+ int main(void) {
+ auto str = "1234";
+ auto start = str;
+ auto end = str + strlen(str);
+ auto value = uint64_t{};
+ auto rv = std::from_chars(start, end, value, 16);
+ if (rv.ec != std::errc{} || rv.ptr != end)
+ return 2;
+
+ return 0;
+ }
+ ''',
+ args: [
+ cxx_std_opt,
+ ],
+ name: 'system std::from_chars usability check',
+ )
+ fast_float_dep = dependency('', required: false)
+elif cxx.compiles('''
#include <cstdint>
#include <cstring>
#include <fast_float/fast_float.h>
@@ -701,6 +724,8 @@ else
fast_float_dep = dependency('fast_float', required: true)
endif
+config_h.set10('WITH_FAST_FLOAT', fast_float_dep.found())
+
# Write config.h
config_sources = [
diff --git a/src/color-parser.cc b/src/color-parser.cc
index 237b4ca7..8d205307 100644
--- a/src/color-parser.cc
+++ b/src/color-parser.cc
@@ -29,7 +29,11 @@
#include <glib.h>
+#if WITH_FAST_FLOAT
#include <fast_float/fast_float.h>
+#else
+#define fast_float std
+#endif
#include "color-names.hh"
diff --git a/src/termprops.hh b/src/termprops.hh
index c9253764..0f462acb 100644
--- a/src/termprops.hh
+++ b/src/termprops.hh
@@ -35,7 +35,11 @@
#include <variant>
#include <version>
+#if WITH_FAST_FLOAT
#include <fast_float/fast_float.h>
+#else
+#define fast_float std
+#endif
namespace vte::terminal {
--
2.48.1

View file

@ -1,21 +1,22 @@
# Template file for 'vte3'
pkgname=vte3
version=0.78.3
version=0.80.0
revision=1
build_style=meson
build_helper="gir"
configure_args="-Db_ndebug=false -Db_lto=false -D_systemd=false
$(vopt_bool gir gir) $(vopt_bool gir vapi) -Dgtk4=true"
hostmakedepends="glib-devel gperf gettext pkg-config
hostmakedepends="glib-devel gettext pkg-config
$(vopt_if gir vala)"
makedepends="gnutls-devel gtk4-devel gtk+3-devel pcre2-devel liblz4-devel
$(vopt_if gir vala-devel)"
depends="vte3-profile"
short_desc="Terminal widget with improved accessibility and I18N support"
maintainer="Enno Boland <gottox@voidlinux.org>"
license="GPL-3.0-or-later, LGPL-2.1-or-later, LGPL-3.0-or-later"
homepage="https://wiki.gnome.org/Apps/Terminal/VTE"
homepage="https://gitlab.gnome.org/GNOME/vte/"
distfiles="${GNOME_SITE}/vte/${version%.*}/vte-${version}.tar.xz"
checksum=97e2ac3a27bc5755358a223f55f5a2518654aa0361bfc61a196c1c2e08798eff
checksum=267f63739765e568cf8113d0e2ee8f593028946187854bebe268c778e62647c8
# Suppress warnings as errors for NULL format strings (musl libc)
CXXFLAGS="-Wno-error=format="
@ -32,7 +33,15 @@ esac
build_options="gir"
build_options_default="gir"
vte3-profile_package() {
short_desc+=" - profile scripts"
pkg_install() {
vmove etc/profile.d
}
}
vte3-gtk4_package() {
depends="vte3-profile"
short_desc+=" - GTK4 version"
pkg_install() {
vmove usr/bin/vte-2.91-gtk4