argtable / argtable3

A single-file, ANSI C, command-line parsing library that parses GNU-style command-line options.
http://www.argtable.org
Other
372 stars 65 forks source link

Add project to meson WrapDB #90

Open antoniovazquezblanco opened 7 months ago

antoniovazquezblanco commented 7 months ago

Meson build system provides a list of projects that are available to be downloaded and used as dependencies if not found in the compiling system.

It would be nice to have argtable available there!

https://mesonbuild.com/Wrapdb-projects.html

tomghuang commented 7 months ago

@antoniovazquezblanco : thanks for the suggestion. Are you familiar with how to package a library for Meson?

antoniovazquezblanco commented 7 months ago

Well, I have just recently started using Meson. I believe one must be able to compile the project with meson. That can be achieved via two options:

  1. In tree meson support
  2. A patch that is applied via the wrap mechanism

I don't know if you would like to have meson build system support in tree. I may be able to provide an initial version that may be improved on the future...

antoniovazquezblanco commented 7 months ago

As it turns out, meson now supports building cmake projects.

Initial approach to adding argtable to meson at https://github.com/mesonbuild/wrapdb/pull/1381

tomghuang commented 7 months ago

@antoniovazquezblanco : Really appreciate that you help to provide PR for meson support.

I'm curious. When you use argtable3, would you consider the amalgamation format first? When I use argtable3 in my own projects, I always add argtable3.c and argtable3.h to the source tree, so I don't need to worry about building argtable3 separately. May I know why you want to build argtable3 separately? Is it because you want to make it as a shared library? Thanks.

antoniovazquezblanco commented 7 months ago

Well, I could consider amalgamation and copy the files but I believe that would be a patch to a not very useful dependency system.

I can just add a couple lines in my build file and manage the dependency externally without effort. That should help me manage and track software versions. Whenever there is an update or an external change I do not need to copy files again, the build system can take care of that for me...

The idea would be to also be able to identify my external dependencies so that I can keep track of them and even track possible vulnerabilities in them.

Plus, if correctly defined, as you said if my OS provides a shared lib, I can compile my program without having it statically linked...

In the end, an amalgamation version is really nice when a good dependency manager is not available.

tomghuang commented 7 months ago

@antoniovazquezblanco : Thanks for your comment. Now I know why many developers asked me to support vcpkg, which I've supported since a few years ago.