$OpenBSD: patch-extconf_rb,v 1.2 2021/09/02 14:59:45 jeremy Exp $

Support ruby 3.0+.

Index: extconf.rb
--- extconf.rb.orig
+++ extconf.rb
@@ -16,14 +16,14 @@ libruby = CONFIG['RUBY_SO_NAME']
 makefile =  "all: arirang\n"
 makefile += "exec_prefix = /usr/local\n"
 makefile += "CC=         cc\n"
-makefile += "CFLAGS+=-Wall -pedantic\n"
+makefile += "CFLAGS+=-Wall -pedantic -fdeclspec\n"
 makefile += "TARGET=     arirang\n"
 makefile += "SRCS=       arirang.c grabhead.c rule.c screen.c report.c arissl.c ariruby.c proxy.c debug.c\n"
 makefile += "OBJS=       $(SRCS:.c=.o)\n\n"
 
 makefile += ".c.o:\n"
 
-if RUBY_VERSION =~ /1.9/ then
+if RUBY_VERSION !~ /1.8/ then
     makefile += "	$(CC) $(CFLAGS) -c $< -I #{$topdir} -I #{$topdir}/#{RUBY_PLATFORM} -DRUBY_19\n\n"
 else
     makefile += "	$(CC) $(CFLAGS) -c $< -I #{$topdir} \n\n"
