Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | require ruby.inc |
| 2 | |
| 3 | SRC_URI += " \ |
| 4 | file://ruby-CVE-2017-9226.patch \ |
| 5 | file://ruby-CVE-2017-9228.patch \ |
| 6 | file://CVE-2018-1000073.patch \ |
| 7 | " |
| 8 | |
| 9 | SRC_URI[md5sum] = "23867bc8c16c55e43b14dfe0614bcfa8" |
| 10 | SRC_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 |
| 15 | UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo" |
| 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-wide-getaddrinfo," |
| 23 | |
| 24 | EXTRA_AUTORECONF += "--exclude=aclocal" |
| 25 | |
| 26 | EXTRA_OECONF = "\ |
| 27 | --disable-versioned-paths \ |
| 28 | --disable-rpath \ |
| 29 | --disable-dtrace \ |
| 30 | --enable-shared \ |
| 31 | --enable-load-relative \ |
| 32 | " |
| 33 | |
| 34 | do_install() { |
| 35 | oe_runmake 'DESTDIR=${D}' install |
| 36 | } |
| 37 | |
| 38 | do_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 | |
| 58 | PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" |
| 59 | |
| 60 | SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" |
| 61 | RDEPENDS_${PN}-ri-docs = "${PN}" |
| 62 | FILES_${PN}-ri-docs += "${datadir}/ri" |
| 63 | |
| 64 | SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source" |
| 65 | RDEPENDS_${PN}-rdoc = "${PN}" |
| 66 | FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" |
| 67 | |
| 68 | FILES_${PN} += "${datadir}/rubygems" |
| 69 | |
| 70 | BBCLASSEXTEND = "native" |