Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | require ruby.inc |
| 2 | |
| 3 | SRC_URI += " \ |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame^] | 4 | file://0001-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 5 | file://run-ptest \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 6 | " |
| 7 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 8 | SRC_URI[md5sum] = "7e156fb526b8f4bb1b30a3dd8a7ce400" |
| 9 | SRC_URI[sha256sum] = "28a945fdf340e6ba04fc890b98648342e3cccfd6d223a48f3810572f11b2514c" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 10 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 11 | PACKAGECONFIG ??= "" |
| 12 | PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" |
| 13 | |
| 14 | PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" |
| 15 | PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" |
Brad Bishop | 00e122a | 2019-10-05 11:10:57 -0400 | [diff] [blame^] | 16 | PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 17 | |
| 18 | EXTRA_AUTORECONF += "--exclude=aclocal" |
| 19 | |
| 20 | EXTRA_OECONF = "\ |
| 21 | --disable-versioned-paths \ |
| 22 | --disable-rpath \ |
| 23 | --disable-dtrace \ |
| 24 | --enable-shared \ |
| 25 | --enable-load-relative \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 26 | --with-pkg-config=pkg-config \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 27 | " |
| 28 | |
| 29 | do_install() { |
| 30 | oe_runmake 'DESTDIR=${D}' install |
| 31 | } |
| 32 | |
| 33 | do_install_append_class-target () { |
| 34 | # Find out rbconfig.rb from .installed.list |
| 35 | rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list` |
| 36 | # Remove build host directories |
| 37 | sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ |
| 38 | -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ |
| 39 | -e 's|${DEBUG_PREFIX_MAP}||g' \ |
| 40 | -e 's:${HOSTTOOLS_DIR}/::g' \ |
| 41 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ |
| 42 | -e 's:${RECIPE_SYSROOT}::g' \ |
| 43 | -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ |
| 44 | ${D}$rbconfig_rb |
| 45 | |
| 46 | # Find out created.rid from .installed.list |
| 47 | created_rid=`grep created.rid ${B}/.installed.list` |
| 48 | # Remove build host directories |
| 49 | sed -i -e 's:${WORKDIR}::g' ${D}$created_rid |
| 50 | |
| 51 | } |
| 52 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 53 | do_install_ptest () { |
| 54 | cp -rf ${S}/test ${D}${PTEST_PATH}/ |
| 55 | cp -r ${S}/include ${D}/${libdir}/ruby/ |
| 56 | test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list` |
| 57 | sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb |
| 58 | } |
| 59 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 60 | PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" |
| 61 | |
| 62 | SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" |
| 63 | RDEPENDS_${PN}-ri-docs = "${PN}" |
| 64 | FILES_${PN}-ri-docs += "${datadir}/ri" |
| 65 | |
| 66 | SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source" |
| 67 | RDEPENDS_${PN}-rdoc = "${PN}" |
| 68 | FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" |
| 69 | |
| 70 | FILES_${PN} += "${datadir}/rubygems" |
| 71 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 72 | FILES_${PN}-ptest_append_class-target += "${libdir}/ruby/include" |
| 73 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 74 | BBCLASSEXTEND = "native" |