Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | require ruby.inc |
| 2 | |
| 3 | SRC_URI += " \ |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 4 | file://0003-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 | 1d80a2e | 2019-11-15 16:35:03 -0500 | [diff] [blame] | 8 | SRC_URI[md5sum] = "8754bfb36d52c2bf1fb3d3ddc7101606" |
| 9 | SRC_URI[sha256sum] = "66976b716ecc1fd34f9b7c3c2b07bbd37631815377a2e3e85a5b194cfdcbed7d" |
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 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 18 | EXTRA_OECONF = "\ |
| 19 | --disable-versioned-paths \ |
| 20 | --disable-rpath \ |
| 21 | --disable-dtrace \ |
| 22 | --enable-shared \ |
| 23 | --enable-load-relative \ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 24 | --with-pkg-config=pkg-config \ |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 25 | " |
| 26 | |
| 27 | do_install() { |
| 28 | oe_runmake 'DESTDIR=${D}' install |
| 29 | } |
| 30 | |
| 31 | do_install_append_class-target () { |
| 32 | # Find out rbconfig.rb from .installed.list |
| 33 | rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list` |
| 34 | # Remove build host directories |
| 35 | sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ |
| 36 | -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ |
| 37 | -e 's|${DEBUG_PREFIX_MAP}||g' \ |
| 38 | -e 's:${HOSTTOOLS_DIR}/::g' \ |
| 39 | -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ |
| 40 | -e 's:${RECIPE_SYSROOT}::g' \ |
| 41 | -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ |
| 42 | ${D}$rbconfig_rb |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 43 | } |
| 44 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 45 | do_install_ptest () { |
| 46 | cp -rf ${S}/test ${D}${PTEST_PATH}/ |
Brad Bishop | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 47 | # install test-binaries |
| 48 | find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \ |
| 49 | | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \ |
| 50 | | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf - |
| 51 | # adjust path to not assume build directory layout |
| 52 | sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \ |
| 53 | -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb |
| 54 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 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 | 64c979e | 2019-11-04 13:55:29 -0500 | [diff] [blame] | 72 | FILES_${PN}-ptest_append_class-target = "\ |
| 73 | ${libdir}/ruby/include \ |
| 74 | ${libdir}/ruby/${SHRT_VER}.0/*/-test- \ |
| 75 | " |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 76 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 77 | BBCLASSEXTEND = "native" |