mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
To separate runtime libraries from this port, add a "RUNTIME" knob for
the forthcoming slave port.
This commit is contained in:
parent
d13ca5ddf9
commit
996c8266da
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=31845
2 changed files with 21 additions and 15 deletions
|
@ -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/
|
||||
${INSTALL_DATA} ${WRKSRC}/lib/racc/${f} ${RUBY_SITELIBDIR}/racc/
|
||||
.endfor
|
||||
.for f in ${MODULES_RT}
|
||||
${INSTALL_DATA} ${WRKSRC}/lib/raccrt/${f} \
|
||||
${PREFIX}/lib/ruby/site_ruby/${RUBY_VER}/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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue