mesonbuild / wrapdb

New wrap requests
https://mesonbuild.com/Adding-new-projects-to-wrapdb.html
MIT License
69 stars 174 forks source link

zpp_bits: Add new wrap 4.4.22 #1574

Open QWERTIOX opened 3 days ago

QWERTIOX commented 3 days ago

I'm not sure if meson_version: '>=1.0.1' should be so high but this is the one i'm using right now

QWERTIOX commented 3 days ago

of course sanity checks pass on local machine...

benoit-pierre commented 3 days ago

You forgot to update releases.json.

As for the meson_version: '>=1.0.1' requirement, there's no reason for it.

QWERTIOX commented 3 days ago

wait, i include whole directory and not just .h file

benoit-pierre commented 3 days ago

Why?

QWERTIOX commented 3 days ago

because it was including junk like readme.md and I could't find another way to move this header file or force including just header file

benoit-pierre commented 3 days ago

If by included, you mean add the directory to the include flags, yes… So? You're afraid someone is going to use #include <README.md>?

And you could have just used fs.copyfile to copy the include to an include sub-directory at setup.

QWERTIOX commented 3 days ago

i tried and it didn't see the include directory

benoit-pierre commented 3 days ago

Please post the code you used.

QWERTIOX commented 3 days ago
project(
  'zpp_bits',
  'cpp',
  version: '4.4.22',
  license: 'MIT',
)
fs = import('fs')
copy = fs.copyfile('zpp_bits.h', 'include')

incdir = include_directories('include')

zpp_bits_dep = declare_dependency(include_directories: include_directories())
benoit-pierre commented 3 days ago

That's not how fs.copyfile work:

dest str: the name of the output file. If unset will be the basename of the src argument

Try something like this:

subdir('include')

zpp_bits_dep = declare_dependency(include_directories: incdir)

- `include/meson.build`:
```meson
copy = import('fs').copyfile('../zpp_bits.h')

incdir = include_directories('.')
benoit-pierre commented 3 days ago

(And go back to the original upstream source distribution).

QWERTIOX commented 3 days ago

i think meson.build will still be included this way

benoit-pierre commented 3 days ago

What do you mean included? declare_dependency is not creating an archive.

QWERTIOX commented 3 days ago

i mean it's in the same directory as header

benoit-pierre commented 3 days ago

IHMO, you could have kept the original code. The real use case for fs.copyfile with respect to headers is to avoid making private headers accessible when they are mixed with public ones, particularly things like headers with generic names, like config.h.

i mean it's in the same directory as header

So? You'll have multiple instances of that in the wraps provided (with makefiles, source files…). Unless someone is foolish enough to try to include<meson.build>, what is the harm exactly?

QWERTIOX commented 3 days ago

maybe i'm perfectionist but i don't like that my tools reports that meson.build is one of the headers ready to be included

QWERTIOX commented 3 days ago

but as you mentioned, other wraps do that so now i don't care

QWERTIOX commented 3 days ago

of course i'm stupid - i forget to set c++ at least to c++20