Mailing List Archive

Adding Ada support
Hi,

Can we add the following patch to the toolchain.eclass? I want to stop
having to mess with this overlay. The diff can be generated by grabbing
the repo https://github.com/Lucretia/ada-overlay and running
./scripts/diff_eclass.sh.

The only thing I'm not sure about is the BDEPEND stuff.

The reason for doing this is because gnat-gpl is dead, more info can be
found here https://www.adacore.com/community.

The
https://github.com/Lucretia/ada-overlay/tree/master/dev-lang/ada-bootstrap
ebuilds provide bootstrap compilers, the archives are hosted on dropbox,
from 9.5.0 -> 14.

The scripts/build-bootstrap.sh script will build a bootstrap for a
particular version based on an env var.

As for anything in dev-ada/* well, the ada guy would need to work on
that really, I'm not really experienced enough to handle it properly.

Given GCC is masked up to :10 now, the gnat gpr tools / libs might be
easier to get going with single versions covering numerous toolchain
versions.

Alire would need to be added at some point, http://alire.ada.dev/ to
provide an easier way to get packages going.

I originally envisioned gnatmake, gprbuild eclasses to cover building
simple projects with one entry point (gnatmake) and projects (gprbuild).
I think an alire based eclass would need to be added as well.

Thanks,
Luke.
Re: Adding Ada support [ In reply to ]
"Luke A. Guest" <laguest@archeia.com> writes:

> Hi,
>
> Can we add the following patch to the toolchain.eclass? I want to stop
> having to mess with this overlay. The diff can be generated by
> grabbing the repo https://github.com/Lucretia/ada-overlay and running
> ./scripts/diff_eclass.sh.

It'd be useful to send the whole lot with `git send-email` as proper
patches which could be `git am`'d.

>
> The only thing I'm not sure about is the BDEPEND stuff.

It looks OK from a glance.

>
> The reason for doing this is because gnat-gpl is dead, more info can
> be found here https://www.adacore.com/community.
>
> The
> https://github.com/Lucretia/ada-overlay/tree/master/dev-lang/ada-bootstrap
> ebuilds provide bootstrap compilers, the archives are hosted on
> dropbox, from 9.5.0 -> 14.
>

What is going to be a problem is using these. We'll need to build our
own.

> The scripts/build-bootstrap.sh script will build a bootstrap for a
> particular version based on an env var.
>

But if this works, I guess that's fine. It would be nice if there were
some we could use from elsewhere somewhat-official that other distros
are using, but if they don't exist, I guess we have to live with it.

We need to do the same for D.

> As for anything in dev-ada/* well, the ada guy would need to work on
> that really, I'm not really experienced enough to handle it properly.
>

Kind of curious as to your interest in Ada if you're not experienced
enough - not intended derogatorily, just know you've been interested
in Ada for a while so I wonder if dev-ada/* is somehow that different
or what..

I also wouldn't want to merge something if it's then going to conflict
with anything in dev-ada/*, so at least some coordination is required.

(To that end, cc'd toolchain@ and ada@.)

> Given GCC is masked up to :10 now, the gnat gpr tools / libs might be
> easier to get going with single versions covering numerous toolchain
> versions.
>
> Alire would need to be added at some point, http://alire.ada.dev/ to
> provide an easier way to get packages going.
>
> I originally envisioned gnatmake, gprbuild eclasses to cover building
> simple projects with one entry point (gnatmake) and projects
> (gprbuild). I think an alire based eclass would need to be added as
> well.
>
> Thanks,
> Luke.
>
> [2. text/x-patch; gentoo-diff.patch]...
Re: Adding Ada support [ In reply to ]
On 09/12/2023 15:12, Sam James wrote:
>
> "Luke A. Guest" <laguest@archeia.com> writes:
>
>> Hi,
>>
>> Can we add the following patch to the toolchain.eclass? I want to stop
>> having to mess with this overlay. The diff can be generated by
>> grabbing the repo https://github.com/Lucretia/ada-overlay and running
>> ./scripts/diff_eclass.sh.
>
> It'd be useful to send the whole lot with `git send-email` as proper
> patches which could be `git am`'d.

Can't really do that as you'd get a lot of stuff that's not required for
portage.

>>
>> The only thing I'm not sure about is the BDEPEND stuff.
>
> It looks OK from a glance.
>
>>
>> The reason for doing this is because gnat-gpl is dead, more info can
>> be found here https://www.adacore.com/community.
>>
>> The
>> https://github.com/Lucretia/ada-overlay/tree/master/dev-lang/ada-bootstrap
>> ebuilds provide bootstrap compilers, the archives are hosted on
>> dropbox, from 9.5.0 -> 14.
>>
>
> What is going to be a problem is using these. We'll need to build our
> own.

You can use those to build your own then as you need a bootstrap to
start with.

>> The scripts/build-bootstrap.sh script will build a bootstrap for a
>> particular version based on an env var.
>>
>
> But if this works, I guess that's fine. It would be nice if there were
> some we could use from elsewhere somewhat-official that other distros
> are using, but if they don't exist, I guess we have to live with it.
>
> We need to do the same for D.

As I said, these are built and packaged as tars, you could change the
script to add in d as well if you wanted. It's not a complex script, it
builds what is needed and dumps it to /tmp/opt/ and then installs it to
/opt with the ebuild.

>> As for anything in dev-ada/* well, the ada guy would need to work on
>> that really, I'm not really experienced enough to handle it properly.
>>
>
> Kind of curious as to your interest in Ada if you're not experienced
> enough - not intended derogatorily, just know you've been interested
> in Ada for a while so I wonder if dev-ada/* is somehow that different
> or what..

I'm not experienced enough with ebuilds.

>
> I also wouldn't want to merge something if it's then going to conflict
> with anything in dev-ada/*, so at least some coordination is required.
>
> (To that end, cc'd toolchain@ and ada@.)

Yes, as I state in the README, I disable all the ::gentoo ada stuff with
another script.

>> Given GCC is masked up to :10 now, the gnat gpr tools / libs might be
>> easier to get going with single versions covering numerous toolchain
>> versions.
>>
>> Alire would need to be added at some point, http://alire.ada.dev/ to
>> provide an easier way to get packages going.
>>
>> I originally envisioned gnatmake, gprbuild eclasses to cover building
>> simple projects with one entry point (gnatmake) and projects
>> (gprbuild). I think an alire based eclass would need to be added as
>> well.
>>
>> Thanks,
>> Luke.
>>
>> [2. text/x-patch; gentoo-diff.patch]...
>
>
Re: Adding Ada support [ In reply to ]
and FYI, I've been utilising this overlay for Ada for over a year.
Re: Adding Ada support [ In reply to ]
And this is what gcc:13 +ada would install:
https://gist.github.com/Lucretia/4837322a4d4ea331246600513ed40aaf


On 09/12/2023 15:30, Luke A. Guest wrote:
> and FYI, I've been utilising this overlay for Ada for over a year.
>
Re: Adding Ada support [ In reply to ]
>> Can we add the following patch to the toolchain.eclass? I want to stop
>> having to mess with this overlay. The diff can be generated by
>> grabbing the repo https://github.com/Lucretia/ada-overlay and running
>> ./scripts/diff_eclass.sh.
>
> It'd be useful to send the whole lot with `git send-email` as proper
> patches which could be `git am`'d.
>

Ok, just looked at this. I don't have sendmail installed here. Due to
the way I've worked on this, the only way I know how to btw and which
was pointed to initially on the #gentoo-* channels. Which is to have a
remote (covered in the README from today) in which I can diff the eclass
with my version to make sure I only ever have ada changes and cherry
pick what I need into my eclass.

If there is a way, I'll send it, but you'll need to guide me on what I
need to do to do it.

Thanks,
Luke.
Re: Adding Ada support [ In reply to ]
On 09/12/2023 15:12, Sam James wrote:
>
> "Luke A. Guest" <laguest@archeia.com> writes:
>
>> Hi,
>>
>> Can we add the following patch to the toolchain.eclass? I want to stop
>> having to mess with this overlay. The diff can be generated by
>> grabbing the repo https://github.com/Lucretia/ada-overlay and running
>> ./scripts/diff_eclass.sh.
>
> It'd be useful to send the whole lot with `git send-email` as proper
> patches which could be `git am`'d.

This is the best I can do rn.
Re: Adding Ada support [ In reply to ]
Sorry about the spam, I just squashed the two commits together.
Re: Adding Ada support [ In reply to ]
On 12/9/23 10:51 AM, Luke A. Guest wrote:
>>> Can we add the following patch to the toolchain.eclass? I want to stop
>>> having to mess with this overlay. The diff can be generated by
>>> grabbing the repo https://github.com/Lucretia/ada-overlay and running
>>> ./scripts/diff_eclass.sh.
>>
>> It'd be useful to send the whole lot with `git send-email` as proper
>> patches which could be `git am`'d.
>>
>
> Ok, just looked at this. I don't have sendmail installed here. Due to
> the way I've worked on this, the only way I know how to btw and which
> was pointed to initially on the #gentoo-* channels. Which is to have a
> remote (covered in the README from today) in which I can diff the eclass
> with my version to make sure I only ever have ada changes and cherry
> pick what I need into my eclass.
>
> If there is a way, I'll send it, but you'll need to guide me on what I
> need to do to do it.


The git send-email tools don't require mail-mta/sendmail installed, but
they do need git to be built with USE=perl. That being said, not
everyone is familiar with how to actually use `git send-email`, it can
be a bit tricky to set it up to connect with your email account via
SMTP. In particular, if your provider doesn't like you to authenticate
without OAuth.

If you like, there's a way to prepare your patches via a guided web UI
workflow: https://man.sr.ht/git.sr.ht/#sending-patches-upstream

tl;dr push your repository to https://git.sr.ht and have it send out the
commits you select to the email address you select.

Hope that helps,

--
Eli Schwartz