summaryrefslogtreecommitdiff
path: root/devel/ruby-racc
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2000-09-07 07:23:43 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2000-09-07 07:23:43 +0000
commitef19b346c19e1e342e952f369c5aff7ab7128a10 (patch)
tree96f18b40648c777428642c9a33c84009552196c4 /devel/ruby-racc
parentAdd ruby-setup-install target which I forgot to add. (diff)
Update fundamental ruby ports first with bsd.ruby.mk.
Notes
Notes: svn path=/head/; revision=32370
Diffstat (limited to 'devel/ruby-racc')
-rw-r--r--devel/ruby-racc/Makefile64
-rw-r--r--devel/ruby-racc/pkg-plist62
2 files changed, 59 insertions, 67 deletions
diff --git a/devel/ruby-racc/Makefile b/devel/ruby-racc/Makefile
index 45fa6ef062d4..f0af4ab11bcc 100644
--- a/devel/ruby-racc/Makefile
+++ b/devel/ruby-racc/Makefile
@@ -9,37 +9,40 @@ PORTNAME= racc
PORTVERSION= 1.2.3
CATEGORIES= devel ruby
MASTER_SITES= http://www1.u-netsurf.ne.jp/~brew/mine/soft/
-PKGNAMEPREFIX= ruby-
+PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
DIST_SUBDIR= ruby
MAINTAINER= knu@FreeBSD.org
-BUILD_DEPENDS= ruby:${PORTSDIR}/lang/ruby
-RUN_DEPENDS= ruby:${PORTSDIR}/lang/ruby \
- ${RUBY_SITELIBDIR}/amstd/info.rb:${PORTSDIR}/devel/ruby-amstd
-
.if !defined(RUNTIME)
-RUN_DEPENDS+= ${RUBY_SITELIBDIR}/racc/parser.rb:${PORTSDIR}/devel/ruby-racc-runtime
+RUN_DEPENDS= ${RUBY_SITELIBDIR}/racc/parser.rb:${PORTSDIR}/devel/ruby-racc-runtime
.endif[
-PLIST_SUB= RUBY_VER="${RUBY_VER}" RUBY_ARCH="${RUBY_ARCH}"
-
-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}
+USE_RUBY= yes
+USE_RUBY_AMSTD= yes
+USE_RUBY_SETUP= yes
-MODULES= facade.rb format.rb grammer.rb info.rb iset.rb \
- libracc.rb raccp.rb raccs.rb state.rb
-MODULES_RT= parser.rb
DOCS_EN= changes.html command.html debug.html grammer.html \
index.html usage.html
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
+post-extract:
+ ${PERL} -i -ne '/^amstd\b/ || print' ${WRKSRC}/lib/PATHCONV
+ ${RM} -rf ${WRKSRC}/lib/amstd
+.if defined(RUNTIME)
+ ${PERL} -i -ne '/^racc\b/ || print' ${WRKSRC}/bin/PATHCONV
+ ${RM} -rf ${WRKSRC}/bin/racc
+ ${PERL} -i -ne '/^racc\b/ || print' ${WRKSRC}/lib/PATHCONV
+ ${RM} -rf ${WRKSRC}/lib/racc
+.else
+ ${PERL} -i -ne '/^cparse\b/ || print' ${WRKSRC}/ext/PATHCONV
+ ${RM} -rf ${WRKSRC}/ext/cparse
+ ${PERL} -i -ne '/^raccrt\b/ || print' ${WRKSRC}/lib/PATHCONV
+ ${RM} -rf ${WRKSRC}/lib/raccrt
+.endif
+
.if !defined(RUNTIME)
post-patch:
${RM} -rf ${WRKSRC}/ext
@@ -48,39 +51,28 @@ post-patch:
${WRKSRC}/misc/y2racc
.endif
-do-configure:
- @cd ${WRKSRC}; ${SETENV} ${CONFIGURE_ENV} ${RUBY} setup.rb config
-
-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/
-.for f in ${MODULES}
- ${INSTALL_DATA} ${WRKSRC}/lib/racc/${f} ${RUBY_SITELIBDIR}/racc/
-.endfor
.if !defined(NOPORTDOCS)
- ${MKDIR} ${PREFIX}/share/examples/ruby/racc
+ ${MKDIR} ${RUBY_EXAMPLESDIR}/racc
.for f in ${EXAMPLES}
- ${INSTALL_DATA} ${WRKSRC}/sample/${f} ${PREFIX}/share/examples/ruby/racc/
+ ${INSTALL_DATA} ${WRKSRC}/sample/${f} ${RUBY_EXAMPLESDIR}/racc/
.endfor
- ${MKDIR} ${PREFIX}/share/doc/ruby/racc/ja
+ ${MKDIR} ${RUBY_DOCDIR}/racc/ja
.for f in ${DOCS_EN}
- ${INSTALL_DATA} ${WRKSRC}/doc.en/${f} ${PREFIX}/share/doc/ruby/racc/
+ ${INSTALL_DATA} ${WRKSRC}/doc.en/${f} ${RUBY_DOCDIR}/racc/
.endfor
.for f in ${DOCS_JA}
- ${INSTALL_DATA} ${WRKSRC}/doc.ja/${f} ${PREFIX}/share/doc/ruby/racc/ja/
+ ${INSTALL_DATA} ${WRKSRC}/doc.ja/${f} ${RUBY_DOCDIR}/racc/ja/
.endfor
.endif
.endif
-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+.include "${PORTSDIR}/Mk/bsd.ruby.mk"
+.include <bsd.port.post.mk>
diff --git a/devel/ruby-racc/pkg-plist b/devel/ruby-racc/pkg-plist
index 21660fedf3af..f7f955d30cd4 100644
--- a/devel/ruby-racc/pkg-plist
+++ b/devel/ruby-racc/pkg-plist
@@ -1,34 +1,34 @@
bin/racc
bin/racc2y
bin/y2racc
-lib/ruby/site_ruby/%%RUBY_VER%%/racc/facade.rb
-lib/ruby/site_ruby/%%RUBY_VER%%/racc/format.rb
-lib/ruby/site_ruby/%%RUBY_VER%%/racc/grammer.rb
-lib/ruby/site_ruby/%%RUBY_VER%%/racc/info.rb
-lib/ruby/site_ruby/%%RUBY_VER%%/racc/iset.rb
-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
-share/examples/ruby/racc/calc-ja.y
-share/examples/ruby/racc/calc.y
-share/examples/ruby/racc/conflict.y
-share/examples/ruby/racc/lalr.y
-share/examples/ruby/racc/syntax.y
-share/examples/ruby/racc/yyerr.y
-share/doc/ruby/racc/ja/changes.html
-share/doc/ruby/racc/ja/command.html
-share/doc/ruby/racc/ja/debug.html
-share/doc/ruby/racc/ja/grammer.html
-share/doc/ruby/racc/ja/index.html
-share/doc/ruby/racc/ja/parser.html
-share/doc/ruby/racc/ja/usage.html
-share/doc/ruby/racc/changes.html
-share/doc/ruby/racc/command.html
-share/doc/ruby/racc/debug.html
-share/doc/ruby/racc/grammer.html
-share/doc/ruby/racc/index.html
-share/doc/ruby/racc/usage.html
-@dirrm share/examples/ruby/racc
-@dirrm share/doc/ruby/racc/ja
-@dirrm share/doc/ruby/racc
+%%RUBY_SITELIBDIR%%/racc/facade.rb
+%%RUBY_SITELIBDIR%%/racc/format.rb
+%%RUBY_SITELIBDIR%%/racc/grammer.rb
+%%RUBY_SITELIBDIR%%/racc/info.rb
+%%RUBY_SITELIBDIR%%/racc/iset.rb
+%%RUBY_SITELIBDIR%%/racc/libracc.rb
+%%RUBY_SITELIBDIR%%/racc/raccp.rb
+%%RUBY_SITELIBDIR%%/racc/raccs.rb
+%%RUBY_SITELIBDIR%%/racc/state.rb
+%%RUBY_EXAMPLESDIR%%/racc/calc-ja.y
+%%RUBY_EXAMPLESDIR%%/racc/calc.y
+%%RUBY_EXAMPLESDIR%%/racc/conflict.y
+%%RUBY_EXAMPLESDIR%%/racc/lalr.y
+%%RUBY_EXAMPLESDIR%%/racc/syntax.y
+%%RUBY_EXAMPLESDIR%%/racc/yyerr.y
+%%RUBY_DOCDIR%%/racc/ja/changes.html
+%%RUBY_DOCDIR%%/racc/ja/command.html
+%%RUBY_DOCDIR%%/racc/ja/debug.html
+%%RUBY_DOCDIR%%/racc/ja/grammer.html
+%%RUBY_DOCDIR%%/racc/ja/index.html
+%%RUBY_DOCDIR%%/racc/ja/parser.html
+%%RUBY_DOCDIR%%/racc/ja/usage.html
+%%RUBY_DOCDIR%%/racc/changes.html
+%%RUBY_DOCDIR%%/racc/command.html
+%%RUBY_DOCDIR%%/racc/debug.html
+%%RUBY_DOCDIR%%/racc/grammer.html
+%%RUBY_DOCDIR%%/racc/index.html
+%%RUBY_DOCDIR%%/racc/usage.html
+@dirrm %%RUBY_EXAMPLESDIR%%/racc
+@dirrm %%RUBY_DOCDIR%%/racc/ja
+@dirrm %%RUBY_DOCDIR%%/racc