pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/ruby
Module Name: pkgsrc
Committed By: taca
Date: Mon Jan 11 11:21:31 UTC 2021
Modified Files:
pkgsrc/lang/ruby: gem-vars.mk gem.mk
Log Message:
lang/ruby: add GEM_PLUGINSDIR support
* Add GEM_PLUGINSDIR support required by rubygems 3.2 and later.
* GEM_EXTSDIR is required unconditonally.
To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 pkgsrc/lang/ruby/gem-vars.mk
cvs rdiff -u -r1.44 -r1.45 pkgsrc/lang/ruby/gem.mk
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/ruby/gem-vars.mk
diff -u pkgsrc/lang/ruby/gem-vars.mk:1.11 pkgsrc/lang/ruby/gem-vars.mk:1.12
--- pkgsrc/lang/ruby/gem-vars.mk:1.11 Mon Jan 11 06:51:27 2021
+++ pkgsrc/lang/ruby/gem-vars.mk Mon Jan 11 11:21:31 2021
@@ -1,4 +1,4 @@
-# $NetBSD: gem-vars.mk,v 1.11 2021/01/11 06:51:27 taca Exp $
+# $NetBSD: gem-vars.mk,v 1.12 2021/01/11 11:21:31 taca Exp $
#
# This Makefile fragment defines various make(1) variables for Ruby gems
# support.
@@ -21,10 +21,15 @@ RUBYGEM= ${LOCALBASE}/bin/${RUBYGEM_NAME
GEM_EXTSDIR_NEEDS_SUBDIR?= yes
+GEM_PLUGINSDIR= ${GEM_HOME}/plugins
+
.if exists(${RUBYGEM})
RUBY_GEM_ARCH!= ${RUBYGEM} environment platform | ${SED} -e 's|.*:||'
+RUBY_GEM_VER!= ${RUBYGEM} --version
GEM_EXTSBASE= ${GEM_HOME}/extensions
+PLIST_SUBST+= GEM_EXTSDIR=${GEM_EXTSDIR}
+PLIST_SUBST+= GEM_PLUGINSDIR=${GEM_PLUGINSDIR}
. if !empty(GEM_EXTSDIR_NEEDS_SUBDIR:M[nN][oO])
GEM_EXTSDIR= ${GEM_EXTSBASE}/${RUBY_GEM_ARCH}/${RUBY_VER_DIR}
@@ -32,11 +37,15 @@ GEM_EXTSDIR= ${GEM_EXTSBASE}/${RUBY_GEM_
GEM_EXTSDIR= ${GEM_EXTSBASE}/${RUBY_GEM_ARCH}/${RUBY_VER_DIR}/${GEM_NAME}
. endif
-. if !empty(GEM_EXTSDIR)
-PLIST_SUBST+= GEM_EXTSDIR=${GEM_EXTSDIR}
-. else
-PLIST_SUBST+= GEM_EXTSDIR="@comment "
-. endif
+_RUBY_GEM_MAJOR= ${RUBY_GEM_VER:C/([0-9]+)\..*/\1/}
+_RUBY_GEM_MINOR= ${RUBY_GEM_VER:C/[0-9]+\.([0-9]+)\..*/\1/}
+
+PLIST_VARS+= ruby_plugins
+
+.if ${_RUBY_GEM_MAJOR} >= 3 && ${_RUBY_GEM_MINOR} >= 2
+PLIST.ruby_plugins= YES
+.endif
+
.endif
.endif
Index: pkgsrc/lang/ruby/gem.mk
diff -u pkgsrc/lang/ruby/gem.mk:1.44 pkgsrc/lang/ruby/gem.mk:1.45
--- pkgsrc/lang/ruby/gem.mk:1.44 Mon Jan 11 06:51:27 2021
+++ pkgsrc/lang/ruby/gem.mk Mon Jan 11 11:21:31 2021
@@ -1,4 +1,4 @@
-# $NetBSD: gem.mk,v 1.44 2021/01/11 06:51:27 taca Exp $
+# $NetBSD: gem.mk,v 1.45 2021/01/11 11:21:31 taca Exp $
#
# This Makefile fragment is intended to be included by packages that build
# and install Ruby gems.
@@ -121,9 +121,12 @@
# repository that holds the contents of the installed gem.
#
# GEM_EXTSDIR
-# "extensions" directory under ${GEM_HOME}. It is generated by
-# rubygems 2.2 and later.
-# In PLIST file, it will be replace to "${GEM_HOME}/extensions" or
+# "extensions" directory under ${GEM_HOME}.
+#
+# GEM_PLUGINSDIR
+# "plguins" direcotry under ${GEM_HOME}. It is generated by
+# rubygems 3.2 and later.
+# In PLIST file, it will be replace to "${GEM_HOME}/plugins" or
# "@comment ..." depends on the version of rubygems.
#
# RUBYGEM
@@ -200,6 +203,11 @@ _RUBY_PRINT_PLIST_GEM+= /^${GEM_EXTSDIR:
{ gsub(/${GEM_EXTSDIR:S|/|\\/|g}/, "$${GEM_EXTSDIR}"); \
print; next; }
.endif
+.if !empty(GEM_PLUGINSDIR)
+_RUBY_PRINT_PLIST_GEM+= /^${GEM_PLUGINSDIR:S|/|\\/|g}/ \
+ { gsub(/${GEM_PLUGINSDIR:S|/|\\/|g}/, "$${PLIST.ruby_plugins}$${GEM_PLUGINSDIR}"); \
+ print; next; }
+.endif
_RUBY_PRINT_PLIST_GEM+= /^${GEM_LIBDIR:S|/|\\/|g}/ \
{ gsub(/${GEM_LIBDIR:S|/|\\/|g}/, "$${GEM_LIBDIR}"); print; next; }
_RUBY_PRINT_PLIST_GEM+= /^${GEM_DOCDIR:S|/|\\/|g}/ \
Home |
Main Index |
Thread Index |
Old Index