aboutsummaryrefslogtreecommitdiff
path: root/devel/cdecl
diff options
context:
space:
mode:
authorLarry Rosenman <ler@FreeBSD.org>2017-05-01 00:39:18 +0000
committerLarry Rosenman <ler@FreeBSD.org>2017-05-01 00:39:18 +0000
commitadc67685a4208e8fa2af09d11902d0d6a071a40d (patch)
tree498b11d332812c48d58c8908c8858a54d0128b93 /devel/cdecl
parent272adbb784da6ff9ec2dcb4441fc3ad5b4b0e071 (diff)
downloadports-adc67685a4208e8fa2af09d11902d0d6a071a40d.tar.gz
ports-adc67685a4208e8fa2af09d11902d0d6a071a40d.zip
devel/cdecl: upgrade to new major version 3.1
This version fixes virtually all the deficiencies in earlier versions as well as adds many new features, most notably: Using GNU Autotools for building. Command-line long-options. Distinguishes among K&R C, C89, C95, C99, C11, C++98, C++03, C++11, and C++14. Support for C11 and C++11 types bool, char16_t, char32_t, complex, restrict, size_t, thread_local, and wchar_t. Support for inline function declarations. Support for typedef declarations. Support for variadic function arguments. Support for C++11 constexpr, enum class, mutable, rvalue references, and the function trailing return-type syntax. Support for const, final, friend, override, volatile, virtual, pure virtual, and ref-qualified C++ member function declarations. Better warning and error messages complete with location information and color. Take Maintainer'ship. Submitted by: paul@lucasmail.org Approved by: adamw (mentor, implicit)
Notes
Notes: svn path=/head/; revision=439855
Diffstat (limited to 'devel/cdecl')
-rw-r--r--devel/cdecl/Makefile28
-rw-r--r--devel/cdecl/distinfo5
-rw-r--r--devel/cdecl/files/patch-Makefile37
-rw-r--r--devel/cdecl/files/patch-cdecl.c97
-rw-r--r--devel/cdecl/pkg-descr2
5 files changed, 19 insertions, 150 deletions
diff --git a/devel/cdecl/Makefile b/devel/cdecl/Makefile
index b3dd81809c96..187ef24f4178 100644
--- a/devel/cdecl/Makefile
+++ b/devel/cdecl/Makefile
@@ -2,28 +2,28 @@
# $FreeBSD$
PORTNAME= cdecl
-PORTVERSION= 2.5
-PORTREVISION= 1
+PORTVERSION= 3.1
CATEGORIES= devel
-MASTER_SITES= SUNSITE/devel/lang/c
-MAINTAINER= ports@FreeBSD.org
+MAINTAINER= ler@FreeBSD.org
COMMENT= Explains complicated C/C++ declarations in plain English
+LICENSE= GPLv3
+
+BUILD_DEPENDS= flex:textproc/flex
+
CONFLICTS= cutils-[0-9]*
-USES= ncurses readline
-USE_CSTD= c89
-ALL_TARGET= ${PORTNAME}
-MAKE_ENV+= STAGEDIR=${STAGEDIR}
+USES= autoreconf bison ncurses readline
-PLIST_FILES= bin/cdecl bin/c++decl man/man1/cdecl.1.gz man/man1/c++decl.1.gz
-PORTDOCS= testset testset++
+USE_GITHUB= yes
-OPTIONS_DEFINE= DOCS
+GH_ACCOUNT= paul-j-lucas
+GH_PROJECT= cdecl
+GH_TAGNAME= ${PORTNAME}-${PORTVERSION}
-post-install-DOCS-on:
- ${MKDIR} ${STAGEDIR}${DOCSDIR}
- ${INSTALL_DATA} ${WRKSRC}/testset* ${STAGEDIR}${DOCSDIR}
+MAKE_JOBS_UNSAFE= yes
+GNU_CONFIGURE= yes
+PLIST_FILES= bin/cdecl bin/c++decl man/man1/cdecl.1.gz man/man1/c++decl.1.gz
.include <bsd.port.mk>
diff --git a/devel/cdecl/distinfo b/devel/cdecl/distinfo
index 1942329baf77..a714fe2de737 100644
--- a/devel/cdecl/distinfo
+++ b/devel/cdecl/distinfo
@@ -1,2 +1,3 @@
-SHA256 (cdecl-2.5.tar.gz) = b74caef08407a2195d6f1facf103e5af29253f67d599486164241b14ee42a936
-SIZE (cdecl-2.5.tar.gz) = 21435
+TIMESTAMP = 1493597720
+SHA256 (paul-j-lucas-cdecl-3.1-cdecl-3.1_GH0.tar.gz) = 270ce7b3e49680e5a386b78d91b5cc0238c5293579f28f06412ad7de608ff13d
+SIZE (paul-j-lucas-cdecl-3.1-cdecl-3.1_GH0.tar.gz) = 235505
diff --git a/devel/cdecl/files/patch-Makefile b/devel/cdecl/files/patch-Makefile
deleted file mode 100644
index 9bb87ca90f13..000000000000
--- a/devel/cdecl/files/patch-Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
---- Makefile.orig 1996-01-16 05:36:38 UTC
-+++ Makefile
-@@ -15,13 +15,13 @@
- #
- # add -DUSE_READLINE To compile in support for the GNU readline library.
-
--CFLAGS= -s -O2 -DUSE_READLINE
--CC= gcc
--LIBS= -lreadline -ltermcap
-+CFLAGS+= -s -DUSE_READLINE ${CPPFLAGS}
-+CC?= gcc
-+LIBS= -lreadline -lncurses ${LDFLAGS}
- 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)/bin
-+MANDIR= $(PREFIX)/man/man1
-+CATDIR= $(PREFIX)/man/cat1
- INSTALL= install -c
- INSTALL_DATA= install -c -m 644
-
-@@ -43,10 +43,10 @@ test:
- ./c++decl < testset++
-
- install: cdecl
-- $(INSTALL) cdecl $(BINDIR)
-- ln $(BINDIR)/cdecl $(BINDIR)/c++decl
-- $(INSTALL_DATA) cdecl.1 $(MANDIR)
-- $(INSTALL_DATA) c++decl.1 $(MANDIR)
-+ ${BSD_INSTALL_PROGRAM} cdecl $(STAGEDIR)$(BINDIR)
-+ ln -s $(BINDIR)/cdecl $(STAGEDIR)$(BINDIR)/c++decl
-+ ${BSD_INSTALL_MAN} cdecl.1 $(STAGEDIR)$(MANDIR)
-+ ln -s $(MANDIR)/cdecl.1 $(STAGEDIR)$(MANDIR)/c++decl.1
-
- clean:
- rm -f cdgram.c cdlex.c cdecl y.output c++decl
diff --git a/devel/cdecl/files/patch-cdecl.c b/devel/cdecl/files/patch-cdecl.c
deleted file mode 100644
index 1d593bb88054..000000000000
--- a/devel/cdecl/files/patch-cdecl.c
+++ /dev/null
@@ -1,97 +0,0 @@
---- cdecl.c.orig 1996-01-16 03:54:46 UTC
-+++ cdecl.c
-@@ -59,14 +59,22 @@
- */
-
- char cdeclsccsid[] = "@(#)cdecl.c 2.5 1/15/96";
--
-+
- #include <stdio.h>
- #include <ctype.h>
-+#include <unistd.h>
-+
- #if __STDC__ || defined(DOS)
-+# if (defined(__unix__) || defined(unix)) && !defined(USG)
-+# include <sys/param.h>
-+# endif
- # include <stdlib.h>
- # include <stddef.h>
- # include <string.h>
- # include <stdarg.h>
-+# ifndef DOS
-+# include <errno.h> /* only M$-DOS environments have ``errno'' in stdlib.h */
-+# endif /* ndef DOS */
- #else
- # ifndef NOVARARGS
- # include <varargs.h>
-@@ -90,7 +98,7 @@ void free(), exit(), perror();
- #ifdef USE_READLINE
- # include <readline/readline.h>
- /* 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 +132,6 @@ char real_prompt[MAX_NAME+3];
-
- #if __STDC__
- char *ds(char *), *cat(char *, ...), *visible(int);
-- int getopt(int,char **,char *);
- int main(int, char **);
- int yywrap(void);
- int dostdin(void);
-@@ -138,7 +145,9 @@ char real_prompt[MAX_NAME+3];
- void docast(char*, char*, char*, char*);
- void dodexplain(char*, char*, char*, char*);
- void docexplain(char*, char*, char*, char*);
-+#if !defined __FreeBSD__ && !defined __DragonFly__
- void setprogname(char *);
-+#endif
- int dotmpfile(int, char**), dofileargs(int, char**);
- #else
- char *ds(), *cat(), *visible();
-@@ -148,7 +157,9 @@ char real_prompt[MAX_NAME+3];
- void unsupp(), notsupported();
- void yyerror();
- void doset(), dodeclare(), docast(), dodexplain(), docexplain();
-+#if !defined __FreeBSD__ && !defined __DragonFly__
- void setprogname();
-+#endif
- int dotmpfile(), dofileargs();
- #endif /* __STDC__ */
- FILE *tmpfile();
-@@ -375,7 +386,7 @@ char *options[] = {
- 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. */
-@@ -802,6 +813,7 @@ void prompt()
- #endif
- }
-
-+#if !defined __FreeBSD__ && !defined __DragonFly__
- /* Save away the name of the program from argv[0] */
- void setprogname(argv0)
- char *argv0;
-@@ -841,6 +853,7 @@ char *argv0;
- real_prompt[len+2] = '\0';
- }
- }
-+#endif
-
- /* Run down the list of keywords to see if the */
- /* program is being called named as one of them */
-@@ -887,7 +900,7 @@ int dostdin()
-
- 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/devel/cdecl/pkg-descr b/devel/cdecl/pkg-descr
index a0a2833ea44d..f6d702970e70 100644
--- a/devel/cdecl/pkg-descr
+++ b/devel/cdecl/pkg-descr
@@ -2,3 +2,5 @@ Cdecl composes compilable C declarations and typecasts from descriptive
English phrases, and can also explain a complicated typecast or declaration.
It handles ANSI C, C++, pre-ANSI C, and K&R C, and has TAB completion of
keywords and line editing and history (provided by the GNU readline library).
+
+WWW: https://github.com/paul-j-lucas/cdecl