git: f800970bc87a - main - devel/ruby-gems: Clean up

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 28 Feb 2022 12:53:36 UTC
The branch main has been updated by sunpoet:

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

commit f800970bc87ab1fac4110c4482ec064be1140b90
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-02-28 09:39:58 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-02-28 12:46:37 +0000

    devel/ruby-gems: Clean up
    
    - Remove unnecessary bin/gem{26,27,30,31}
    - Add PLUGINS_DIR
    - Silence extraction message
    - Simplify patch file name
    - Bump PORTREVISION for package change
---
 devel/ruby-gems/Makefile                            | 21 +++++++++++++--------
 ...ch-bundler-remove.patch => patch-remove-bundler} |  0
 devel/ruby-gems/pkg-plist                           |  3 +--
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/devel/ruby-gems/Makefile b/devel/ruby-gems/Makefile
index 141bd7a9ed80..2baa88184c4d 100644
--- a/devel/ruby-gems/Makefile
+++ b/devel/ruby-gems/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	gems
 PORTVERSION=	3.3.7
+PORTREVISION=	1
 CATEGORIES=	devel ruby
 MASTER_SITES=	https://rubygems.org/rubygems/
 PKGNAMEPREFIX=	${RUBY_PKGNAMEPREFIX}
@@ -27,20 +28,22 @@ NO_ARCH=	yes
 NO_BUILD=	yes
 RUBY_SETUP=	setup.rb
 RUBY_SETUP_OPTIONS=	--destdir=${STAGEDIR} \
-	--no-regenerate-binstubs \
-	--no-regenerate-plugins \
-	--format-executable
+			--no-format-executable \
+			--no-regenerate-binstubs \
+			--no-regenerate-plugins
 
 CACHE_DIR=	${GEMS_BASE_DIR}/cache
 DOC_DIR=	${GEMS_BASE_DIR}/doc
 EXT_DIR=	${GEMS_BASE_DIR}/extensions
 GEMS_DIR=	${GEMS_BASE_DIR}/gems
+PLUGINS_DIR=	${GEMS_BASE_DIR}/plugins
 SPEC_DIR=	${GEMS_BASE_DIR}/specifications
 
 PLIST_SUB=	CACHE_DIR="${CACHE_DIR}" \
 		DOC_DIR="${DOC_DIR}" \
 		EXT_DIR="${EXT_DIR}" \
 		GEMS_DIR="${GEMS_DIR}" \
+		PLUGINS_DIR="${PLUGINS_DIR}" \
 		SPEC_DIR="${SPEC_DIR}"
 
 CPE_VENDOR=	rubygems
@@ -51,21 +54,23 @@ OPTIONS_DEFINE=	DOCS
 DOCS_VARS_OFF=	RUBY_SETUP_OPTIONS+="--no-ri --no-rdoc"
 
 post-extract:
-	${RM} -r ${WRKSRC}/bundler
-	${RM} -r ${WRKSRC}/lib/rubygems/ssl_certs
-	${FIND} ${WRKSRC} -name .document -delete
+	@${RM} -r ${WRKSRC}/bundler
+	@${RM} -r ${WRKSRC}/lib/rubygems/ssl_certs
+	@${FIND} ${WRKSRC} -name .document -delete
+
+post-patch:
+	@${RM} ${WRKSRC}/lib/rubygems/commands/setup_command.rb.orig
 
 do-install:
 	${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}
 	${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}/build_info
-	${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_BASE_DIR}/plugins
 	${MKDIR} ${STAGEDIR}${PREFIX}/${CACHE_DIR}
 	${MKDIR} ${STAGEDIR}${PREFIX}/${DOC_DIR}
 	${MKDIR} ${STAGEDIR}${PREFIX}/${EXT_DIR}
 	${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_DIR}
+	${MKDIR} ${STAGEDIR}${PREFIX}/${PLUGINS_DIR}
 	${MKDIR} ${STAGEDIR}${PREFIX}/${SPEC_DIR}
 	cd ${WRKSRC}/ && ${SETENV} ${GEMS_ENV} ${RUBY} ${RUBY_SETUP} ${RUBY_SETUP_OPTIONS}
-	${LN} -sf gem${RUBY_SUFFIX} ${STAGEDIR}${PREFIX}/bin/gem
 
 # Find all RDOC and RI files
 post-install-DOCS-on:
diff --git a/devel/ruby-gems/files/patch-bundler-remove.patch b/devel/ruby-gems/files/patch-remove-bundler
similarity index 100%
rename from devel/ruby-gems/files/patch-bundler-remove.patch
rename to devel/ruby-gems/files/patch-remove-bundler
diff --git a/devel/ruby-gems/pkg-plist b/devel/ruby-gems/pkg-plist
index f63ddbdbc651..490ef682d2d1 100644
--- a/devel/ruby-gems/pkg-plist
+++ b/devel/ruby-gems/pkg-plist
@@ -1,5 +1,4 @@
 bin/gem
-bin/gem%%RUBY_SUFFIX%%
 %%RUBY_SITELIBDIR%%/rubygems.rb
 %%RUBY_SITELIBDIR%%/rubygems/available_set.rb
 %%RUBY_SITELIBDIR%%/rubygems/basic_specification.rb
@@ -198,9 +197,9 @@ bin/gem%%RUBY_SUFFIX%%
 %%RUBY_SITELIBDIR%%/rubygems/version.rb
 %%RUBY_SITELIBDIR%%/rubygems/version_option.rb
 @dir lib/ruby/gems/%%RUBY_VER%%/build_info
-@dir lib/ruby/gems/%%RUBY_VER%%/plugins
 @dir %%CACHE_DIR%%
 @dir %%DOC_DIR%%
 @dir %%EXT_DIR%%
 @dir %%GEMS_DIR%%
+@dir %%PLUGINS_DIR%%
 @dir %%SPEC_DIR%%