/[gentoo-x86]/dev-util/jay/jay-1.1.1-r2.ebuild
Gentoo

Contents of /dev-util/jay/jay-1.1.1-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (show annotations) (download)
Sun Aug 19 21:18:42 2012 UTC (2 years, 4 months ago) by ottxor
Branch: MAIN
Changes since 1.6: +3 -3 lines
added prefix keywords

(Portage version: 2.2.0_alpha121/cvs/Linux i686)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/jay/jay-1.1.1-r2.ebuild,v 1.6 2012/04/06 19:43:33 ssuominen Exp $
4
5 EAPI=4
6 inherit mono java-pkg-opt-2 toolchain-funcs
7
8 DESCRIPTION="A LALR(1) parser generator: Berkeley yacc retargeted to C# and Java"
9 HOMEPAGE="http://www.cs.rit.edu/~ats/projects/lp/doc/jay/package-summary.html"
10 SRC_URI="http://www.cs.rit.edu/~ats/projects/lp/doc/jay/doc-files/src.zip -> ${P}.zip
11 http://dev.gentoo.org/~ssuominen/${P}-mono.snk.bz2"
12
13 LICENSE="as-is"
14 SLOT="0"
15 KEYWORDS="amd64 ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos"
16 IUSE="java mono"
17
18 COMMON_DEPEND="!<=dev-lang/mono-2.4
19 mono? ( >dev-lang/mono-2.4 )"
20 RDEPEND="${COMMOND_DEPEND}
21 java? ( >=virtual/jre-1.4 )"
22 DEPEND="${COMMON_DEPEND}
23 java? ( >=virtual/jdk-1.4 )
24 app-arch/unzip"
25
26 S=${WORKDIR}/${PN}
27
28 RESTRICT="test"
29
30 java_prepare() {
31 sed -i -r \
32 -e 's:^v4\s*=.*:v4 = ${JAVA_HOME}/bin:' \
33 -e 's:JAVAC\s*=.*:\0 ${JAVACFLAGS}:' \
34 yydebug/makefile || die
35 }
36
37 src_prepare() {
38 sed -i -r \
39 -e "s:^CC\s*=.*:CC = `tc-getCC`:" \
40 -e 's/^jay:.* \$e /\0$(LDFLAGS) /' \
41 -e '/^CFLAGS\s*=/d' \
42 src/makefile || die
43
44 java-utils-2_src_prepare
45 }
46
47 src_compile() {
48 emake -C src jay
49 use java && emake -C yydebug yydebug.jar
50
51 if use mono; then
52 pushd cs >/dev/null
53 "${EPREFIX}"/usr/bin/gmcs /target:library /out:yydebug.dll /keyfile:"${WORKDIR}"/${P}-mono.snk yyDebug.cs || die
54 popd >/dev/null
55 fi
56 }
57
58 src_install() {
59 dobin src/jay
60
61 doman jay.1
62 dodoc README
63
64 if use java; then
65 java-pkg_dojar yydebug/yydebug.jar
66 insinto /usr/share/jay
67 doins java/skeleton.{java,tables}
68 fi
69
70 if use mono; then
71 egacinstall cs/yydebug.dll
72 insinto /usr/share/jay
73 doins cs/skeleton.cs
74 fi
75 }

  ViewVC Help
Powered by ViewVC 1.1.20