From 32b754e45f81ec369258a0417271535770d12aa3 Mon Sep 17 00:00:00 2001 From: Mario Domenech Goulart Date: Tue, 24 Nov 2009 15:53:50 -0200 Subject: chicken: added support for cross compilation with chicken Added the chicken-cross recipe and a chicken class for translating architectures to the Chicken nomenclature. Signed-off-by: Mario Domenech Goulart Signed-off-by: Otavio Salvador --- recipes/chicken/chicken-cross_4.2.0.bb | 27 ++++++++++++++++++++ recipes/chicken/chicken.inc | 46 +++------------------------------- recipes/chicken/chicken_4.2.0.bb | 24 ++++++++++++++++-- 3 files changed, 52 insertions(+), 45 deletions(-) create mode 100644 recipes/chicken/chicken-cross_4.2.0.bb (limited to 'recipes') diff --git a/recipes/chicken/chicken-cross_4.2.0.bb b/recipes/chicken/chicken-cross_4.2.0.bb new file mode 100644 index 0000000000..452128a208 --- /dev/null +++ b/recipes/chicken/chicken-cross_4.2.0.bb @@ -0,0 +1,27 @@ +require chicken.inc + +DEPENDS = "gcc-cross-sdk chicken" +RDEPENDS = "gcc-cross-sdk chicken" + +inherit cross + +do_compile() { + make PLATFORM="linux" PREFIX="${prefix}" TARGET_PREFIX="${STAGING_DIR}/${TARGET_SYS}/usr" TARGET_RUN_PREFIX="${layout_prefix}" TARGETSYSTEM="${TARGET_SYS}" C_COMPILER=gcc LIBRARIAN=ar +} + +do_install() { + make PLATFORM="linux" PREFIX="${prefix}" TARGET_PREFIX="${STAGING_DIR}/${TARGET_SYS}/usr" TARGET_RUN_PREFIX="${layout_prefix}" TARGETSYSTEM="${TARGET_SYS}" C_COMPILER=gcc LIBRARIAN=ar install +} + +do_stage() { + make PLATFORM="linux" PREFIX="${prefix}" TARGET_PREFIX="${STAGING_DIR}/${TARGET_SYS}/usr" TARGET_RUN_PREFIX="${layout_prefix}" TARGETSYSTEM="${TARGET_SYS}" C_COMPILER=gcc LIBRARIAN=ar install +} + +PACKAGES += "chicken-bin libchicken libuchicken" + +FILES_${PN} = "" +FILES_libchicken = "${libdir}/libchicken.so.*" +FILES_libuchicken = "${libdir}/libuchicken.so.*" +FILES_${PN}-bin = "${bindir}/* ${datadir}/chicken/*.* ${libdir}/chicken/*/*.so" +FILES_${PN}-doc += "${datadir}/chicken/doc" +FILES_${PN}-dbg += "${libdir}/chicken/*/.debug" diff --git a/recipes/chicken/chicken.inc b/recipes/chicken/chicken.inc index f0126a9c16..e147dc1548 100644 --- a/recipes/chicken/chicken.inc +++ b/recipes/chicken/chicken.inc @@ -5,50 +5,10 @@ PRIORITY = "optional" LICENSE = "BSD" INC_PR = "r1" -SRC_URI = "http://chicken.wiki.br/releases/${PV}/chicken-${PV}.tar.gz" +SRC_URI = "http://chicken.wiki.br/releases/${PV}/chicken-${PV}.tar.gz \ + file://soname.patch;patch=1" # Parallel building is not supported PARALLEL_MAKE = "" -# Required environment values -export PLATFORM="linux" -export PREFIX="${prefix}" -export LIBRARIAN="${TARGET_PREFIX}" -export TARGETSYSTEM="${TARGET_SYS}" - -do_compile() { - case ${TARGET_ARCH} in - i*86) - ARCH=x86 - ;; - *) - echo "Check ARCH value for ${TARGET_ARCH}" - exit 1 - ;; - esac - - make ARCH=${ARCH} TARGET_C_COMPILER=gcc -} - -do_install() { - case ${TARGET_ARCH} in - i*86) - ARCH=x86 - ;; - *) - echo "Check ARCH value for ${TARGET_ARCH}" - exit 1 - ;; - esac - - make ARCH=${ARCH} DESTDIR=${D} install -} - -PACKAGES += "chicken-bin libchicken libuchicken" - -FILES_${PN} = "" -FILES_libchicken = "${libdir}/libchicken.so.*" -FILES_libuchicken = "${libdir}/libuchicken.so.*" -FILES_${PN}-bin = "${bindir}/* ${datadir}/chicken/*.* ${libdir}/chicken/*/*.so" -FILES_${PN}-doc += "${datadir}/chicken/doc" -FILES_${PN}-dbg += "${libdir}/chicken/*/.debug" +inherit chicken diff --git a/recipes/chicken/chicken_4.2.0.bb b/recipes/chicken/chicken_4.2.0.bb index 473c7ad817..58f826c538 100644 --- a/recipes/chicken/chicken_4.2.0.bb +++ b/recipes/chicken/chicken_4.2.0.bb @@ -1,5 +1,25 @@ require chicken.inc -SRC_URI += "file://soname.patch;patch=1" +DEPENDS = "gcc-cross-sdk" +RDEPENDS = "gcc-cross-sdk" -PR = "${INC_PR}.1" +do_compile() { + make PLATFORM="linux" PREFIX="${STAGING_DIR}/${TARGET_SYS}${layout_prefix}" HOSTSYSTEM="${TARGET_SYS}" ARCH=${CHICKEN_ARCH} +} + +do_install() { + make PLATFORM="linux" PREFIX="${STAGING_DIR}/${TARGET_SYS}${layout_prefix}" HOSTSYSTEM="${TARGET_SYS}" ARCH=${CHICKEN_ARCH} install +} + +do_stage() { + make PLATFORM="linux" PREFIX="${STAGING_DIR}/${TARGET_SYS}${layout_prefix}" HOSTSYSTEM="${TARGET_SYS}" ARCH=${CHICKEN_ARCH} install +} + +PACKAGES += "chicken-bin libchicken libuchicken" + +FILES_${PN} = "" +FILES_libchicken = "${libdir}/libchicken.so.*" +FILES_libuchicken = "${libdir}/libuchicken.so.*" +FILES_${PN}-bin = "${bindir}/* ${datadir}/chicken/*.* ${libdir}/chicken/*/*.so" +FILES_${PN}-doc += "${datadir}/chicken/doc" +FILES_${PN}-dbg += "${libdir}/chicken/*/.debug" -- cgit v1.2.3