From 78a9fbc351cf0e12b653a69438a9e6b9d1292246 Mon Sep 17 00:00:00 2001 From: Jun Aruga Date: Fri, 1 Oct 2021 14:30:59 +0200 Subject: [PATCH] Add AC_PROG_CC to make C++ compiler dependency optional on autoconf >= 2.70. Resolves: rhbz#1999479 --- ruby-3.1.0-autoconf-2.70-add-ac-prog-cc.patch | 27 +++++++++++++++++++ ruby.spec | 4 +++ 2 files changed, 31 insertions(+) create mode 100644 ruby-3.1.0-autoconf-2.70-add-ac-prog-cc.patch diff --git a/ruby-3.1.0-autoconf-2.70-add-ac-prog-cc.patch b/ruby-3.1.0-autoconf-2.70-add-ac-prog-cc.patch new file mode 100644 index 0000000..1bd20bd --- /dev/null +++ b/ruby-3.1.0-autoconf-2.70-add-ac-prog-cc.patch @@ -0,0 +1,27 @@ +From 912a8dcfc5369d840dcd6bf0f88ee0bac7d902d6 Mon Sep 17 00:00:00 2001 +From: Nobuyoshi Nakada +Date: Thu, 30 Sep 2021 18:24:37 +0900 +Subject: [PATCH] Needs `AC_PROG_CC` + +Although `AC_PROG_CC_C99` has been obsolete, `AC_PROG_CC` is not +and the latter is necessary not to make C++ compiler mandatory. +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b24a8f59b0..c7059ee1ec 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -203,7 +203,7 @@ rb_test_CXXFLAGS=${CXXFLAGS+yes} + # BSD's ports and MacPorts prefix GNU binutils with 'g' + + dnl Seems necessarily in order to add -std=gnu99 option for gcc 4.9. +-m4_version_prereq([2.70], [], [AC_PROG_CC_C99]) ++m4_version_prereq([2.70], [AC_PROG_CC], [AC_PROG_CC_C99]) + + AC_PROG_CXX + AC_PROG_CPP +-- +2.31.1 + diff --git a/ruby.spec b/ruby.spec index 414eb19..eb43d42 100644 --- a/ruby.spec +++ b/ruby.spec @@ -164,6 +164,9 @@ Patch18: ruby-3.1.0-addr2line-DW_FORM_ref_addr.patch # Avoid possible timeout errors in TestBugReporter#test_bug_reporter_add. # https://bugs.ruby-lang.org/issues/16492 Patch19: ruby-2.7.1-Timeout-the-test_bug_reporter_add-witout-raising-err.patch +# Add AC_PROG_CC to make C++ compiler dependency optional on autoconf >= 2.70. +# https://github.com/ruby/ruby/commit/912a8dcfc5369d840dcd6bf0f88ee0bac7d902d6 +Patch20: ruby-3.1.0-autoconf-2.70-add-ac-prog-cc.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Suggests: rubypick @@ -614,6 +617,7 @@ rm -rf ext/fiddle/libffi* %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 # Provide an example of usage of the tapset: cp -a %{SOURCE3} .