Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified)) by mollari.NetBSD.org (Postfix) with ESMTPS id 0A76B1A9217 for ; Mon, 11 Jan 2021 11:21:34 +0000 (UTC) Received: by mail.netbsd.org (Postfix, from userid 605) id 42F4884D5D; Mon, 11 Jan 2021 11:21:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 7E05B84D21 for ; Mon, 11 Jan 2021 11:21:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id WbF4V5wwX1hM for ; Mon, 11 Jan 2021 11:21:32 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id DE75C84CE1 for ; Mon, 11 Jan 2021 11:21:31 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id D020EFA9D; Mon, 11 Jan 2021 11:21:31 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1610364091179410" MIME-Version: 1.0 Date: Mon, 11 Jan 2021 11:21:31 +0000 From: "Takahiro Kambe" Subject: CVS commit: pkgsrc/lang/ruby To: pkgsrc-changes@NetBSD.org Reply-To: taca@netbsd.org X-Mailer: log_accum Message-Id: <20210111112131.D020EFA9D@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1610364091179410 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_1610364091179410 Content-Disposition: inline Content-Length: 3045 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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}/ \ --_----------=_1610364091179410--