[yocto] [meta-mono] [PATCH 01/11] mono.bbclass: add

Richard Tollerton rich.tollerton at ni.com
Thu Jul 16 16:16:11 PDT 2015


The DEPENDS_*, RDEPENDS_*, and FILES_* settings between C# packages
share a lot in common. We can refactor these bits into their own
bbclass:

- DEPEND on mono-native because we need it to compile stuff
- DEPEND on mono to have the native sysroot available
- RDEPEND on mono to make sure we can run the package
- ${PN} contains dlls, exes, and config bits thereof
- ${PN}-dbg contains mono debug (mdb) files
- ${PN}-dev contains:
  - build response (rsp) files
  - machine-readable assembly documentation (xml)
  - xbuild-related files
- ${PN}-doc contains monodoc output

Some C# packages build native code, though, so don't set
PACKAGE_ARCH="all".

Signed-off-by: Richard Tollerton <rich.tollerton at ni.com>
---
 classes/mono.bbclass | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 classes/mono.bbclass

diff --git a/classes/mono.bbclass b/classes/mono.bbclass
new file mode 100644
index 0000000..315ee82
--- /dev/null
+++ b/classes/mono.bbclass
@@ -0,0 +1,32 @@
+# Class for building C# packages. If your package is all-managed, add
+# PACKAGE_ARCH="all"
+
+DEPENDS += "mono-native mono"
+RDEPENDS_${PN} += "mono"
+
+FILES_${PN} += "\
+  ${libdir}/mono/*/*.exe \
+  ${libdir}/mono/*/*.dll \
+  ${libdir}/mono/*/*.config \
+  ${libdir}/mono/gac/*/*/*.dll \
+  ${libdir}/mono/gac/*/*/*.*.config \
+"
+
+FILES_${PN}-dbg += "\
+  ${libdir}/mono/*/*.mdb \
+  ${libdir}/mono/gac/*/*/*.mdb \
+"
+
+FILES_${PN}-dev += "\
+  ${libdir}/mono/*/*.rsp \
+  ${libdir}/mono/*/*.xml \
+  ${libdir}/mono/gac/*/*/*.xml \
+  ${libdir}/mono/xbuild/* \
+  ${libdir}/mono/xbuild-frameworks/* \
+  ${libdir}/mono/Microsoft* \
+  ${libdir}/mono/*/*.Targets \
+"
+
+FILES_${PN}-doc += "\
+  ${libdir}/monodoc/* \
+"
-- 
2.4.4




More information about the yocto mailing list