summaryrefslogtreecommitdiff
path: root/lang/ruby/modules.mk
diff options
context:
space:
mode:
authortaca <taca@pkgsrc.org>2010-09-10 03:21:57 +0000
committertaca <taca@pkgsrc.org>2010-09-10 03:21:57 +0000
commitc7289cd6cdd0b03624457d62ad1ccbf4d3ab8f06 (patch)
tree864381d8736829e99d5429deee007708819d82ff /lang/ruby/modules.mk
parent20261cd96ea1e476e5d284c075355ff87b518311 (diff)
downloadpkgsrc-c7289cd6cdd0b03624457d62ad1ccbf4d3ab8f06.tar.gz
* Default PKGNAME will be set to ${RUBY_PKGPREFIX}-${DISTNAME}.
* RUBY_HAS_ARCHLIB is deprecated. * Add support of both ruby18 and ruby19.
Diffstat (limited to 'lang/ruby/modules.mk')
-rw-r--r--lang/ruby/modules.mk31
1 files changed, 28 insertions, 3 deletions
diff --git a/lang/ruby/modules.mk b/lang/ruby/modules.mk
index 8242dddf44f..5d640798b05 100644
--- a/lang/ruby/modules.mk
+++ b/lang/ruby/modules.mk
@@ -1,10 +1,15 @@
-# $NetBSD: modules.mk,v 1.27 2009/06/14 22:58:03 joerg Exp $
+# $NetBSD: modules.mk,v 1.28 2010/09/10 03:21:57 taca Exp $
.if !defined(_RUBY_MODULE_MK)
_RUBY_MODULE_MK= # defined
.include "../../lang/ruby/rubyversion.mk"
+#
+# Default package name would prefixed by RUBY_PKGPREFIX.
+#
+PKGNAME?= ${RUBY_PKGPREFIX}-${DISTNAME}
+
.if defined(NO_BUILD) && empty(NO_BUILD:M[Nn][Oo])
DEPENDS+= ruby${RUBY_VER}-base>=${RUBY_REQD}:../../lang/ruby${RUBY_VER}-base
.else
@@ -38,7 +43,8 @@ do-configure: ruby-extconf-configure
.if defined(RUBY_EXTCONF_SUBDIRS)
ruby-extconf-configure:
.for d in ${RUBY_EXTCONF_SUBDIRS}
- @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure"
+ @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} in ${d} to configure"; \
+ ${ECHO_MSG} "${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}"
${RUN}cd ${WRKSRC}/${d}; \
${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
.if empty(RUBY_EXTCONF_CHECK:M[nN][oO])
@@ -69,7 +75,8 @@ ruby-extconf-install:
.else
ruby-extconf-configure:
- @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure"
+ @${ECHO_MSG} "===> Running ${RUBY_EXTCONF} to configure"; \
+ ${ECHO_MSG} "${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}"
${RUN}cd ${WRKSRC}; \
${SETENV} ${CONFIGURE_ENV} ${RUBY} ${RUBY_EXTCONF} ${CONFIGURE_ARGS}
.if empty(RUBY_EXTCONF_CHECK:M[nN][oO])
@@ -162,5 +169,23 @@ ruby-simple-install:
.endif
.endif # USE_RUBY_INSTALL
+.if defined(USE_RAKE) && empty(USE_RAKE:M[nN][oO])
+
+.if ${RUBY_VER} == "18"
+.if !empty(USE_RAKE:M[Rr][Uu][Nn])
+DEPENDS+= ${RUBY_PKGPREFIX}-rake>=0.8.1:../../devel/rake
+.else
+BUILD_DEPENDS+= ${RUBY_PKGPREFIX}-rake>=0.8.1:../../devel/rake
+.endif
+.endif
+
+# RAKE
+# The path to the ``rake'' binary.
+#
+EVAL_PREFIX+= RAKE_PREFIX=${RAKE_NAME}
+RAKE= ${RAKE_PREFIX}/bin/${RAKE_NAME}
+MAKE_ENV+= RAKE=${RAKE:Q}
+.endif
+
.include "replace.mk"
.endif