getopt/getopt_long C library
This is a build2 package for the
getopt_port C library. It provides
an original implementation of getopt and getopt_long with limited GNU
extensions, under a BSD license, so that non-GPL projects can use getopt-style
command-line parsing.
Upstream does not version or tag releases. This package is based on commit
9d3d387087d252970923db7f297f681622c4e026.
Usage
To start using libgetopt_port in your project, add the following depends
value to your manifest, adjusting the version constraint as appropriate:
depends: libgetopt_port ^0.0.1
Then import the library in your buildfile:
import libs = libgetopt_port%lib{getopt_port}
On Windows only the static variant is provided. The shared variant cannot
bind optarg / optind without dllimport in the upstream header, and the
MinGW CRT already defines getopt.
Public headers are installed into the getopt_port/ subdirectory and must be
included with that prefix:
#include <getopt_port/getopt.h>
A system-installed getopt (#include <getopt.h> / sys:libgetopt_port)
cannot be used as a substitute, because that header has no library-name
prefix.
Importable targets
This package provides the following importable targets:
lib{getopt_port}
On Windows only the static member is available.
Configuration variables
This package has no configuration variables.
| version | 0.0.1 |
|---|---|
| license | BSD-3-Clause |
| repository | https://pkg.cppget.org/1/testing |
| download | libgetopt_port-0.0.1.tar.gz |
| sha256 | 28e4d3be3b22dcc1ce1117ed43bc07077c2f9121a2e8455d87bba6503f9303a2 |
| project | getopt_port |
|---|---|
| url | github.com/kimgr/getopt_port |
| src-url | github.com/kimgr/getopt_port |
| package-url | github.com/build2-packaging/getopt_port |
| kim.grasman@gmail.com | |
| package-email | packaging@build2.orgMailing list |
Reviews
| fail | 0 |
|---|---|
| pass | 0 |
Builds
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.3 |
| tgt config | windows_10-msvc_17 |
| timestamp | 2026-11-02 08:12:26 UTC (04 14:54:28 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0-static_O3 |
| timestamp | 2026-11-02 03:30:12 UTC (04 19:36:42 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0-O3 |
| timestamp | 2026-11-02 03:29:08 UTC (04 19:37:46 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-clang_15.0 |
| timestamp | 2026-11-02 03:28:05 UTC (04 19:38:49 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64-static_O2 |
| timestamp | 2026-11-01 10:36:40 UTC (05 12:30:13 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64-O2 |
| timestamp | 2026-11-01 10:36:35 UTC (05 12:30:19 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-w64-mingw32 |
| tgt config | windows_10-gcc_15.2_mingw_w64 |
| timestamp | 2026-11-01 10:36:14 UTC (05 12:30:39 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19-O3 |
| timestamp | 2026-11-01 10:33:16 UTC (05 12:33:38 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd14.1 |
| tgt config | freebsd_14-clang_18 |
| timestamp | 2026-11-01 10:32:42 UTC (05 12:34:12 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19 |
| timestamp | 2026-11-01 10:32:32 UTC (05 12:34:22 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++-static_O3 |
| timestamp | 2026-11-01 10:30:34 UTC (05 12:36:19 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++ |
| timestamp | 2026-11-01 10:30:00 UTC (05 12:36:54 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22_libc++-O3 |
| timestamp | 2026-11-01 10:29:18 UTC (05 12:37:36 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22-static_O3 |
| timestamp | 2026-11-01 10:29:18 UTC (05 12:37:36 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-static_O3 |
| timestamp | 2026-11-01 10:28:52 UTC (05 12:38:02 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22-O3 |
| timestamp | 2026-11-01 10:28:50 UTC (05 12:38:04 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-ndebug_O3 |
| timestamp | 2026-11-01 10:28:21 UTC (05 12:38:32 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_22 |
| timestamp | 2026-11-01 10:28:05 UTC (05 12:38:49 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16-O3 |
| timestamp | 2026-11-01 10:27:57 UTC (05 12:38:56 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_21_libc++ |
| timestamp | 2026-11-01 10:27:18 UTC (05 12:39:36 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_15-O3 |
| timestamp | 2026-11-01 10:27:09 UTC (05 12:39:45 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_16 |
| timestamp | 2026-11-01 10:26:59 UTC (05 12:39:54 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-clang_21 |
| timestamp | 2026-11-01 10:26:55 UTC (05 12:39:58 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_15 |
| timestamp | 2026-11-01 10:26:06 UTC (05 12:40:48 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_fedora_44-gcc_16-bindist |
| timestamp | 2026-11-01 10:25:06 UTC (05 12:41:47 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18-static_O2 |
| timestamp | 2026-11-01 10:23:30 UTC (05 12:43:23 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18-O2 |
| timestamp | 2026-11-01 10:23:26 UTC (05 12:43:27 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18-static_O2 |
| timestamp | 2026-11-01 10:23:06 UTC (05 12:43:48 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-clang_21_msvc_18 |
| timestamp | 2026-11-01 10:22:45 UTC (05 12:44:08 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18-O2 |
| timestamp | 2026-11-01 10:22:39 UTC (05 12:44:15 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-microsoft-win32-msvc14.5 |
| tgt config | windows_10-msvc_18 |
| timestamp | 2026-11-01 10:22:25 UTC (05 12:44:28 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-freebsd15.0 |
| tgt config | freebsd_15-clang_19-static_O3 |
| timestamp | 2026-11-01 10:22:12 UTC (05 12:44:42 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin22.5.0 |
| tgt config | macos_13-clang_15.0 |
| timestamp | 2026-11-01 10:22:11 UTC (05 12:44:43 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_ubuntu_24.04-gcc_13-bindist |
| timestamp | 2026-11-01 10:22:07 UTC (05 12:44:46 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_debian_13-gcc_14-bindist |
| timestamp | 2026-11-01 10:21:59 UTC (05 12:44:55 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_fedora_43-gcc_15-bindist |
| timestamp | 2026-11-01 10:21:43 UTC (05 12:45:10 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-static_O3 |
| timestamp | 2026-11-01 10:20:35 UTC (05 12:46:19 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++-O3 |
| timestamp | 2026-11-01 10:19:59 UTC (05 12:46:55 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18_libc++ |
| timestamp | 2026-11-01 10:19:58 UTC (05 12:46:55 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18-static_O3 |
| timestamp | 2026-11-01 10:19:23 UTC (05 12:47:31 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18-O3 |
| timestamp | 2026-11-01 10:19:18 UTC (05 12:47:35 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-clang_18 |
| timestamp | 2026-11-01 10:18:48 UTC (05 12:48:06 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-static_O3 |
| timestamp | 2026-11-01 10:13:02 UTC (05 12:53:51 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-O3 |
| timestamp | 2026-11-01 10:13:01 UTC (05 12:53:53 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14-ndebug_O3 |
| timestamp | 2026-11-01 10:12:24 UTC (05 12:54:30 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_14 |
| timestamp | 2026-11-01 10:12:22 UTC (05 12:54:31 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-linux-gnu |
| tgt config | linux_ubuntu_26.04-gcc_15-bindist |
| timestamp | 2026-11-01 10:09:29 UTC (05 12:57:25 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | aarch64-linux-gnu |
| tgt config | linux_debian_12-gcc_13 |
| timestamp | 2026-11-01 10:05:50 UTC (05 13:01:03 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-gcc_14_homebrew-static_O3 |
| timestamp | 2026-10-18 13:09:01 UTC (19 09:57:52 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-gcc_14_homebrew-O3 |
| timestamp | 2026-10-18 13:07:59 UTC (19 09:58:54 days ago) |
| result | success | log | rebuild |
| toolchain | public-0.18.1 |
|---|---|
| target | x86_64-apple-darwin23.5.0 |
| tgt config | macos_14-gcc_14_homebrew |
| timestamp | 2026-10-18 13:07:01 UTC (19 09:59:53 days ago) |
| result | success | log | rebuild |