git: 1076bf74d562 - main - devel/ruby-gems: Clean up
Po-Chuan Hsieh
sunpoet at FreeBSD.org
Tue Jul 6 15:07:01 UTC 2021
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=1076bf74d562c5cea1e730f2e80b2a1b6877c7a9
commit 1076bf74d562c5cea1e730f2e80b2a1b6877c7a9
Author: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
AuthorDate: 2021-07-06 14:59:40 +0000
Commit: Po-Chuan Hsieh <sunpoet at FreeBSD.org>
CommitDate: 2021-07-06 14:59:40 +0000
devel/ruby-gems: Clean up
- Replace RUBY_VER_SHORT with RUBY_SUFFIX (defined in Mk/bsd.ruby.mk)
- Remove interim knob: GEMS_BASE_DIR, GEMS_DOC_BASE_DIR and GEMS_DOC_DIR
- Remove unused knobs: GEMS_BASE_DIR_P, GEMS_DOC_BASE_DIR_P, GEMS_DOC_DIR_P and GEMS_VER_DIR_P
- Remove unused PLIST_SUB: DISTNAME
---
devel/ruby-gems/Makefile | 41 ++++++++++++++---------------------------
devel/ruby-gems/pkg-plist | 2 +-
2 files changed, 15 insertions(+), 28 deletions(-)
diff --git a/devel/ruby-gems/Makefile b/devel/ruby-gems/Makefile
index 6565f0cb8496..11d27f926763 100644
--- a/devel/ruby-gems/Makefile
+++ b/devel/ruby-gems/Makefile
@@ -5,7 +5,7 @@ PORTVERSION= 3.0.8
CATEGORIES= devel ruby
MASTER_SITES= https://rubygems.org/rubygems/
PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
-DISTNAME= ruby${PORTNAME}-${PORTVERSION}
+DISTNAME= rubygems-${PORTVERSION}
DIST_SUBDIR= ruby
MAINTAINER= ruby at FreeBSD.org
@@ -19,31 +19,20 @@ LICENSE_FILE_RUBY= ${WRKSRC}/LICENSE.txt
USES= tar:tgz
USE_RUBY= yes
+GEMS_VER_DIR= lib/ruby/gems/${RUBY_VER}
+GEMS_ENV= DONT_USE_BUNDLER_FOR_GEMDEPS=true GEM_HOME=${STAGEDIR}${PREFIX}/${GEMS_VER_DIR}
NO_ARCH= yes
NO_BUILD= yes
RUBY_SETUP= setup.rb
-
-GEMS_BASE_DIR= lib/ruby/gems
-GEMS_BASE_DIR_P= ${GEMS_BASE_DIR}
-GEMS_VER_DIR= ${GEMS_BASE_DIR}/${RUBY_VER}
-GEMS_VER_DIR_P= ${GEMS_BASE_DIR_P}/%%RUBY_VER%%
-GEMS_DOC_BASE_DIR= ${GEMS_VER_DIR}/doc
-GEMS_DOC_BASE_DIR_P= ${GEMS_VER_DIR_P}/doc
-GEMS_DOC_DIR= ${GEMS_DOC_BASE_DIR}/${DISTNAME}
-GEMS_DOC_DIR_P= ${GEMS_DOC_BASE_DIR_P}/%%DISTNAME%%
-GEMS_ENV= DONT_USE_BUNDLER_FOR_GEMDEPS=true GEM_HOME=${STAGEDIR}${PREFIX}/${GEMS_VER_DIR}
RUBY_SETUP_OPTIONS= --destdir=${STAGEDIR} --no-regenerate-binstubs
-RUBY_VER_SHORT= ${RUBY_VER:S/.//}
-GEMS_DIR= ${GEMS_VER_DIR}/gems
-DOC_DIR= ${GEMS_VER_DIR}/doc
-CACHE_DIR= ${GEMS_VER_DIR}/cache
-SPEC_DIR= ${GEMS_VER_DIR}/specifications
-EXT_DIR= ${GEMS_VER_DIR}/extensions
+CACHE_DIR= ${GEMS_VER_DIR}/cache
+DOC_DIR= ${GEMS_VER_DIR}/doc
+EXT_DIR= ${GEMS_VER_DIR}/extensions
+GEMS_DIR= ${GEMS_VER_DIR}/gems
+SPEC_DIR= ${GEMS_VER_DIR}/specifications
-PLIST_SUB= DISTNAME="${DISTNAME}" \
- RUBY_VER_SHORT="${RUBY_VER_SHORT}" \
- GEMS_DIR="${GEMS_DIR}" \
+PLIST_SUB= GEMS_DIR="${GEMS_DIR}" \
DOC_DIR="${DOC_DIR}" \
CACHE_DIR="${CACHE_DIR}" \
SPEC_DIR="${SPEC_DIR}" \
@@ -56,18 +45,16 @@ DOCS_VARS_OFF= RUBY_SETUP_OPTIONS+="--no-ri --no-rdoc"
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_VER_DIR}
${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_VER_DIR}/build_info
- ${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_DIR}
- ${MKDIR} ${STAGEDIR}${PREFIX}/${DOC_DIR}
${MKDIR} ${STAGEDIR}${PREFIX}/${CACHE_DIR}
- ${MKDIR} ${STAGEDIR}${PREFIX}/${SPEC_DIR}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/${DOC_DIR}
${MKDIR} ${STAGEDIR}${PREFIX}/${EXT_DIR}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/${GEMS_DIR}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/${SPEC_DIR}
cd ${WRKSRC}/ && ${SETENV} ${GEMS_ENV} ${RUBY} ${RUBY_SETUP} ${RUBY_SETUP_OPTIONS}
- ${LN} -sf gem${RUBY_VER_SHORT} ${STAGEDIR}${PREFIX}/bin/gem
+ ${LN} -sf gem${RUBY_SUFFIX} ${STAGEDIR}${PREFIX}/bin/gem
-#
# Find all RDOC and RI files
-#
post-install-DOCS-on:
- cd ${STAGEDIR}${PREFIX}/ && ${FIND} -ds ${GEMS_DOC_DIR}/ ! -type d >> ${TMPPLIST}
+ cd ${STAGEDIR}${PREFIX}/ && ${FIND} -ds ${DOC_DIR}/ ! -type d >> ${TMPPLIST}
.include <bsd.port.mk>
diff --git a/devel/ruby-gems/pkg-plist b/devel/ruby-gems/pkg-plist
index ab5d46bc6305..37bb05dd8483 100644
--- a/devel/ruby-gems/pkg-plist
+++ b/devel/ruby-gems/pkg-plist
@@ -1,5 +1,5 @@
bin/gem
-bin/gem%%RUBY_VER_SHORT%%
+bin/gem%%RUBY_SUFFIX%%
%%RUBY_SITELIBDIR%%/rubygems.rb
%%RUBY_SITELIBDIR%%/rubygems/available_set.rb
%%RUBY_SITELIBDIR%%/rubygems/basic_specification.rb
More information about the dev-commits-ports-all
mailing list