aboutsummaryrefslogtreecommitdiff
path: root/devel/ruby-racc
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2000-08-22 06:46:52 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2000-08-22 06:46:52 +0000
commit996c8266da57a2946cc8c5fba44ce8e0d1622995 (patch)
tree61a62d543cdccd2c796134774c623e21fe988973 /devel/ruby-racc
parentd13ca5ddf922cea2fa9de7c73e52a99052dab9c5 (diff)
downloadports-996c8266da57a2946cc8c5fba44ce8e0d1622995.tar.gz
ports-996c8266da57a2946cc8c5fba44ce8e0d1622995.zip
Notes
Diffstat (limited to 'devel/ruby-racc')
-rw-r--r--devel/ruby-racc/Makefile32
-rw-r--r--devel/ruby-racc/pkg-plist4
2 files changed, 21 insertions, 15 deletions
diff --git a/devel/ruby-racc/Makefile b/devel/ruby-racc/Makefile
index 6d348bfe1336..45fa6ef062d4 100644
--- a/devel/ruby-racc/Makefile
+++ b/devel/ruby-racc/Makefile
@@ -16,7 +16,11 @@ MAINTAINER= knu@FreeBSD.org
BUILD_DEPENDS= ruby:${PORTSDIR}/lang/ruby
RUN_DEPENDS= ruby:${PORTSDIR}/lang/ruby \
- ${LOCALBASE}/lib/ruby/site_ruby/${RUBY_VER}/amstd/info.rb:${PORTSDIR}/devel/ruby-amstd
+ ${RUBY_SITELIBDIR}/amstd/info.rb:${PORTSDIR}/devel/ruby-amstd
+
+.if !defined(RUNTIME)
+RUN_DEPENDS+= ${RUBY_SITELIBDIR}/racc/parser.rb:${PORTSDIR}/devel/ruby-racc-runtime
+.endif[
PLIST_SUB= RUBY_VER="${RUBY_VER}" RUBY_ARCH="${RUBY_ARCH}"
@@ -24,6 +28,9 @@ RUBY?= ${LOCALBASE}/bin/ruby
RUBY_VER?= 1.4
RUBY_ARCH?= ${ARCH}-freebsd${OSREL}
+RUBY_SITELIBDIR?= ${LOCALBASE}/lib/ruby/site_ruby/${RUBY_VER}
+RUBY_SITEARCHLIBDIR?= ${LOCALBASE}/lib/ruby/site_ruby/${RUBY_VER}/${RUBY_ARCH}
+
MODULES= facade.rb format.rb grammer.rb info.rb iset.rb \
libracc.rb raccp.rb raccs.rb state.rb
MODULES_RT= parser.rb
@@ -33,10 +40,13 @@ DOCS_JA= changes.html command.html debug.html grammer.html \
index.html parser.html usage.html
EXAMPLES= calc-ja.y calc.y conflict.y lalr.y syntax.y yyerr.y
+.if !defined(RUNTIME)
post-patch:
+ ${RM} -rf ${WRKSRC}/ext
${PERL} -i -pe '$$. == 1 && s,^#!\s*\S+,#!${RUBY},' \
${WRKSRC}/misc/racc2y \
${WRKSRC}/misc/y2racc
+.endif
do-configure:
@cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} setup.rb config
@@ -45,20 +55,19 @@ do-build:
@cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${RUBY} setup.rb setup
do-install:
+.if defined(RUNTIME)
+ ${MKDIR} ${RUBY_SITELIBDIR}/racc
+.for f in ${MODULES_RT}
+ ${INSTALL_DATA} ${WRKSRC}/lib/raccrt/${f} ${RUBY_SITELIBDIR}/racc/
+.endfor
+ ${MKDIR} ${RUBY_SITEARCHLIBDIR}/racc
+ ${INSTALL_DATA} ${WRKSRC}/ext/cparse/cparse.so ${RUBY_SITEARCHLIBDIR}/racc/
+.else
${INSTALL_SCRIPT} ${WRKSRC}/bin/racc/racc \
${WRKSRC}/misc/racc2y ${WRKSRC}/misc/y2racc ${PREFIX}/bin/
- ${MKDIR} ${PREFIX}/lib/ruby/site_ruby/${RUBY_VER}/racc
.for f in ${MODULES}
- ${INSTALL_DATA} ${WRKSRC}/lib/racc/${f} \
- ${PREFIX}/lib/ruby/site_ruby/${RUBY_VER}/racc/
-.endfor
-.for f in ${MODULES_RT}
- ${INSTALL_DATA} ${WRKSRC}/lib/raccrt/${f} \
- ${PREFIX}/lib/ruby/site_ruby/${RUBY_VER}/racc/
+ ${INSTALL_DATA} ${WRKSRC}/lib/racc/${f} ${RUBY_SITELIBDIR}/racc/
.endfor
- ${MKDIR} ${PREFIX}/lib/ruby/site_ruby/${RUBY_VER}/${RUBY_ARCH}/racc
- ${INSTALL_DATA} ${WRKSRC}/ext/cparse/cparse.so \
- ${PREFIX}/lib/ruby/site_ruby/${RUBY_VER}/${RUBY_ARCH}/racc/
.if !defined(NOPORTDOCS)
${MKDIR} ${PREFIX}/share/examples/ruby/racc
.for f in ${EXAMPLES}
@@ -72,5 +81,6 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/doc.ja/${f} ${PREFIX}/share/doc/ruby/racc/ja/
.endfor
.endif
+.endif
.include <bsd.port.mk>
diff --git a/devel/ruby-racc/pkg-plist b/devel/ruby-racc/pkg-plist
index c6492afd8c89..21660fedf3af 100644
--- a/devel/ruby-racc/pkg-plist
+++ b/devel/ruby-racc/pkg-plist
@@ -10,10 +10,6 @@ lib/ruby/site_ruby/%%RUBY_VER%%/racc/libracc.rb
lib/ruby/site_ruby/%%RUBY_VER%%/racc/raccp.rb
lib/ruby/site_ruby/%%RUBY_VER%%/racc/raccs.rb
lib/ruby/site_ruby/%%RUBY_VER%%/racc/state.rb
-lib/ruby/site_ruby/%%RUBY_VER%%/racc/parser.rb
-lib/ruby/site_ruby/%%RUBY_VER%%/%%RUBY_ARCH%%/racc/cparse.so
-@dirrm lib/ruby/site_ruby/%%RUBY_VER%%/racc
-@dirrm lib/ruby/site_ruby/%%RUBY_VER%%/%%RUBY_ARCH%%/racc
share/examples/ruby/racc/calc-ja.y
share/examples/ruby/racc/calc.y
share/examples/ruby/racc/conflict.y