Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-integ / recipes-devtools / ruby / ruby_2.0.0-p648.bb
1
2 require ruby.inc
3 inherit openssl10
4
5 DEPENDS += " libnsl2"
6
7 SRCREV = "1a828cad2d559e2ff55a5f01cc5de217b9c9bc2b"
8
9 SRC_URI += " \
10         git://github.com/ruby/spec.git;protocol=https;rev=${SRCREV};destsuffix=spec/rubyspec \
11         file://ruby-CVE-2017-9228.patch \
12         file://ext.socket.extmk.patch \
13         "
14
15 SRC_URI[md5sum] = "05db49992d01731fee023cad09bb4e52"
16 SRC_URI[sha256sum] = "8690bd6b4949c333b3919755c4e48885dbfed6fd055fe9ef89930bde0d2376f8"
17
18 # it's unknown to configure script, but then passed to extconf.rb
19 # maybe it's not really needed as we're hardcoding the result with
20 # 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
21 UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
22
23 PACKAGECONFIG ??= ""
24
25 PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
26 #PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
27
28 EXTRA_AUTORECONF += "--exclude=aclocal"
29
30 EXTRA_OECONF ?= " "
31 EXTRA_OECONF = "\
32     --disable-install-doc \
33     --disable-rpath \
34     --disable-dtrace \
35     --enable-shared \
36     --enable-load-relative \
37 "
38
39 EXTRA_OEMAKE = " \
40     LIBRUBYARG='-lruby-static' \
41 "
42
43 do_configure_prepend() {
44     cd ${S}
45     rm -rf spec/rubyspec
46     cp -rf ${WORKDIR}/spec ${S}
47     cd ${B}
48 }
49
50 do_install() {
51     oe_runmake 'DESTDIR=${D}' install
52 }
53
54 do_install_append_class-target () {
55     # Find out rbconfig.rb from .installed.list
56     rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list`
57     # Remove build host directories
58     sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
59            -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
60            -e 's|${DEBUG_PREFIX_MAP}||g' \
61            -e 's:${HOSTTOOLS_DIR}/::g' \
62            -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
63            -e 's:${RECIPE_SYSROOT}::g' \
64            -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
65         ${D}$rbconfig_rb
66
67 }
68
69 do_install_ptest () {
70     cp -rf ${S}/test ${D}${PTEST_PATH}/
71     cp -r ${S}/include ${D}/${libdir}/ruby/
72     test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list`
73     sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb
74 }
75
76 FILES_${PN} += "${datadir}/rubygems"
77
78
79 BBCLASSEXTEND = "native nativesdk"
80
81 # INSANE_SKIP_${PN} += "ldflags"