[Gtk-sharp-list] Solve duplicate Cairo# library bindings issue
antoniusriha at gmail.com
Fri Oct 3 21:15:49 UTC 2014
-----BEGIN PGP SIGNED MESSAGE-----
First of all, thank you Bertrand for your detailed answer. Since this
issue concerns both, the gtk-sharp and mono dev communities, I've
added the respective mailing lists in CC. I've also noticed that Jo
Shields has been assigned to the bug I reported on the mono class
libraries component . In this email I'd like to explain what I'd
like to change about the current situation of cairo-sharp/Mono.Cairo.
Currently, the .NET/mono cairo bindings exist in two places: In the
mono repository and in the gtk-sharp repository. The two code bases
are fairly similar, but are not the same. I think both projects (mono
and gtk-sharp) would profit, if the cairo code bases would be merged
together into a single repository, because f.i. it wouldn't be
necessary to fix issues in 2 places. Hence, my bug reports  and .
To fix this issue, I suggest to put cairo-sharp into its own
repository on github. But instead of making it a standalone package
with all the implications (like releases and distro packages), I'd
make it a source code only repository with minimal build
infrastructure to facilitate development (i.e. MonoDevelop project
files). When doing that I would also make sure not to lose any git
history by using git-subtree on the mono and gtk-sharp repositories.
cairo-sharp would be included as a git submodule in mono and gtk-sharp
and both projects should be able to include it in their respective
build systems. Since we would be using git submodules, each project
could choose for itself, which commit ref to include.
About licensing: Bertrand reported that cairo-sharp in the gtk-sharp
repository is licensed under MIT/X11, according to the Debian
copyright file. Since both code bases use the same license, we
wouldn't have any problems merging them license-wise and the resulting
repository would also be licensed under MIT/X11.
I'd prepare the repository and the necessary pull requests for both
projects in my spare time, which would be mainly on weekends. I'd also
take on the maintenance duties for the new cairo-sharp repository,
which would mainly be reviewing and merging PRs.
Before starting work, I'd like to get confirmation from the mono side.
- From the gtk-sharp side, there are no fundamental objections AFAICT.
- - antonius
On 2014-10-02 22:05, Bertrand Lorentz wrote:
> Sorry for not replying earlier, I did file this under "need to
> think about it" but then...
> From what I know, cairo-sharp was only included in gtk-sharp for
> the case when Mono.Cairo is not available . Which means when
> building or using gtk-sharp with the .NET Framework, so on Windows.
> I guess nobody wants to build the whole of mono just to get a
> single assembly.
> From what I saw in the git history, up until work on GTK+ 3
> started, the API of the 2 code bases were aligned, and code was
> copied liberally from one to another. Then, when Mike Kestner
> started working on binding GTK+ 3, he needed new API from cairo
> 1.10, which he added in cairo sharp. Later, that API got merged
> into Mono.Cairo, and it should be available in mono 3.8.0.
> I've been working on making gtk-sharp default on using Mono.Cairo
> if mono
>> = 3.8 is available, but I haven't had the time to finish that
> My position right now is that any changes should go to Mono.Cairo
> first, and then be copied into cairo-sharp.
> I'd have no objection to spinning off cairo-sharp in it's own git
> repo. But I won't be able to maintain it. For gtk-sharp we just
> need an easy way to get cairo bindings on Windows, either through a
> git submodule, or an external dependency. So I guess this depends
> on the opinion of the Mono team. Have you contacted them about this
> (other than the bug ) ?
> I'm not sure there's any relicensing of cairo-sharp needed:
> although the whole of gtk-sharp is indicated as licensed under the
> LGPL, all the .cs files under cairo/ appear to have an MIT/X11
> header. And those files originate from Mono.Cairo anyways. In
> addition, the Debian copyright file for gtk-sharp 2.99.3  also
> states cairo/* is MIT/X11, and those guys know their licensing.
> I hope this helps,
> -- Bertrand
>  See the initial commit at
> On Tue, Sep 30, 2014 at 7:45 AM, Antonius Riha
> <antoniusriha at gmail.com> wrote:
> Does no one have an opinion on this?
> On 2014-09-14 13:02, Antonius Riha wrote:
>>>> Hi gtk-sharp community, I'm currently looking into the issue
>>>> that the cairo library binding code exists in 2 different
>>>> places: Once in the gtk-sharp repository and the second time
>>>> in the class libraries of the mono repository. In my opinion,
>>>> the 2 code bases are very similar and should be merged and
>>>> put into a separate repository. I've filed 2 bugs with the
>>>> respective components, see  and  for details.
>>>> Since the cairo bindings are not distributed as a standalone
>>>> package (but with gtk-sharp and mono), an eventual new
>>>> cairo-sharp git repository should only be used as a simple
>>>> source code container with a minimal MSBuild build
>>>> infrastructure for development. This repository can be
>>>> included in gtk-sharp and mono as git submodule. Since its
>>>> not a package per se, it doesn't make sense to set up an
>>>> autotools build system, which would just add to the repo
>>>> There are some issues with this task. Primarily, the two
>>>> libraries are licensed differently: The mono version it
>>>> licensed as MIT/X11, whereas the gtk-sharp version is under
>>>> LGPLv2. For merging the code, it would be best, if both had
>>>> the same license. Since the mono class libraries are
>>>> distributed as MIT/X11, I would suggest to attempt to
>>>> relicense the Cairo# portion of the gtk-sharp repository as
>>>> My questions to he community are: * Are there any other
>>>> opinions about this issue, or whether this is actually an
>>>> issue? * Which would be the necessary steps to relicense the
>>>> Cairo# protion of the code as MIT/X11?
>>>> - antonius
>>>>  https://bugzilla.xamarin.com/show_bug.cgi?id=22975
>>>>  https://bugzilla.xamarin.com/show_bug.cgi?id=22976
>>>>  About the gtk-sharp package license: Since (to my
>>>> knowledge) you can relicense MIT/X11 code as LGPLv2 without
>>>> consent of the code owners (but not the other way around), I
>>>> think it would be no problem to put the entire package
>>>> (including the imported submodule Cairo#) under LGPLv2. (Note
>>>> though that IANAL.)
>> _______________________________________________ Gtk-sharp-list
>> maillist - Gtk-sharp-list at lists.ximian.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
-----END PGP SIGNATURE-----
More information about the Gtk-sharp-list