gentoo/dev-lang/ruby/files/3.3/015-strscan-update-extconf.rb.patch
Z. Liu a5f0a97207
dev-lang/ruby: fix build issue with gcc15
1. if USE="socks5", full protoype is required by C23
2. if CFLAGS="-flto -Werror=lto-type-mismatch", and building with
   -std=c23 (default for gcc 15), build will fail with"
   "static declaration of ‘rb_io_closed_p’ follows non-static declaration"

all patches are from upstream (w/ minor change if backport)

Closes: https://bugs.gentoo.org/945502
Closes: https://bugs.gentoo.org/945643
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/42828
Closes: https://github.com/gentoo/gentoo/pull/42828
Signed-off-by: Sam James <sam@gentoo.org>
2025-09-19 15:08:18 +01:00

30 lines
934 B
Diff

From 4585ccd90f4251f4d42bfc338a5e14100236fa15 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@ruby-lang.org>
Date: Thu, 12 Jun 2025 10:32:49 +0900
Subject: [PATCH] [ruby/strscan] Update extconf.rb
(https://github.com/ruby/strscan/pull/158)
- `have_func` includes "ruby.h" by default.
- include "ruby/re.h" where `rb_reg_onig_match` is declared.
https://github.com/ruby/strscan/commit/1ac96f47e9
diff --git a/ext/strscan/extconf.rb b/ext/strscan/extconf.rb
index bd65606a4e..abcbdb3ad2 100644
--- a/ext/strscan/extconf.rb
+++ b/ext/strscan/extconf.rb
@@ -2,8 +2,8 @@
require 'mkmf'
if RUBY_ENGINE == 'ruby'
$INCFLAGS << " -I$(top_srcdir)" if $extmk
- have_func("onig_region_memsize", "ruby.h")
- have_func("rb_reg_onig_match", "ruby.h")
+ have_func("onig_region_memsize")
+ have_func("rb_reg_onig_match", "ruby/re.h")
create_makefile 'strscan'
else
File.write('Makefile', dummy_makefile("").join)
--
2.45.2