Skip to content

Commit

Permalink
rip out getopt and replace it with yarg.
Browse files Browse the repository at this point in the history
yarg is a public domain argument parser written by the author of bzip3.
  • Loading branch information
kspalaiologos committed Dec 16, 2024
1 parent fd258cd commit 249b173
Show file tree
Hide file tree
Showing 7 changed files with 357 additions and 334 deletions.
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,6 @@ install(
if(BZIP3_BUILD_APPS)
add_executable(bzip3)
target_sources(bzip3 PRIVATE src/main.c)
check_symbol_exists(getopt_long "getopt.h" HAVE_GETOPT_LONG)
if(HAVE_GETOPT_LONG)
target_compile_definitions(bzip3 PRIVATE HAVE_GETOPT_LONG)
endif()
if(BZIP3_ENABLE_STATIC_EXE)
if(BUILD_SHARED_LIBS)
message(
Expand Down
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pkgconfig_DATA = bzip3.pc
include_HEADERS = include/libbz3.h
noinst_HEADERS = include/common.h \
include/libsais.h \
include/getopt-shim.h
include/yarg.h

lib_LTLIBRARIES = libbzip3.la
libbzip3_la_SOURCES = src/libbz3.c
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ A breakdown of components and their licenses follows:
- (compile-time) `build-aux/ax_check_compile_flag.m4`: Copyright 2008, Guido U. Draheim ([email protected]), 2011, Maarten Bosmans ([email protected]); FSFAP
- (compile-time) `build-aux/git-version-gen`: Copyright 2007-2012, Free Software Foundation, Inc; GPLv3
- (runtime) `bz3grep`: Copyright 2003, Thomas Klausner; BSD-2-clause
- (runtime) `include/getopt-shim.h`: Copyright 2005-2014, Rich Felker; Expat

`bzip3` as a whole is licensed under LGPLv3 only. It is not dual-licensed under LGPLv3 and Apache 2.0.

Expand Down
3 changes: 0 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ LT_INIT
PKG_PROG_PKG_CONFIG
PKG_INSTALLDIR

AC_CHECK_HEADERS([getopt.h])
AC_CHECK_FUNCS([getopt_long])

AC_C_RESTRICT

AC_ARG_WITH([pthread],
Expand Down
236 changes: 0 additions & 236 deletions include/getopt-shim.h

This file was deleted.

Loading

0 comments on commit 249b173

Please sign in to comment.