community/abook: upgrade to 0.6.2

pick patches from void linux
remove obsolete patches
change license as it is changed upstream
This commit is contained in:
Milan P. Stanić 2026-03-27 19:58:21 +01:00
parent c7ed091bb3
commit 992b645af1
8 changed files with 65 additions and 61 deletions

View File

@ -1,24 +1,24 @@
# Contributor: Bartłomiej Piotrowski <nospam@bpiotrowski.pl>
# Maintainer: ScrumpyJack <scrumpyjack@st.ilet.to>
pkgname=abook
pkgver=0.6.1
pkgrel=10
pkgver=0.6.2
pkgrel=0
pkgdesc="Text-based addressbook designed for use with Mutt"
url="https://abook.sourceforge.net/"
license="GPL-2.0-or-later"
license="GPL-3.0-or-later"
arch="all"
makedepends="ncurses-dev readline-dev automake autoconf gettext-dev"
subpackages="$pkgname-doc $pkgname-lang"
source="https://abook.sourceforge.net/devel/abook-$pkgver.tar.gz
gcc6.patch
gcc14.patch
gcc15.patch
gettext-0.24.patch
inline.patch
fix-musl-and-strcpy-overflow.patch
fix-musl-and-headers.patch
fix-ctype.patch
"
builddir=$srcdir
prepare() {
default_prepare
autoreconf -fiv
}
@ -42,9 +42,10 @@ package() {
}
sha512sums="
993895ef2fd6d98d50db610699f8f0a28112778065ac56484373eb814afd8ab7371201fc21506c090514f4b29570ec229dc62c606ab068301152567e2c47fe66 abook-0.6.1.tar.gz
21ab6475512ea9baae1a6509749628d6b610e96e77c64139d09697d272d66556875058e91c9b948c4ebaf65795a97d8532bae25e5d7e71cc4a20af49897cd867 gcc6.patch
fdcce9c273c20a063f45682abf7f0e10fcbc3650f2cc34c333ca1c8408aaef07e0a2d7a928b77bf92010bbd1f40c44b83db0cf8a9fee3b79d806034a10ff7ef5 gcc14.patch
f6cc20cb4964a20ba25e2a2ed337d96681b90c5e9a3a2e77b97ea805a5c5f4958b49de75616ec1532cf451690a74acaee24bc5317848bac02574b87f67740fdf abook-0.6.2.tar.gz
b48ca99e7e94ce418e81a4a69879e9ee9e773a463b98a3d983d44d4a87f5a23b46ad67becc275cec307af8e1b0bccdc73a9b34fdb66829e78378498db684d880 gcc15.patch
526a1eee1eb161370eb5afdd45f0817cd395e045530e19e04e794a19f2e7276288d088b7bc327c179ca75ba497db3e60aefa46f169f8ec8f26e067133eb89ac5 gettext-0.24.patch
677361a1be1af6725f03244ea8351e94e79dd88cdf721d444c9d3cf07c0e653b668f56d5944d2278b7bda62092e3ffcc2009c45a12ea0290a44da982bac5dc28 inline.patch
0322f576bdef311eb1d84be66e9b2f388334a36c4cb4cfeac9656bdf320b15a8f176a8b10989685f23ee0ba00b487e7c625aba06295c78eb9715fe7addb14006 fix-musl-and-strcpy-overflow.patch
674cbbb32536f85484a066ee7c8b04a2d2e2f2ec3b2cfbf822df930cb7d5ec8338cdbb86c9919e69ad8869ef02d8849ef45d168b878ba506c54c33b103466153 fix-musl-and-headers.patch
5cb69218439ad5fe1bf471f0a4dce326f2edf6d2975504f3675f25e8e83b0a9bf35f158c12815851beab3256255744f0a3f67b416b56a4c2716546a97426e331 fix-ctype.patch
"

View File

