Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ruby lang/ruby/gem.mk: introduce GEM_KEEPBUILD



details:   https://anonhg.NetBSD.org/pkgsrc/rev/15131c0d53d8
branches:  trunk
changeset: 430644:15131c0d53d8
user:      taca <taca%pkgsrc.org@localhost>
date:      Sat May 02 17:03:11 2020 +0000

description:
lang/ruby/gem.mk: introduce GEM_KEEPBUILD

Introduce GEM_KEEPBUILD which specifies file should not be removed by
GEM_CLEANBUILD.

diffstat:

 lang/ruby/gem.mk |  15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diffs (52 lines):

diff -r f40401f1eed5 -r 15131c0d53d8 lang/ruby/gem.mk
--- a/lang/ruby/gem.mk  Sat May 02 16:56:47 2020 +0000
+++ b/lang/ruby/gem.mk  Sat May 02 17:03:11 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gem.mk,v 1.41 2019/11/03 19:04:06 rillig Exp $
+# $NetBSD: gem.mk,v 1.42 2020/05/02 17:03:11 taca Exp $
 #
 # This Makefile fragment is intended to be included by packages that build
 # and install Ruby gems.
@@ -84,8 +84,15 @@
 #      These files will be additionaly removed from the gem installed in
 #      the installation root.
 #
+# GEM_KEEPBUILD
+#      A list of shell globs representing files not to remove even it match
+#      with GEM_CLEANBUILD or GEM_CLEANBUILD_EXTENSIONS.
+#
+#      Default: (empty)
+#
 # GEM_NAME
 #      The name of the gem to install.  The default value is ${DISTNAME}.
+#      gem installed in the installation root.
 #
 # GEM_SPECFILE
 #      The path to the gemspec file to use when building a gem using
@@ -210,6 +217,7 @@
 GEM_SPECFILE?=                 ${WRKDIR}/${DISTNAME}.gemspec
 GEM_CLEANBUILD?=               ext/*
 GEM_CLEANBUILD_EXTENSIONS+=    *.out *.log
+GEM_KEEPBUILD?=                        # empty
 
 .if !empty(GEM_CLEANBUILD:M/*) || !empty(GEM_CLEANBUILD:M*../*)
 PKG_FAIL_REASON+=      "GEM_CLEANBUILD must be relative to "${PREFIX}/${GEM_LIBDIR:Q}"."
@@ -219,6 +227,10 @@
 PKG_FAIL_REASON+=      "GEM_CLEANBUILD_EXTENSIONS must be relative to "${PREFIX}/${GEM_LIBDIR:Q}"."
 .endif
 
+.if !empty(GEM_KEEPBUILD:M/*) || !empty(GEM_KEEPBUILD:M*../*)
+PKG_FAIL_REASON+=      "GEM_KEEPBUILD must be relative to "${PREFIX}/${GEM_LIBDIR:Q}"."
+.endif
+
 .PHONY: gem-build
 do-build: _gem-pre-build gem-build
 
@@ -297,6 +309,7 @@
        find . -print | sort -r |                                       \
        while read file; do                                             \
                case $$file in                                          \
+               ${GEM_KEEPBUILD:@.p.@./${.p.}) continue ;;@}            \
                ${GEM_CLEANBUILD:@.p.@./${.p.}) ;;@}                    \
                *)      continue ;;                                     \
                esac;                                                   \



Home | Main Index | Thread Index | Old Index