git: 585e6543da46 - main - japanese/ruby-uconv: Fix build with Ruby 3.1 and 12.3-RELEASE

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Fri, 10 Feb 2023 05:51:44 UTC
The branch main has been updated by yasu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=585e6543da46bf87df03b8a759401004a55e8d94

commit 585e6543da46bf87df03b8a759401004a55e8d94
Author:     Yasuhiro Kimura <yasu@FreeBSD.org>
AuthorDate: 2023-01-26 11:04:34 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2023-02-10 05:50:33 +0000

    japanese/ruby-uconv: Fix build with Ruby 3.1 and 12.3-RELEASE
    
    While I'm here,
    * Add license information.
    * Pet portclippy.
    * Tidy up Makefile with portfmt.
    
    PR:             269166
    Approved by:    maintainer timeout
---
 japanese/ruby-uconv/Makefile               | 12 ++++++++----
 japanese/ruby-uconv/files/patch-extconf.rb | 10 ++++++++++
 2 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/japanese/ruby-uconv/Makefile b/japanese/ruby-uconv/Makefile
index 71ec25d3ffec..f19116e3900a 100644
--- a/japanese/ruby-uconv/Makefile
+++ b/japanese/ruby-uconv/Makefile
@@ -8,12 +8,16 @@ MAINTAINER=	ruby@FreeBSD.org
 COMMENT=	Unicode conversion library with Japanese codesets support for Ruby
 WWW=		http://www.yoshidam.net/Ruby.html #uconv
 
-USES=	ruby:extconf
+LICENSE=	RUBY
+LICENSE_FILE=	${WRKSRC}/README
 
-WRKSRC=		${WRKDIR}/${PORTNAME}
+USES=		ruby:extconf
+
+MAKE_ARGS=	INSTALL_DATA="${INSTALL_DATA}" \
+		INSTALL_PROG="${INSTALL_PROGRAM}"
 INSTALL_TARGET=	site-install
-MAKE_ARGS=	INSTALL_PROG="${INSTALL_PROGRAM}" \
-		INSTALL_DATA="${INSTALL_DATA}"
+
+WRKSRC=		${WRKDIR}/${PORTNAME}
 
 OPTIONS_DEFINE=	DOCS
 
diff --git a/japanese/ruby-uconv/files/patch-extconf.rb b/japanese/ruby-uconv/files/patch-extconf.rb
new file mode 100644
index 000000000000..ea48d76e7ca6
--- /dev/null
+++ b/japanese/ruby-uconv/files/patch-extconf.rb
@@ -0,0 +1,10 @@
+--- extconf.rb.orig	2003-03-12 05:20:47 UTC
++++ extconf.rb
+@@ -1,6 +1,6 @@
+ require 'mkmf'
+ 
+-$CFLAGS = ""
++$CFLAGS = "-fdeclspec"
+ #$CFLAGS="-DUSE_EUC -DUSE_SJIS"
+ ##$CFLAGS="-DUSE_SJIS -DUSE_WIN32API"
+