git: c0b1343ec04d - main - textproc/sdcv: Fix build with newer glib20
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 22 Mar 2025 08:33:38 UTC
The branch main has been updated by arrowd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=c0b1343ec04d3109290c5b1c3a2eadef29418ec0
commit c0b1343ec04d3109290c5b1c3a2eadef29418ec0
Author: Gleb Popov <arrowd@FreeBSD.org>
AuthorDate: 2025-03-22 08:32:51 +0000
Commit: Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2025-03-22 08:33:34 +0000
textproc/sdcv: Fix build with newer glib20
PR: 281083
---
textproc/sdcv/Makefile | 1 +
textproc/sdcv/files/patch-src_stardict__lib.cpp | 19 +++++++++++++++++++
2 files changed, 20 insertions(+)
diff --git a/textproc/sdcv/Makefile b/textproc/sdcv/Makefile
index faae8459cefc..a0433c5adc83 100644
--- a/textproc/sdcv/Makefile
+++ b/textproc/sdcv/Makefile
@@ -1,6 +1,7 @@
PORTNAME= sdcv
DISTVERSIONPREFIX= v
DISTVERSION= 0.5.5
+PORTREVISION= 1
CATEGORIES= textproc
MAINTAINER= citrin@citrin.ru
diff --git a/textproc/sdcv/files/patch-src_stardict__lib.cpp b/textproc/sdcv/files/patch-src_stardict__lib.cpp
new file mode 100644
index 000000000000..25723fa60592
--- /dev/null
+++ b/textproc/sdcv/files/patch-src_stardict__lib.cpp
@@ -0,0 +1,19 @@
+--- src/stardict_lib.cpp.orig 2023-04-18 18:47:55 UTC
++++ src/stardict_lib.cpp
+@@ -1047,12 +1047,12 @@ bool Libs::LookupSimilarWord(const gchar *sWord, std::
+ }
+ // Upper the first character and lower others.
+ if (!bFound) {
+- gchar *nextchar = g_utf8_next_char(sWord);
++ const gchar *nextchar = g_utf8_next_char(sWord);
+ gchar *firstchar = g_utf8_strup(sWord, nextchar - sWord);
+- nextchar = g_utf8_strdown(nextchar, -1);
+- casestr = g_strdup_printf("%s%s", firstchar, nextchar);
++ gchar *nextDownchar = g_utf8_strdown(nextchar, -1);
++ casestr = g_strdup_printf("%s%s", firstchar, nextDownchar);
+ g_free(firstchar);
+- g_free(nextchar);
++ g_free(nextDownchar);
+ if (strcmp(casestr, sWord)) {
+ if (oLib[iLib]->Lookup(casestr, iWordIndices))
+ bFound = true;