cdecl: Update to 14.4

remove unused patch
This commit is contained in:
Christoph Reiter 2024-01-13 09:41:03 +01:00
parent 7891e7e1ae
commit c446771dd1
2 changed files with 2 additions and 96 deletions

View File

@ -1,7 +1,7 @@
# Maintainer: Christoph Reiter <reiter.christoph@gmail.com> # Maintainer: Christoph Reiter <reiter.christoph@gmail.com>
pkgname=cdecl pkgname=cdecl
pkgver=14.0 pkgver=14.4
pkgrel=1 pkgrel=1
pkgdesc="Composing and deciphering C (or C++) declarations or casts, aka 'gibberish.'" pkgdesc="Composing and deciphering C (or C++) declarations or casts, aka 'gibberish.'"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
@ -10,7 +10,7 @@ license=('spdx:GPL-3.0-or-later')
depends=('ncurses' 'libreadline') depends=('ncurses' 'libreadline')
makedepends=('gcc' 'make' 'ncurses-devel' 'libreadline-devel' 'flex' 'bison' 'autotools') makedepends=('gcc' 'make' 'ncurses-devel' 'libreadline-devel' 'flex' 'bison' 'autotools')
source=("https://github.com/paul-j-lucas/cdecl/releases/download/cdecl-${pkgver}/cdecl-${pkgver}.tar.gz") source=("https://github.com/paul-j-lucas/cdecl/releases/download/cdecl-${pkgver}/cdecl-${pkgver}.tar.gz")
sha256sums=('a3947baaf40d2534b7c3d989cb56e008bd3cb730077643090012e3a2678262c9') sha256sums=('093449995ea286c47a45b330ea6f3b4ab7ff47d0f11ba1d4f0a400d3cd174f4d')
prepare() { prepare() {
cd "${pkgname}-${pkgver}" cd "${pkgname}-${pkgver}"

View File

@ -1,94 +0,0 @@
diff --git cdecl-blocks-2.5.orig/Makefile cdecl-blocks-2.5/Makefile
index 2a1429d..86f759b 100644
--- cdecl-blocks-2.5.orig/Makefile
+++ cdecl-blocks-2.5/Makefile
@@ -15,13 +15,13 @@
#
# add -DUSE_READLINE To compile in support for the GNU readline library.
-CFLAGS= -g -O2
+CFLAGS= -g -O2 -DUSE_READLINE
CC= gcc
-LIBS=
+LIBS=-ledit
ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++
-BINDIR= /usr/bin
-MANDIR= /usr/man/man1
-CATDIR= /usr/man/cat1
+BINDIR= $(PREFIX)/usr/bin
+MANDIR= $(PREFIX)/usr/share/man/man1
+CATDIR= $(PREFIX)/usr/man/cat1
INSTALL= install -c
INSTALL_DATA= install -c -m 644
@@ -34,10 +34,10 @@ c++decl: cdgram.c cdlex.c cdecl.c
rm -f cdecl
cdlex.c: cdlex.l
- lex cdlex.l && mv lex.yy.c cdlex.c
+ lex -ocdlex.c cdlex.l
cdgram.c: cdgram.y
- yacc cdgram.y && mv y.tab.c cdgram.c
+ yacc -ocdgram.c cdgram.y
test: cdecl
@./cdecl < testset | diff -U 3 - test_expected_output.txt \
@@ -48,8 +48,10 @@ test_cpp: c++decl
./c++decl < testset++
install: cdecl
+ $(INSTALL) -d $(BINDIR)
$(INSTALL) cdecl $(BINDIR)
ln -s cdecl $(BINDIR)/c++decl
+ $(INSTALL) -d $(MANDIR)
$(INSTALL_DATA) cdecl.1 $(MANDIR)
$(INSTALL_DATA) c++decl.1 $(MANDIR)
diff --git cdecl-blocks-2.5.orig/cdecl.c cdecl-blocks-2.5/cdecl.c
index 8ecaca4..c839c17 100644
--- cdecl-blocks-2.5.orig/cdecl.c
+++ cdecl-blocks-2.5/cdecl.c
@@ -93,12 +93,12 @@ void free(), exit(), perror();
#endif /* __STDC__ || DOS */
#ifdef USE_READLINE
-# include <readline/readline.h>
+# include <editline/readline.h>
/* prototypes for functions related to readline() */
- char * getline();
+ char * _getline();
char ** attempt_completion(char *, int, int);
char * keyword_completion(char *, int);
- char * command_completion(char *, int);
+ char * command_completion(const char *, int);
#endif
/* maximum # of chars from progname to display in prompt */
@@ -379,7 +379,7 @@ char *options[] = {
static char *line_read = NULL;
/* Read a string, and return a pointer to it. Returns NULL on EOF. */
-char * getline ()
+char * _getline ()
{
/* If the buffer has already been allocated, return the memory
to the free pool. */
@@ -408,7 +408,7 @@ char ** attempt_completion(char *text, int start, int end)
return matches;
}
-char * command_completion(char *text, int flag)
+char * command_completion(const char *text, int flag)
{
static int index, len;
char *command;
@@ -891,7 +891,7 @@ int dostdin()
if (!quiet) (void) printf("Type `help' or `?' for help\n");
ret = 0;
- while ((line = getline())) {
+ while ((line = _getline())) {
if (!strcmp(line, "quit") || !strcmp(line, "exit")) {
free(line);
return ret;