Adding GTK# package
v4 cover Adding GTK# package
This patch adds GTK# gui librrary for mono and enables inclusion of future third party mono software libreries.
---
Changes v3 -> v4:
- Adding missing eval autools line
Changes v1 -> v3:
- General patch cleaning
Angelo Compagnucci (3):
package/mono: enable mono library compilation
system: Defaulting TZ_LOCALTIME to UTC
package/gtksharp: new package
Angelo Compagnucci (3):
package/mono: enable mono library compilation
system: Defaulting TZ_LOCALTIME to UTC
package/gtksharp: new package
package/Config.in | 5 +++++ package/gtksharp/Config.in | 9 +++++++++ package/gtksharp/gtksharp.mk | 15 +++++++++++++++ package/mono/mono.mk | 1 - system/Config.in | 1 + 5 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 package/gtksharp/Config.in create mode 100644 package/gtksharp/gtksharp.mk
Signature · 1 line
1.9.1
PATCH v4 1/3 package/mono: enable mono library compilation
This patch enables the compilation of mono library to be used in third party software.
--- package/mono/mono.mk | 1 - 1 file changed, 1 deletion(-)
package/mono/mono.mk +0 -1
@@ -21,7 +21,6 @@ MONO_AUTORECONF = YES MONO_CONF_OPTS = --disable-gtk-doc \ --with-mcs-docs=no \ --with-moonlight=no \ - --disable-libraries \ --with-ikvm-native=no \ --enable-minimal=aot,profiler,debug \ --disable-mcs-build \
Signature · 1 line
1.9.1
PATCH v4 1/3 package/mono: enable mono library compilation
Dear Angelo Compagnucci,
package/mono/mono.mk MONO_AUTORECONF = YES · line 26
Quoted 12 lines · Angelo Compagnucci
package/mono/mono.mk +0
-1@@ -21,7 +21,6 @@ MONO_AUTORECONF = YES MONO_CONF_OPTS = --disable-gtk-doc \ --with-mcs-docs=no \ --with-moonlight=no \ - --disable-libraries \ --with-ikvm-native=no \ --enable-minimal=aot,profiler,debug \ --disable-mcs-build \
Apparently, Mono was working fine with --disable-libraries, as long as no third party libraries are used. So should we make this optional instead? What is the size impact of this (i.e a Mono build with --disable-libraries, and a Mono build without --disable-libraries), in terms of installed size? If the size difference is small compared to the overall size of Mono, then I'm fine for doing it unconditionally.
Could you comment on this?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 1/3 package/mono: enable mono library compilation
Dear Thomas Petazzoni,
2015-02-14 7:58 GMT+01:00 Thomas Petazzoni
<[email protected]>:
Quoted 24 lines
Dear Angelo Compagnucci,
package/mono/mono.mk MONO_AUTORECONF = YES · line 26
Quoted 12 lines · Angelo Compagnucci
package/mono/mono.mk +0
-1@@ -21,7 +21,6 @@ MONO_AUTORECONF = YES MONO_CONF_OPTS = --disable-gtk-doc \ --with-mcs-docs=no \ --with-moonlight=no \ - --disable-libraries \ --with-ikvm-native=no \ --enable-minimal=aot,profiler,debug \ --disable-mcs-build \Apparently, Mono was working fine with --disable-libraries, as long as no third party libraries are used. So should we make this optional instead? What is the size impact of this (i.e a Mono build with --disable-libraries, and a Mono build without --disable-libraries), in terms of installed size? If the size difference is small compared to the overall size of Mono, then I'm fine for doing it unconditionally.
Quoted 1 line
Could you comment on this?
libmono* size is ~6mb and the overrall size of mono with only 4.5 libraries is ~60mb so it's a ~3.6%. If think it's too much, I'll add an option to enable/disable compilation of it.
I think that the size is small (if compared to the entire size) and could be enabled without too much thinking. Obviously, a user can manually remove files he/she not uses, there are tons of libraries rarely used that can be removed. But this is an optimization step that only the software developer can do.
Sincerely, Angelo
Quoted 8 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo
PATCH v4 1/3 package/mono: enable mono library compilation
Dear Angelo Compagnucci,
Quoted 3 lines · Angelo Compagnucci
libmono* size is ~6mb and the overrall size of mono with only 4.5 libraries is ~60mb so it's a ~3.6%. If think it's too much, I'll add an option to enable/disable compilation of it.
6 MB of 60 MB is 10%, not 3.6%. But ok, fair enough, I believe it's quite reasonable to have this by default: Mono is anyway a huge beast. I'll apply this patch.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 1/3 package/mono: enable mono library compilation
Dear Thomas Petazzoni,
2015-02-14 10:17 GMT+01:00 Thomas Petazzoni
<[email protected]>:
Quoted 9 lines
Dear Angelo Compagnucci,
Quoted 3 lines · Angelo Compagnucci
libmono* size is ~6mb and the overrall size of mono with only 4.5 libraries is ~60mb so it's a ~3.6%. If think it's too much, I'll add an option to enable/disable compilation of it.
6 MB of 60 MB is 10%, not 3.6%.
Honestly I don't know why i wrote such and idiocy, sorry!
Quoted 9 lines
But ok, fair enough, I believe it's
quite reasonable to have this by default: Mono is anyway a huge beast. I'll apply this patch.Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo
Thomas Petazzoni
AppliedPATCH v4 1/3 package/mono: enable mono library compilation
In reply to Angelo CompagnucciDear Angelo Compagnucci,
Quoted 4 lines · Angelo Compagnucci
This patch enables the compilation of mono library to be used in third party software.
Signed-off-by Angelo Compagnucci <[email protected]>
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 2/3 system: Defaulting TZ_LOCALTIME to UTC
In reply to Angelo CompagnucciThis patch sets the default timezone to UTC if not overwritten. Some packages need a configured system timezone for properly operating like mono based software.
--- system/Config.in | 1 + 1 file changed, 1 insertion(+)
system/Config.in +1 -0
@@ -371,6 +371,7 @@ config BR2_TARGET_TZ_ZONELIST config BR2_TARGET_LOCALTIME string "default local time" + default "Etc/UTC" help The time zone to install as the default local time, expressed as a tzdata location, such as:
Signature · 1 line
1.9.1
PATCH v4 2/3 system: Defaulting TZ_LOCALTIME to UTC
Dear Angelo Compagnucci,
Quoted 14 lines · Angelo Compagnucci
This patch sets the default timezone to UTC if not overwritten. Some packages need a configured system timezone for properly operating like mono based software.
Signed-off-by Angelo Compagnucci <[email protected]>--- system/Config.in | 1 + 1 file changed, 1 insertion(+)system/Config.in +0
-0
system/Config.in config BR2_TARGET_TZ_ZONELIST · line 377
Quoted 7 lines
system/Config.in +1
-0@@ -371,6 +371,7 @@ config BR2_TARGET_TZ_ZONELIST config BR2_TARGET_LOCALTIME string "default local time" + default "Etc/UTC" help The time zone to install as the default local time, expressed as a tzdata location, such as:
Can you give more details as to what doesn't work with the current default of an empty local time? An empty local time already means UTC, so there should be no need to specify Etc/UTC as the local time.
Improving the commit log to give more details about the exact failure solved by this patch would be useful.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 2/3 system: Defaulting TZ_LOCALTIME to UTC
Dear Thomas Petazzoni,
2015-02-14 8:36 GMT+01:00 Thomas Petazzoni
<[email protected]>:
Quoted 29 lines
Dear Angelo Compagnucci,
Quoted 14 lines · Angelo Compagnucci
This patch sets the default timezone to UTC if not overwritten. Some packages need a configured system timezone for properly operating like mono based software.
Signed-off-by Angelo Compagnucci <[email protected]>--- system/Config.in | 1 + 1 file changed, 1 insertion(+)system/Config.in +0
-0system/Config.in config BR2_TARGET_TZ_ZONELIST · line 377
Quoted 7 lines
system/Config.in +1
-0@@ -371,6 +371,7 @@ config BR2_TARGET_TZ_ZONELIST config BR2_TARGET_LOCALTIME string "default local time" + default "Etc/UTC" help The time zone to install as the default local time, expressed as a tzdata location, such as:Can you give more details as to what doesn't work with the current default of an empty local time? An empty local time already means UTC, so there should be no need to specify Etc/UTC as the local time.
Quoted 2 lines
Improving the commit log to give more details about the exact failure solved by this patch would be useful.
I just discovered that problems is in the whole Mono libraries, not only in gtk#.
Without /etc/timezone and /etc/localtime files this is the error:
System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.
at System.TimeZoneInfo.get_Local () [0x00000] in <filename unknown>:0 at System.CurrentSystemTimeZone.GetUtcOffset (DateTime time)
[0x00000] in <filename unknown>:0
at System.TimeZone.GetLocalTimeDiff (DateTime time) [0x00000] in
<filename unknown>:0
at System.DateTime.get_Now () [0x00000] in <filename unknown>:0 at MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.TimeZoneNotFoundException:
Exception of type 'System.TimeZoneNotFoundException' was thrown.
at System.TimeZoneInfo.get_Local () [0x00000] in <filename unknown>:0 at System.CurrentSystemTimeZone.GetUtcOffset (DateTime time)
[0x00000] in <filename unknown>:0
at System.TimeZone.GetLocalTimeDiff (DateTime time) [0x00000] in
<filename unknown>:0
at System.DateTime.get_Now () [0x00000] in <filename unknown>:0 at MainClass.Main (System.String[] args) [0x00000] in <filename unknown>:0
Mono libraries wants an explicit localtime to work, cannot be empty.
I do you suggest to solve this problem? Obviously it belongs to the mono package, but how to solve it in a clean way?
Quoted 8 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo
PATCH v4 2/3 system: Defaulting TZ_LOCALTIME to UTC
In reply to Angelo CompagnucciAngelo, All,
On 2015-02-12 14:49 +0100, Angelo Compagnucci spake thusly:
Quoted 5 lines
This patch sets the default timezone to UTC if not overwritten. Some packages need a configured system timezone for properly operating like mono based software.
Signed-off-by Angelo Compagnucci <[email protected]>
I was at first a bit sceptic about the "Etc/" prefix, but indeed, UTC is not a "top-level" timezone; I was confusing it with GMT, which is a "top-level" timezone. So:
Regards,
Yann E. MORIN.
Quoted 23 lines
--- system/Config.in | 1 + 1 file changed, 1 insertion(+)system/Config.in +1
-0@@ -371,6 +371,7 @@ config BR2_TARGET_TZ_ZONELIST config BR2_TARGET_LOCALTIME string "default local time" + default "Etc/UTC" help The time zone to install as the default local time, expressed as a tzdata location, such as:Signature · 6 lines
1.9.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH v4 2/3 system: Defaulting TZ_LOCALTIME to UTC
In reply to Angelo CompagnucciDear Angelo Compagnucci,
Quoted 5 lines · Angelo Compagnucci
This patch sets the default timezone to UTC if not overwritten. Some packages need a configured system timezone for properly operating like mono based software.
Signed-off-by Angelo Compagnucci <[email protected]>
Applied to next, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 3/3 package/gtksharp: new package
In reply to Angelo CompagnucciThis patch adds gtksharp package for mono.
--- package/Config.in | 5 +++++ package/gtksharp/Config.in | 9 +++++++++ package/gtksharp/gtksharp.mk | 15 +++++++++++++++ 3 files changed, 29 insertions(+) create mode 100644 package/gtksharp/Config.in create mode 100644 package/gtksharp/gtksharp.mk
package/Config.in +5 -0
@@ -464,6 +464,11 @@ menu "Lua libraries/modules" endmenu endif source "package/mono/Config.in" +if BR2_PACKAGE_MONO +menu "Mono libraries/modules" + source "package/gtksharp/Config.in" +endmenu +endif source "package/nodejs/Config.in" source "package/perl/Config.in" if BR2_PACKAGE_PERL
package/gtksharp/Config.in new file +9 -0
@@ -0,0 +1,9 @@ +config BR2_PACKAGE_GTKSHARP + bool "gtk#" + depends on BR2_PACKAGE_MONO + select BR2_PACKAGE_LIBGTK3 + select BR2_TARGET_TZ_INFO + help + Gtk# is a .NET language binding for the GTK+ toolkit. + + http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.99/
package/gtksharp/gtksharp.mk new file +15 -0
@@ -0,0 +1,15 @@ +############################################################# +# +# gtksharp +# +############################################################# + +GTKSHARP_VERSION = 2.99.3 +GTKSHARP_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.99/ +GTKSHARP_SOURCE = gtk-sharp-$(GTKSHARP_VERSION).tar.xz +GTKSHARP_LICENSE = LGPLv2 +GTKSHARP_LICENSE_FILES = COPYING +GTKSHARP_INSTALL_STAGING = YES +GTKSHARP_DEPENDENCIES += mono libgtk3 + +$(eval $(autotools-package))
Signature · 1 line
1.9.1
PATCH v4 3/3 package/gtksharp: new package
Dear Angelo Compagnucci,
package/gtksharp/Config.in line 3
Quoted 9 lines · Angelo Compagnucci
package/gtksharp/Config.in new file +3
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_GTKSHARP + bool "gtk#" + depends on BR2_PACKAGE_MONO
Not needed, since this Config.in file is already only included if Mono is enabled, as per your change in package/Config.in.
package/gtksharp/Config.in line 4
Quoted 1 line
package/gtksharp/Config.in new file +1
-0+ select BR2_PACKAGE_LIBGTK3
You can't just select libgtk3, you also need to inherit all its dependencies. However, I am not sure in such situation if we really want to "select" libgtk3 or to "depend" on it. The reason is that by using "select", the user may not necessarily go to the libgtk3 option to select the display backend. And by default, the display backend is the Broadway backend, which most likely isn't what the user wants.
So for this case, I would personally lean towards using "depends on BR2_PACKAGE_LIBGTK3", especially since it's quite obvious for the user who wants gtk# that the gtk library should be installed.
package/gtksharp/Config.in line 5
Quoted 1 line
package/gtksharp/Config.in new file +1
-0+ select BR2_TARGET_TZ_INFO
More details about why tz information are needed would be useful. In any case, this should be:
select BR2_TARGET_TZ_INFO if BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBC
because the BR2_TARGET_TZ_INFO option is not available for Musl toolchains.
package/gtksharp/Config.in line 9
Quoted 4 lines
package/gtksharp/Config.in new file +4
-0+ help + Gtk# is a .NET language binding for the GTK+ toolkit. + + http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.99/
In the Config.in help text, we want the main web site of the project, not the download URL. So most likely, this should instead be:
package/gtksharp/gtksharp.mk line 5
Quoted 11 lines
package/gtksharp/gtksharp.mk new file +5
-0@@ -0,0 +1,15 @@ +############################################################# +# +# gtksharp +# +#############################################################
80 # signs are the convention.
package/gtksharp/gtksharp.mk line 8
Quoted 3 lines
package/gtksharp/gtksharp.mk new file +3
-0+ +GTKSHARP_VERSION = 2.99.3 +GTKSHARP_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.99/
Please use the GTKSHARP_VERSION_MAJOR thing used in several other packages:
GTKSHARP_VERSION_MAJOR = 2.99GTKSHAP_VERSION = $(GTKSHARP_VERSION_MAJOR).3 GTKSHARP_SITE = ......./gtk-sharp/$(GTKSHARP_VERSION_MAJOR)/
package/gtksharp/gtksharp.mk line 13
Quoted 5 lines
package/gtksharp/gtksharp.mk new file +5
-0+GTKSHARP_SOURCE = gtk-sharp-$(GTKSHARP_VERSION).tar.xz +GTKSHARP_LICENSE = LGPLv2 +GTKSHARP_LICENSE_FILES = COPYING +GTKSHARP_INSTALL_STAGING = YES +GTKSHARP_DEPENDENCIES += mono libgtk3
Minor detail: the += sign is not needed here, you could just do '='.
Other than that looks good. Really, the only thing a bit weird about this series is the time zone related thing.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 3/3 package/gtksharp: new package
Dear Thomas Petazzoni,
2015-02-14 8:44 GMT+01:00 Thomas Petazzoni
<[email protected]>:
Quoted 4 lines
Dear Angelo Compagnucci,
On Thu, 12 Feb 2015 14:49:32 +0100, Angelo Compagnucci wrote:
Quoted 12 lines
package/gtksharp/Config.in line 3
Quoted 9 lines
package/gtksharp/Config.in new file +3
-0@@ -0,0 +1,9 @@ +config BR2_PACKAGE_GTKSHARP + bool "gtk#" + depends on BR2_PACKAGE_MONONot needed, since this Config.in file is already only included if Mono is enabled, as per your change in package/Config.in.
Ok!
Quoted 9 lines
package/gtksharp/Config.in line 4
Quoted 1 line
package/gtksharp/Config.in new file +1
-0+ select BR2_PACKAGE_LIBGTK3You can't just select libgtk3, you also need to inherit all its dependencies. However, I am not sure in such situation if we really
want to "select" libgtk3 or to "depend" on it. The reason is that by
using "select", the user may not necessarily go to the libgtk3 option/she need to enable to select the display backend. And by default, the display backend is
the Broadway backend, which most likely isn't what the user wants.
Quoted 3 lines
So for this case, I would personally lean towards using "depends on
BR2_PACKAGE_LIBGTK3", especially since it's quite obvious for the user who wants gtk# that the gtk library should be installed.
Honestly, I will stay with "select" but expanding it with all libgtk3 selects and depens is impractical, so let's go for depend. For the backend side, users should be a little bit aware of what they are doing and selecting a proper backend.
We can default on another backend for libgtk3, but this is not strictly related to gtk#. I think that having an X11 default backend for libgtk3 is more sensible than broadway.
Quoted 9 lines
package/gtksharp/Config.in line 5
Quoted 2 lines
package/gtksharp/Config.in new file +1
-0+ select BR2_TARGET_TZ_INFOMore details about why tz information are needed would be useful. In any case, this should be:
select BR2_TARGET_TZ_INFO if BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_UCLIBCbecause the
BR2_TARGET_TZ_INFOoption is not available for Musl toolchains.
Please refer to the thread regarding "[PATCH v4 2/3] system:
Defaulting TZ_LOCALTIME to UTC" for a better explanation.
Quoted 10 lines
package/gtksharp/Config.in line 9
Quoted 5 lines
package/gtksharp/Config.in new file +4
-0+ help + Gtk# is a .NET language binding for the GTK+ toolkit. + + http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.99/In the Config.in help text, we want the main web site of the project, not the download URL. So most likely, this should instead be:
Ok!
Quoted 5 lines
Quoted 5 lines
package/gtksharp/gtksharp.mk new file +0
-0
Quoted 8 lines
package/gtksharp/gtksharp.mk line 5
Quoted 6 lines
package/gtksharp/gtksharp.mk new file +5
-0@@ -0,0 +1,15 @@ +############################################################# +# +# gtksharp +# +#############################################################80 # signs are the convention.
Ok, I just copied from another package!
Quoted 10 lines
package/gtksharp/gtksharp.mk line 8
Quoted 4 lines
package/gtksharp/gtksharp.mk new file +3
-0+ +GTKSHARP_VERSION = 2.99.3 +GTKSHARP_SITE = http://ftp.gnome.org/pub/gnome/sources/gtk-sharp/2.99/Please use the
GTKSHARP_VERSION_MAJORthing used in several other packages:
GTKSHARP_VERSION_MAJOR= 2.99GTKSHAP_VERSION= $(GTKSHARP_VERSION_MAJOR).3GTKSHARP_SITE= ......./gtk-sharp/$(GTKSHARP_VERSION_MAJOR)/
Ok!
Quoted 7 lines
package/gtksharp/gtksharp.mk line 13
Quoted 5 lines
package/gtksharp/gtksharp.mk new file +5
-0+GTKSHARP_SOURCE = gtk-sharp-$(GTKSHARP_VERSION).tar.xz +GTKSHARP_LICENSE = LGPLv2 +GTKSHARP_LICENSE_FILES = COPYING +GTKSHARP_INSTALL_STAGING = YES +GTKSHARP_DEPENDENCIES += mono libgtk3Minor detail: the += sign is not needed here, you could just do '='.
OK!
Quoted 4 lines
Other than that looks good. Really, the only thing a bit weird about this series is the time zone related thing.
Thanks,
Thank you too Thomas!
Quoted 6 lines
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo