1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-30 05:40:06 +00:00

Improve gem.mk

* Check for valid args to USES=gem
* Make autoplist default, allowing it to be specified (which is a no-op), or
  turned off
* Add sanity checks for USE_RUBYGEMS RUBYGEM_AUTOPLIST

Requested by:	mat
Discussed with:	mat
This commit is contained in:
Steve Wills 2016-04-27 20:19:16 +00:00
parent 36df7703e4
commit 38fb960f49
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=414131
2 changed files with 18 additions and 3 deletions

View File

@ -12,6 +12,15 @@
_INCLUDE_USES_GEM_MK= yes
_valid_ARGS= autoplist noautoplist
# Sanity check
.for arg in ${gem_ARGS}
. if empty(_valid_ARGS:M${arg})
IGNORE= Incorrect 'USES+= gem:${gem_ARGS}' usage: argument [${arg}] is not recognized
. endif
.endfor
BUILD_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems
RUN_DEPENDS+= ${RUBYGEMBIN}:devel/ruby-gems
@ -122,7 +131,7 @@ do-install:
.endif
.endif
.if ${gem_ARGS} == "autoplist"
.if empty(gem_ARGS:Mnoautoplist)
_USES_install+= 820:gem-autoplist
gem-autoplist:
@${ECHO} ${GEM_SPEC} >> ${TMPPLIST}
@ -136,8 +145,6 @@ gem-autoplist:
${FIND} -ds ${STAGEDIR}${PREFIX}/${EXT_DIR} -type f -print | ${SED} -E -e \
's,^${STAGEDIR}${PREFIX}/?,,' >> ${TMPPLIST} ; \
fi
.else
IGNORE= Incorrect 'USES+=gem:${gem_ARGS}' expecting 'USES+=gem[:autoplist]'
.endif
.endif

View File

@ -161,6 +161,14 @@ DEV_ERROR+= "WANT_SDL is no longer supported. If you need SDL, use USE_SDL, if y
DEV_ERROR+= "USE_RC_SUBR=yes has not been supported for a long time, remove it."
.endif
.if defined(USE_RUBYGEMS) && !defined(RUBYGEM_AUTOPLIST)
DEV_ERROR+= "USE_RUBYGEMS is no longer supported, please use USES=gem:noautoplist"
.endif
.if defined(RUBYGEM_AUTOPLIST)
DEV_ERROR+= "RUBYGEM_AUTOPLIST is no longer supported, please use USES=gem"
.endif
SANITY_UNSUPPORTED= USE_OPENAL USE_FAM USE_MAKESELF USE_ZIP USE_LHA USE_CMAKE \
USE_READLINE USE_ICONV PERL_CONFIGURE PERL_MODBUILD \
USE_PERL5_BUILD USE_PERL5_RUN USE_DISPLAY USE_FUSE \