FS#46961 - [mono] libgdiplus as optdepend?

Attached to Project: Arch Linux
Opened by Paul Mulders (justinkb) - Tuesday, 03 November 2015, 22:17 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:26 GMT
Task Type General Gripe
Category Packages: Extra
Status Closed
Assigned To Levente Polyak (anthraxx)
Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 5
Private No


Having libgdiplus as strict dependency means we have to pull in all kinds of X/GUI packages, directly and indirectly (via cairo particularly).

On a headless server this could be undesirable. There is plenty of mono software which doesn't use GDI+/System.Drawing at all, so perhaps we can make this optdepend with a note "required for GDI+ drawing functionality".

Of course, packages in the Arch Linux repositories and AUR that rely on mono AND libgdiplus can just explicitly depend on libgdiplus, so there's no problem there.

Looking at libgdiplus's reverse dependencies, I see only mono listed on the package web interface, so perhaps there are currently packages which would have to be changed should this change go through.
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:26 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/mono/issues/3
Comment by John M (iefbr14) - Monday, 29 January 2018, 23:28 GMT
I think this is a good idea. I maintain some "regular-size" Intel and some ARM-based (space-constrained) systems that require mono, but none of the libgdiplus dependencies. I've been creating my own mono package without the libgdiplus dependency. Its not a big deal to keep doing this, but it makes sense to build mono with libgdiplus as an optdepends.
Comment by Giancarlo Razzolini (grazzolini) - Tuesday, 30 January 2018, 15:30 GMT
I'm all pro in favor of listing all the direct dependencies of packages. But I think it would be best if we can come up with a list of these packages that would need to get changed and create a TODO for this.
Comment by John M (iefbr14) - Tuesday, 30 January 2018, 22:59 GMT
Let me preface by stating I'm not a C#/.NET/Mono expert (not even a little bit! :) but I figured there had to be an easy way to determine if any of the Arch packages that require mono ALSO require libgdiplus. So downloaded the packages listed at https://www.archlinux.org/packages/extra/x86_64/mono/ as follows:


I extracted each archive and used the monodis tool (comes with mono) with the --assemblyref option (https://linux.die.net/man/1/monodis) to examine each .exe and .dll file to see which used "System.Drawing". I assumed that if the exe/dll uses System.Drawing, it probably requires libgdiplus. I can't say for certain that is 100% valid, but it makes sense to me. :) http://www.mono-project.com/docs/gui/libgdiplus/

This is the list of exe/dll files which use System.Drawing:


So, assuming my test is valid, that means gtk-sharp-2, gtk-sharp-3, keepass, openbve, and openra require libgdiplus.

Hopefully this information helps at some point!
Comment by Giancarlo Razzolini (grazzolini) - Wednesday, 31 January 2018, 12:39 GMT

Thanks for looking into it. I can take care of keepass depending on it, since I maintain it. But we would need to create a todo for the remaining ones. I'm waiting for Levente's take on this though.
Comment by Steve M (smmalis37) - Saturday, 31 March 2018, 22:00 GMT
Any update here? I'm one of the people who would be strongly in favor of this change happening, but it seems this issue's been sitting idle for a few months now.
Comment by Giancarlo Razzolini (grazzolini) - Sunday, 01 April 2018, 02:30 GMT
Hi @Steve, I have not tested all this software to see if they work fine with libgdiplus as a dependency directly to them (I don't see why not) instead of mono. I can say that keepass works just fine without it. I'll talk with the devs of those packages and see if they are up to change them and, if so, prepare a todo for this.
Comment by Buggy McBugFace (bugbot) - Tuesday, 08 August 2023, 19:11 GMT
This is an automated comment as this bug is open for more then 2 years. Please reply if you still experience this bug otherwise this issue will be closed after 1 month.