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