From bcaec55e4e64f6bca21cf0e50eaec787bd29b735 Mon Sep 17 00:00:00 2001 From: Henryk Ploetz Date: Tue, 2 Oct 2007 18:51:53 +0000 Subject: mono 1.2.5.1: added mono.bbclass, many changes required for packaging New file: packages/mono/mono-mcs-intermediate_1.2.5.1.bb Compiles mono in native mode with standard prefix, then tars up the resulting tree and puts the tarfile into staging New file: packages/mono/mono_files.py Automatically generated using collect-path.py (attached to this mail) and contains a list that maps file patterns to package names (and contained assemblies, see below). New file: classes/mono.bbclass Has a helper function for the list that maps file patterns to package names and assemblies (see below). Also has a function mono_do_clilibs and inserts that function into PACKAGEFUNCS. This function calls mono_find_provides_and_requires which finds out (through calls to monodis --assembly and monodis --assemblyref) which assemblies are provided and required by a particular package. mono_do_clilibs then puts the information about provided assemblies into ${STAGING_DIR}/clilibs/${packagename}.list and information about the required packages into ${PKGDEST}/{packagename}.clilibdeps where it will later be picked up by the modified read_shlibdeps. Originally I had dependency resolution through the partial list in mono_files.py but obviously this doens't scale, so I implemented the new method with mono_do_clilibs. The benefit is now that I don't really need the extra information in mono_files.py anymore and can in principle get rid of mono_get_file_table and related code. Instead it should be possible to modify collect-paths.py to output bitbake .inc code (e.g. PACKAGES = "..." and a whole lot of FILES_... = "...") instead of python code. There's still the minor problem of how to handle the .mdb files, that's why I didn't implement it yet but instead opted for an approach that I knew would work. (Debian just puts the .mdb files into the individual packages, while I would argue that they do belong into corresponding -dbg packages.) Modified file: classes/package.bbclass In read_shlibdeps I folded the two identical code blocks dealing with *.shlibdeps and *.pcdeps into one and added *.clilibdeps (generated by mono_do_clilibs above). Modified file: packages/mono/mono_1.2.5.1.bb Add the mono-mcs-intermediate workaround. Add a whole lot of python code in populate_packages_prepend in order to split up the packages based on information from mono_files.py (via mono.bbclass' mono_get_file_table). As I said above a lot of this code can hopefully be replaced in the future. --- packages/mono/mono-mcs-intermediate_1.2.5.1.bb | 59 ++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 packages/mono/mono-mcs-intermediate_1.2.5.1.bb (limited to 'packages/mono/mono-mcs-intermediate_1.2.5.1.bb') diff --git a/packages/mono/mono-mcs-intermediate_1.2.5.1.bb b/packages/mono/mono-mcs-intermediate_1.2.5.1.bb new file mode 100644 index 0000000000..07f9387e2a --- /dev/null +++ b/packages/mono/mono-mcs-intermediate_1.2.5.1.bb @@ -0,0 +1,59 @@ +# This is a straw-man recipe for step 1 in the two-step build of +# mono. Because it's impossible to build the mcs directory +# in cross-compile mode, this recipe will do a native build, +# then tar the resulting install tree for usage by the mono +# package in step 2. +# See http://www.mono-project.com/Mono:ARM + +require mono_1.2.5.inc +PR = "r0" +DEPENDS = "mono-native glib-2.0-native" + +SRC_URI += "file://mono-fix-libdir-path.patch;patch=1" + +# Inherit native to set up compiler and paths ... +inherit native +# ... but override the target prefix +prefix = "/usr" +exec_prefix = "/usr" +sysconfdir = "/etc" +# TODO: Where does the mono package get +# these paths from? Use the same source. + +do_fix_libtool_name() { + # inherit native will make that all native tools that are being + # built are prefixed with something like "i686-linux-", + # including libtool. Fix up some hardcoded libtool names: + for i in "${S}"/runtime/*-wrapper.in; do + sed -e "s/libtool/${BUILD_SYS}-libtool/" -i "${i}" + done +} +addtask fix_libtool_name after do_patch before do_configure + +do_stage() { + true +} + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +do_package() { + true +} + +do_populate_staging() { + cd ${D} + rm -f ${WORKDIR}/mono-mcs-${PV}.tar.gz + tar -cvzf ${WORKDIR}/mono-mcs-${PV}.tar.gz . + install -d ${STAGING_DIR}/share/mono-mcs + cp ${WORKDIR}/mono-mcs-${PV}.tar.gz ${STAGING_DIR}/share/mono-mcs/ +} + +do_package_write_ipk() { + true +} + +do_package_write() { + true +} -- cgit v1.2.3 From 49f849d955510d2079e2de3d3a56d20c075eae59 Mon Sep 17 00:00:00 2001 From: Cliff Brake Date: Wed, 3 Oct 2007 17:05:47 +0000 Subject: mono 1.2.5.1: disable parallel make due to build issues in the MCS tree --- packages/mono/mono-mcs-intermediate_1.2.5.1.bb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'packages/mono/mono-mcs-intermediate_1.2.5.1.bb') diff --git a/packages/mono/mono-mcs-intermediate_1.2.5.1.bb b/packages/mono/mono-mcs-intermediate_1.2.5.1.bb index 07f9387e2a..49e9c2a8e7 100644 --- a/packages/mono/mono-mcs-intermediate_1.2.5.1.bb +++ b/packages/mono/mono-mcs-intermediate_1.2.5.1.bb @@ -9,6 +9,8 @@ require mono_1.2.5.inc PR = "r0" DEPENDS = "mono-native glib-2.0-native" +PARALLEL_MAKE = "" + SRC_URI += "file://mono-fix-libdir-path.patch;patch=1" # Inherit native to set up compiler and paths ... -- cgit v1.2.3 From 493a9dae7b8d0f0d1e05901bceaa48132c9d2c3e Mon Sep 17 00:00:00 2001 From: Cliff Brake Date: Wed, 3 Oct 2007 17:10:04 +0000 Subject: mono 1.2.5.1: add perl-native to DEPENDS --- packages/mono/mono-mcs-intermediate_1.2.5.1.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/mono/mono-mcs-intermediate_1.2.5.1.bb') diff --git a/packages/mono/mono-mcs-intermediate_1.2.5.1.bb b/packages/mono/mono-mcs-intermediate_1.2.5.1.bb index 49e9c2a8e7..813da24ddf 100644 --- a/packages/mono/mono-mcs-intermediate_1.2.5.1.bb +++ b/packages/mono/mono-mcs-intermediate_1.2.5.1.bb @@ -7,7 +7,7 @@ require mono_1.2.5.inc PR = "r0" -DEPENDS = "mono-native glib-2.0-native" +DEPENDS = "mono-native glib-2.0-native perl-native" PARALLEL_MAKE = "" -- cgit v1.2.3