blob: 1197323e90afefb7197d608b8822b995458050b0 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001require ruby.inc
2
3SRC_URI += " \
4 file://ruby-CVE-2017-9226.patch \
5 file://ruby-CVE-2017-9228.patch \
6 file://CVE-2018-1000073.patch \
7 "
8
9SRC_URI[md5sum] = "23867bc8c16c55e43b14dfe0614bcfa8"
10SRC_URI[sha256sum] = "dac81822325b79c3ba9532b048c2123357d3310b2b40024202f360251d9829b1"
11
12# it's unknown to configure script, but then passed to extconf.rb
13# maybe it's not really needed as we're hardcoding the result with
14# 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
15UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
16
17PACKAGECONFIG ??= ""
18PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}"
19
20PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
21PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
22PACKAGECONFIG[ipv6] = ",--enable-wide-getaddrinfo,"
23
24EXTRA_AUTORECONF += "--exclude=aclocal"
25
26EXTRA_OECONF = "\
27 --disable-versioned-paths \
28 --disable-rpath \
29 --disable-dtrace \
30 --enable-shared \
31 --enable-load-relative \
32"
33
34do_install() {
35 oe_runmake 'DESTDIR=${D}' install
36}
37
38do_install_append_class-target () {
39 # Find out rbconfig.rb from .installed.list
40 rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list`
41 # Remove build host directories
42 sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
43 -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
44 -e 's|${DEBUG_PREFIX_MAP}||g' \
45 -e 's:${HOSTTOOLS_DIR}/::g' \
46 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
47 -e 's:${RECIPE_SYSROOT}::g' \
48 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
49 ${D}$rbconfig_rb
50
51 # Find out created.rid from .installed.list
52 created_rid=`grep created.rid ${B}/.installed.list`
53 # Remove build host directories
54 sed -i -e 's:${WORKDIR}::g' ${D}$created_rid
55
56}
57
58PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc"
59
60SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library"
61RDEPENDS_${PN}-ri-docs = "${PN}"
62FILES_${PN}-ri-docs += "${datadir}/ri"
63
64SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source"
65RDEPENDS_${PN}-rdoc = "${PN}"
66FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc"
67
68FILES_${PN} += "${datadir}/rubygems"
69
70BBCLASSEXTEND = "native"