Add Mono native/managed package.
PATCH 1/1 Add Mono native/managed package.
This package builds both the native and managed part with all standard libraries and provides a complete mono environment.
--- package/Config.in | 1 + package/mono/Config.in | 7 +++++++ package/mono/mono-managed/mono-managed.mk | 26 ++++++++++++++++++++++++++ package/mono/mono-native/mono-native.mk | 19 +++++++++++++++++++ package/mono/mono.mk | 17 +++++++++++++++++ 5 files changed, 70 insertions(+) create mode 100644 package/mono/Config.in create mode 100644 package/mono/mono-managed/mono-managed.mk create mode 100644 package/mono/mono-native/mono-native.mk create mode 100644 package/mono/mono.mk
package/Config.in +1 -0
@@ -478,6 +478,7 @@ endmenu endif source "package/ruby/Config.in" source "package/tcl/Config.in" +source "package/mono/Config.in" if BR2_PACKAGE_TCL menu "tcl libraries/modules" source "package/expect/Config.in"
package/mono/Config.in new file +7 -0
@@ -0,0 +1,7 @@ +config BR2_PACKAGE_MONO + bool "mono" + select BR2_STRIP_none + help + An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET. + + http://download.mono-project.com/sources/mono/
package/mono/mono-managed/mono-managed.mk new file +26 -0
@@ -0,0 +1,26 @@ +############################################################# +# +# mono-managed +# +############################################################# + +MONO_MANAGED_VERSION = $(MONO_VERSION) +MONO_MANAGED_SITE = $(MONO_SITE) +MONO_MANAGED_SOURCE = $(MONO_SOURCE) + +HOST_MONO_MANAGED_CONF_OPT = \ + $(MONO_CONF_OPT) \ + --enable-static + +define MONO_MANAGED_GETMONOLITE + $(MAKE) -C $(@D) get-monolite-latest +endef + +define MONO_MANAGED_INSTALL + cp -av $(HOST_DIR)/usr/lib/mono $(TARGET_DIR)/usr/lib/ +endef + +HOST_MONO_MANAGED_POST_CONFIGURE_HOOKS += MONO_MANAGED_GETMONOLITE +HOST_MONO_MANAGED_POST_INSTALL_HOOKS += MONO_MANAGED_INSTALL + +$(eval $(host-autotools-package))
package/mono/mono-native/mono-native.mk new file +19 -0
@@ -0,0 +1,19 @@ +############################################################# +# +# mono-native +# +############################################################# + +MONO_NATIVE_VERSION = $(MONO_VERSION) +MONO_NATIVE_SITE = $(MONO_SITE) +MONO_NATIVE_SOURCE = $(MONO_SOURCE) +MONO_NATIVE_INSTALL_STAGING = $(MONO_INSTALL_STAGING) + +MONO_NATIVE_DEPENDENCIES += host-mono-managed + +# Disable managed code (mcs folder) from building +MONO_NATIVE_CONF_OPT = \ + $(MONO_CONF_OPT) \ + --disable-mcs-build + +$(eval $(autotools-package))
package/mono/mono.mk new file +17 -0
@@ -0,0 +1,17 @@ +############################################################# +# +# mono +# +############################################################# + +MONO_VERSION = 3.2.8 +MONO_SITE = http://download.mono-project.com/sources/mono/ +MONO_SOURCE = mono-$(MONO_VERSION).tar.bz2 +MONO_INSTALL_STAGING = YES + +MONO_CONF_OPT = --disable-gtk-doc --with-mcs-docs=no + +ifeq ($(BR2_PACKAGE_MONO),y) + include package/mono/*/*.mk + TARGETS += mono-native mono-managed +endif
Signature · 1 line
1.9.1
PATCH 1/1 Add Mono native/managed package.
Angelo, All,
On 2014-05-15 22:09 +0200, Angelo Compagnucci spake thusly:
Quoted 3 lines
This package builds both the native and managed part with all standard libraries and provides a complete mono environment.
Thank you for this patch! :-)
I have a few comments, see below.
Quoted 18 lines
Signed-off-by Angelo Compagnucci <[email protected]>--- package/Config.in | 1 + package/mono/Config.in | 7 +++++++ package/mono/mono-managed/mono-managed.mk | 26 ++++++++++++++++++++++++++ package/mono/mono-native/mono-native.mk | 19 +++++++++++++++++++ package/mono/mono.mk | 17 +++++++++++++++++ 5 files changed, 70 insertions(+) create mode 100644 package/mono/Config.in create mode 100644 package/mono/mono-managed/mono-managed.mk create mode 100644 package/mono/mono-native/mono-native.mk create mode 100644 package/mono/mono.mkpackage/Config.in +0
-0
package/Config.in endmenu · line 481
Quoted 4 lines
package/Config.in +1
-0@@ -478,6 +478,7 @@ endmenu endif source "package/ruby/Config.in" source "package/tcl/Config.in" +source "package/mono/Config.in"
Please keep alphabetical ordering: mono comes between lua and nodejs.
Quoted 9 lines
package/Config.in +0
-0if BR2_PACKAGE_TCL menu "tcl libraries/modules" source "package/expect/Config.in"package/mono/Config.in new file +0
-0
package/mono/Config.in line 7
Quoted 7 lines
package/mono/Config.in new file +7
-0@@ -0,0 +1,7 @@ +config BR2_PACKAGE_MONO + bool "mono" + select BR2_STRIP_none + help + An open source, cross-platform, implementation of C# and the CLR that is binary compatible with Microsoft.NET. + + http://download.mono-project.com/sources/mono/
For the help text, theindentation is one tab plus two spaces, not two tabs.
Quoted 6 lines
package/mono/mono-managed/mono-managed.mk new file +0
-0
package/mono/mono-managed/mono-managed.mk line 9
Quoted 9 lines
package/mono/mono-managed/mono-managed.mk new file +9
-0@@ -0,0 +1,26 @@ +############################################################# +# +# mono-managed +# +############################################################# + +MONO_MANAGED_VERSION = $(MONO_VERSION) +MONO_MANAGED_SITE = $(MONO_SITE) +MONO_MANAGED_SOURCE = $(MONO_SOURCE)
Do not line-up assignments, just do:
MONO_MANAGED_VERSION = $(MONO_VERSION)
MONO_MANAGED_SITE = $(MONO_SITE)
MONO_MANAGED_SOURCE = $(MONO_SOURCE)package/mono/mono-managed/mono-managed.mk line 13
Quoted 3 lines
package/mono/mono-managed/mono-managed.mk new file +3
-0+HOST_MONO_MANAGED_CONF_OPT = \ + $(MONO_CONF_OPT) \ + --enable-static
For so few options, put them on a single line:
HOST_MONO_MANAGED_CONF_OPT = $(MONO_CONF_OPT) --enable-static
Why do you need --enable-static ? Generally, for the host tools, we do not care that they be shared, and we do usually build them shared.
package/mono/mono-managed/mono-managed.mk line 17
Quoted 3 lines
package/mono/mono-managed/mono-managed.mk new file +3
-0+define MONO_MANAGED_GETMONOLITE + $(MAKE) -C $(@D) get-monolite-latest +endef
Does it mean that some downloading is done _after_ the configure step? Can't we do that during the download step, eg:
define MONO_MANAGED_GET_MONOLITE
$(call DOWNLOAD,url-of-monolite-archive)
endef
MONO_MANAGED_POST_DOWNLOAD_HOOKS += MONO_MANAGED_GET_MONOLITEOr something like that?
In Buildroot, we expect that running "make source" will download everything, and no access to the network is needed after that.
package/mono/mono-managed/mono-managed.mk line 24
Quoted 6 lines
package/mono/mono-managed/mono-managed.mk new file +6
-0+define MONO_MANAGED_INSTALL + cp -av $(HOST_DIR)/usr/lib/mono $(TARGET_DIR)/usr/lib/ +endef + +HOST_MONO_MANAGED_POST_CONFIGURE_HOOKS += MONO_MANAGED_GETMONOLITE +HOST_MONO_MANAGED_POST_INSTALL_HOOKS += MONO_MANAGED_INSTALL
Keep the hooks assignments just below the definitions.
Quoted 7 lines
package/mono/mono-managed/mono-managed.mk new file +1
-0+$(eval $(host-autotools-package))package/mono/mono-native/mono-native.mk new file +0
-0
package/mono/mono-native/mono-native.mk line 10
Quoted 10 lines
package/mono/mono-native/mono-native.mk new file +10
-0@@ -0,0 +1,19 @@ +############################################################# +# +# mono-native +# +############################################################# + +MONO_NATIVE_VERSION = $(MONO_VERSION) +MONO_NATIVE_SITE = $(MONO_SITE) +MONO_NATIVE_SOURCE = $(MONO_SOURCE) +MONO_NATIVE_INSTALL_STAGING = $(MONO_INSTALL_STAGING)
Ditto: do not allign assignments.
package/mono/mono-native/mono-native.mk line 17
Quoted 6 lines
package/mono/mono-native/mono-native.mk new file +6
-0+MONO_NATIVE_DEPENDENCIES += host-mono-managed + +# Disable managed code (mcs folder) from building +MONO_NATIVE_CONF_OPT = \ + $(MONO_CONF_OPT) \ + --disable-mcs-build
Ditto: on a single line.
Quoted 7 lines
package/mono/mono-native/mono-native.mk new file +1
-0+$(eval $(autotools-package))package/mono/mono.mk new file +0
-0
package/mono/mono.mk line 10
Quoted 10 lines
package/mono/mono.mk new file +10
-0@@ -0,0 +1,17 @@ +############################################################# +# +# mono +# +############################################################# + +MONO_VERSION = 3.2.8 +MONO_SITE = http://download.mono-project.com/sources/mono/ +MONO_SOURCE = mono-$(MONO_VERSION).tar.bz2 +MONO_INSTALL_STAGING = YES
Ditto alignment.
package/mono/mono.mk line 17
Quoted 6 lines
package/mono/mono.mk new file +6
-0+MONO_CONF_OPT = --disable-gtk-doc --with-mcs-docs=no + +ifeq ($(BR2_PACKAGE_MONO),y) + include package/mono/*/*.mk + TARGETS += mono-native mono-managed +endif
That last assigment to TARGETS in the if-block is absolutely unneeded:
the $(eval $(autotools-package)) lines will do it automatically. You should just remove the TARGETS assign,ment and the if-block, to keep only:
include package/mono/*/*.mk
Thanks!
Regards,
Yann E. MORIN.
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. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 Add Mono native/managed package.
Hi Yann, All
2014-05-15 22:45 GMT+02:00 Yann E. MORIN <[email protected]>:
Quoted 6 lines
For so few options, put them on a single line:
HOST_MONO_MANAGED_CONF_OPT = $(MONO_CONF_OPT) --enable-staticWhy do you need --enable-static ? Generally, for the host tools, we do not care that they be shared, and we do usually build them shared.
During configure Mono complains:
"configure: WARNING: Turning off static Mono is a risk"
And compilation fails somewhere.
Quoted 7 lines
package/mono/mono-managed/mono-managed.mk line 17
Quoted 3 lines
package/mono/mono-managed/mono-managed.mk new file +3
-0+define MONO_MANAGED_GETMONOLITE + $(MAKE) -C $(@D) get-monolite-latest +endefDoes it mean that some downloading is done _after_ the configure step? Can't we do that during the download step, eg:
Quoted 6 lines
define MONO_MANAGED_GET_MONOLITE $(call DOWNLOAD,url-of-monolite-archive) endef MONO_MANAGED_POST_DOWNLOAD_HOOKS += MONO_MANAGED_GET_MONOLITEOr something like that?
Mono needs a previously installed Mono or the monolite binaries to compile. I don't want to count on users having the right mono version previously installed on their machines, so the best way is to use monolite. The right way to obtain the latest correct monolite version is to use "make get-monolite-latest" before the final make. I can extract the url where the file is located from the makefile, but I have also to handle various unpacking steps needed to place the monolites binaries in the correct places.
I don't think this is right, because It can break easily on newer Mono versions and it needs some maintenance. Please let me know if it must be done!
Ok for the other points! I will send you a new patch as soon as possible!
Signature · 1 line
Profile: http://it.linkedin.com/in/compagnucciangelo
PATCH 1/1 Add Mono native/managed package.
Angelo, All,
On 2014-05-15 23:33 +0200, Angelo Compagnucci spake thusly:
Quoted 5 lines
2014-05-15 22:45 GMT+02:00 Yann E. MORIN <[email protected]>:
Quoted 3 lines
For so few options, put them on a single line:
HOST_MONO_MANAGED_CONF_OPT = $(MONO_CONF_OPT) --enable-static
Quoted 8 lines
Quoted 2 lines
Why do you need --enable-static ? Generally, for the host tools, we do not care that they be shared, and we do usually build them shared.
During configure Mono complains:
"configure: WARNING: Turning off static Mono is a risk"
And compilation fails somewhere.
OK, state so in a comment on a line above, like:
# Enable static, otherwise Mono complains and the build fails
Quoted 14 lines
Quoted 7 lines
package/mono/mono-managed/mono-managed.mk line 17
Quoted 3 lines
package/mono/mono-managed/mono-managed.mk new file +3
-0+define MONO_MANAGED_GETMONOLITE + $(MAKE) -C $(@D) get-monolite-latest +endefDoes it mean that some downloading is done _after_ the configure step? Can't we do that during the download step, eg:
Quoted 6 lines
define MONO_MANAGED_GET_MONOLITE $(call DOWNLOAD,url-of-monolite-archive) endef MONO_MANAGED_POST_DOWNLOAD_HOOKS += MONO_MANAGED_GET_MONOLITEOr something like that?
Quoted 11 lines
Mono needs a previously installed Mono or the monolite binaries to compile. I don't want to count on users having the right mono version previously installed on their machines, so the best way is to use monolite. The right way to obtain the latest correct monolite version is to use "make get-monolite-latest" before the final make. I can extract the url where the file is located from the makefile, but I have also to handle various unpacking steps needed to place the monolites binaries in the correct places.
I don't think this is right, because It can break easily on newer Mono versions and it needs some maintenance. Please let me know if it must be done!
If it is indeed more complex that "wget + tar xf", then we can live with that.
However, I'd like some others to comment: Peter, Thomas?
Quoted 1 line
Ok for the other points! I will send you a new patch as soon as possible!
Thanks! Please wait a bit for some more feedback before you repost.
Regards,
Yann E. MORIN.
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. | '------------------------------^-------^------------------^--------------------'