blob: e5373790faae6e5ca364ad7b48c8edd76b9908de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# $NetBSD: Makefile,v 1.1.1.1 2001/06/30 23:26:15 taca Exp $
# FreeBSD: ports/devel/ruby-racc/Makefile,v 1.20 2001/01/27 09:54:30 knu Exp
DISTNAME= racc-${RACC_VERSION}
PKGNAME?= ${RUBY_PKGNAMEPREFIX}${DISTNAME}
CATEGORIES= devel
MASTER_SITES= http://www.xdsl.ne.jp/Cd/aamine/soft/
MAINTAINER= taca@netbsd.org
HOMEPAGE= http://www.xdsl.ne.jp/Cd/aamine/
COMMENT?= LALR(1) parser generator for Ruby
RACC_VERSION= 1.3.9
DIST_SUBDIR= ruby
USE_RUBY= yes
USE_RUBY_AMSTD= yes
USE_RUBY_SETUP= yes
.if !defined(RUNTIME)
DEPENDS+= ${RUBY_PKGNAMEPREFIX}racc-runtime-${RACC_VERSION}:../../devel/ruby-racc-runtime
DEPENDS+= ${RUBY_PKGNAMEPREFIX}strscan>=0.6.1:../../devel/ruby-strscan
REPLACE_RUBY= misc/racc2y misc/y2racc
DOCS_EN= changes.html command.html debug.html grammer.html index.html \
parser.html usage.html
DOCS_JA= changes.html command.html debug.html grammer.html index.html \
parser.html usage.html
EXAMPLES= array.y array2.y calc-ja.y calc.y conflict.y hash.y lalr.y \
syntax.y yyerr.y
.endif
pre-patch:
${RUBY} -i -ne '/^amstd\b/ || /^strscan\b/ || print' ${WRKSRC}/lib/PATHCONV
${RM} -rf ${WRKSRC}/lib/amstd ${WRKSRC}/lib/strscan
.if defined(RUNTIME)
${RUBY} -i -ne '/^racc\b/ || print' ${WRKSRC}/bin/PATHCONV
${RM} -rf ${WRKSRC}/bin/racc
${RUBY} -i -ne '/^strscanso\b/ || print' ${WRKSRC}/ext/PATHCONV
${RM} -rf ${WRKSRC}/ext/strscanso
${RUBY} -i -ne '/^racc\b/ || print' ${WRKSRC}/lib/PATHCONV
${RM} -rf ${WRKSRC}/lib/racc
.else
${RM} -rf ${WRKSRC}/ext
${RUBY} -i -ne '/^raccrt\b/ || print' ${WRKSRC}/lib/PATHCONV
${RM} -rf ${WRKSRC}/lib/raccrt
.endif
.if defined(RUNTIME)
pre-install:
${INSTALL_DATA_DIR} ${RUBY_SITELIBDIR}/racc
${INSTALL_DATA_DIR} ${RUBY_SITEARCHLIBDIR}/racc
.else
post-install:
${INSTALL_SCRIPT} ${WRKSRC}/bin/racc/racc \
${WRKSRC}/misc/racc2y ${WRKSRC}/misc/y2racc ${PREFIX}/bin
${INSTALL_DATA_DIR} ${RUBY_EXAMPLESDIR}/racc
.for f in ${EXAMPLES}
${INSTALL_DATA} ${WRKSRC}/sample/${f} ${RUBY_EXAMPLESDIR}/racc
.endfor
${INSTALL_DATA_DIR} ${RUBY_DOCDIR}/racc/ja
.for f in ${DOCS_EN}
${INSTALL_DATA} ${WRKSRC}/doc.en/${f} ${RUBY_DOCDIR}/racc
.endfor
.for f in ${DOCS_JA}
${INSTALL_DATA} ${WRKSRC}/doc.ja/${f} ${RUBY_DOCDIR}/racc/ja
.endfor
.endif
.include "../../lang/ruby-base/Makefile.common"
.include "../../mk/bsd.pkg.mk"
|