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