GNU bug report logs -
#55533
[PATCH] gnu: Add cdecl.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55533 in the body.
You can then email your comments to 55533 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#55533
; Package
guix-patches
.
(Fri, 20 May 2022 04:07:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 20 May 2022 04:07:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/code.scm (cdecl): New variable.
---
gnu/packages/code.scm | 87 ++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 86 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index e96a55e5b0..f0dd443560 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -15,7 +15,7 @@
;;; Copyright © 2020, 2021 Marius Bakke <marius <at> gnu.org>
;;; Copyright © 2020 Julien Lepiller <julien <at> lepiller.eu>
;;; Copyright © 2021 lu hui <luhuins <at> 163.com>
-;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
+;;; Copyright © 2021, 2022 Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -48,12 +48,14 @@
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages bison)
#:use-module (gnu packages c)
#:use-module (gnu packages compression)
#:use-module (gnu packages cpp)
#:use-module (gnu packages curl)
#:use-module (gnu packages elf)
#:use-module (gnu packages emacs)
+ #:use-module (gnu packages flex)
#:use-module (gnu packages gcc)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages llvm)
@@ -66,6 +68,7 @@
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages readline)
#:use-module (gnu packages serialization)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages texinfo)
@@ -925,6 +928,88 @@ extensions over the standard utility.")
source and header amalgamation in projects.")
(license license:bsd-3))))
+(define-public cdecl
+ (package
+ (name "cdecl")
+ (version "2.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://www.ibiblio.org/pub/linux/devel/lang/c/cdecl-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0dm98bp186r4cihli6fmcwzjaadgwl1z3b0zdxfik8h7hkqawk5p"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags
+ ,#~(list "LIBS=-lreadline"
+ (string-append "BINDIR=" #$output "/bin")
+ (string-append "MANDIR=" #$output "/share/man/man1"))
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure) ; No configure script.
+ (add-after 'unpack 'fix-build
+ (lambda _
+ (substitute* "Makefile"
+ (("lex cdlex.l")
+ "flex cdlex.l"))
+ (substitute* "cdecl.c"
+ ;; Fix "error: conflicting types for ‘getline’".
+ (("char \\* getline\\(\\)")
+ "char * our_getline(void)")
+ (("char \\* getline \\(\\)")
+ "char * our_getline(void)")
+ (("line = getline\\(\\)")
+ "line = our_getline()")
+ ;; Fix "error: conflicting types for ‘getopt’".
+ (("int getopt\\(int,char \\*\\*,char \\*\\);")
+ "")
+ ;; Fix invalid use of "restrict" as a variable name.
+ (("i, j, restrict")
+ "i, j, restriction")
+ (("restrict =")
+ "restriction =")
+ ;; Fix "warning: implicit declaration of function ‘add_history’".
+ (("# include <readline/readline.h>" all)
+ (string-append all "\n# include <readline/history.h>"))
+ ;; Fix "warning: implicit declaration of function ‘dotmpfile_from_string’".
+ (("void setprogname\\(char \\*\\);" all)
+ (string-append all "\nint dotmpfile_from_string(char *);"))
+ ;; Fix "warning: implicit declaration of function ‘completion_matches’".
+ (("matches = completion_matches\\(text, command_completion\\);")
+ "matches = rl_completion_matches(text, command_completion);")
+ (("char \\* command_completion\\(char \\*, int\\);")
+ "char * command_completion(const char *, int);")
+ (("char \\* command_completion\\(char \\*text, int flag\\)")
+ "char * command_completion(const char *text, int flag)")
+ ;; Fix "warning: ‘CPPFunction’ is deprecated".
+ (("rl_attempted_completion_function = \\(CPPFunction \\*\\)attempt_completion;")
+ "rl_attempted_completion_function = (rl_completion_func_t *)attempt_completion;")
+ ;; Fix "warning: ‘Function’ is deprecated".
+ (("rl_completion_entry_function = \\(Function \\*\\)keyword_completion;")
+ "rl_completion_entry_function = (rl_compentry_func_t *)keyword_completion;"))
+ ;; Fix typo in man page.
+ (substitute* "cdecl.1"
+ (("<storage>\t::= auto \\| extern \\| register \\| auto")
+ "<storage>\t::= auto | extern | register | static"))))
+ (add-before 'install 'create-directories
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (man (string-append out "/share/man/man1")))
+ (mkdir-p bin)
+ (mkdir-p man)))))
+ #:tests? #f)) ; No "check" target.
+ (native-inputs (list bison flex))
+ (inputs (list readline))
+ (home-page "https://www.ibiblio.org/pub/linux/devel/lang/c/")
+ (synopsis "Turn English phrases into C or C++ declarations and vice versa")
+ (description "@code{cdecl} is a program which will turn English-like phrases
+into C declarations. It can also translate the C into the pseudo-English. And
+it handles typecasts, too. Plus C++. And in this version it has command line
+editing and history with the GNU readline library.")
+ (license license:public-domain)))
+
(define-public cscope
(package
(name "cscope")
base-commit: cf17cbbc1b16dd15c8ec2e637d240de7ae5c3a44
--
2.25.1
Reply sent
to
Ludovic Courtès <ludo <at> gnu.org>
:
You have taken responsibility.
(Wed, 01 Jun 2022 21:24:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Foo Chuan Wei <chuanwei.foo <at> hotmail.com>
:
bug acknowledged by developer.
(Wed, 01 Jun 2022 21:24:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 55533-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Foo Chuan Wei <chuanwei.foo <at> hotmail.com> skribis:
> * gnu/packages/code.scm (cdecl): New variable.
Applied with the changes below, thanks!
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/code.scm b/gnu/packages/code.scm
index f0dd443560..437c735c79 100644
--- a/gnu/packages/code.scm
+++ b/gnu/packages/code.scm
@@ -1004,10 +1004,10 @@ (define-public cdecl
(inputs (list readline))
(home-page "https://www.ibiblio.org/pub/linux/devel/lang/c/")
(synopsis "Turn English phrases into C or C++ declarations and vice versa")
- (description "@code{cdecl} is a program which will turn English-like phrases
-into C declarations. It can also translate the C into the pseudo-English. And
-it handles typecasts, too. Plus C++. And in this version it has command line
-editing and history with the GNU readline library.")
+ (description "@code{cdecl} is a program that turns English-like phrases into C
+declarations. It can also translate C into pseudo-English. It also handles
+type casts and C++. It has command-line editing and history with the GNU
+Readline library.")
(license license:public-domain)))
(define-public cscope
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Thu, 30 Jun 2022 11:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 273 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.