From 3cdf5da514b424a6d78ba4e1412331b6cf2b3bff Mon Sep 17 00:00:00 2001 From: Wang Mingyu Date: Wed, 12 Feb 2020 10:35:06 -0800 Subject: ruby: upgrade 2.6.5 -> 2.7.0 0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch Removed since it is included in 2.7.0. refresh the following patch: 0002-Obey-LDFLAGS-for-the-link-of-libruby.patch add the following patch to solve build error: 0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch [error message] ERROR: ruby-2.7.0-r0 do_package_qa: QA Issue: /usr/lib/ruby/gems/2.7.0/gems/racc-1.4.16/bin/y2racc contained in package ruby requires /usr/local/bin/ruby, but no providers found in RDEPENDS_ruby? [file-rdeps] format of file COPYING is updated. LEGAL notice information is updated. Signed-off-by: Wang Mingyu Signed-off-by: Richard Purdie --- meta/recipes-devtools/ruby/ruby.inc | 4 +- ...bang-of-libexec-y2racc-and-libexec-racc2y.patch | 38 ++++++++ ...0002-Obey-LDFLAGS-for-the-link-of-libruby.patch | 8 +- ...c-check-finite-isinf-isnan-as-macros-firs.patch | 103 --------------------- meta/recipes-devtools/ruby/ruby_2.6.5.bb | 78 ---------------- meta/recipes-devtools/ruby/ruby_2.7.0.bb | 78 ++++++++++++++++ 6 files changed, 122 insertions(+), 187 deletions(-) create mode 100644 meta/recipes-devtools/ruby/ruby/0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch delete mode 100644 meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch delete mode 100644 meta/recipes-devtools/ruby/ruby_2.6.5.bb create mode 100644 meta/recipes-devtools/ruby/ruby_2.7.0.bb (limited to 'meta/recipes-devtools/ruby') diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc index ce1b02f012..a38b3fe624 100644 --- a/meta/recipes-devtools/ruby/ruby.inc +++ b/meta/recipes-devtools/ruby/ruby.inc @@ -8,10 +8,10 @@ HOMEPAGE = "http://www.ruby-lang.org/" SECTION = "devel/ruby" LICENSE = "Ruby | BSD-2-Clause | BSD-3-Clause | GPLv2 | ISC | MIT" LIC_FILES_CHKSUM = "\ - file://COPYING;md5=340948e1882e579731841bf49cdc22c1 \ + file://COPYING;md5=5b8c87559868796979806100db3f3805 \ file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\ file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\ - file://LEGAL;md5=4ac0b84d1f7f420bca282e1adefc7f99 \ + file://LEGAL;md5=2b6d62dc0d608f34d510ca3f428110ec \ " DEPENDS = "ruby-native zlib openssl tcl libyaml gdbm readline libffi" diff --git a/meta/recipes-devtools/ruby/ruby/0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch b/meta/recipes-devtools/ruby/ruby/0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch new file mode 100644 index 0000000000..f316bed7bd --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby/0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch @@ -0,0 +1,38 @@ +From eed7bc855fd8d232d4d203cc9027dd07cee8eca2 Mon Sep 17 00:00:00 2001 +From: Wang Mingyu +Date: Sat, 8 Feb 2020 15:16:14 +0800 +Subject: [PATCH] Modify shebang of libexec/y2racc and libexec/racc2y. + +change /usr/local/bin/ruby to /usr/bin/env ruby. + +Upstream-Status: Pending + +Signed-off-by: Wang Mingyu +--- + libexec/racc2y | 2 +- + libexec/y2racc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libexec/racc2y b/libexec/racc2y +index f88d73ed2c..74e49cfa21 100755 +--- a/libexec/racc2y ++++ b/libexec/racc2y +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/ruby ++#!/usr/bin/env ruby + # + # $Id$ + # +diff --git a/libexec/y2racc b/libexec/y2racc +index 7933f94153..36daf864e1 100755 +--- a/libexec/y2racc ++++ b/libexec/y2racc +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/ruby ++#!/usr/bin/env ruby + # + # $Id$ + # +-- +2.17.1 + diff --git a/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch b/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch index 5979d8bd73..b31dee1128 100644 --- a/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch +++ b/meta/recipes-devtools/ruby/ruby/0002-Obey-LDFLAGS-for-the-link-of-libruby.patch @@ -6,13 +6,13 @@ Subject: [PATCH 2/3] Obey LDFLAGS for the link of libruby Signed-off-by: Christopher Larson Upstream-Status: Pending --- - Makefile.in | 2 +- + template/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/Makefile.in b/Makefile.in +diff --git a/template/Makefile.in b/template/Makefile.in index fa1e19ef37..bbd07fa34b 100644 ---- a/Makefile.in -+++ b/Makefile.in +--- a/template/Makefile.in ++++ b/template/Makefile.in @@ -109,7 +109,7 @@ MISSING = @LIBOBJS@ @ALLOCA@ ENABLE_SHARED = @ENABLE_SHARED@ LDSHARED = @LIBRUBY_LDSHARED@ diff --git a/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch b/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch deleted file mode 100644 index 1a8cff3e8c..0000000000 --- a/meta/recipes-devtools/ruby/ruby/0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch +++ /dev/null @@ -1,103 +0,0 @@ -From bd71b698bf733e6e93282cd2b1b93f51e1a33c7c Mon Sep 17 00:00:00 2001 -From: nobu -Date: Fri, 8 Feb 2019 07:22:55 +0000 -Subject: [PATCH 3/3] configure.ac: check finite,isinf,isnan as macros first -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -[ruby-core:91487] [Bug #15595] - -git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@67036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e - ---- -Upstream-Status: Backport [https://github.com/ruby/ruby/commit/74f94b3e6ebf15b76f3b357e754095412b006e94] -Signed-off-by: André Draszik ---- - aclocal.m4 | 1 + - configure.ac | 13 ++++--------- - tool/m4/ruby_replace_funcs.m4 | 13 +++++++++++++ - 3 files changed, 18 insertions(+), 9 deletions(-) - create mode 100644 tool/m4/ruby_replace_funcs.m4 - -diff --git a/aclocal.m4 b/aclocal.m4 -index b0fe3eb959..ed7d14ef63 100644 ---- a/aclocal.m4 -+++ b/aclocal.m4 -@@ -35,6 +35,7 @@ m4_include([tool/m4/ruby_func_attribute.m4]) - m4_include([tool/m4/ruby_mingw32.m4]) - m4_include([tool/m4/ruby_prepend_option.m4]) - m4_include([tool/m4/ruby_prog_gnu_ld.m4]) -+m4_include([tool/m4/ruby_replace_funcs.m4]) - m4_include([tool/m4/ruby_replace_type.m4]) - m4_include([tool/m4/ruby_rm_recursive.m4]) - m4_include([tool/m4/ruby_setjmp_type.m4]) -diff --git a/configure.ac b/configure.ac -index 2c4d2888d2..2691da6a3c 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -946,9 +946,6 @@ main() - ac_cv_func_fsync=yes - ac_cv_func_seekdir=yes - ac_cv_func_telldir=yes -- ac_cv_func_isinf=yes -- ac_cv_func_isnan=yes -- ac_cv_func_finite=yes - ac_cv_func_lchown=yes - ac_cv_func_link=yes - ac_cv_func_readlink=yes -@@ -999,9 +996,6 @@ main() - [netbsd*], [ LIBS="-lm $LIBS" - ], - [dragonfly*], [ LIBS="-lm $LIBS" -- # isinf() and isnan() are macros on DragonFly. -- ac_cv_func_isinf=yes -- ac_cv_func_isnan=yes - ], - [aix*],[ LIBS="-lm $LIBS" - ac_cv_func_round=no -@@ -1724,11 +1718,8 @@ AC_REPLACE_FUNCS(dup2) - AC_REPLACE_FUNCS(erf) - AC_REPLACE_FUNCS(explicit_bzero) - AC_REPLACE_FUNCS(ffs) --AC_REPLACE_FUNCS(finite) - AC_REPLACE_FUNCS(flock) - AC_REPLACE_FUNCS(hypot) --AC_REPLACE_FUNCS(isinf) --AC_REPLACE_FUNCS(isnan) - AC_REPLACE_FUNCS(lgamma_r) - AC_REPLACE_FUNCS(memmove) - AC_REPLACE_FUNCS(nan) -@@ -1741,6 +1732,10 @@ AC_REPLACE_FUNCS(strlcpy) - AC_REPLACE_FUNCS(strstr) - AC_REPLACE_FUNCS(tgamma) - -+RUBY_REPLACE_FUNC([finite], [@%:@include ]) -+RUBY_REPLACE_FUNC([isinf], [@%:@include ]) -+RUBY_REPLACE_FUNC([isnan], [@%:@include ]) -+ - # for missing/setproctitle.c - AS_CASE(["$target_os"], - [aix* | k*bsd*-gnu | kopensolaris*-gnu | linux* | darwin*], [AC_DEFINE(SPT_TYPE,SPT_REUSEARGV)], -diff --git a/tool/m4/ruby_replace_funcs.m4 b/tool/m4/ruby_replace_funcs.m4 -new file mode 100644 -index 0000000000..d0612e29a0 ---- /dev/null -+++ b/tool/m4/ruby_replace_funcs.m4 -@@ -0,0 +1,13 @@ -+# -*- Autoconf -*- -+dnl RUBY_REPLACE_FUNC [func] [included] -+AC_DEFUN([RUBY_REPLACE_FUNC], [dnl -+ AC_CHECK_DECL([$1],dnl -+ [AC_DEFINE(AS_TR_CPP(HAVE_[$1]))],dnl -+ [AC_REPLACE_FUNCS($1)],dnl -+ [$2])dnl -+]) -+ -+dnl RUBY_REPLACE_FUNCS [funcs] [included] -+AC_DEFUN([RUBY_REPLACE_FUNCS] [dnl -+ m4_map_args_w([$1], [RUBY_REPLACE_FUNC(], [), [$2]])dnl -+]) --- -2.23.0.rc1 - diff --git a/meta/recipes-devtools/ruby/ruby_2.6.5.bb b/meta/recipes-devtools/ruby/ruby_2.6.5.bb deleted file mode 100644 index 0cdf6ee09f..0000000000 --- a/meta/recipes-devtools/ruby/ruby_2.6.5.bb +++ /dev/null @@ -1,78 +0,0 @@ -require ruby.inc - -SRC_URI += " \ - file://0003-configure.ac-check-finite-isinf-isnan-as-macros-firs.patch \ - file://remove_has_include_macros.patch \ - file://run-ptest \ - " - -SRC_URI[md5sum] = "8754bfb36d52c2bf1fb3d3ddc7101606" -SRC_URI[sha256sum] = "66976b716ecc1fd34f9b7c3c2b07bbd37631815377a2e3e85a5b194cfdcbed7d" - -PACKAGECONFIG ??= "" -PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" - -PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" -PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" -PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," - -EXTRA_OECONF = "\ - --disable-versioned-paths \ - --disable-rpath \ - --disable-dtrace \ - --enable-shared \ - --enable-load-relative \ - --with-pkg-config=pkg-config \ -" - -do_install() { - oe_runmake 'DESTDIR=${D}' install -} - -do_install_append_class-target () { - # Find out rbconfig.rb from .installed.list - rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list` - # Remove build host directories - sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ - -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ - -e 's|${DEBUG_PREFIX_MAP}||g' \ - -e 's:${HOSTTOOLS_DIR}/::g' \ - -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ - -e 's:${RECIPE_SYSROOT}::g' \ - -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ - ${D}$rbconfig_rb -} - -do_install_ptest () { - cp -rf ${S}/test ${D}${PTEST_PATH}/ - # install test-binaries - find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \ - | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \ - | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf - - # adjust path to not assume build directory layout - sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \ - -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb - - cp -r ${S}/include ${D}/${libdir}/ruby/ - test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list` - sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb -} - -PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" - -SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" -RDEPENDS_${PN}-ri-docs = "${PN}" -FILES_${PN}-ri-docs += "${datadir}/ri" - -SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source" -RDEPENDS_${PN}-rdoc = "${PN}" -FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" - -FILES_${PN} += "${datadir}/rubygems" - -FILES_${PN}-ptest_append_class-target = "\ - ${libdir}/ruby/include \ - ${libdir}/ruby/${SHRT_VER}.0/*/-test- \ -" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-devtools/ruby/ruby_2.7.0.bb b/meta/recipes-devtools/ruby/ruby_2.7.0.bb new file mode 100644 index 0000000000..c796318717 --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby_2.7.0.bb @@ -0,0 +1,78 @@ +require ruby.inc + +SRC_URI += " \ + file://remove_has_include_macros.patch \ + file://run-ptest \ + file://0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch \ + " + +SRC_URI[md5sum] = "bf4a54e8231176e109a42c546b4725a9" +SRC_URI[sha256sum] = "8c99aa93b5e2f1bc8437d1bbbefd27b13e7694025331f77245d0c068ef1f8cbe" + +PACKAGECONFIG ??= "" +PACKAGECONFIG += "${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)}" + +PACKAGECONFIG[valgrind] = "--with-valgrind=yes, --with-valgrind=no, valgrind" +PACKAGECONFIG[gmp] = "--with-gmp=yes, --with-gmp=no, gmp" +PACKAGECONFIG[ipv6] = "--enable-ipv6, --disable-ipv6," + +EXTRA_OECONF = "\ + --disable-versioned-paths \ + --disable-rpath \ + --disable-dtrace \ + --enable-shared \ + --enable-load-relative \ + --with-pkg-config=pkg-config \ +" + +do_install() { + oe_runmake 'DESTDIR=${D}' install +} + +do_install_append_class-target () { + # Find out rbconfig.rb from .installed.list + rbconfig_rb=`grep rbconfig.rb ${B}/.installed.list` + # Remove build host directories + sed -i -e 's:--sysroot=${STAGING_DIR_TARGET}::g' \ + -e s:'--with-libtool-sysroot=${STAGING_DIR_TARGET}'::g \ + -e 's|${DEBUG_PREFIX_MAP}||g' \ + -e 's:${HOSTTOOLS_DIR}/::g' \ + -e 's:${RECIPE_SYSROOT_NATIVE}::g' \ + -e 's:${RECIPE_SYSROOT}::g' \ + -e 's:${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}::g' \ + ${D}$rbconfig_rb +} + +do_install_ptest () { + cp -rf ${S}/test ${D}${PTEST_PATH}/ + # install test-binaries + find $(find ./.ext -path '*/-test-') -name '*.so' -print0 \ + | tar --no-recursion --null -T - --no-same-owner --preserve-permissions -cf - \ + | tar -C ${D}${libdir}/ruby/${SHRT_VER}.0/ --no-same-owner --preserve-permissions --strip-components=2 -xf - + # adjust path to not assume build directory layout + sed -e 's|File.expand_path(.*\.\./bin/erb[^)]*|File.expand_path("${bindir}/erb"|g' \ + -i ${D}${PTEST_PATH}/test/erb/test_erb_command.rb + + cp -r ${S}/include ${D}/${libdir}/ruby/ + test_case_rb=`grep rubygems/test_case.rb ${B}/.installed.list` + sed -i -e 's:../../../test/:../../../ptest/test/:g' ${D}/$test_case_rb +} + +PACKAGES =+ "${PN}-ri-docs ${PN}-rdoc" + +SUMMARY_${PN}-ri-docs = "ri (Ruby Interactive) documentation for the Ruby standard library" +RDEPENDS_${PN}-ri-docs = "${PN}" +FILES_${PN}-ri-docs += "${datadir}/ri" + +SUMMARY_${PN}-rdoc = "RDoc documentation generator from Ruby source" +RDEPENDS_${PN}-rdoc = "${PN}" +FILES_${PN}-rdoc += "${libdir}/ruby/*/rdoc ${bindir}/rdoc" + +FILES_${PN} += "${datadir}/rubygems" + +FILES_${PN}-ptest_append_class-target = "\ + ${libdir}/ruby/include \ + ${libdir}/ruby/${SHRT_VER}.0/*/-test- \ +" + +BBCLASSEXTEND = "native" -- cgit 1.2.3-korg