aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.ruby.mk
diff options
context:
space:
mode:
authorStanislav Sedov <stas@FreeBSD.org>2009-02-13 22:48:51 +0000
committerStanislav Sedov <stas@FreeBSD.org>2009-02-13 22:48:51 +0000
commit49fadd18828400599ad247ac61678983f3f93c53 (patch)
tree4910abec75255da4f87dcee6ab102c770b91456f /Mk/bsd.ruby.mk
parent245fe878ce8c61ce764e2ded6ae7ac6f1b8be150 (diff)
downloadports-49fadd18828400599ad247ac61678983f3f93c53.tar.gz
ports-49fadd18828400599ad247ac61678983f3f93c53.zip
Notes
Diffstat (limited to 'Mk/bsd.ruby.mk')
-rw-r--r--Mk/bsd.ruby.mk31
1 files changed, 27 insertions, 4 deletions
diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk
index 302ed5bdea5a..0f62559b40e2 100644
--- a/Mk/bsd.ruby.mk
+++ b/Mk/bsd.ruby.mk
@@ -393,10 +393,10 @@ DOC_DIR= ${GEMS_BASE_DIR}/doc
CACHE_DIR= ${GEMS_BASE_DIR}/cache
SPEC_DIR= ${GEMS_BASE_DIR}/specifications
GEM_NAME?= ${PORTNAME}-${PORTVERSION}
-GEM_LIB_DIR= ${GEMS_DIR}/${GEM_NAME}
-GEM_DOC_DIR= ${DOC_DIR}/${GEM_NAME}
-GEM_SPEC= ${SPEC_DIR}/${GEM_NAME}.gemspec
-GEM_CACHE= ${CACHE_DIR}/${GEM_NAME}.gem
+GEM_LIB_DIR?= ${GEMS_DIR}/${GEM_NAME}
+GEM_DOC_DIR?= ${DOC_DIR}/${GEM_NAME}
+GEM_SPEC?= ${SPEC_DIR}/${GEM_NAME}.gemspec
+GEM_CACHE?= ${CACHE_DIR}/${GEM_NAME}.gem
PLIST_SUB+= PORTVERSION="${PORTVERSION}" \
REV="${RUBY_GEM}" \
@@ -426,6 +426,29 @@ do-install:
${SETENV} ${GEM_ENV} ${RUBYGEMBIN} install -l --no-update-sources --no-ri --install-dir ${PREFIX}/lib/ruby/gems/${RUBY_VER} ${DISTDIR}/${DIST_SUBDIR}/${_D} -- --build-args ${CONFIGURE_ARGS}
.endfor
+. if defined(RUBYGEM_AUTOPLIST)
+. if !target(post-install-script)
+post-install-script:
+ @${ECHO} ${GEM_CACHE} >> ${TMPPLIST}
+ @${ECHO} ${GEM_SPEC} >> ${TMPPLIST}
+ @${FIND} -ds ${PREFIX}/${GEM_DOC_DIR} -type f -print | ${SED} -E -e \
+ 's,^${PREFIX}/?,,' >> ${TMPPLIST}
+ @${FIND} -ds ${PREFIX}/${GEM_DOC_DIR} -type d -print | ${SED} -E -e \
+ 's,^${PREFIX}/?,@dirrm ,' >> ${TMPPLIST}
+ @${FIND} -ds ${PREFIX}/${GEM_LIB_DIR} -type f -print | ${SED} -E -e \
+ 's,^${PREFIX}/?,,' >> ${TMPPLIST}
+ @${FIND} -ds ${PREFIX}/${GEM_LIB_DIR} -type d -print | ${SED} -E -e \
+ 's,^${PREFIX}/?,@dirrm ,' >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/${GEMS_DIR} 2>/dev/null || true" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/${DOC_DIR} 2>/dev/null || true" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/${CACHE_DIR} 2>/dev/null || true" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/${SPEC_DIR} 2>/dev/null || true" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/${GEMS_BASE_DIR} 2>/dev/null || true" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/lib/ruby/gems 2>/dev/null || true" >> ${TMPPLIST}
+ @${ECHO_CMD} "@unexec rmdir %D/lib/ruby 2>/dev/null || true" >> ${TMPPLIST}
+. endif
+. endif
+
.endif # USE_RUBYGEMS
#