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
This commit is contained in:
Po-Chuan Hsieh 2022-02-28 17:39:58 +08:00
parent 986ceae9b2
commit f800970bc8
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
3 changed files with 14 additions and 10 deletions

View File

@ -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-format-executable \
--no-regenerate-binstubs \
--no-regenerate-plugins \
--format-executable
--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:

View File

@ -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%%