summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mk/extract/bsd.extract-vars.mk5
-rwxr-xr-xmk/extract/extract8
-rw-r--r--mk/tools/defaults.mk3
-rw-r--r--mk/tools/replace.mk13
4 files changed, 25 insertions, 4 deletions
diff --git a/mk/extract/bsd.extract-vars.mk b/mk/extract/bsd.extract-vars.mk
index 5b8d1ddb7ae..cc7076b83ae 100644
--- a/mk/extract/bsd.extract-vars.mk
+++ b/mk/extract/bsd.extract-vars.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.extract-vars.mk,v 1.5 2006/09/13 11:10:36 joerg Exp $
+# $NetBSD: bsd.extract-vars.mk,v 1.6 2006/10/15 01:56:06 minskim Exp $
#
# This Makefile fragment is included separately by bsd.pkg.mk and
# defines some variables which must be defined earlier than where
@@ -65,3 +65,6 @@ USE_TOOLS+= unzoo
.if !empty(EXTRACT_ONLY:M*.rar)
USE_TOOLS+= unrar
.endif
+.if !empty(EXTRACT_ONLY:M*.gem)
+USE_TOOLS+= gem
+.endif
diff --git a/mk/extract/extract b/mk/extract/extract
index 7600d947b8c..d0dd57cc5d5 100755
--- a/mk/extract/extract
+++ b/mk/extract/extract
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: extract,v 1.3 2006/09/13 11:10:36 joerg Exp $
+# $NetBSD: extract,v 1.4 2006/10/15 01:56:06 minskim Exp $
#
# Copyright (c) 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -100,6 +100,7 @@ set -u # treat undefined variables as errors
: ${CAT:=cat}
: ${CP:=cp}
: ${ECHO:=echo}
+: ${GEM:="gem unpack"}
: ${GZCAT:="gzip -cd"}
: ${LHA:=lha}
: ${MKDIR:=mkdir}
@@ -191,6 +192,7 @@ case "$distfile" in
*.zoo) _format=zoo ;;
*.rar) _format=rar ;;
*.bin) _format=jre-bin ;;
+*.gem) _format=gem ;;
*) _format=none ;;
esac
${TEST} -n "$format" || format="$_format"
@@ -305,6 +307,10 @@ jre-bin)
${ECHO} yes | "$distfile" ${EXTRACT_OPTS_BIN} >/dev/null
;;
+gem)
+ ${GEM} "$distfile"
+ ;;
+
none)
# By default, copy the distfile over to the current working directory.
${CP} "$distfile" .
diff --git a/mk/tools/defaults.mk b/mk/tools/defaults.mk
index fe6d5f39a83..09dd9004f33 100644
--- a/mk/tools/defaults.mk
+++ b/mk/tools/defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.48 2006/07/13 15:27:57 jlam Exp $
+# $NetBSD: defaults.mk,v 1.49 2006/10/15 01:56:06 minskim Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -79,6 +79,7 @@ _TOOLS_VARNAME.fgrep= FGREP
_TOOLS_VARNAME.file= FILE_CMD
_TOOLS_VARNAME.find= FIND
_TOOLS_VARNAME.gawk= AWK
+_TOOLS_VARNAME.gem= GEM
_TOOLS_VARNAME.gm4= M4
_TOOLS_VARNAME.gmake= GMAKE
_TOOLS_VARNAME.grep= GREP
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index 94cc251d008..42b62ec8a99 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.176 2006/09/27 15:18:15 joerg Exp $
+# $NetBSD: replace.mk,v 1.177 2006/10/15 01:56:06 minskim Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -342,6 +342,17 @@ TOOLS_PATH.gawk= ${TOOLS_PREFIX.gawk}/bin/${GNU_PROGRAM_PREFIX}awk
TOOLS_ALIASES.gawk= awk
.endif
+.if !defined(TOOLS_IGNORE.gem) && !empty(_USE_TOOLS:Mgem)
+. if !empty(PKGPATH:Mmisc/rubygems)
+MAKEFLAGS+= TOOLS_IGNORE.gem=
+. elif !empty(_TOOLS_USE_PKGSRC.gem:M[yY][eE][sS])
+TOOLS_DEPENDS.gem?= rubygems-[0-9]*:../../misc/rubygems
+TOOLS_CREATE+= gem
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.gem=gem
+TOOLS_PATH.gem= ${TOOLS_PREFIX.gem}/bin/gem
+. endif
+.endif
+
.if !defined(TOOLS_IGNORE.gm4) && !empty(_USE_TOOLS:Mgm4)
. if !empty(PKGPATH:Mdevel/m4)
MAKEFLAGS+= TOOLS_IGNORE.gm4=