aboutsummaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2000-08-22 14:46:52 +0800
committerknu <knu@FreeBSD.org>2000-08-22 14:46:52 +0800
commit51f27f514a762bd8939a3dfac8690adb8f41143d (patch)
tree22e7b4f12b581d721148a288ee3c4f917953f2d7 /devel
parent93b9a4024bf41935e05f109f8288bf51b653e52b (diff)
downloadfreebsd-ports-gnome-51f27f514a762bd8939a3dfac8690adb8f41143d.tar.gz
freebsd-ports-gnome-51f27f514a762bd8939a3dfac8690adb8f41143d.tar.zst
freebsd-ports-gnome-51f27f514a762bd8939a3dfac8690adb8f41143d.zip
To separate runtime libraries from this port, add a "RUNTIME" knob for
the forthcoming slave port.
Diffstat (limited to 'devel')
-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