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