[Mono-dev] [Gtk-sharp-list] Solve duplicate Cairo# library bindings issue

Antonius Riha antoniusriha at gmail.com
Fri Oct 3 21:15:49 UTC 2014


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi everyone,
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 [1]. 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 [1] and [2].

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


[1] https://bugzilla.xamarin.com/show_bug.cgi?id=22976
[2] https://bugzilla.xamarin.com/show_bug.cgi?id=22975

On 2014-10-02 22:05, Bertrand Lorentz wrote:
> Hello,
> 
> 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 [1]. 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
>> yet.
> 
> 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  [2] also 
> states cairo/* is MIT/X11, and those guys know their licensing.
> 
> I hope this helps,
> 
> -- Bertrand
> 
> [1] See the initial commit at 
> https://github.com/mono/gtk-sharp/commit/81e6815080
> 
> [2] 
> http://metadata.ftp-master.debian.org/changelogs//main/g/gtk-sharp3/gtk-sharp3_2.99.3-2_copyright
>
> 
> 
> 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 [1] and [2] 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
>>>> overhead.
>>>> 
>>>> 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
>>>> MIT/X11.[3]
>>>> 
>>>> 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
>>>> 
>>>> 
>>>> [1] https://bugzilla.xamarin.com/show_bug.cgi?id=22975
>>>> 
>>>> [2] https://bugzilla.xamarin.com/show_bug.cgi?id=22976
>>>> 
>>>> [3] 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 
>> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEcBAEBAgAGBQJULxIFAAoJEI2lsCv1vbcL8R0IAKxM3qd2u1gJ6+fifOKXevIE
N3NVzpP5l/+ZXRpAQXm3yuFVgbpTPEBbfnXLCDtyqUJQjS6e4XzuUiFYiCXGc7ME
TJF5KSBo0gKnmM+mTBhx2H5VV/SkkICkB68fioDz1XmkbXSnIbU5oWUL9yehaJp0
tc6FqltQW9ax36H5c2t2hyI1f/G6U7n7oRn8pBDSGod64ulsveZlJf+WW1b2pK56
fk/j8a5nHCvRhF9eJnK0e3L7Sv9aaa8HxsroGQBiGAkhJ+H6qdogjImJI7AHPbf1
e/Y/EMTN+OObLhoL0DWOQgViuz52cheDIBxtTFS6rIAzNx1Ls+haK7IAjiDEU8s=
=hLmW
-----END PGP SIGNATURE-----


More information about the Mono-devel-list mailing list