diff options
Diffstat (limited to 'meta/recipes-devtools/ruby/ruby_2.7.5.bb')
| -rw-r--r-- | meta/recipes-devtools/ruby/ruby_2.7.5.bb | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/meta/recipes-devtools/ruby/ruby_2.7.5.bb b/meta/recipes-devtools/ruby/ruby_2.7.5.bb new file mode 100644 index 0000000000..44a2527ee7 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby_2.7.5.bb | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | require ruby.inc | ||
| 2 | |||
| 3 | DEPENDS_append_libc-musl = " libucontext" | ||
| 4 | |||
| 5 | SRC_URI += " \ | ||
| 6 | file://remove_has_include_macros.patch \ | ||
| 7 | file://run-ptest \ | ||
| 8 | file://0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch \ | ||
| 9 | file://0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch \ | ||
| 10 | " | ||
| 11 | |||
| 12 | SRC_URI[md5sum] = "ede247b56fb862f1f67f9471189b04d4" | ||
| 13 | SRC_URI[sha256sum] = "2755b900a21235b443bb16dadd9032f784d4a88f143d852bc5d154f22b8781f1" | ||
| 14 | |||
| 15 | PACKAGECONFIG ??= "" | ||
| 16 | PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" | ||
| 17 | |||
| 18 | PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" | ||
| 19 | PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" | ||
| 20 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," | ||
| 21 | |||
| 22 | EXTRA_OECONF = "\ | ||
| 23 | --disable-versioned-paths \ | ||
| 24 | --disable-rpath \ | ||
| 25 | --disable-dtrace \ | ||
| 26 | --enable-shared \ | ||
| 27 | --enable-load-relative \ | ||
| 28 | --with-pkg-config=pkg-config \ | ||
| 29 | " | ||
| 30 | |||
| 31 | EXTRA_OECONF_append_libc-musl = "\ | ||
| 32 | LIBS='-lucontext' \ | ||
| 33 | ac_cv_func_isnan=yes \ | ||
| 34 | ac_cv_func_isinf=yes \ | ||
| 35 | " | ||
| 36 | |||
| 37 | do_install() { | ||
| 38 | oe_runmake 'DESTDIR=${D}' install | ||
| 39 | } | ||
| 40 | |||
| 41 | do_install_append_class-target () { | ||
| 42 | # Find out rbconfig.rb from .installed.list | ||
| 43 | rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list` | ||
| 44 | # Remove build host directories | ||
| 45 | sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ | ||
| 46 | -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ | ||
| 47 | -e 's|${DEBUG_PREFIX_MAP}||g' \ | ||
| 48 | -e 's:${HOSTTOOLS_DIR}/::g' \ | ||
| 49 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ | ||
| 50 | -e 's:${RECIPE_SYSROOT}::g' \ | ||
| 51 | -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ | ||
| 52 | ${D}$rbconfig_rb | ||
| 53 | } | ||
| 54 | |||
| 55 | do_install_ptest () { | ||
| 56 | cp -rf ${S}/test ${D}${PTEST_PATH}/ | ||
| 57 | |||
| 58 | install -D ${S}/tool/test/runner.rb ${D}${PTEST_PATH}/tool/test/runner.rb | ||
| 59 | cp -r ${S}/tool/lib ${D}${PTEST_PATH}/tool/ | ||
| 60 | mkdir -p ${D}${PTEST_PATH}/lib | ||
| 61 | cp -r ${S}/lib/did_you_mean ${S}/lib/rdoc ${D}${PTEST_PATH}/lib | ||
| 62 | |||
| 63 | # install test-binaries | ||
| 64 | find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \ | ||
| 65 | | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \ | ||
| 66 | | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf - | ||
| 67 | # adjust path to not assume build directory layout | ||
| 68 | sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \ | ||
| 69 | -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb | ||
| 70 | |||
| 71 | cp -r ${S}/include ${D}/${libdir}/ruby/ | ||
| 72 | test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list` | ||
| 73 | sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb | ||
| 74 | } | ||
| 75 | |||
| 76 | PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" | ||
| 77 | |||
| 78 | SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" | ||
| 79 | RDEPENDS_${PN}-ri-docs = "${PN}" | ||
| 80 | FILES_${PN}-ri-docs += "${datadir}/ri" | ||
| 81 | |||
| 82 | SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source" | ||
| 83 | RDEPENDS_${PN}-rdoc = "${PN}" | ||
| 84 | FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" | ||
| 85 | |||
| 86 | FILES_${PN} += "${datadir}/rubygems" | ||
| 87 | |||
| 88 | FILES_${PN}-ptest_append_class-target = "\ | ||
| 89 | ${libdir}/ruby/include \ | ||
| 90 | ${libdir}/ruby/${SHRT_VER}.0/*/-test- \ | ||
| 91 | " | ||
| 92 | |||
| 93 | BBCLASSEXTEND = "native" | ||
