Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40321 - New ebuild for SableCC
Summary: New ebuild for SableCC
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All All
: High enhancement (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-03 15:28 UTC by Kaleb Pederson
Modified: 2004-02-17 19:32 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
new ebuild (sablecc-2.18.2.ebuild,1.14 KB, text/plain)
2004-02-04 17:36 UTC, Kaleb Pederson
Details
updated ebuild (sablecc-2.18.2.ebuild,1.18 KB, text/plain)
2004-02-04 20:58 UTC, Kaleb Pederson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kaleb Pederson 2004-02-03 15:28:23 UTC
An ebuild follows for the current stable release of SableCC.  After having wanted it more than once over the last couple of months, I thought I would write my own.  I hope it's right ;)

# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /home/cvsroot/gentoo-x86/dev-java/velocity/velocity-1.3.ebuild,v 1.4 2003/12/16 15:25:18 weeve Exp $

DESCRIPTION="Java based compiler/parser generator"
HOMEPAGE="http://www.sablecc.org/"
SRC_URI="mirror://sourceforge/sablecc/sablecc-${PV}.tar.gz"

LICENSE="LGPL"
SLOT="0"
KEYWORDS="x86 ppc -sparc"
IUSE="jikes doc"

DEPEND=">=dev-java/sun-jdk-1.3.1"
RDEPEND=">=dev-java/sun-jdk-1.3.1
    >=dev-java/java-getopt-1.0.9
    >=dev-java/ant-1.5.1
    jikes? ( >=dev-java/jikes-1.17 )"

src_compile () {
    cd ${S}
    ANT_OPTS=""
    if [ -n "`use jikes`" ] ; then
        ANT_OPTS="${ANT_OPTS} -Dbuild.compiler=jikes"
    fi
}

src_install () {
    cd ${S}
    ANT_OPTS="${ANT_OPTS} -Dinstall.dir=${D}/usr"

    ant ${ANT_OPTS} install || die "Java build/install failed."

    # fix the sablecc shell script that was generated
    sed -i "s,${D},/,g" ${D}/usr/bin/sablecc
    sed -i "s,java,\$JAVA_HOME/bin/java,g" ${D}/usr/bin/sablecc

    # don't need the windows bat files
    rm -f ${D}/usr/bin/sablecc.bat

    dodoc AUTHORS LICENSE COPYING-LESSER THANKS
    use doc && dohtml README.html
}
Comment 1 SpanKY gentoo-dev 2004-02-04 17:19:02 UTC
please post it as an attachment
Comment 2 Kaleb Pederson 2004-02-04 17:36:16 UTC
Created attachment 24976 [details]
new ebuild

I was going to attach it, but then the first bugzilla interface that I got to,
where I was allowed to type in everything, didn't allow me to.	It was only on
the second interface that I was allowed to attach.  I guess you could call that
a bugzilla bug, or at minimum an interface design problem.
Comment 3 Adrian Almenar 2004-02-04 20:27:14 UTC
This ebuild will build only with sun-jdk ?

If not, please fix the ebuild to use virtuals.
Comment 4 Kaleb Pederson 2004-02-04 20:58:21 UTC
Created attachment 24982 [details]
updated ebuild

Ok.  This one now uses a virtual for Java, fixed DEPEND, and Java version >=
1.4 required because of org.sax dependency.
Comment 5 Chris Aniszczyk (RETIRED) gentoo-dev 2004-02-17 19:32:22 UTC
In portage now, thanks.