- Fix parsing of the -il option

- Enable STAGE support

PR:		ports/183438
Submitted by:	Wietse Venema <wietse@porcupine.org>
This commit is contained in:
Johan van Selst 2013-11-04 07:30:34 +00:00
parent f674dd0388
commit c6f42c9aef
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=332669
6 changed files with 19 additions and 31 deletions

View file

@ -3,7 +3,7 @@
PORTNAME= gindent PORTNAME= gindent
PORTVERSION= 2.2.10 PORTVERSION= 2.2.10
PORTREVISION= 2 PORTREVISION= 3
CATEGORIES= devel CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_GNU} MASTER_SITES= ${MASTER_SITE_GNU}
MASTER_SITE_SUBDIR= indent MASTER_SITE_SUBDIR= indent
@ -18,7 +18,6 @@ LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS= --program-prefix=g CONFIGURE_ARGS= --program-prefix=g
MAKE_JOBS_UNSAFE= yes MAKE_JOBS_UNSAFE= yes
NO_STAGE= yes
.include <bsd.port.options.mk> .include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MNLS} .if ${PORT_OPTIONS:MNLS}
@ -29,7 +28,6 @@ CONFIGURE_ARGS+=--disable-nls
PLIST_SUB+= NLS="@comment " PLIST_SUB+= NLS="@comment "
.endif .endif
MAN1= gindent.1
INFO= indent INFO= indent
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
@ -39,9 +37,9 @@ post-patch:
's|malloc\.h|stdlib.h|g' 's|malloc\.h|stdlib.h|g'
post-install: post-install:
.if !defined(NOPORTDOCS) .if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR} @${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/indent.html ${DOCSDIR} ${INSTALL_DATA} ${WRKSRC}/doc/indent.html ${STAGEDIR}${DOCSDIR}
.endif .endif
.include <bsd.port.post.mk> .include <bsd.port.post.mk>

View file

@ -1,11 +0,0 @@
--- doc/indent.texinfo.orig 2008-03-11 19:50:42.000000000 +0100
+++ doc/indent.texinfo 2010-06-27 16:29:17.000000000 +0200
@@ -13,7 +13,7 @@
@dircategory Indent Code Formatter
@direntry
-* Indent: (indent). C code formatter.
+* GNU indent: (indent). C code formatter.
@end direntry

View file

@ -1,6 +1,6 @@
--- src/args.c.orig 2008-03-11 19:50:42.000000000 +0100 --- src/args.c.orig 2008-03-11 19:50:42.000000000 +0100
+++ src/args.c 2010-06-27 16:29:54.000000000 +0200 +++ src/args.c 2013-11-04 07:16:35.000000000 +0100
@@ -163,6 +163,7 @@ @@ -163,6 +163,7 @@ static int exp_hnl = 0;
static int exp_i = 0; static int exp_i = 0;
static int exp_il = 0; static int exp_il = 0;
static int exp_ip = 0; static int exp_ip = 0;
@ -8,7 +8,7 @@
static int exp_kr = 0; static int exp_kr = 0;
static int exp_l = 0; static int exp_l = 0;
static int exp_lc = 0; static int exp_lc = 0;
@@ -237,6 +238,30 @@ @@ -237,6 +238,30 @@ typedef struct
static void usage (void); static void usage (void);
@ -39,7 +39,7 @@
#ifdef BERKELEY_DEFAULTS #ifdef BERKELEY_DEFAULTS
/** /**
@@ -264,63 +289,66 @@ @@ -264,63 +289,66 @@ const pro_ty pro[] =
#endif #endif
{"pi", PRO_INT, -1, ONOFF_NA, &settings.paren_indent, &exp_pi}, {"pi", PRO_INT, -1, ONOFF_NA, &settings.paren_indent, &exp_pi},
{"pcs", PRO_BOOL, false, ON, &settings.proc_calls_space, &exp_pcs}, {"pcs", PRO_BOOL, false, ON, &settings.proc_calls_space, &exp_pcs},
@ -113,8 +113,8 @@
+/* This is now the default. */ +/* This is now the default. */
+ KNF_PRO_SETTINGS, + KNF_PRO_SETTINGS,
+ {"ip", PRO_INT, 8, ONOFF_NA, &settings.indent_parameters, &exp_ip}, + {"ip", PRO_INT, 8, ONOFF_NA, &settings.indent_parameters, &exp_ip},
+ {"i", PRO_INT, 8, ONOFF_NA, &settings.ind_size, &exp_i},
{"il", PRO_INT, DEFAULT_LABEL_INDENT, ONOFF_NA, &settings.label_offset, &exp_il}, {"il", PRO_INT, DEFAULT_LABEL_INDENT, ONOFF_NA, &settings.label_offset, &exp_il},
+ {"i", PRO_INT, 8, ONOFF_NA, &settings.ind_size, &exp_i},
{"hnl", PRO_BOOL, true, ON, &settings.honour_newlines, &exp_hnl}, {"hnl", PRO_BOOL, true, ON, &settings.honour_newlines, &exp_hnl},
{"h", PRO_FUNCTION, 0, ONOFF_NA, (int *) usage, &exp_version}, {"h", PRO_FUNCTION, 0, ONOFF_NA, (int *) usage, &exp_version},
- {"gnu", PRO_SETTINGS, 0, ONOFF_NA, GNU_SETTINGS_STRING, &exp_gnu}, - {"gnu", PRO_SETTINGS, 0, ONOFF_NA, GNU_SETTINGS_STRING, &exp_gnu},
@ -133,7 +133,7 @@
{"cp", PRO_INT, 33, ONOFF_NA, &settings.else_endif_col, &exp_cp}, {"cp", PRO_INT, 33, ONOFF_NA, &settings.else_endif_col, &exp_cp},
{"cli", PRO_INT, 0, ONOFF_NA, &settings.case_indent, &exp_cli}, {"cli", PRO_INT, 0, ONOFF_NA, &settings.case_indent, &exp_cli},
{"ci", PRO_INT, 4, ONOFF_NA, &settings.continuation_indent, &exp_ci}, {"ci", PRO_INT, 4, ONOFF_NA, &settings.continuation_indent, &exp_ci},
@@ -341,12 +369,12 @@ @@ -341,12 +369,12 @@ const pro_ty pro[] =
{"bl", PRO_BOOL, true, OFF, &settings.btype_2, &exp_bl}, {"bl", PRO_BOOL, true, OFF, &settings.btype_2, &exp_bl},
{"bfda", PRO_BOOL, false, ON, &settings.break_function_decl_args, &exp_bfda}, {"bfda", PRO_BOOL, false, ON, &settings.break_function_decl_args, &exp_bfda},
{"bfde", PRO_BOOL, false, ON, &settings.break_function_decl_args_end, &exp_bfde}, {"bfde", PRO_BOOL, false, ON, &settings.break_function_decl_args_end, &exp_bfde},
@ -150,7 +150,7 @@
{"bacc", PRO_BOOL, false, ON, &settings.blanklines_around_conditional_compilation, &exp_bacc}, {"bacc", PRO_BOOL, false, ON, &settings.blanklines_around_conditional_compilation, &exp_bacc},
{"T", PRO_KEY, 0, ONOFF_NA, 0, &exp_T}, {"T", PRO_KEY, 0, ONOFF_NA, 0, &exp_T},
{"ppi", PRO_INT, 0, ONOFF_NA, &settings.force_preproc_width, &exp_ppi}, {"ppi", PRO_INT, 0, ONOFF_NA, &settings.force_preproc_width, &exp_ppi},
@@ -381,7 +409,7 @@ @@ -381,7 +409,7 @@ const pro_ty pro[] =
#endif #endif
{"pi", PRO_INT, -1, ONOFF_NA, &settings.paren_indent, &exp_pi}, {"pi", PRO_INT, -1, ONOFF_NA, &settings.paren_indent, &exp_pi},
{"pcs", PRO_BOOL, true, ON, &settings.proc_calls_space, &exp_pcs}, {"pcs", PRO_BOOL, true, ON, &settings.proc_calls_space, &exp_pcs},
@ -159,7 +159,7 @@
{"o", PRO_BOOL, false, ON, &settings.expect_output_file, &exp_o}, {"o", PRO_BOOL, false, ON, &settings.expect_output_file, &exp_o},
{"nv", PRO_BOOL, false, OFF, &settings.verbose, &exp_v}, {"nv", PRO_BOOL, false, OFF, &settings.verbose, &exp_v},
{"nut", PRO_BOOL, true, OFF, &settings.use_tabs, &exp_ut}, {"nut", PRO_BOOL, true, OFF, &settings.use_tabs, &exp_ut},
@@ -425,14 +453,15 @@ @@ -425,14 +453,15 @@ const pro_ty pro[] =
{"lp", PRO_BOOL, true, ON, &settings.lineup_to_parens, &exp_lp}, {"lp", PRO_BOOL, true, ON, &settings.lineup_to_parens, &exp_lp},
{"lc", PRO_INT, DEFAULT_RIGHT_COMMENT_MARGIN, ONOFF_NA, &settings.comment_max_col, &exp_lc}, {"lc", PRO_INT, DEFAULT_RIGHT_COMMENT_MARGIN, ONOFF_NA, &settings.comment_max_col, &exp_lc},
{"l", PRO_INT, DEFAULT_RIGHT_MARGIN, ONOFF_NA, &settings.max_col, &exp_l}, {"l", PRO_INT, DEFAULT_RIGHT_MARGIN, ONOFF_NA, &settings.max_col, &exp_l},
@ -177,7 +177,7 @@
{"fca", PRO_BOOL, false, ON, &settings.format_comments, &exp_fca}, {"fca", PRO_BOOL, false, ON, &settings.format_comments, &exp_fca},
{"fc1", PRO_BOOL, false, ON, &settings.format_col1_comments, &exp_fc1}, {"fc1", PRO_BOOL, false, ON, &settings.format_col1_comments, &exp_fc1},
{"eei", PRO_BOOL, false, ON, &settings.extra_expression_indent, &exp_eei}, {"eei", PRO_BOOL, false, ON, &settings.extra_expression_indent, &exp_eei},
@@ -593,6 +622,9 @@ @@ -593,6 +622,9 @@ const long_option_conversion_ty option_c
{"blank-lines-after-declarations", "bad"}, {"blank-lines-after-declarations", "bad"},
{"blank-lines-after-commas", "bc"}, {"blank-lines-after-commas", "bc"},
{"blank-before-sizeof", "bs"}, {"blank-before-sizeof", "bs"},
@ -187,7 +187,7 @@
{"berkeley-style", "orig"}, {"berkeley-style", "orig"},
{"berkeley", "orig"}, {"berkeley", "orig"},
{"Bill-Shannon", "bs"}, {"Bill-Shannon", "bs"},
@@ -798,7 +830,7 @@ @@ -798,7 +830,7 @@ extern int set_option(
if (!found) if (!found)
{ {

View file

@ -1,6 +1,6 @@
--- doc/Makefile.in.orig 2008-03-11 19:54:15.000000000 +0100 --- doc/Makefile.in.orig 2008-03-11 19:54:15.000000000 +0100
+++ doc/Makefile.in 2010-06-27 16:29:17.000000000 +0200 +++ doc/Makefile.in 2013-11-04 06:57:00.000000000 +0100
@@ -602,10 +602,10 @@ @@ -602,10 +602,10 @@ uninstall-am: uninstall-dvi-am uninstall
uninstall-pdf-am uninstall-ps-am uninstall-pdf-am uninstall-ps-am

View file

@ -1,6 +1,6 @@
--- src/indent.h.orig 2008-03-11 19:50:42.000000000 +0100 --- src/indent.h.orig 2008-03-11 19:50:42.000000000 +0100
+++ src/indent.h 2010-06-27 16:29:17.000000000 +0200 +++ src/indent.h 2013-11-04 06:57:00.000000000 +0100
@@ -135,9 +135,9 @@ @@ -135,9 +135,9 @@ typedef enum bb_code
bb_cast bb_cast
} bb_code_ty; } bb_code_ty;

View file

@ -1,5 +1,6 @@
bin/gindent bin/gindent
bin/gtexinfo2man bin/gtexinfo2man
man/man1/gindent.1.gz
%%PORTDOCS%%%%DOCSDIR%%/indent.html %%PORTDOCS%%%%DOCSDIR%%/indent.html
%%NLS%%share/locale/ca/LC_MESSAGES/indent.mo %%NLS%%share/locale/ca/LC_MESSAGES/indent.mo
%%NLS%%share/locale/da/LC_MESSAGES/indent.mo %%NLS%%share/locale/da/LC_MESSAGES/indent.mo