Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Apr 2016 20:19:16 +0000 (UTC)
From:      Steve Wills <swills@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r414131 - in head/Mk: . Uses
Message-ID:  <201604272019.u3RKJG2e098536@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: swills
Date: Wed Apr 27 20:19:16 2016
New Revision: 414131
URL: https://svnweb.freebsd.org/changeset/ports/414131

Log:
  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

Modified:
  head/Mk/Uses/gem.mk
  head/Mk/bsd.sanity.mk

Modified: head/Mk/Uses/gem.mk
==============================================================================
--- head/Mk/Uses/gem.mk	Wed Apr 27 20:05:11 2016	(r414130)
+++ head/Mk/Uses/gem.mk	Wed Apr 27 20:19:16 2016	(r414131)
@@ -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

Modified: head/Mk/bsd.sanity.mk
==============================================================================
--- head/Mk/bsd.sanity.mk	Wed Apr 27 20:05:11 2016	(r414130)
+++ head/Mk/bsd.sanity.mk	Wed Apr 27 20:19:16 2016	(r414131)
@@ -161,6 +161,14 @@ DEV_ERROR+=	"WANT_SDL is no longer suppo
 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 \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604272019.u3RKJG2e098536>