[packages/cdecl] Rel 32

arekm arekm at pld-linux.org
Wed May 20 18:44:17 CEST 2026


commit e6ad397eb01b5e5ef27ca0b95448d206ce1ac46b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed May 20 18:44:01 2026 +0200

    Rel 32

 cdecl-modern-readline.patch | 55 +++++++++++++++++++++++++++++++++++++++++++++
 cdecl.spec                  |  6 +++--
 2 files changed, 59 insertions(+), 2 deletions(-)
---
diff --git a/cdecl.spec b/cdecl.spec
index 7de8ab7..835e541 100644
--- a/cdecl.spec
+++ b/cdecl.spec
@@ -9,13 +9,14 @@ Summary(tr.UTF-8):	İngilizceden C/C++ bildirimlerine çevirici
 Summary(uk.UTF-8):	Транслятор English <--> декларації C/C++
 Name:		cdecl
 Version:	2.5
-Release:	31
+Release:	32
 License:	distributable
 Group:		Development/Tools
 Source0:	ftp://sunsite.unc.edu/pub/Linux/devel/lang/c/%{name}-%{version}.tar.gz
 # Source0-md5:	29895dab52e85b2474a59449e07b7996
 Patch0:		%{name}-misc.patch
 Patch1:		getline.patch
+Patch2:		%{name}-modern-readline.patch
 BuildRequires:	bison
 BuildRequires:	flex
 BuildRequires:	readline-devel >= 4.2
@@ -63,12 +64,13 @@ kullanışlıdır.
 %setup -q
 %patch -P0 -p1
 %patch -P1 -p1
+%patch -P2 -p1
 
 %build
 bison -y cdgram.y && mv -f y.tab.c cdgram.c
 %{__make} \
 	CC="%{__cc}" \
-	CFLAGS="%{rpmcflags} %{rpmldflags} -DUSE_READLINE" \
+	CFLAGS="%{rpmcflags} %{rpmcppflags} %{rpmldflags} -DUSE_READLINE" \
 	LIBS="-lreadline"
 
 %install
diff --git a/cdecl-modern-readline.patch b/cdecl-modern-readline.patch
new file mode 100644
index 0000000..08dc30c
--- /dev/null
+++ b/cdecl-modern-readline.patch
@@ -0,0 +1,55 @@
+--- cdecl-2.5/cdecl.c.orig	2026-05-20 18:24:57.398574486 +0200
++++ cdecl-2.5/cdecl.c	2026-05-20 18:25:02.856222416 +0200
+@@ -90,6 +90,7 @@
+
+ #ifdef USE_READLINE
+ # include <readline/readline.h>
++# include <readline/history.h>
+   /* prototypes for functions related to readline() */
+   char * cdecl_getline();
+   char ** attempt_completion(char *, int, int);
+@@ -126,6 +127,7 @@
+ #if __STDC__
+   char *ds(char *), *cat(char *, ...), *visible(int);
+   int main(int, char **);
++  int yylex(void);
+   int yywrap(void);
+   int dostdin(void);
+   void mbcheck(void), dohelp(void), usage(void);
+@@ -139,7 +141,9 @@
+   void dodexplain(char*, char*, char*, char*);
+   void docexplain(char*, char*, char*, char*);
+   void setprogname(char *);
++  int namedkeyword(char *);
+   int dotmpfile(int, char**), dofileargs(int, char**);
++  int dotmpfile_from_string(char *);
+ #else
+   char *ds(), *cat(), *visible();
+   int getopt();
+@@ -399,7 +403,7 @@
+ {
+   char **matches = NULL;
+
+-  if (start == 0) matches = completion_matches(text, command_completion);
++  if (start == 0) matches = rl_completion_matches(text, (rl_compentry_func_t *)command_completion);
+
+   return matches;
+ }
+@@ -1245,14 +1249,15 @@
+ }
+
+ int main(argc, argv)
++int argc;
+ char **argv;
+ {
+     int c, ret = 0;
+
+ #ifdef USE_READLINE
+     /* install completion handlers */
+-    rl_attempted_completion_function = (CPPFunction *)attempt_completion;
+-    rl_completion_entry_function = (Function *)keyword_completion;
++    rl_attempted_completion_function = (rl_completion_func_t *)attempt_completion;
++    rl_completion_entry_function = (rl_compentry_func_t *)keyword_completion;
+ #endif
+
+     setprogname(argv[0]);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/cdecl.git/commitdiff/e6ad397eb01b5e5ef27ca0b95448d206ce1ac46b



More information about the pld-cvs-commit mailing list