mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 07:26:13 -05:00
gnu: tofi: Update to 0.9.1.
* gnu/packages/xdisorg.scm (tofi): Update to 0.9.1. [source]: Add patch to fix building on 32-bit systems. * gnu/packages/patches/tofi-32bit-compat.patch. * gnu/local.mk (dist_patch_DATA): Register it. Co-authored-by: Efraim Flashner <efraim@flashner.co.il> Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
parent
d9c0280d5e
commit
15838db973
3 changed files with 91 additions and 2 deletions
|
@ -1961,6 +1961,7 @@ dist_patch_DATA = \
|
|||
%D%/packages/patches/tk-find-library.patch \
|
||||
%D%/packages/patches/tla2tools-build-xml.patch \
|
||||
%D%/packages/patches/tlf-support-hamlib-4.2+.patch \
|
||||
%D%/packages/patches/tofi-32bit-compat.patch \
|
||||
%D%/packages/patches/tootle-glib-object-naming.patch \
|
||||
%D%/packages/patches/tootle-reason-phrase.patch \
|
||||
%D%/packages/patches/transcode-ffmpeg.patch \
|
||||
|
|
87
gnu/packages/patches/tofi-32bit-compat.patch
Normal file
87
gnu/packages/patches/tofi-32bit-compat.patch
Normal file
|
@ -0,0 +1,87 @@
|
|||
This patch is from upstream and shouldn't be needed in the next release.
|
||||
https://github.com/philj56/tofi/commit/667075f0920da3c2b353fbce54b6430c195ef031.patch
|
||||
|
||||
From 667075f0920da3c2b353fbce54b6430c195ef031 Mon Sep 17 00:00:00 2001
|
||||
From: Phil Jones <philj56@gmail.com>
|
||||
Date: Sun, 30 Apr 2023 20:08:57 +0100
|
||||
Subject: [PATCH] Replace `strto[u]l` with `strto[u]ll`.
|
||||
|
||||
On 32-bit systems, using `strtoul` was causing negative values for
|
||||
unsigned options to be treated as valid, as the value was being parsed
|
||||
as a 32-bit unsigned int, then cast to a 64-bit signed int, which
|
||||
remained positive.
|
||||
---
|
||||
src/color.c | 8 ++++----
|
||||
src/config.c | 6 +++---
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/color.c b/src/color.c
|
||||
index 4b6b356..b1d5e90 100644
|
||||
--- a/src/color.c
|
||||
+++ b/src/color.c
|
||||
@@ -22,7 +22,7 @@ struct color hex_to_color(const char *hex)
|
||||
hex[2], hex[2],
|
||||
'\0'};
|
||||
char *endptr;
|
||||
- tmp = strtol(str, &endptr, 16);
|
||||
+ tmp = strtoll(str, &endptr, 16);
|
||||
if (errno || *endptr != '\0' || tmp < 0) {
|
||||
return (struct color) { -1, -1, -1, -1 };
|
||||
}
|
||||
@@ -37,14 +37,14 @@ struct color hex_to_color(const char *hex)
|
||||
hex[3], hex[3],
|
||||
'\0'};
|
||||
char *endptr;
|
||||
- tmp = strtol(str, &endptr, 16);
|
||||
+ tmp = strtoll(str, &endptr, 16);
|
||||
if (errno || *endptr != '\0' || tmp < 0) {
|
||||
return (struct color) { -1, -1, -1, -1 };
|
||||
}
|
||||
val = tmp;
|
||||
} else if (len == 6) {
|
||||
char *endptr;
|
||||
- tmp = strtol(hex, &endptr, 16);
|
||||
+ tmp = strtoll(hex, &endptr, 16);
|
||||
if (errno || *endptr != '\0' || tmp < 0) {
|
||||
return (struct color) { -1, -1, -1, -1 };
|
||||
}
|
||||
@@ -53,7 +53,7 @@ struct color hex_to_color(const char *hex)
|
||||
val |= 0xFFu;
|
||||
} else if (len == 8) {
|
||||
char *endptr;
|
||||
- tmp = strtol(hex, &endptr, 16);
|
||||
+ tmp = strtoll(hex, &endptr, 16);
|
||||
if (errno || *endptr != '\0' || tmp < 0) {
|
||||
return (struct color) { -1, -1, -1, -1 };
|
||||
}
|
||||
diff --git a/src/config.c b/src/config.c
|
||||
index 2b85028..556199d 100644
|
||||
--- a/src/config.c
|
||||
+++ b/src/config.c
|
||||
@@ -1027,7 +1027,7 @@ uint32_t parse_uint32(const char *filename, size_t lineno, const char *str, bool
|
||||
{
|
||||
errno = 0;
|
||||
char *endptr;
|
||||
- int64_t ret = strtoul(str, &endptr, 0);
|
||||
+ int64_t ret = strtoull(str, &endptr, 0);
|
||||
if (endptr == str || *endptr != '\0') {
|
||||
PARSE_ERROR(filename, lineno, "Failed to parse \"%s\" as unsigned int.\n", str);
|
||||
if (err) {
|
||||
@@ -1046,7 +1046,7 @@ int32_t parse_int32(const char *filename, size_t lineno, const char *str, bool *
|
||||
{
|
||||
errno = 0;
|
||||
char *endptr;
|
||||
- int64_t ret = strtol(str, &endptr, 0);
|
||||
+ int64_t ret = strtoll(str, &endptr, 0);
|
||||
if (endptr == str || *endptr != '\0') {
|
||||
PARSE_ERROR(filename, lineno, "Failed to parse \"%s\" as int.\n", str);
|
||||
if (err) {
|
||||
@@ -1065,7 +1065,7 @@ struct uint32_percent parse_uint32_percent(const char *filename, size_t lineno,
|
||||
{
|
||||
errno = 0;
|
||||
char *endptr;
|
||||
- int64_t val = strtoul(str, &endptr, 0);
|
||||
+ int64_t val = strtoull(str, &endptr, 0);
|
||||
bool percent = false;
|
||||
if (endptr == str || (*endptr != '\0' && *endptr != '%')) {
|
||||
PARSE_ERROR(filename, lineno, "Failed to parse \"%s\" as unsigned int.\n", str);
|
|
@ -1983,7 +1983,7 @@ (define-public tint2
|
|||
(define-public tofi
|
||||
(package
|
||||
(name "tofi")
|
||||
(version "0.8.1")
|
||||
(version "0.9.1")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
|
@ -1992,7 +1992,8 @@ (define-public tofi
|
|||
(file-name (git-file-name name version))
|
||||
(sha256
|
||||
(base32
|
||||
"11bfi9his0cc5mzikamr5icv5mh2fyj9jy5l3sbbayj6jk51f68y"))))
|
||||
"1paknsgfsgan27lqwhb2ndsk4gi8ciq9r49b0fpbbdwxk7ljk2cn"))
|
||||
(patches (search-patches "tofi-32bit-compat.patch"))))
|
||||
(build-system meson-build-system)
|
||||
(native-inputs (list pkg-config))
|
||||
(inputs (list cairo
|
||||
|
|
Loading…
Reference in a new issue