ntpsec doesn't build with waf >= 2.1.0
It seems waf switched from optparse to argparse in 2.1.0. If not using the waf script bundled with ntpsec (as might be required by distro-specific packaging guidelines), the build now fails with this error:
$ waf configure
Traceback (most recent call last):
File "/usr/share/waf3/waflib/Scripting.py", line 121, in waf_entry_point
run_commands()
~~~~~~~~~~~~^^
File "/usr/share/waf3/waflib/Scripting.py", line 180, in run_commands
parse_options()
~~~~~~~~~~~~~^^
File "/usr/share/waf3/waflib/Scripting.py", line 160, in parse_options
ctx.execute()
~~~~~~~~~~~^^
File "/usr/share/waf3/waflib/Options.py", line 201, in execute
super(OptionsContext,self).execute()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/share/waf3/waflib/Context.py", line 91, in execute
self.recurse([os.path.dirname(g_module.root_path)])
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/waf3/waflib/Context.py", line 132, in recurse
user_function(self)
~~~~~~~~~~~~~^^^^^^
File "/home/test/ntpsec/wscript", line 61, in options
options_cmd(ctx, config)
~~~~~~~~~~~^^^^^^^^^^^^^
File "/home/test/ntpsec/wafhelpers/options.py", line 47, in options_cmd
grp.add_option('--cross-compiler', type='string',
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
help="Path to cross compiler CC. (enables cross-compiling)")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib64/python3.13/argparse.py", line 1464, in add_argument
raise ValueError('%r is not callable' % (type_func,))
ValueError: 'string' is not callable
I'm not sure if it's possible to support both optparse and argparse at the same time. Please consider porting the code and upgrading the bundled waf version.