BSD Ports

devel/gengetopt 2.23_1 MidnightBSD

Tool for generating a C function which parses command line arguments

System
MidnightBSD
Repository
mports
Maintainer
[email protected]
License
gpl3+
Categories
devel

Description

This program generate a C function that uses getopt_long function to parse the command line options, validate them and fill a struct.

Thus your program can now handle options such as:

myprog --input foo.c -o foo.o --no-tabs -i 100 \*.class

And both long options (those that start with --) and short options (start with - and consist of only one character) can be handled. For standards about short and long options you may want to take a look at the GNU Coding Standards.

In the other systems

SystemPortVersion
MidnightBSDdevel/gengetopt2.23_1
FreeBSDdevel/gengetopt2.23.1
OpenBSDdevel/gengetopt2.23.1
NetBSDdevel/gengetopt2.22.6
DragonFlydevel/gengetopt2.23_1
HardenedBSDdevel/gengetopt2.23.1
GhostBSDdevel/gengetopt2.23_1

Install

Binary package:

mport install gengetopt

From mports:

cd /usr/mports/devel/gengetopt && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	gengetopt>0:devel/gengetopt

Dependencies

Required by 1

Configuration

Options name: devel_gengetopt

OptionDefaultDescription
DOCSoff
EXAMPLESoff
USES
tar:xz
Service scripts
none

Files

Manual pages 1
  • gengetopt(1)
pkg-plist 5
  • bin/gengetopt
  • share/man/man1/gengetopt.1.gz
  • share/gengetopt/getopt.c
  • share/gengetopt/getopt1.c
  • share/gengetopt/gnugetopt.h
distinfo 1
FileSizeSHA256
gengetopt-2.23.tar.xz584860b941aec9011864978dd7fdeb052b1943535824169d2aa2b0e7eae9ab807584ac
Master sites 1
  • GNU