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