summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiroslav Šulc <fordfrog@gentoo.org>2011-01-16 13:01:39 +0000
committerMiroslav Šulc <fordfrog@gentoo.org>2011-01-16 13:01:39 +0000
commit4e66fa18564ef30159af6d30cb84564c08988f98 (patch)
tree9c502b9fe30c6de8d0b7b4b9ae3dce90d1a21698 /dev-java/antlr
parentppc stable wrt #325943 (diff)
downloadgentoo-2-4e66fa18564ef30159af6d30cb84564c08988f98.tar.gz
gentoo-2-4e66fa18564ef30159af6d30cb84564c08988f98.tar.bz2
gentoo-2-4e66fa18564ef30159af6d30cb84564c08988f98.zip
dev-java/antlr: fixed bug #349678
(Portage version: 2.1.9.31/cvs/Linux x86_64)
Diffstat (limited to 'dev-java/antlr')
-rw-r--r--dev-java/antlr/ChangeLog9
-rw-r--r--dev-java/antlr/antlr-2.7.7-r1.ebuild105
2 files changed, 112 insertions, 2 deletions
diff --git a/dev-java/antlr/ChangeLog b/dev-java/antlr/ChangeLog
index f002b2334642..33a981a0e2ae 100644
--- a/dev-java/antlr/ChangeLog
+++ b/dev-java/antlr/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-java/antlr
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/antlr/ChangeLog,v 1.79 2009/12/29 17:33:15 josejx Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/antlr/ChangeLog,v 1.80 2011/01/16 13:01:39 fordfrog Exp $
+
+*antlr-2.7.7-r1 (16 Jan 2011)
+
+ 16 Jan 2011; Miroslav Šulc <fordfrog@gentoo.org> +antlr-2.7.7-r1.ebuild:
+ fixed bug #349678
29 Dec 2009; Joseph Jezak <josejx@gentoo.org> antlr-3.1.3-r2.ebuild:
Marked ppc stable for bug #287425.
diff --git a/dev-java/antlr/antlr-2.7.7-r1.ebuild b/dev-java/antlr/antlr-2.7.7-r1.ebuild
new file mode 100644
index 000000000000..6dbdab6b0d84
--- /dev/null
+++ b/dev-java/antlr/antlr-2.7.7-r1.ebuild
@@ -0,0 +1,105 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/antlr/antlr-2.7.7-r1.ebuild,v 1.1 2011/01/16 13:01:39 fordfrog Exp $
+
+EAPI=1
+
+inherit base java-pkg-2 mono distutils multilib
+
+DESCRIPTION="A parser generator for C++, C#, Java, and Python"
+HOMEPAGE="http://www.antlr2.org/"
+SRC_URI="http://www.antlr2.org/download/${P}.tar.gz"
+
+LICENSE="ANTLR"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
+IUSE="doc debug examples mono +cxx +java python script source"
+
+# TODO do we actually need jdk at runtime?
+RDEPEND=">=virtual/jdk-1.3
+ mono? ( dev-lang/mono )
+ python? ( dev-lang/python )"
+DEPEND="${RDEPEND}
+ script? ( !dev-util/pccts )
+ source? ( app-arch/zip )"
+
+PATCHES=( "${FILESDIR}/2.7.7-gcc-4.3.patch" "${FILESDIR}/2.7.7-gcc-4.4.patch" "${FILESDIR}/2.7.7-makefixes.patch" )
+
+src_unpack() {
+ base_src_unpack
+}
+
+src_compile() {
+ # don't ask why, but this is needed for stuff to get built properly
+ # across the various JDKs
+ JAVACFLAGS="+ ${JAVACFLAGS}"
+
+ # mcs for https://bugs.gentoo.org/show_bug.cgi?id=172104
+ CSHARPC="mcs" econf $(use_enable java) \
+ $(use_enable python) \
+ $(use_enable mono csharp) \
+ $(use_enable debug) \
+ $(use_enable examples) \
+ $(use_enable cxx) \
+ --enable-verbose || die "configure failed"
+
+ emake || die "compile failed"
+
+ sed -e "s|@prefix@|/usr/|" \
+ -e 's|@exec_prefix@|${prefix}|' \
+ -e "s|@libdir@|\$\{exec_prefix\}/$(get_libdir)/antlr|" \
+ -e 's|@libs@|-r:\$\{libdir\}/antlr.astframe.dll -r:\$\{libdir\}/antlr.runtime.dll|' \
+ -e "s|@VERSION@|${PV}|" \
+ "${FILESDIR}"/antlr.pc.in > "${S}"/antlr.pc
+}
+
+src_install() {
+ exeinto /usr/bin
+ doexe "${S}"/scripts/antlr-config
+
+ if use cxx ; then
+ cd "${S}"/lib/cpp
+ einstall || die "failed to install C++ files"
+ fi
+
+ if use java ; then
+ java-pkg_dojar "${S}"/antlr/antlr.jar
+
+ use script && java-pkg_dolauncher antlr --main antlr.Tool
+
+ use source && java-pkg_dosrc "${S}"/antlr
+ use doc && java-pkg_dohtml -r "${S}"/doc/*
+ fi
+
+ if use mono ; then
+ cd "${S}"/lib
+
+ dodir /usr/$(get_libdir)/antlr/
+ insinto /usr/$(get_libdir)/antlr/
+
+ doins antlr.astframe.dll
+ doins antlr.runtime.dll
+
+ insinto /usr/$(get_libdir)/pkgconfig
+ doins "${S}"/antlr.pc
+ fi
+
+ if use python ; then
+ cd "${S}"/lib/python
+ distutils_src_install
+ fi
+
+ if use examples ; then
+ find "${S}"/examples -iname Makefile\* -exec rm \{\} \;
+
+ dodir /usr/share/doc/${PF}/examples
+ insinto /usr/share/doc/${PF}/examples
+
+ use cxx && doins -r "${S}"/examples/cpp
+ use java && doins -r "${S}"/examples/java
+ use mono && doins -r "${S}"/examples/csharp
+ use python && doins -r "${S}"/examples/python
+ fi
+
+ newdoc "${S}"/README.txt README || die
+}