[gtkada] Patches for gtkada-2.24.4 with gnat-pro-17.x (and higher)
BEAUGY Alexandre
alexandre.beaugy at thalesgroup.com
Wed Mar 6 14:42:36 CET 2019
Dear all,
For those who still need to work with Gtk2 to build their Ada graphical
solution, but don't want to stay stuck with gnat(-pro) 7.2.2, and so using
gnat(-pro)-17.x (or higher), I've managed to setup a set of patches to allow
anyone to build a Gtk2 Ada project with gnat-pro-17.x (or higher).
First of all, I want to clarify a few things to explain my context:
- My target is el7.x86_64
- I want and I need to work with the latest gnat(-pro) available
- The GTK HMIs of my solution are stuck in gtk2 in the short-term (gtk3
migration only considered at a longer term)
- I don't want to carry an Adacore gtk2 binaries bundle at runtime (i.e.
gtk+-2.24.8-x86_64-pc-linux-gnu.tgz), so I'm working with gtk2 libraries
provided by el7
Now that the context is given, here is my approach:
First of all, to avoid any misunderstanding, the solution I will detail below
is mainly based on Fedora Project's work on gtkada2 (thanks to them), that's
why a big part of my solution come from there. But, as you will soon notice, I
did not do the full Fedora Project job, as I skipped all the "Fedora
Project -- Ada Packaging" specific stuff.
So let's go :
1. I first studied the patches extracted from GtkAda-2.24.2-19.fc24.src.rpm
and applicable to gtkada2-2.24.2
2. Then I did a(n incomplete) work of creating an equivalent set of patches
adapted to gtkada2-2.24.4, which led me to the following:
2.a. Patches *not* adapted:
(considered Fedora Project specific, or too much time consuming to fix, or
even already fixed in 2.24.*4*)
- GtkAda-2.14.1-multilib_gpr.patch
- GtkAda-2.14.1-multilib_gtkada-config.patch
- GtkAda-2.18.0-gl_placement.patch
- GtkAda-2.18.0-no_include_gmain.patch
- GtkAda-2.24.2-configuration-5.patch
- GtkAda-2.24.2-source_dir.patch
2.b. Patches adapted to gtkada2-2.24.2:
- GtkAda-2.18.0-link_as_needed.patch
- GtkAda-2.18.0-lm.patch
- GtkAda-2.24.2-man_xref.patch
- GtkAda-2.24.2-no_extern_inline.patch
- GtkAda-2.24.2-stringcopy.patch
3. I fixed GPR errors (non-blocking in gnat-pro-17.2 /*blocking* in
gnat-pro-19.1) in one last patch
(this patch includes one snippet -- simplified version of one debian GNU/Linux
script: library-cfg.sh
(https://salsa.debian.org/debian/ncurses/blob/stretch/Ada95/src/library-cfg.sh)
- GtkAda-2.24.4-gnatmake_cargs.patch
4. I determined the following order of application of patches based on
GtkAda.spec (from GtkAda-2.24.2-19.fc24.src.rpm):
4.a. GtkAda-2.18.0-lm.patch
4.b. GtkAda-2.18.0-link_as_needed.patch
4.c. GtkAda-2.24.2-man_xref.patch
4.d. GtkAda-2.24.2-stringcopy.patch
4.e. GtkAda-2.24.2-no_extern_inline.patch
4.f. GtkAda-2.24.4-gnatmake_cargs.patch
5. Then I built my gtkada2 that way:
rm -rf /var/tmp/maestro-env.WK01yNE3Io/gtkada-2.24.4-src
tar -C /var/tmp/maestro-env.WK01yNE3Io -xf gtkada-2.24.4-src.tgz
pushd /var/tmp/maestro-env.WK01yNE3Io/gtkada-2.24.4-src
patch -Np1 -i GtkAda-2.18.0-lm.patch
patch -Np1 -i GtkAda-2.18.0-link_as_needed.patch
patch -Np1 -i GtkAda-2.24.2-man_xref.patch
patch -Np1 -i GtkAda-2.24.2-stringcopy.patch
patch -Np1 -i GtkAda-2.24.2-no_extern_inline.patch
patch -Np1 -i GtkAda-2.24.4-gnatmake_cargs.patch
./configure
make
make install
popd
I finally checked that my solution build and run properly with my newly built
gtkada2-2.24.4.el7.x86-64.
It did!
Successfully tested with gnat-pro-17.2 and gnat-pro-19.1.
Hope this helps.
Best Regards,
--
Alexandre BEAUGY
[@@ OPEN @@]
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gtkada-2.24.4-src-patches.tar.xz
Type: application/octet-stream
Size: 4112 bytes
Desc: not available
URL: </pipermail/gtkada/attachments/20190306/ad4cf25d/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 7349 bytes
Desc: not available
URL: </pipermail/gtkada/attachments/20190306/ad4cf25d/attachment.bin>
More information about the gtkada
mailing list