aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.ruby.mk
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2013-02-24 06:02:06 +0000
committerSteve Wills <swills@FreeBSD.org>2013-02-24 06:02:06 +0000
commit05e464023e53ca4e5beba26eedc17bda36feff65 (patch)
tree627db23a266ee82d41a7f6b303ac74a8576e62e9 /Mk/bsd.ruby.mk
parent9f1abfd905b00932197729bbc681bb49e3d2293c (diff)
downloadports-05e464023e53ca4e5beba26eedc17bda36feff65.tar.gz
ports-05e464023e53ca4e5beba26eedc17bda36feff65.zip
Notes
Diffstat (limited to 'Mk/bsd.ruby.mk')
-rw-r--r--Mk/bsd.ruby.mk22
1 files changed, 17 insertions, 5 deletions
diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk
index 5bf567f08bb2..f6384a614b79 100644
--- a/Mk/bsd.ruby.mk
+++ b/Mk/bsd.ruby.mk
@@ -203,6 +203,8 @@ RUBY_DISTVERSION?= ${RUBY_RELVERSION}-p${RUBY_PATCHLEVEL}
RUBY_WRKSRC= ${WRKDIR}/ruby-${RUBY_DISTVERSION}
+GEM_ENV?= LC_CTYPE=UTF-8
+
RUBY_CONFIGURE_ARGS+= --with-rubyhdrdir="${PREFIX}/include/ruby-1.9/" \
--with-rubylibprefix="${PREFIX}/lib/ruby" \
--docdir="${RUBY_DOCDIR}" \
@@ -387,8 +389,7 @@ EXTRACT_SUFX= .gem
EXTRACT_ONLY=
DIST_SUBDIR= rubygem
-NO_BUILD= yes
-
+EXTRACT_DEPENDS+= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems
GEMS_BASE_DIR= lib/ruby/gems/${RUBY_VER}
GEMS_DIR= ${GEMS_BASE_DIR}/gems
DOC_DIR= ${GEMS_BASE_DIR}/doc
@@ -428,10 +429,21 @@ RUBYGEM_ARGS=-l --no-update-sources --no-ri --install-dir ${PREFIX}/lib/ruby/gem
RUBYGEM_ARGS+= --no-rdoc
.endif
+do-extract:
+ @${SETENV} ${GEM_ENV} ${RUBYGEMBIN} unpack --target=${WRKDIR} ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES}
+ @${TAR} -xOzf ${DISTDIR}/${DIST_SUBDIR}/${GEMFILES} metadata.gz | ${GZCAT} > ${BUILD_WRKSRC}/${GEMFILES}spec
+
+do-build:
+ @(cd ${BUILD_WRKSRC}; if ! ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} build --force ${GEMFILES}spec ; then \
+ if [ x != x${BUILD_FAIL_MESSAGE} ] ; then \
+ ${ECHO_MSG} "===> Compilation failed unexpectedly."; \
+ (${ECHO_CMD} ${BUILD_FAIL_MESSAGE}) | ${FMT} 75 79 ; \
+ fi; \
+ ${FALSE}; \
+ fi)
+
do-install:
-.for _D in ${GEMFILES}
- ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} ${DISTDIR}/${DIST_SUBDIR}/${_D} -- --build-args ${CONFIGURE_ARGS}
-.endfor
+ @(cd ${BUILD_WRKSRC}; ${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install ${RUBYGEM_ARGS} ${GEMFILES} -- --build-args ${CONFIGURE_ARGS})
. if defined(RUBYGEM_AUTOPLIST)
. if !target(post-install-script)