svn commit: r419783 - in head/devel/cdecl: . files

John Marino marino at FreeBSD.org
Sun Aug 7 17:21:28 UTC 2016


Author: marino
Date: Sun Aug  7 17:21:26 2016
New Revision: 419783
URL: https://svnweb.freebsd.org/changeset/ports/419783

Log:
  devel/cdecl: document ncurses, fix for DragonFly
  
  While here, incorporate getline fix into the regenerated patches.

Modified:
  head/devel/cdecl/Makefile
  head/devel/cdecl/files/patch-Makefile
  head/devel/cdecl/files/patch-cdecl.c

Modified: head/devel/cdecl/Makefile
==============================================================================
--- head/devel/cdecl/Makefile	Sun Aug  7 17:08:19 2016	(r419782)
+++ head/devel/cdecl/Makefile	Sun Aug  7 17:21:26 2016	(r419783)
@@ -3,6 +3,7 @@
 
 PORTNAME=	cdecl
 PORTVERSION=	2.5
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	SUNSITE/devel/lang/c
 
@@ -11,7 +12,7 @@ COMMENT=	Explains complicated C/C++ decl
 
 CONFLICTS=	cutils-[0-9]*
 
-USES=		readline
+USES=		ncurses readline
 USE_CSTD=	c89
 ALL_TARGET=	${PORTNAME}
 MAKE_ENV+=	STAGEDIR=${STAGEDIR}
@@ -21,9 +22,6 @@ PORTDOCS=	testset testset++
 
 OPTIONS_DEFINE=	DOCS
 
-post-patch:
-	${REINPLACE_CMD} -e "s/getline/get_line/g" ${WRKSRC}/cdecl.c
-
 post-install-DOCS-on:
 	${MKDIR} ${STAGEDIR}${DOCSDIR}
 	${INSTALL_DATA} ${WRKSRC}/testset* ${STAGEDIR}${DOCSDIR}

Modified: head/devel/cdecl/files/patch-Makefile
==============================================================================
--- head/devel/cdecl/files/patch-Makefile	Sun Aug  7 17:08:19 2016	(r419782)
+++ head/devel/cdecl/files/patch-Makefile	Sun Aug  7 17:21:26 2016	(r419783)
@@ -1,5 +1,5 @@
---- Makefile.orig	1996-01-16 00:36:38.000000000 -0500
-+++ Makefile	2014-08-09 14:36:10.000000000 -0400
+--- 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.
@@ -9,7 +9,7 @@
 -LIBS= -lreadline -ltermcap
 +CFLAGS+= -s -DUSE_READLINE ${CPPFLAGS}
 +CC?= gcc
-+LIBS= -lreadline -ltermcap ${LDFLAGS}
++LIBS= -lreadline -lncurses ${LDFLAGS}
  ALLFILES= makefile cdgram.y cdlex.l cdecl.c cdecl.1 testset testset++
 -BINDIR= /usr/bin
 -MANDIR= /usr/man/man1
@@ -20,7 +20,7 @@
  INSTALL= install -c
  INSTALL_DATA= install -c -m 644
  
-@@ -43,10 +43,10 @@
+@@ -43,10 +43,10 @@ test:
  	./c++decl < testset++
  
  install: cdecl

Modified: head/devel/cdecl/files/patch-cdecl.c
==============================================================================
--- head/devel/cdecl/files/patch-cdecl.c	Sun Aug  7 17:08:19 2016	(r419782)
+++ head/devel/cdecl/files/patch-cdecl.c	Sun Aug  7 17:21:26 2016	(r419783)
@@ -1,5 +1,5 @@
---- ./cdecl.c.orig	1996-01-16 04:54:46.000000000 +0100
-+++ ./cdecl.c	2013-06-10 00:06:29.231069167 +0200
+--- cdecl.c.orig	1996-01-16 03:54:46 UTC
++++ cdecl.c
 @@ -59,14 +59,22 @@
   */
  
@@ -24,7 +24,16 @@
  #else
  # ifndef NOVARARGS
  #  include <varargs.h>
-@@ -124,7 +132,6 @@
+@@ -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);
@@ -32,35 +41,44 @@
    int main(int, char **);
    int yywrap(void);
    int dostdin(void);
-@@ -138,7 +145,9 @@
+@@ -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 __FreeBSD_version < 430001 || (__FreeBSD_version >= 500000 && __FreeBSD_version < 500019)
++#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 @@
+@@ -148,7 +157,9 @@ char real_prompt[MAX_NAME+3];
    void unsupp(), notsupported();
    void yyerror();
    void doset(), dodeclare(), docast(), dodexplain(), docexplain();
-+#if __FreeBSD_version < 430001 || (__FreeBSD_version >= 500000 && __FreeBSD_version < 500019)
++#if !defined __FreeBSD__ && !defined __DragonFly__
    void setprogname();
 +#endif
    int dotmpfile(), dofileargs();
  #endif /* __STDC__ */
    FILE *tmpfile();
-@@ -802,6 +813,7 @@
+@@ -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 __FreeBSD_version < 430001 || (__FreeBSD_version  >= 500000 && __FreeBSD_version < 500019)
++#if !defined __FreeBSD__ && !defined __DragonFly__
  /* Save away the name of the program from argv[0] */
  void setprogname(argv0)
  char *argv0;
-@@ -841,6 +853,7 @@
+@@ -841,6 +853,7 @@ char *argv0;
  	real_prompt[len+2] = '\0';
      }
  }
@@ -68,3 +86,12 @@
  
  /* 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;


More information about the svn-ports-all mailing list