@ -0,0 +1,19 @@
--- a/database.c 2026-01-26 11:04:38.000000000 +0100
+++ b/database.c 2026-03-01 02:11:46.310427997 +0000
@@ -12,6 +12,7 @@
#include <string.h>
#include <unistd.h>
#include <assert.h>
+#include <ctype.h>
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@@ -737,7 +738,7 @@
{
char* p = str;
while (*str) {
- if (isalnum (*str)) *(p++) = *str;
+ if (isalnum((unsigned char)*str)) *(p++) = *str;
++str;
}
*p = 0;

View File

@ -0,0 +1,10 @@
--- a/getopt.c 2026-01-26 11:04:16.000000000 +0100
+++ b/getopt.c 2026-03-01 02:30:21.706709907 +0000
@@ -44,6 +44,7 @@
#include <stdio.h>
#include <strings.h>
+#include <string.h>
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C

View File

@ -0,0 +1,11 @@
--- a/filter.c 2026-01-26 11:04:38.000000000 +0100
+++ b/filter.c 2026-03-01 02:21:59.530750295 +0000
@@ -2184,7 +2184,7 @@
mutt_alias_gengroups(int i)
{
char *groups, *res = NULL;
- char groupstr[7] = "-group ";
+ char groupstr[] = "-group ";
abook_list *list, *tmp;
groups = db_fget(i, GROUPS);

View File

@ -1,12 +0,0 @@
Fix -Wimplicit-function-declaration error with gcc 14.
--- abook-0.6.1-origin/getopt.c
+++ abook-0.6.1/getopt.c
@@ -110,6 +110,7 @@
GNU application programs can use a third alternative mode in which
they can distinguish the relative order of options and other arguments. */
+#include <string.h>
#include "getopt.h"
/* For communication from `getopt' to the caller.

View File

@ -1,24 +0,0 @@
diff -up abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c.gcc5 abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c
--- abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c.gcc5 2014-11-28 16:29:52.000000000 +0100
+++ abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.c 2015-02-11 16:02:15.837789303 +0100
@@ -859,7 +859,7 @@ item_merge(list_item dest, list_item src
*/
/* quick lookup by "standard" field number */
-inline int
+extern inline int
field_id(int i)
{
assert((i >= 0) && (i < ITEM_FIELDS));
diff -up abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h.gcc5 abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h
--- abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h.gcc5 2014-11-28 16:29:52.000000000 +0100
+++ abook-git-6e550af8a907a680dc845c22a7d6c36d89e900c1/database.h 2015-02-11 16:02:23.465818915 +0100
@@ -61,7 +61,7 @@ struct db_enumerator {
/*
* Field operations
*/
-inline int field_id(int i);
+extern inline int field_id(int i);
abook_field *find_standard_field(char *key, int do_declare);
abook_field *real_find_field(char *key, abook_field_list *list, int *nb);
#define find_field(key, list) real_find_field(key, list, NULL)

View File

@ -1,13 +0,0 @@
--- a/configure.ac
+++ b/configure.ac
@@ -11,7 +11,9 @@
AC_USE_SYSTEM_EXTENSIONS
AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.18.1])
+dnl Support for AM_GNU_GETTEXT_REQUIRE_VERSION was added in 0.19.6.
+AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
+AM_GNU_GETTEXT_VERSION([0.19.6])
AC_DEFUN([ABOOK_EXPAND_PREFIX], [
$1=$2

View File

@ -0,0 +1,12 @@
diff -ur database.h database.h
--- a/database.h 2015-10-04 10:38:25.000000000 +0800
+++ b/database.h 2018-02-15 21:11:46.311673251 +0800
@@ -61,7 +61,7 @@
/*
* Field operations
*/
-inline int field_id(int i);
+int field_id(int i);
abook_field *find_standard_field(char *key, int do_declare);
abook_field *real_find_field(char *key, abook_field_list *list, int *nb);
#define find_field(key, list) real_find_field(key, list, NULL)