The problemGNOME calculator is a handy little application. Long story short, it is a calculator application for GNOME as you all know. Written (and rewritten) for GNOME, it includes lexer, parser, and evaluation of expressions, plus a GTK+-based user interface to access the features of the calculation engine. This "engine" currently lives inside the projects' tree lib folder, and is used as a static library for the application. The library seemed fairly well split from the user interface, but it turned out there is a dependency on gtk textview, because of a mathematical equation subclassing Gtk.SourceBuffer (from gtktextview library) for easier handling, which is a subclass of Gtk.TextBuffer (from gtk+). So gtk+ is a transitive dependency of the calculator library. Moreso, the library also has a direct dependency on gtk+ due to having a reference to a Gtk.TextTag for "marking" the answer part of the equation to be able to reuse it and/or find it programatically in the text view or visually by marking it with bold characters.
With all these stated, you can see that if you would like to build a simple console application for evaluating expressions using this library, you would have to pull in gtk and gtksourceview as a dependency, which might not be the best thing to do.
It would be great to have the calculation engine without a dependency on any display toolkit so that it can be reused by projects. The library source could live inside gnome-calculator source tree, but could also live separately. I would go with the first option for now (looking easier to me), unless you have a good reason to move it to a separate git repo. And if you have, please share your reason.
The library licenseNow the harder question is: if we want the library to be used by other projects, what license should it use? Currently, as it lives inside the gnome-calculator tree, it is licensed using GPL(v3), but that has certain restrictions, and some people argue that LGPL is usually a better fit for libraries. I'm always afraid of licensing questions, and I'm always asking for help in these matters, so as the person asking for the library split was asking for a re-licensing of the library I got a bit worried. But fortunately it will not be the first relicensing in history, so there is quite some information on how to do it. And it involves contacting ALL authors to check if they are OK with the re-licensing. And there are quite a few authors, starting from easy-to-find people with email addresses to people without email addresses and to companies without contact (e.g. Sun Microsystems - acquired by Oracle since quite some time).
Daniel Espinoza Ortiz is working hard for quite some time to make this happen, with a couple of people jumping in with ideas and feedback on his MR or the related bug report.
Daniel has already contacted all the authors he could (with some level of success and some responses for accepting the relicensing), and he is working hard on re-implementing the parts of the code authored by people/entities who could not be contacted or who didn't respond.
Feedback is importantI can see the obvious benefit of these changes for the project am willing to continue (being translated to review and accept the related MR) with the re-licensing and library split, with the benefits outweighing the disadvantages to me. But I might have missed something you know or you have already experienced while doing something similar, so it would be great if you could help Daniel and us out to finish this transition in any of the following ways after checking the discussion in the MR or in the issue:
- if you are an author/contributor of any of the files in gnome-calculator/lib folder and you didn't receive anything related to re-licensing, please state if you accept or refuse the re-licensing from GPL to LGPL
- if you have any suggestions on the process (either re-licensing or splitting out a backend library of a project), what to look out for, just share in a quick comment here or in the MR or the issue
- if you have any suggestions on the MR, just join the discussion