Re: Using DUB packages with Meson

2023-04-28 Thread Denis Feklushkin via Digitalmars-d-learn
On Thursday, 27 April 2023 at 20:48:45 UTC, Richard (Rikki) 
Andrew Cattermole wrote:

On 28/04/2023 1:43 AM, Denis Feklushkin wrote:
On Wednesday, 12 April 2023 at 10:06:22 UTC, Dmitry Olshansky 
wrote:

And I did fetch & build


What are possible ways to automate such download? Meson knows 
exactly which versions of packages suit to build. Is it 
possible, for example, to get somehow packages list and then 
download using dub fetch?


On dubs end yes, and yes.

$ dub build package@version


I guess I didn't express myself that way

How to get list of packages that can be passed to DUB by this way 
as above?


Re: Using DUB packages with Meson

2023-04-27 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn

On 28/04/2023 1:43 AM, Denis Feklushkin wrote:

On Wednesday, 12 April 2023 at 10:06:22 UTC, Dmitry Olshansky wrote:

And I did fetch & build


What are possible ways to automate such download? Meson knows exactly 
which versions of packages suit to build. Is it possible, for example, 
to get somehow packages list and then download using dub fetch?


On dubs end yes, and yes.

$ dub build package@version

```
$ dub search knocker
 registry at https://code.dlang.org/ (fallbacks registry at 
https://codemirror.dlang.org/, registry at https://dub.byt


ecraft.nl/, registry at https://code-mirror.dlang.io/) 
  knocker (1.0.3) Knocks on ports to open up another. Compatible with 
Knockd.

```

You can also get the entire manifest from dub-registry directly if you 
want it (you shouldn't need it).


Re: Using DUB packages with Meson

2023-04-27 Thread Denis Feklushkin via Digitalmars-d-learn
On Wednesday, 12 April 2023 at 10:06:22 UTC, Dmitry Olshansky 
wrote:

And I did fetch & build


What are possible ways to automate such download? Meson knows 
exactly which versions of packages suit to build. Is it possible, 
for example, to get somehow packages list and then download using 
dub fetch?




Re: Using DUB packages with Meson

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 12 April 2023 at 11:07:56 UTC, Richard (Rikki) 
Andrew Cattermole wrote:

Did you compile the library with dub using ldc2?


Yup, I do not have other compilers installed.

--
Dmitry Olshansky


Re: Using DUB packages with Meson

2023-04-12 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn

Did you compile the library with dub using ldc2?


Re: Using DUB packages with Meson

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 12 April 2023 at 10:24:48 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
I'm going to guess that you need to use the version specifier 
in the package name. Because I'm not seeing anything there to 
handle it specifically.


https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/dub.py

i.e. ``dub build [[@]] []``

So use ``package:sub@1.0.2``.

Also I just noticed meson doesn't support shared libraries from 
dub, so something to keep in mind.


I'm getting closer. I'm stuck with this at the moment:

Found DUB: /home/d.olshanskiy/bin/dub (DUB version 1.31.1, built 
on Mar 12 2023)

ERROR: strand found but it wasn't compiled with ldc
Run-time dependency strand found: NO

src/meson.build:22:0: ERROR: Dependency "strand" not found

--
Dmitry Olshansky


Re: Using DUB packages with Meson

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
On Wednesday, 12 April 2023 at 10:24:48 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
I'm going to guess that you need to use the version specifier 
in the package name. Because I'm not seeing anything there to 
handle it specifically.


https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/dub.py

i.e. ``dub build [[@]] []``

So use ``package:sub@1.0.2``.

Also I just noticed meson doesn't support shared libraries from 
dub, so something to keep in mind.


Oh, Rikki, you are so helpful. Thanks!

--
Dmitry Olshansky


Re: Using DUB packages with Meson

2023-04-12 Thread Richard (Rikki) Andrew Cattermole via Digitalmars-d-learn
I'm going to guess that you need to use the version specifier in the 
package name. Because I'm not seeing anything there to handle it 
specifically.


https://github.com/mesonbuild/meson/blob/master/mesonbuild/dependencies/dub.py

i.e. ``dub build [[@]] []``

So use ``package:sub@1.0.2``.

Also I just noticed meson doesn't support shared libraries from dub, so 
something to keep in mind.


Using DUB packages with Meson

2023-04-12 Thread Dmitry Olshansky via Digitalmars-d-learn
I'm trying to use my new DUB package from Photon, which is 
polyglot project and is built with Meson.


Have anyone worked with DUB packages in Meson? I've found this 
bit of documentation:

https://mesonbuild.com/Dependencies.html#dub

And I did fetch & build but I do not understand how to introduce 
library dependency on a specific DUB package.


--
Dmitry Olshansky