2 ## Copyright (C) 2019 Wind River Systems, Inc.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
21 # file://ruby-CVE-2017-9226.patch # Not applicable
23 file://ruby-CVE-2017-9228.patch \
24 file://ext.socket.extmk.patch \
28 SRC_URI[md5sum] = "05db49992d01731fee023cad09bb4e52"
29 SRC_URI[sha256sum] = "8690bd6b4949c333b3919755c4e48885dbfed6fd055fe9ef89930bde0d2376f8"
31 # it's unknown to configure script, but then passed to extconf.rb
32 # maybe it's not really needed as we're hardcoding the result with
33 # 0001-socket-extconf-hardcode-wide-getaddr-info-test-outco.patch
34 UNKNOWN_CONFIGURE_WHITELIST += "--enable-wide-getaddrinfo"
38 PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind"
39 #PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp"
41 EXTRA_AUTORECONF += "--exclude=aclocal"
43 # --disable-versioned-paths
46 --disable-install-doc \
50 --enable-load-relative \
54 LIBRUBYARG='-lruby-static' \
57 do_configure_prepend() {
60 git clone git://github.com/ruby/rubyspec.git spec/rubyspec
65 oe_runmake 'DESTDIR=${D}' install
68 do_install_append_class-target () {
69 # Find out rbconfig.rb from .installed.list
70 rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list`
71 # Remove build host directories
72 sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \
73 -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \
74 -e 's|${DEBUG_PREFIX_MAP}||g' \
75 -e 's:${HOSTTOOLS_DIR}/::g' \
76 -e 's:${RECIPE_SYSROOT_NATIVE}::g' \
77 -e 's:${RECIPE_SYSROOT}::g' \
78 -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \
84 cp -rf ${S}/test ${D}${PTEST_PATH}/
85 cp -r ${S}/include ${D}/${libdir}/ruby/
86 test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list`
87 sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb
90 FILES_${PN} += "${datadir}/rubygems"
93 BBCLASSEXTEND = "native nativesdk"
95 # INSANE_SKIP_${PN} += "ldflags"