Hi,
This diff updates gnugetopt to the latest release 1.1.5.
Comments ? OK ?
Cheers,
benoit
Index: Makefile
===================================================================
RCS file: /cvs/ports/misc/gnugetopt/Makefile,v
retrieving revision 1.11
diff -u -r1.11 Makefile
--- Makefile 5 Nov 2010 08:24:50 -0000 1.11
+++ Makefile 23 Jan 2013 13:25:38 -0000
@@ -2,9 +2,8 @@
COMMENT= GNU getopt(1) utility
-DISTNAME= getopt-1.1.4
+DISTNAME = getopt-1.1.5
PKGNAME= gnu${DISTNAME}
-REVISION= 2
CATEGORIES= misc
HOMEPAGE= http://software.frodo.looijaard.name/getopt/
@@ -26,7 +25,6 @@
LDFLAGS="-L${LOCALBASE}/lib" \
LIBS="-lintl -liconv" \
CC="${CC}"
-USE_GROFF = Yes
NO_REGRESS= Yes
Index: distinfo
===================================================================
RCS file: /cvs/ports/misc/gnugetopt/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo 5 Apr 2007 17:41:07 -0000 1.2
+++ distinfo 23 Jan 2013 13:25:38 -0000
@@ -1,5 +1,2 @@
-MD5 (getopt-1.1.4.tar.gz) = AhiMpo2ifEF11unz2nMhAQ==
-RMD160 (getopt-1.1.4.tar.gz) = ef/8zxtIlWv8H7sZwiwtlK3xDf8=
-SHA1 (getopt-1.1.4.tar.gz) = i5symzqPXVLJHAOBYW7L0bopFIY=
-SHA256 (getopt-1.1.4.tar.gz) = QQg9mZPCZ5KFHnm4GgmRmWo/YeFJmP3WB2Fcw7+TO6s=
-SIZE (getopt-1.1.4.tar.gz) = 37163
+SHA256 (getopt-1.1.5.tar.gz) = EYkydrlLFilgardXchQ5GKVxMlmVD79CFiiOJG8Z+7Y=
+SIZE (getopt-1.1.5.tar.gz) = 51794
Index: patches/patch-Makefile
===================================================================
RCS file: /cvs/ports/misc/gnugetopt/patches/patch-Makefile,v
retrieving revision 1.3
diff -u -r1.3 patch-Makefile
--- patches/patch-Makefile 25 Mar 2009 14:32:22 -0000 1.3
+++ patches/patch-Makefile 23 Jan 2013 13:25:38 -0000
@@ -1,7 +1,6 @@
-$OpenBSD: patch-Makefile,v 1.3 2009/03/25 14:32:22 naddy Exp $
---- Makefile.orig Mon Nov 7 23:32:46 2005
-+++ Makefile Wed Mar 25 15:31:06 2009
-@@ -1,17 +1,17 @@
+--- Makefile.orig Sun Aug 12 11:07:43 2012
++++ Makefile Sun Jan 13 15:54:44 2013
+@@ -1,29 +1,29 @@
.SUFFIXES:
DESTDIR=
@@ -10,9 +9,8 @@
bindir=$(prefix)/bin
mandir=$(prefix)/man
man1dir=$(mandir)/man1
- libdir=$(prefix)/lib
sharedir=$(prefix)/share
--getoptdir=$(libdir)/getopt
+-getoptdir=$(sharedir)/getopt
+getoptdir=$(sharedir)/examples/getopt
localedir=$(sharedir)/locale
@@ -22,7 +20,13 @@
# Define this to 1 if you do not have the gettext routines
WITHOUT_GETTEXT=0
-@@ -24,7 +24,7 @@ UNLIKELYNAME=a8vwjfd92
+
+ # For creating the archive
+-PACKAGE=getopt
++PACKAGE=gnugetopt
+ VERSION=1.1.5
+ BASENAME=$(PACKAGE)-$(VERSION)
+ UNLIKELYNAME=a8vwjfd92
SHELL=/bin/sh
@@ -31,16 +35,16 @@
LD=ld
RM=rm -f
INSTALL=install
-@@ -33,7 +33,7 @@ MSGFMT=msgfmt
- LANGUAGES = cs de es fr it ja nl pt_BR
+@@ -32,7 +32,7 @@
+ LANGUAGES = ca cs da de es et eu fi fr gl hu id it ja nl pl pt_BR ru sl sv tr uk vi zh_CN zh_TW
MOFILES:=$(patsubst %,po/%.mo,$(LANGUAGES))
--CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITH_GETTEXT=$(WITH_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX
-+CPPFLAGS+=-DLIBCGETOPT=$(LIBCGETOPT) -DWITH_GETTEXT=$(WITH_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX
+-CPPFLAGS=-DLIBCGETOPT=$(LIBCGETOPT) -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"$(PACKAGE)\" -Dprogram_version=\"$(VERSION)\"
++CPPFLAGS+=-DLIBCGETOPT=$(LIBCGETOPT) -DWITHOUT_GETTEXT=$(WITHOUT_GETTEXT) -DLOCALEDIR=\"$(localedir)\" -DNOT_UTIL_LINUX -Dprogram_invocation_short_name=\"$(PACKAGE)\" -Dprogram_version=\"$(VERSION)\"
ifeq ($(LIBCGETOPT),0)
CPPFLAGS+=-I./gnu
endif
-@@ -43,8 +43,6 @@ WARNINGS=-Wall \
+@@ -42,8 +42,6 @@
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes \
-Wnested-externs -Winline
OPTIMIZE=-O3 -fno-strength-reduce
@@ -49,7 +53,7 @@
sources=getopt.c
ifeq ($(LIBCGETOPT),0)
-@@ -62,7 +60,7 @@ clean: clean_po
+@@ -61,7 +59,7 @@
-$(RM) $(objects) $(binaries)
getopt: $(objects)
Index: patches/patch-getopt_1
===================================================================
RCS file: /cvs/ports/misc/gnugetopt/patches/patch-getopt_1,v
retrieving revision 1.2
diff -u -r1.2 patch-getopt_1
--- patches/patch-getopt_1 18 Jan 2009 23:19:15 -0000 1.2
+++ patches/patch-getopt_1 23 Jan 2013 13:25:38 -0000
@@ -1,176 +1,195 @@
-$OpenBSD: patch-getopt_1,v 1.2 2009/01/18 23:19:15 jasper Exp $
---- getopt.1.orig Mon Nov 7 23:16:38 2005
-+++ getopt.1 Mon Jan 19 00:17:18 2009
-@@ -1,14 +1,14 @@
+--- getopt.1.orig Thu Jul 19 17:00:37 2012
++++ getopt.1 Sun Jan 13 16:21:18 2013
+@@ -1,16 +1,16 @@
-.TH GETOPT 1 "May 31, 1997" Linux ""
+.TH GNUGETOPT 1 "May 31, 1997" Linux ""
.SH NAME
-getopt \- parse command options (enhanced)
+gnugetopt \- parse command options (enhanced)
.SH SYNOPSIS
--.BR getopt " optstring parameters"
-+.BR gnugetopt " optstring parameters"
-
--.BR getopt " [options] [" \-\- "] optstring parameters"
-+.BR gnugetopt " [options] [" \-\- "] optstring parameters"
-
--.BR getopt " [options] " \-o | \-\-options " optstring [options] [" \-\- "] parameters"
-+.BR gnugetopt " [options] " \-o | \-\-options " optstring [options] [" \-\- "] parameters"
+-.B getopt
++.B gnugetopt
+ .I optstring parameters
+ .br
+-.B getopt
++.B gnugetopt
+ .RI [ options ]
+ .RB [ \-\- ]
+ .I optstring parameters
+ .br
+-.B getopt
++.B gnugetopt
+ .RI [ options ]
+ .BR \-o | \-\-options
+ .I optstring
+@@ -18,7 +18,7 @@
+ .RB [ \-\- ]
+ .I parameters
.SH DESCRIPTION
-.B getopt
+.B gnugetopt
- is used to break up
+ is used to break up
.RI ( parse )
options in command lines for easy parsing by
-@@ -19,9 +19,9 @@ It uses the
+@@ -29,7 +29,7 @@
routines to do this.
- The parameters
+ The parameters
-.B getopt
+.B gnugetopt
is called with can be divided into two parts: options
--which modify the way getopt will parse
-+which modify the way gnugetopt will parse
+ which modify the way getopt will parse
.RI ( options
- and
- .I \-o|\-\-options optstring
-@@ -49,7 +49,7 @@ is not an option (does not start with a
+@@ -60,7 +60,7 @@
.RB ` \- ',
- this is the first format in the
- .BR SYNOPSIS),
+ this is the first format in the
+ .BR SYNOPSIS ),
-.B getopt
+.B gnugetopt
- will generate output that is compatible with that of other versions of
- .BR getopt (1).
+ will generate output that is compatible with that of other versions of
+ .BR getopt (1).
It will still do parameter shuffling and recognize optional
-@@ -67,12 +67,12 @@ by using the
+@@ -78,12 +78,12 @@
.B eval
command). This has the effect of preserving those characters, but
- you must call
+ you must call
-.B getopt
+.B gnugetopt
- in a way that is no longer compatible with other versions (the second
- or third format in the
- .BR SYNOPSIS).
+ in a way that is no longer compatible with other versions (the second
+ or third format in the
+ .BR SYNOPSIS ).
To determine whether this enhanced version of
-.BR getopt (1)
+.BR gnugetopt (1)
is installed, a special test option
- .RB ( \-T )
+ .RB ( \-T )
can be used.
-@@ -95,14 +95,14 @@ in
- may be followed by one colon to indicate it has a required argument,and by two colons to indicate it has an optional argument.
- .IP "\-n, \-\-name progname"
- The name that will be used by the
+@@ -110,15 +110,15 @@
+ .TP
+ .BR \-n , " \-\-name \fIprogname\fP"
+ The name that will be used by the
-.BR getopt (3)
+.BR gnugetopt (3)
routines when it reports errors. Note that errors of
-.BR getopt (1)
-are still reported as coming from getopt.
+-.TP
+.BR gnugetopt (1)
+are still reported as coming from gnugetopt.
- .IP "\-o, \-\-options shortopts"
++.TP
+ .BR \-o , " \-\-options \fIshortopts\fP"
The short (one\-character) options to be recognized. If this option is not
- found, the first parameter of
--.B getopt
-+.B gnugetopt
+ found, the first parameter of
+-.B getopt
++.B gnugetopt
that does not start with
- a
- .RB ` \- '
-@@ -121,10 +121,10 @@ options are parsed and output is generated (see sectio
- .B SCANNING MODES
+ a
+ .RB ` \- '
+@@ -138,11 +138,11 @@
for details).
- .IP "\-q, \-\-quiet"
+ .TP
+ .BR \-q , " \-\-quiet"
-Disable error reporting by getopt(3).
+Disable error reporting by gnugetopt(3).
- .IP "\-Q, \-\-quiet\-output"
+ .TP
+ .BR \-Q , " \-\-quiet\-output"
Do not generate normal output. Errors are still reported by
--.BR getopt (3),
-+.BR gnugetopt (3),
- unless you also use
+-.BR getopt (3),
++.BR gnugetopt (3),
+ unless you also use
.IR \-q .
- .IP "\-s, \-\-shell shell"
-@@ -144,7 +144,7 @@ characters can cause havoc in this mode (like they do
- implementations).
- .IP "\-T \-\-test"
- Test if your
--.BR getopt (1)
-+.BR gnugetopt (1)
- is this enhanced version or an old version. This generates no output,
- and sets the error status to 4. Other implementations of
+ .TP
+@@ -165,7 +165,7 @@
+ .TP
+ .BR \-T , " \-\-test"
+ Test if your
+-.BR getopt (1)
++.BR gnugetopt (1)
+ is this enhanced version or an old version. This generates no output,
+ and sets the error status to 4. Other implementations of
.BR getopt (1),
-@@ -158,7 +158,7 @@ and error status 0.
- Output version information and exit succesfully. No other output is generated.
+@@ -180,7 +180,7 @@
+ Output version information and exit successfully. No other output is generated.
.SH PARSING
This section specifies the format of the second part of the parameters of
-.B getopt
+.B gnugetopt
- (the
- .I parameters
- in the
-@@ -170,7 +170,7 @@ generated. These parameters were typically the paramet
- was called with.
+ (the
+ .I parameters
+ in the
+@@ -192,7 +192,7 @@
+ was called with.
Care must be taken that each parameter the shell function was
called with corresponds to exactly one parameter in the parameter list of
--.B getopt
-+.B gnugetopt
- (see the
- .BR EXAMPLES ).
- All parsing is done by the GNU
-@@ -355,14 +355,14 @@ parameter is still generated, but it will always be th
+-.B getopt
++.B gnugetopt
+ (see the
+ .BR EXAMPLES ).
+ All parsing is done by the GNU
+@@ -280,7 +280,7 @@
+ quoting mode,
+ but no second parameter will be generated in unquoted (compatible) mode.
+ Note that many other
+-.BR getopt (1)
++.BR gnugetopt (1)
+ implementations do not support optional arguments.
+
+ If several short options were specified after a single
+@@ -377,14 +377,14 @@
this mode.
.SH COMPATIBILITY
- This version of
+ This version of
-.BR getopt (1)
+.BR gnugetopt (1)
- is written to be as compatible as possible to
+ is written to be as compatible as possible to
other versions. Usually you can just replace them with this version
without any modifications, and with some advantages.
--If the first character of the first parameter of getopt is not a
-+If the first character of the first parameter of gnugetopt is not a
- .RB ` \- ',
+-If the first character of the first parameter of getopt is not a
++If the first character of the first parameter of gnugetopt is not a
+ .RB ` \- ',
-getopt goes into compatibility mode. It will interpret its first parameter as
+gnugetopt goes into compatibility mode. It will interpret its first parameter as
the string of short options, and all other arguments will be parsed. It
- will still do parameter shuffling (ie. all non\-option parameters are outputed
- at the end), unless the environment variable
-@@ -372,7 +372,7 @@ is set.
- The environment variable
- .B GETOPT_COMPATIBLE
- forces
+ will still do parameter shuffling (ie. all non\-option parameters are outputted
+ at the end), unless the environment variable
+@@ -394,7 +394,7 @@
+ The environment variable
+ .B GETOPT_COMPATIBLE
+ forces
-.B getopt
+.B gnugetopt
into compatibility mode. Setting both this environment variable and
.B POSIXLY_CORRECT
offers 100% compatibility for `difficult' programs. Usually, though,
-@@ -384,13 +384,13 @@ and
+@@ -406,13 +406,13 @@
.RB ` + '
characters in the short options string are ignored.
.SH RETURN CODES
-.B getopt
+.B gnugetopt
- returns error code
- .B 0
- for succesful parsing,
+ returns error code
+ .B 0
+ for successful parsing,
.B 1
if
-.BR getopt (3)
+.BR gnugetopt (3)
returns errors,
- .B 2
+ .B 2
if it does not understand its own parameters,
-@@ -401,15 +401,13 @@ if it is called with
+@@ -423,16 +423,14 @@
.BR \-T .
.SH EXAMPLES
Example scripts for (ba)sh and (t)csh are provided with the
-.BR getopt (1)
+.BR gnugetopt (1)
- distribution, and are optionally installed in
--.B /usr/local/lib/getopt
--or
--.BR /usr/lib/getopt .
+ distribution, and are optionally installed in
+-.B /usr/local/share/getopt
+-or
+-.BR /usr/share/getopt .
+.B /usr/local/share/examples/gnugetopt .
+
.SH ENVIRONMENT
.IP POSIXLY_CORRECT
This environment variable is examined by the
@@ -178,8 +197,8 @@
+.BR gnugetopt (3)
routines.
If it is set, parsing stops as soon as a parameter
- is found that is not an option or an option argument. All remaining
-@@ -418,14 +416,14 @@ whether they start with a
+ is found that is not an option or an option argument. All remaining
+@@ -441,14 +439,14 @@
.RB ` \- '.
.IP GETOPT_COMPATIBLE
Forces
@@ -191,7 +210,7 @@
-.BR getopt (3)
+.BR gnugetopt (3)
can parse long options with optional arguments that are given an empty optional
- argument (but can not do this for short options). This
+ argument (but can not do this for short options). This
-.BR getopt (1)
+.BR gnugetopt (1)
treats optional arguments that are empty as if they were not present.
Index: patches/patch-getopt_c
===================================================================
RCS file: /cvs/ports/misc/gnugetopt/patches/patch-getopt_c,v
retrieving revision 1.2
diff -u -r1.2 patch-getopt_c
--- patches/patch-getopt_c 18 Jan 2009 23:19:15 -0000 1.2
+++ patches/patch-getopt_c 23 Jan 2013 13:25:38 -0000
@@ -1,63 +1,24 @@
-$OpenBSD: patch-getopt_c,v 1.2 2009/01/18 23:19:15 jasper Exp $
---- getopt.c.orig Mon Nov 7 23:17:01 2005
-+++ getopt.c Mon Jan 19 00:17:18 2009
-@@ -88,7 +88,7 @@ void *our_malloc(size_t size)
- {
- void *ret=malloc(size);
- if (! ret) {
-- fprintf(stderr,_("%s: Out of memory!\n"),"getopt");
-+ fprintf(stderr,_("%s: Out of memory!\n"),"gnugetopt");
- exit(3);
- }
- return(ret);
-@@ -98,7 +98,7 @@ void *our_realloc(void *ptr, size_t size)
- {
- void *ret=realloc(ptr,size);
- if (! ret && size) {
-- fprintf(stderr,_("%s: Out of memory!\n"),"getopt");
-+ fprintf(stderr,_("%s: Out of memory!\n"),"gnugetopt");
- exit(3);
- }
- return(ret);
-@@ -231,8 +231,8 @@ int generate_output(char * argv[],int argc,const char
- void parse_error(const char *message)
- {
- if (message)
-- fprintf(stderr,"getopt: %s\n",message);
-- fputs(_("Try `getopt --help' for more information.\n"),stderr);
-+ fprintf(stderr,"gnugetopt: %s\n",message);
-+ fputs(_("Try `gnugetopt --help' for more information.\n"),stderr);
- exit(2);
- }
-
-@@ -323,9 +323,9 @@ void set_shell(const char *new_shell)
+--- getopt.c.orig Sun Aug 12 12:17:30 2012
++++ getopt.c Sun Jan 13 16:05:35 2013
+@@ -320,9 +320,9 @@
- void print_help(void)
+ static void __attribute__ ((__noreturn__)) print_help(void)
{
-- fputs(_("Usage: getopt optstring parameters\n"),stderr);
-- fputs(_(" getopt [options] [--] optstring parameters\n"),stderr);
-- fputs(_(" getopt [options] -o|--options optstring [options] [--]\n"),stderr);
-+ fputs(_("Usage: gnugetopt optstring parameters\n"),stderr);
-+ fputs(_(" gnugetopt [options] [--] optstring parameters\n"),stderr);
-+ fputs(_(" gnugetopt [options] -o|--options optstring [options] [--]\n"),stderr);
- fputs(_(" parameters\n"),stderr);
- fputs(_(" -a, --alternative Allow long options starting with single -\n"),stderr);
- fputs(_(" -h, --help This small usage guide\n"),stderr);
-@@ -335,7 +335,7 @@ void print_help(void)
- fputs(_(" -q, --quiet Disable error reporting by getopt(3)\n"),stderr);
- fputs(_(" -Q, --quiet-output No normal output\n"),stderr);
- fputs(_(" -s, --shell=shell Set shell quoting conventions\n"),stderr);
-- fputs(_(" -T, --test Test for getopt(1) version\n"),stderr);
-+ fputs(_(" -T, --test Test for gnugetopt(1) version\n"),stderr);
- fputs(_(" -u, --unqote Do not quote the output\n"),stderr);
- fputs(_(" -V, --version Output version information\n"),stderr);
- exit(2);
-@@ -443,7 +443,7 @@ int main(int argc, char *argv[])
- quote=0;
- break;
- case 'V':
-- printf(_("getopt (enhanced) 1.1.4\n"));
-+ printf(_("gnugetopt (enhanced) 1.1.4\n"));
- exit(0);
- case '?':
- case ':':
+- fputs(_("Usage: getopt optstring parameters\n"), stderr);
+- fputs(_(" getopt [options] [--] optstring parameters\n"), stderr);
+- fputs(_(" getopt [options] -o|--options optstring [options] [--]\n"), stderr);
++ fputs(_("Usage: gnugetopt optstring parameters\n"), stderr);
++ fputs(_(" gnugetopt [options] [--] optstring parameters\n"), stderr);
++ fputs(_(" gnugetopt [options] -o|--options optstring [options] [--]\n"), stderr);
+ fputs(_(" parameters\n"), stderr);
+ fputs(_("\nOptions:\n"), stderr);
+ fputs(_(" -a, --alternative Allow long options starting with single -\n"), stderr);
+@@ -333,7 +333,7 @@
+ fputs(_(" -q, --quiet Disable error reporting by getopt(3)\n"), stderr);
+ fputs(_(" -Q, --quiet-output No normal output\n"), stderr);
+ fputs(_(" -s, --shell <shell> Set shell quoting conventions\n"), stderr);
+- fputs(_(" -T, --test Test for getopt(1) version\n"), stderr);
++ fputs(_(" -T, --test Test for gnugetopt(1) version\n"), stderr);
+ fputs(_(" -u, --unquote Do not quote the output\n"), stderr);
+ fputs(_(" -V, --version Output version information\n"), stderr);
+ fputc('\n', stderr);