From 420e09224873234beef428f5a15a5f19e6664d9eff51033a13345c99c2f1065f Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 16 Dec 2019 16:02:16 +0000 Subject: [PATCH] - Update to release 6.6.2 OBS-URL: https://build.opensuse.org/package/show/devel:tools/cdecl?expand=0&rev=8 --- cdecl-2.5-deb11.diff | 88 ---------------------------------------- cdecl-2.5.tar.xz | 3 -- cdecl-6.6.2.tar.gz | 3 ++ cdecl.changes | 35 ++++++++++++++++ cdecl.spec | 37 ++++++++--------- keyword-identifier.patch | 60 --------------------------- 6 files changed, 54 insertions(+), 172 deletions(-) delete mode 100644 cdecl-2.5-deb11.diff delete mode 100644 cdecl-2.5.tar.xz create mode 100644 cdecl-6.6.2.tar.gz delete mode 100644 keyword-identifier.patch diff --git a/cdecl-2.5-deb11.diff b/cdecl-2.5-deb11.diff deleted file mode 100644 index aa155f1..0000000 --- a/cdecl-2.5-deb11.diff +++ /dev/null @@ -1,88 +0,0 @@ ---- cdecl-2.5.orig/Makefile -+++ cdecl-2.5/Makefile -@@ -15,9 +15,9 @@ - # - # add -DUSE_READLINE To compile in support for the GNU readline library. - --CFLAGS= -s -O2 -DUSE_READLINE -+CFLAGS= -g -O2 -DUSE_READLINE - CC= gcc --LIBS= -lreadline -ltermcap -+LIBS= -lreadline - ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++ - BINDIR= /usr/bin - MANDIR= /usr/man/man1 -@@ -26,7 +26,7 @@ - INSTALL_DATA= install -c -m 644 - - cdecl: c++decl -- ln c++decl cdecl -+ ln -s c++decl cdecl - - c++decl: cdgram.c cdlex.c cdecl.c - $(CC) $(CFLAGS) -o c++decl cdecl.c $(LIBS) -@@ -44,7 +44,7 @@ - - install: cdecl - $(INSTALL) cdecl $(BINDIR) -- ln $(BINDIR)/cdecl $(BINDIR)/c++decl -+ ln -s cdecl $(BINDIR)/c++decl - $(INSTALL_DATA) cdecl.1 $(MANDIR) - $(INSTALL_DATA) c++decl.1 $(MANDIR) - ---- cdecl-2.5.orig/cdecl.1 -+++ cdecl-2.5/cdecl.1 -@@ -274,7 +274,7 @@ - ::= short | long | unsigned | signed | - ::= | NOTHING - ::= const | volatile | noalias -- ::= auto | extern | register | auto -+ ::= auto | extern | register | static - ::= NOTHING | - ::= NOTHING | - | create | nocreate ---- cdecl-2.5.orig/cdecl.c -+++ cdecl-2.5/cdecl.c -@@ -67,6 +67,7 @@ - # include - # include - # include -+# include - #else - # ifndef NOVARARGS - # include -@@ -90,7 +91,7 @@ - #ifdef USE_READLINE - # include - /* prototypes for functions related to readline() */ -- char * getline(); -+ char * get_line(); - char ** attempt_completion(char *, int, int); - char * keyword_completion(char *, int); - char * command_completion(char *, int); -@@ -124,7 +125,6 @@ - - #if __STDC__ - char *ds(char *), *cat(char *, ...), *visible(int); -- int getopt(int,char **,char *); - int main(int, char **); - int yywrap(void); - int dostdin(void); -@@ -375,7 +375,7 @@ - static char *line_read = NULL; - - /* Read a string, and return a pointer to it. Returns NULL on EOF. */ --char * getline () -+char * get_line () - { - /* If the buffer has already been allocated, return the memory - to the free pool. */ -@@ -887,7 +887,7 @@ - - if (!quiet) (void) printf("Type `help' or `?' for help\n"); - ret = 0; -- while ((line = getline())) { -+ while ((line = get_line())) { - if (!strcmp(line, "quit") || !strcmp(line, "exit")) { - free(line); - return ret; diff --git a/cdecl-2.5.tar.xz b/cdecl-2.5.tar.xz deleted file mode 100644 index 342c569..0000000 --- a/cdecl-2.5.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8259d3e811c2c54c30d83259d5207b23c5a39aa1b371975f08ef5fb0abadafc5 -size 19548 diff --git a/cdecl-6.6.2.tar.gz b/cdecl-6.6.2.tar.gz new file mode 100644 index 0000000..edcf851 --- /dev/null +++ b/cdecl-6.6.2.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:490d19d07737d0598d1fd80c6eeddd4850df9058c2569d22c8ced9816aec11cc +size 721716 diff --git a/cdecl.changes b/cdecl.changes index 830e7f9..dd258be 100644 --- a/cdecl.changes +++ b/cdecl.changes @@ -1,3 +1,38 @@ +------------------------------------------------------------------- +Mon Dec 16 15:57:23 UTC 2019 - Jan Engelhardt + +- Update to release 6.6.2 + * Command-line long-options. + * Distinguishes among K&R C, C89, C95, C99, C11, C18, C++98, + C++03, C++11, C++14, C++17, and C++20. + * Support for C89 const, restrict, and volatile declarations. + * Support for the standard C95 type wchar_t. + * Support for the standard C99 types _Bool, _Complex, + _Imaginary, int8_t, int16_t, ptrdiff_t, size_t, etc. + * Support for C99 static, type-qualified, and variable length + array function arguments. + * Support for the standard C11 atomic types atomic_bool, + atomic_char, etc. + * Support for the standard C11 and C++11 types char16_t, + char32_t, and thread_local. + * Support for inline function and variable declarations. + * Support for typedef declarations. + * Support for variadic function arguments. + * Support for C and C++ alternative tokens (and, and_eq, etc.). + * Support for C++ mutable data members, namespaces and scoped + names, new-style casts, throw, overloaded operators, and + friend, virtual and pure virtual member function + declarations, and user-defined conversion operators. + * Support for C++11 constexpr, enum class, final, noexcept, + override, rvalue references, user-defined literals, using (as + a typedef synonym), the function trailing return-type syntax, + and ref-qualified member function declarations. + * Support for C++ [[carries_dependency]], [[deprecated]], + [[maybe_unused]], [[nodiscard]], and [[noreturn]] attribute + specifiers. + * Better warning and error messages complete with location + information and color. + ------------------------------------------------------------------- Thu Jun 11 09:08:54 UTC 2015 - schwab@suse.de diff --git a/cdecl.spec b/cdecl.spec index 9f687ee..acdb86a 100644 --- a/cdecl.spec +++ b/cdecl.spec @@ -1,7 +1,7 @@ # # spec file for package cdecl # -# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,24 +12,23 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # - Name: cdecl -Version: 2.5 -Release: 1 -Group: Development/Languages/C and C++ +Version: 6.6.2 +Release: 0 Summary: C/C++ function declaration translator -Url: ftp://ftp.oss.cc.gatech.edu/pub/linux/devel/lang/c/cdecl-2.5.tar.gz -License: SUSE-Public-Domain +License: GPL-3.0-only +Group: Development/Languages/C and C++ +URL: https://github.com/paul-j-lucas/cdecl/ -Source: %name-%version.tar.xz -Patch1: %name-2.5-deb11.diff -Patch2: keyword-identifier.patch -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: bison flex readline-devel xz +Source: https://github.com/paul-j-lucas/cdecl/releases/download/cdecl-6.6.2/cdecl-6.6.2.tar.gz +BuildRequires: bison +BuildRequires: flex +BuildRequires: ncurses-devel +BuildRequires: readline-devel %description Turn English phrases to C or C++ declarations Cdecl is a program @@ -41,21 +40,17 @@ version it has command line editing and history with the GNU readline library. %prep -%setup -%patch -P 1 -P 2 -p1 +%autosetup -p1 %build -make CFLAGS="%optflags -DUSE_READLINE -DOLD_READLINE" %{?_smp_mflags}; +%configure %install -b="%buildroot"; -install -dm0755 "$b/%_bindir"; -install -dm0755 "$b/%_mandir/man1"; -make install BINDIR="$b/%_bindir" MANDIR="$b/%_mandir/man1"; +%make_install %files -%defattr(-,root,root) %_bindir/* %_mandir/*/* +%license COPYING %changelog diff --git a/keyword-identifier.patch b/keyword-identifier.patch deleted file mode 100644 index ce6b210..0000000 --- a/keyword-identifier.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: schwab@suse.de -Date: Thu Jun 11 09:08:54 +0000 - -"restrict" is a keyword used by the programming language. Rename it. - -Index: cdecl-2.5/cdecl.c -=================================================================== ---- cdecl-2.5.orig/cdecl.c -+++ cdecl-2.5/cdecl.c -@@ -241,7 +241,7 @@ struct - /* for unsupported combinations of types. */ - void mbcheck() - { -- register int i, j, restrict; -+ register int i, j, restriction; - char *t1, *t2; - - /* Loop through the types */ -@@ -258,26 +258,26 @@ void mbcheck() - if (!(modbits & crosstypes[j].bit)) - continue; - /* check the type of restriction */ -- restrict = crosscheck[i][j]; -- if (restrict == ALWAYS) -+ restriction = crosscheck[i][j]; -+ if (restriction == ALWAYS) - continue; - t1 = crosstypes[i].name; - t2 = crosstypes[j].name; -- if (restrict == NEVER) -+ if (restriction == NEVER) - { - notsupported("", t1, t2); - } -- else if (restrict == RITCHIE) -+ else if (restriction == RITCHIE) - { - if (RitchieFlag) - notsupported(" (Ritchie Compiler)", t1, t2); - } -- else if (restrict == PREANSI) -+ else if (restriction == PREANSI) - { - if (PreANSIFlag || RitchieFlag) - notsupported(" (Pre-ANSI Compiler)", t1, t2); - } -- else if (restrict == ANSI) -+ else if (restriction == ANSI) - { - if (!RitchieFlag && !PreANSIFlag) - notsupported(" (ANSI Compiler)", t1, t2); -@@ -286,7 +286,7 @@ void mbcheck() - { - (void) fprintf (stderr, - "%s: Internal error in crosscheck[%d,%d]=%d!\n", -- progname, i, j, restrict); -+ progname, i, j, restriction); - exit(1); /* NOTREACHED */ - } - }