From e7893545113b0d0c6581c75ddabac6b681a4739f Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Mon, 8 Feb 2021 11:59:24 +0100 Subject: ruby: update 2.7.2 -> 3.0.0 Drop 0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch as files removed upstream. License-Update: formatting Drop autoconf270.patch, as no longer needed with 3.0.0 (I verified against master-next which has the new autoconf). (From OE-Core rev: 8fbf04053845aac24e0c0f1395051b60294e02a3) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- meta/recipes-devtools/ruby/ruby.inc | 11 ++- ...bang-of-libexec-y2racc-and-libexec-racc2y.patch | 38 --------- ...0002-Obey-LDFLAGS-for-the-link-of-libruby.patch | 14 ++-- meta/recipes-devtools/ruby/ruby/autoconf270.patch | 34 -------- .../ruby/ruby/remove_has_include_macros.patch | 17 +++- meta/recipes-devtools/ruby/ruby_2.7.2.bb | 94 ---------------------- meta/recipes-devtools/ruby/ruby_3.0.0.bb | 91 +++++++++++++++++++++ 7 files changed, 115 insertions(+), 184 deletions(-) delete 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/autoconf270.patch delete mode 100644 meta/recipes-devtools/ruby/ruby_2.7.2.bb create mode 100644 meta/recipes-devtools/ruby/ruby_3.0.0.bb diff --git a/meta/recipes-devtools/ruby/ruby.inc b/meta/recipes-devtools/ruby/ruby.inc index 7b6d4edc61..1cede8d47c 100644 --- a/meta/recipes-devtools/ruby/ruby.inc +++ b/meta/recipes-devtools/ruby/ruby.inc @@ -7,12 +7,11 @@ It is simple, straight-forward, and extensible. \ 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=5b8c87559868796979806100db3f3805 \ - file://BSDL;md5=19aaf65c88a40b508d17ae4be539c4b5\ - file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263\ - file://LEGAL;md5=2b6d62dc0d608f34d510ca3f428110ec \ -" +LIC_FILES_CHKSUM = "file://COPYING;md5=5b8c87559868796979806100db3f3805 \ + file://BSDL;md5=8b50bc6de8f586dc66790ba11d064d75 \ + file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://LEGAL;md5=cfe5b0bc9f051b58c7e78db882ca5f9b \ + " DEPENDS = "ruby-native zlib openssl libyaml gdbm readline libffi" DEPENDS_class-native = "openssl-native libyaml-native readline-native zlib-native" 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 deleted file mode 100644 index f316bed7bd..0000000000 --- a/meta/recipes-devtools/ruby/ruby/0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch +++ /dev/null @@ -1,38 +0,0 @@ -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 b31dee1128..4b954e439b 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 @@ -1,27 +1,25 @@ -From 6d608326970b1613633d7715ebb7d628dfcd16ee Mon Sep 17 00:00:00 2001 +From 07fd1ada322eda6c05ac45c08fc814976f31b596 Mon Sep 17 00:00:00 2001 From: Christopher Larson Date: Thu, 5 May 2016 10:59:07 -0700 -Subject: [PATCH 2/3] Obey LDFLAGS for the link of libruby +Subject: [PATCH] Obey LDFLAGS for the link of libruby Signed-off-by: Christopher Larson Upstream-Status: Pending + --- template/Makefile.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/template/Makefile.in b/template/Makefile.in -index fa1e19ef37..bbd07fa34b 100644 +index f5a3149..5cc75ae 100644 --- a/template/Makefile.in +++ b/template/Makefile.in -@@ -109,7 +109,7 @@ MISSING = @LIBOBJS@ @ALLOCA@ - ENABLE_SHARED = @ENABLE_SHARED@ +@@ -114,7 +114,7 @@ ENABLE_SHARED = @ENABLE_SHARED@ LDSHARED = @LIBRUBY_LDSHARED@ DLDSHARED = @DLDSHARED@ + XDLDFLAGS = @DLDFLAGS@ -DLDFLAGS = @LIBRUBY_DLDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) +DLDFLAGS = @LIBRUBY_DLDFLAGS@ @LDFLAGS@ $(XLDFLAGS) $(ARCH_FLAG) SOLIBS = @SOLIBS@ ENABLE_DEBUG_ENV = @ENABLE_DEBUG_ENV@ MAINLIBS = @MAINLIBS@ --- -2.23.0.rc1 - diff --git a/meta/recipes-devtools/ruby/ruby/autoconf270.patch b/meta/recipes-devtools/ruby/ruby/autoconf270.patch deleted file mode 100644 index 8d205bde43..0000000000 --- a/meta/recipes-devtools/ruby/ruby/autoconf270.patch +++ /dev/null @@ -1,34 +0,0 @@ -This macro breaks under autoconf 2.70. Since we don't worry abot darwin or -openbsd builds, simply remove it. - -Upstream-Status: Pending -RP - 2021/1/28 - -Index: ruby-2.7.2/configure.ac -=================================================================== ---- ruby-2.7.2.orig/configure.ac -+++ ruby-2.7.2/configure.ac -@@ -170,23 +170,6 @@ dnl orig_cxxflags="$cxxflags" - dnl cxxflags="$cxxflags "'${optflags} ${debugflags} ${warnflags}' - dnl ]) - --AS_CASE(["$host_os:$build_os"], --[darwin*:darwin*], [ -- AC_CHECK_TOOLS(CC, [clang gcc cc]) -- # Following Apple deployed clang are broken -- # clang version 1.0 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-23 exported) -- # Apple clang version 2.0 (tags/Apple/clang-137) (based on LLVM 2.9svn) -- # Apple clang version 2.1 (tags/Apple/clang-163.7.1) (based on LLVM 3.0svn) -- AS_IF([! $CC -E -xc - </dev/null], [ -- @%:@if defined __APPLE_CC__ && defined __clang_major__ && __clang_major__ < 3 -- @%:@error premature clang -- @%:@endif --SRC -- AC_MSG_ERROR([clang version 3.0 or later is required]) -- ])], --[openbsd*:openbsd*], [ -- AC_CHECK_TOOLS(CC, [cc]) --]) - AS_IF([test x"${build}" != x"${host}"], [ - AC_CHECK_TOOL(CC, gcc) - ]) diff --git a/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch b/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch index a1e6330445..6e90a8ee77 100644 --- a/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch +++ b/meta/recipes-devtools/ruby/ruby/remove_has_include_macros.patch @@ -1,4 +1,7 @@ -Filter out __has_include* compiler defines +From 303fe0d20184203f1ac86d2a77b1447d47c8c29d Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 26 Jan 2020 11:27:40 -0800 +Subject: [PATCH] Filter out __has_include* compiler defines They are internal to compiler and this header is later on includes in C files, but newer gcc >= 10 complains about it. @@ -13,12 +16,18 @@ error in initial header file: Upstream-Status: Pending Signed-off-by: Khem Raj +--- + common.mk | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/common.mk b/common.mk +index 7633050..422aa9c 100644 --- a/common.mk +++ b/common.mk -@@ -221,6 +221,8 @@ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT - $(TIMESTAMPDIR)/$(arch)/.time +@@ -233,6 +233,8 @@ $(TIMESTAMPDIR)/$(MJIT_HEADER:.h=)$(MJIT_HEADER_SUFFIX).time: probes.h vm.$(OBJE $(ECHO) building $(@F:.time=.h) - $(Q) $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new + $(MINIRUBY) $(tooldir)/mjit_tabs.rb "$(MJIT_TABS)" \ + $(CPP) -DMJIT_HEADER $(MJIT_HEADER_FLAGS) $(CFLAGS) $(XCFLAGS) $(CPPFLAGS) $(srcdir)/vm.c $(CPPOUTFLAG)$(@F:.time=.h).new + $(Q)sed -i -e "/#define __has_include __has_include/d" $(@F:.time=.h).new + $(Q)sed -i -e "/#define __has_include_next __has_include_next/d" $(@F:.time=.h).new $(Q) $(IFCHANGE) "--timestamp=$@" $(@F:.time=.h) $(@F:.time=.h).new diff --git a/meta/recipes-devtools/ruby/ruby_2.7.2.bb b/meta/recipes-devtools/ruby/ruby_2.7.2.bb deleted file mode 100644 index 8c338ebecf..0000000000 --- a/meta/recipes-devtools/ruby/ruby_2.7.2.bb +++ /dev/null @@ -1,94 +0,0 @@ -require ruby.inc - -DEPENDS_append_libc-musl = " libucontext" - -SRC_URI += " \ - file://remove_has_include_macros.patch \ - file://run-ptest \ - file://0001-Modify-shebang-of-libexec-y2racc-and-libexec-racc2y.patch \ - file://0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch \ - file://autoconf270.patch \ - " - -SRC_URI[md5sum] = "2d4a28dcfa38352a627a597f6057c465" -SRC_URI[sha256sum] = "6e5706d0d4ee4e1e2f883db9d768586b4d06567debea353c796ec45e8321c3d4" - -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 \ -" - -EXTRA_OECONF_append_libc-musl = "\ - LIBS='-lucontext' \ - ac_cv_func_isnan=yes \ - ac_cv_func_isinf=yes \ -" - -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 -D ${S}/tool/test/runner.rb ${D}${PTEST_PATH}/tool/test/runner.rb - cp -r ${S}/tool/lib ${D}${PTEST_PATH}/tool/ - mkdir -p ${D}${PTEST_PATH}/lib - cp -r ${S}/lib/did_you_mean ${S}/lib/rdoc ${D}${PTEST_PATH}/lib - - # 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_3.0.0.bb b/meta/recipes-devtools/ruby/ruby_3.0.0.bb new file mode 100644 index 0000000000..5e143ee87f --- /dev/null +++ b/meta/recipes-devtools/ruby/ruby_3.0.0.bb @@ -0,0 +1,91 @@ +require ruby.inc + +DEPENDS_append_libc-musl = " libucontext" + +SRC_URI += " \ + file://remove_has_include_macros.patch \ + file://run-ptest \ + file://0001-template-Makefile.in-do-not-write-host-cross-cc-item.patch \ + " + +SRC_URI[sha256sum] = "a13ed141a1c18eb967aac1e33f4d6ad5f21be1ac543c344e0d6feeee54af8e28" + +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 \ +" + +EXTRA_OECONF_append_libc-musl = "\ + LIBS='-lucontext' \ + ac_cv_func_isnan=yes \ + ac_cv_func_isinf=yes \ +" + +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 -D ${S}/tool/test/runner.rb ${D}${PTEST_PATH}/tool/test/runner.rb + cp -r ${S}/tool/lib ${D}${PTEST_PATH}/tool/ + mkdir -p ${D}${PTEST_PATH}/lib + cp -r ${S}/lib/did_you_mean ${S}/lib/rdoc ${D}${PTEST_PATH}/lib + + # 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 v1.2.3-54-g00ecf