File:  [cvs.NetBSD.org] / pkgsrc / lang / ruby / gem-vars.mk
Revision 1.13: download - view: text, annotated - select for diffs
Fri Jan 14 15:42:08 2022 UTC (2 years, 10 months ago) by taca
Branches: MAIN
CVS tags: pkgsrc-2024Q3-base, pkgsrc-2024Q3, pkgsrc-2024Q2-base, pkgsrc-2024Q2, pkgsrc-2024Q1-base, pkgsrc-2024Q1, pkgsrc-2023Q4-base, pkgsrc-2023Q4, pkgsrc-2023Q3-base, pkgsrc-2023Q3, pkgsrc-2023Q2-base, pkgsrc-2023Q2, pkgsrc-2023Q1-base, pkgsrc-2023Q1, pkgsrc-2022Q4-base, pkgsrc-2022Q4, pkgsrc-2022Q3-base, pkgsrc-2022Q3, pkgsrc-2022Q2-base, pkgsrc-2022Q2, pkgsrc-2022Q1-base, pkgsrc-2022Q1, HEAD
lang/ruby: clean up some macro handling

1. Move some variables from gem-vars.mk to rubyversion.mk:

	GEM_EXTSBASE
	GEM_PATH
	GEM_PLUGINSDIR
	RUBYGEM
	RUBY_GEM_ARCH

2. Drop unused GEM_EXTSDIR_NEEDS_SUBDIR (it is always true).

3. Define bundled module's version as "MODULE_VER".

4. Generate PLIST_SUBST and PRINT_PLIST_AWK from bundled module's name
   if corresponding MODULE_VER is defined.

5. Do not run ${RUBYGEM} for RUYB_GEM_ARCH and RUBY_GEM_VER.

NFCI.

# $NetBSD: gem-vars.mk,v 1.13 2022/01/14 15:42:08 taca Exp $
#
# This Makefile fragment defines various make(1) variables for Ruby gems
# support.
#
.if !defined(_RUBYGEM_VARS_MK)
_RUBYGEM_VARS_MK=	# defined

RUBYGEM_VERBOSE?=	No

RUBYGEM_LANG?=	en_US.UTF-8
RUBYGEM_ENV?=	LANG=${RUBYGEM_LANG} LC_CTYPE=${RUBYGEM_LANG}

_RUBY_GEM_MAJOR=	${RUBY_RUBYGEMS_VER:C/([0-9]+)\..*/\1/}
_RUBY_GEM_MINOR=	${RUBY_RUBYGEMS_VER:C/[0-9]+\.([0-9]+)\..*/\1/}

PLIST_VARS+=	ruby_plugins

GEM_EXTSDIR=	${GEM_EXTSBASE}/${GEM_NAME}

PLIST_SUBST+=	GEM_EXTSDIR=${GEM_EXTSDIR}

.if ${_RUBY_GEM_MAJOR} >= 3 && ${_RUBY_GEM_MINOR} >= 2
PLIST.ruby_plugins=	YES
.endif

.endif

CVSweb <webmaster@jp.NetBSD.org>