man-db: update to 2.10.2.

This commit is contained in:
bitofhope 2022-06-26 20:58:03 +03:00 committed by classabbyamp
parent 3318164577
commit 37cd26739b
3 changed files with 36 additions and 45 deletions

View file

@ -1,10 +0,0 @@
--- a/libdb/db_btree.c
+++ b/libdb/db_btree.c
@@ -29,6 +29,7 @@
#ifdef BTREE
#include <stdio.h>
+#include <stdlib.h>
#include <errno.h>
#include <string.h>

View file

@ -1,19 +1,38 @@
src/convert.c | 4 ++++
src/manconv.c | 7 ++++++-
src/manconv_client.c | 4 ++++
src/whatis.c | 4 ++++
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git src/manconv.c src/manconv.c
index b9ac8d3a..8f5bdaee 100644
diff --git a/src/convert.c b/src/convert.c
index 447240c6..231f5c14 100644
--- a/src/convert.c
+++ b/src/convert.c
@@ -55,10 +55,14 @@ static void close_conv_to_locale (void *ignored MAYBE_UNUSED)
char * ATTRIBUTE_MALLOC convert_to_locale (char *string)
{
if (!conv_to_locale_initialized) {
+#ifdef __GLIBC__
char *locale_charset = xasprintf
("%s//IGNORE", get_locale_charset ());
conv_to_locale = iconv_open (locale_charset, "UTF-8");
free (locale_charset);
+#else /* __GLIBC__ */
+ conv_to_locale = iconv_open (get_locale_charset (), "UTF-8");
+#endif /* ! __GLIBC__ */
if (conv_to_locale != (iconv_t) -1)
push_cleanup (close_conv_to_locale, NULL, 0);
conv_to_locale_initialized = true;
diff --git a/src/manconv.c b/src/manconv.c
index 18ae307a..e2e6aa33 100644
--- a/src/manconv.c
+++ b/src/manconv.c
@@ -111,9 +111,14 @@ static int try_iconv (pipeline *p, const char *try_from_code, const char *to,
@@ -301,9 +301,14 @@ static tried_iconv try_iconv (decompress *decomp, const char *try_from_code,
iconv_t cd_utf8, cd = NULL;
bool to_utf8 = STREQ (try_to_code, "UTF-8") ||
STRNEQ (try_to_code, "UTF-8//", 7);
- const char *utf8_target = last ? "UTF-8//IGNORE" : "UTF-8";
bool ignore_errors = (strstr (try_to_code, "//IGNORE") != NULL);
int ret = 0;
tried_iconv ret = TRIED_ICONV_OK;
+#ifdef __GLIBC__
+ const char *utf8_target = last ? "UTF-8//IGNORE" : "UTF-8";
+#else /* __GLIBC__ */
@ -23,37 +42,19 @@ index b9ac8d3a..8f5bdaee 100644
debug ("trying encoding %s -> %s\n", try_from_code, try_to_code);
diff --git src/manconv_client.c src/manconv_client.c
index 0c41bec6..2a7f1398 100644
diff --git a/src/manconv_client.c b/src/manconv_client.c
index 55289ff4..6e7861f5 100644
--- a/src/manconv_client.c
+++ b/src/manconv_client.c
@@ -102,7 +102,11 @@ void add_manconv (pipeline *p, const char *source, const char *target)
gl_list_add_last (codes->from, xstrdup (source));
name = appendstr (name, "UTF-8:", source, (void *) 0);
@@ -111,7 +111,11 @@ void add_manconv (pipeline *p,
gl_list_add_last (codes->from, xstrdup (source_encoding));
name = appendstr (name, "UTF-8:", source_encoding, (void *) 0);
}
+#ifdef __GLIBC__
codes->to = xasprintf ("%s//IGNORE", target);
+#ifdef __GBLIBC__
codes->to = xasprintf ("%s//IGNORE", target_encoding);
+#else /* __GLIBC__ */
+ codes->to = xasprintf ("%s", target);
+ codes->to = xasprintf ("%s", target_encoding);
+#endif /* ! __GLIBC__ */
/* informational only; no shell quoting concerns */
name = appendstr (name, " -t ", codes->to, (void *) 0);
if (quiet >= 2)
diff --git src/whatis.c src/whatis.c
index d2559169..ec80c117 100644
--- a/src/whatis.c
+++ b/src/whatis.c
@@ -945,9 +945,13 @@ int main (int argc, char *argv[])
display_seen = new_string_set (GL_HASH_SET);
#ifdef HAVE_ICONV
+#ifdef __GLIBC__
locale_charset = xasprintf ("%s//IGNORE", get_locale_charset ());
conv_to_locale = iconv_open (locale_charset, "UTF-8");
free (locale_charset);
+#else /* __GLIBC__ */
+ conv_to_locale = iconv_open(get_locale_charset (), "UTF-8");
+#endif /* ! __GLIBC__ */
#endif /* HAVE_ICONV */
if (regex_opt) {

View file

@ -1,6 +1,6 @@
# Template file for 'man-db'
pkgname=man-db
version=2.9.4
version=2.10.2
revision=1
build_style=gnu-configure
configure_args="--with-db=db --with-pager=less --with-gzip=/usr/bin/gzip
@ -16,11 +16,11 @@ depends="bzip2 coreutils grep groff gzip less"
conf_files="/etc/man_db.conf"
short_desc="On-line manual database"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-or-later, LGPL-2.1-or-later"
license="GPL-3.0-or-later"
homepage="https://www.nongnu.org/man-db/"
changelog="https://git.savannah.gnu.org/cgit/man-db.git/plain/NEWS"
changelog="https://gitlab.com/cjwatson/man-db/-/raw/main/NEWS.md"
distfiles="${NONGNU_SITE}/man-db/man-db-${version}.tar.xz"
checksum=b66c99edfad16ad928c889f87cf76380263c1609323c280b3a9e6963fdb16756
checksum=ee97954d492a13731903c9d0727b9b01e5089edbd695f0cdb58d405a5af5514d
provides="man-0_1"
lib32disabled=yes
system_accounts="_man"