Gtk-fortran for GTK 3 can now also be used as a fpm dependency and with MacPorts

The gtk3 branch of gtk-fortran has been exceptionnally updated with backports from gtk4 and can now be used as a fpm dependency. The Fortran interfaces have been regenerated: nothing new of course concerning GTK 3.24 itself (last GTK 3 version released in 2018), but it includes especially the latests GLib 2.80 and Cairo 1.18. See the CHANGELOG.md file.

You may be interested by this branch if you don’t plan to migrate toward GTK 4, or if you use Glade (For GTK 4, Cambalache is not yet in version 1.0). GTK 3.24.41 is also of course well debugged as shown by its patch version number.

To try it as a fpm dependency, you can start from this demo: GitHub - vmagnin/gtkzero_fpm at gtk3
Assuming you have already installed GTK 3 and its development files, just type fpm run and you should obtain (here in MSYS2 / Windows 10):
gtkzero_fpm_gtk3_MSYS2

Finally, if you want to discover gtk-fortran, you should generally rather start with the gtk4 branch where new developments are made since 2020.

16 Likes

A MacPort of that latest gtk3 branch is now available, thanks to @barracuda156:
https://ports.macports.org/port/gtk-fortran/

sudo port install gtk-fortran
3 Likes