SHA256
1
0
forked from pool/dictd

Update to 1.13.2:

- Remove config.{sub,guess}
  - Update version to 1.13.2
  - Rename configure.in to configure.ac
  - dictP.h: remove #include <sys/time.h>
  - configure.in: fix obsolete code
  - Fix compilation issues with gcc-14
  - Update configure script and the like (autoconf-2.72)
Remove upstreamed patch gcc-14.patch.
This commit is contained in:
Matej Cepl 2024-11-15 14:24:54 +01:00
parent a2add63921
commit 05323552f9
Signed by: mcepl
GPG Key ID: 79205802880BC9D8
6 changed files with 37 additions and 135 deletions

Binary file not shown.

BIN
dictd-1.13.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Fri Nov 15 12:58:53 UTC 2024 - Matej Cepl <mcepl@cepl.eu>
- Update to 1.13.2:
- Remove config.{sub,guess}
- Update version to 1.13.2
- Rename configure.in to configure.ac
- dictP.h: remove #include <sys/time.h>
- configure.in: fix obsolete code
- Fix compilation issues with gcc-14
- Update configure script and the like (autoconf-2.72)
- Remove upstreamed patch gcc-14.patch.
-------------------------------------------------------------------
Sat Nov 02 21:08:57 UTC 2024 - mcepl@cepl.eu

View File

@ -17,7 +17,7 @@
Name: dictd
Version: 1.13.1+git.1730572217.cccab00
Version: 1.13.2
Release: 0
Summary: DICT protocol (RFC 2229) server and command-line client
License: BSD-3-Clause AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND MIT AND SUSE-Public-Domain
@ -27,13 +27,8 @@ Source0: https://github.com/cheusov/dictd/archive/%{version}.tar.gz#/dict
Source1: colorit.conf
Source2: dictd.service
Source99: dictd-rpmlintrc
# Patch0: dictd-1.12.1-unused-return.patch
# PATCH-FIX-UPSTREAM gcc-14.patch bsc#[0-9]+ mcepl@suse.com
# Inspiration from the thread https://lists.gnu.org/r/bug-bison/2022-01/msg00009.html
# and https://lists.gnu.org/r/bug-bison/2022-01/msg00012.html
# Patch published upstream as gh#cheusov/dictd!26
Patch1: gcc-14.patch
BuildRequires: mk-configure
# BuildRequires: mk-configure
BuildRequires: autoconf
BuildRequires: bison
BuildRequires: flex
BuildRequires: gawk
@ -58,10 +53,6 @@ set up a custom dictionary. To look up, for example, the word "grunt",
execute `dict grunt` at a command line. See the man pages of dict and
dictd for details.
%prep
%autosetup -p1
%package devel
Summary: Development files for dictd
Group: Development/Languages/C and C++
@ -77,24 +68,29 @@ dictd for details.
This package contains development files for the dictd package.
%prep
%autosetup -p1
autoreconf --force --install --verbose
%build
export LDFLAGS="%{?__global_ldflags}" CPPFLAGS="%{optflags} -fPIC"
export USE_PLUGIN=1
export PREFIX="%{_prefix}"
export MANDIR="%{_mandir}"
export SYSCONFDIR="%{_sysconfdir}"
export CC="%{__cc}"
export DESTDIR="%{buildroot}"
export COPTS="%{optflags} -fPIC"
mkc_compiler_settings
mkcmake all
# %%configure --enable-dictorg --with-plugin-dbi
# export USE_PLUGIN=1
# export PREFIX="%{_prefix}"
# export MANDIR="%{_mandir}"
# export SYSCONFDIR="%{_sysconfdir}"
# export CC="%{__cc}"
# export DESTDIR="%{buildroot}"
# export COPTS="%{optflags} -fPIC"
# mkc_compiler_settings
# mkcmake all
%configure --enable-dictorg --with-plugin-dbi
# --disable-plugin
# %%make_build
%make_build
%install
# %%make_install
mkcmake install
%make_install
# mkcmake install
install -D -m 0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/colorit.conf
cat <<EOF >%{buildroot}/%{_sysconfdir}/dictd.conf
global {

View File

@ -1,107 +0,0 @@
---
dict/clientparse.y | 3 +++
dictd/dictd.c | 4 ++--
dictd/plugin.c | 5 +++--
dictd/plugin.h | 4 ++--
dictd/servparse.y | 4 ++++
dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c | 2 ++
6 files changed, 16 insertions(+), 6 deletions(-)
--- a/dict/clientparse.y
+++ b/dict/clientparse.y
@@ -29,6 +29,9 @@ extern void yyerror(const char *);
#define YYERROR_VERBOSE
static dictServer *s;
+
+int yylex (void);
+void yyerror (const char *);
%}
%union {
--- a/dictd/dictd.c
+++ b/dictd/dictd.c
@@ -767,7 +767,7 @@ static int init_mime_db_list (const void
static int init_plugin( const void *datum )
{
#ifdef USE_PLUGIN
- dictDatabase *db = (dictDatabase *)datum;
+ const dictDatabase *db = (const dictDatabase *)datum;
dict_plugin_init(db);
#endif
@@ -1002,7 +1002,7 @@ static int init_database_short (const vo
static int close_plugin(const void *datum)
{
#ifdef USE_PLUGIN
- dictDatabase *db = (dictDatabase *)datum;
+ const dictDatabase *db = (const dictDatabase *)datum;
dict_plugin_destroy (db);
#endif
--- a/dictd/plugin.c
+++ b/dictd/plugin.c
@@ -16,6 +16,7 @@
* 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include "common.h"
#include "dictd.h"
#include "plugin.h"
#include "strategy.h"
@@ -555,7 +556,7 @@ static dictPlugin *create_plugin (
return plugin;
}
-int dict_plugin_init(dictDatabase *db)
+int dict_plugin_init(const dictDatabase *db)
{
int ret = 0;
lst_List list;
@@ -604,7 +605,7 @@ int dict_plugin_init(dictDatabase *db)
return 0;
}
-void dict_plugin_destroy ( dictDatabase *db )
+void dict_plugin_destroy (const dictDatabase *db )
{
int ret;
--- a/dictd/plugin.h
+++ b/dictd/plugin.h
@@ -24,9 +24,9 @@
#include "dictdplugin.h"
/* initialize the plugin associated with db*/
-extern int dict_plugin_init (dictDatabase *db);
+extern int dict_plugin_init (const dictDatabase *db);
/* destroy the plugin associated with db*/
-extern void dict_plugin_destroy (dictDatabase *db);
+extern void dict_plugin_destroy (const dictDatabase *db);
/* search */
extern int dict_search_plugin (
--- a/dictd/servparse.y
+++ b/dictd/servparse.y
@@ -57,6 +57,10 @@ static int string2bool (const char *str)
src_parse_error( stderr, s.src, #field "already set" ); \
db->field = t.string; \
} while(0);
+
+int yylex (void);
+void yyerror (const char *);
+
%}
%union {
--- a/dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c
+++ b/dictdplugins/dictdplugin_dbi/dictdplugin_dbi.c
@@ -27,6 +27,8 @@
#include <dbi/dbi.h>
#include <stdio.h>
+#include <string.h>
+#include <assert.h>
#define BUFSIZE 4096