summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVlastimil Babka <caster@gentoo.org>2010-03-27 22:32:17 +0000
committerVlastimil Babka <caster@gentoo.org>2010-03-27 22:32:17 +0000
commit5352641dce7ea0676d218464f6968bf62fbfddf9 (patch)
tree0b58ff0d760ec2bdca9f0cddb94ebd1db71d4612
parentAdd @LIBDIR@ (rewritted to get_libdir) support in package.env (diff)
downloadgentoo-2-5352641dce7ea0676d218464f6968bf62fbfddf9.tar.gz
gentoo-2-5352641dce7ea0676d218464f6968bf62fbfddf9.tar.bz2
gentoo-2-5352641dce7ea0676d218464f6968bf62fbfddf9.zip
Revbump to switch to gnu-classpath-0.98, move the install to /usr/lib/jamvm, apply stuff (compatibility symlinks) from java-overlay.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
-rw-r--r--dev-java/jamvm/ChangeLog9
-rw-r--r--dev-java/jamvm/files/jamvm-1.5.4-r1.env12
-rw-r--r--dev-java/jamvm/jamvm-1.5.4-r1.ebuild98
3 files changed, 118 insertions, 1 deletions
diff --git a/dev-java/jamvm/ChangeLog b/dev-java/jamvm/ChangeLog
index e4f59bed3f2c..bc97c4353f02 100644
--- a/dev-java/jamvm/ChangeLog
+++ b/dev-java/jamvm/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-java/jamvm
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/jamvm/ChangeLog,v 1.39 2010/03/27 17:55:53 ali_bush Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jamvm/ChangeLog,v 1.40 2010/03/27 22:32:16 caster Exp $
+
+*jamvm-1.5.4-r1 (27 Mar 2010)
+
+ 27 Mar 2010; Vlastimil Babka <caster@gentoo.org> +jamvm-1.5.4-r1.ebuild,
+ +files/jamvm-1.5.4-r1.env:
+ Revbump to switch to gnu-classpath-0.98, move the install to
+ /usr/lib/jamvm, apply stuff (compatibility symlinks) from java-overlay.
*jamvm-1.5.4 (27 Mar 2010)
diff --git a/dev-java/jamvm/files/jamvm-1.5.4-r1.env b/dev-java/jamvm/files/jamvm-1.5.4-r1.env
new file mode 100644
index 000000000000..9419ab6b449d
--- /dev/null
+++ b/dev-java/jamvm/files/jamvm-1.5.4-r1.env
@@ -0,0 +1,12 @@
+VERSION="JamVM @PV@"
+JAVA_HOME="/usr/@LIBDIR@/@PN@"
+BOOTCLASSPATH="${JAVA_HOME}/classes.zip:${JAVA_HOME}/lib/rt.jar"
+JDK_HOME="${JAVA_HOME}"
+JAVAC="${JAVA_HOME}/bin/javac"
+PATH="${JAVA_HOME}/bin"
+ROOTPATH="${JAVA_HOME}/bin"
+PROVIDES_TYPE="JDK JRE"
+PROVIDES_VERSION="1.5"
+GENERATION="2"
+ENV_VARS="JAVA_HOME JDK_HOME JAVAC PATH"
+LDPATH="${JAVA_HOME}/lib"
diff --git a/dev-java/jamvm/jamvm-1.5.4-r1.ebuild b/dev-java/jamvm/jamvm-1.5.4-r1.ebuild
new file mode 100644
index 000000000000..875cb40da361
--- /dev/null
+++ b/dev-java/jamvm/jamvm-1.5.4-r1.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/jamvm/jamvm-1.5.4-r1.ebuild,v 1.1 2010/03/27 22:32:16 caster Exp $
+
+EAPI=2
+
+inherit eutils flag-o-matic multilib java-vm-2 autotools
+
+DESCRIPTION="An extremely small and specification-compliant virtual machine."
+HOMEPAGE="http://jamvm.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug libffi"
+
+CLASSPATH_SLOT=0.98
+DEPEND="dev-java/gnu-classpath:${CLASSPATH_SLOT}
+ libffi? ( virtual/libffi )
+ amd64? ( virtual/libffi )"
+RDEPEND="${DEPEND}"
+PDEPEND="dev-java/gjdoc
+ dev-java/eclipse-ecj"
+
+src_prepare() {
+ # without this patch, classes.zip is not found at runtime
+ epatch "${FILESDIR}/classes-location.patch"
+ eautoreconf
+
+ # These come precompiled.
+ # configure script uses detects the compiler
+ # from PATH. I guess we should compile this from source.
+ # Then just make sure not to hit
+ # https://bugs.gentoo.org/show_bug.cgi?id=163801
+ #rm -v lib/classes.zip || die
+}
+
+CLASSPATH_DIR="/usr/gnu-classpath-${CLASSPATH_SLOT}"
+
+src_configure() {
+ # Keep libjvm.so out of /usr
+ # http://bugs.gentoo.org/show_bug.cgi?id=181896
+ INSTALL_DIR="/usr/$(get_libdir)/${PN}"
+
+ filter-flags "-fomit-frame-pointer"
+
+ if use amd64 || use libffi; then
+ append-cflags "$(pkg-config --cflags-only-I libffi)"
+ fi
+
+ local fficonf="--enable-ffi"
+ use !amd64 && fficonf="$(use_enable libffi ffi)"
+
+ econf ${fficonf} \
+ --disable-dependency-tracking \
+ $(use_enable debug trace) \
+ --prefix=${INSTALL_DIR} \
+ --datadir=/usr/$(get_libdir) \
+ --bindir=/usr/bin \
+ --libdir=${INSTALL_DIR}/lib \
+ --with-classpath-install-dir=${CLASSPATH_DIR} \
+ || die "configure failed."
+}
+
+create_launcher() {
+ local script="${D}/${INSTALL_DIR}/bin/${1}"
+ cat > "${script}" <<-EOF
+#!/bin/sh
+exec /usr/bin/jamvm \
+ -Xbootclasspath/p:"${CLASSPATH_DIR}/share/classpath/tools.zip" \
+ gnu.classpath.tools.${1}.Main "\$@"
+EOF
+ chmod +x "${script}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "installation failed."
+
+ dodoc ACKNOWLEDGEMENTS AUTHORS ChangeLog NEWS README \
+ || die "dodoc failed"
+
+ set_java_env "${FILESDIR}/${PN}-1.5.4-r1.env"
+
+ local bindir=${INSTALL_DIR}/bin
+ dodir ${bindir}
+ dosym /usr/bin/jamvm ${bindir}/java
+ dosym /usr/bin/ecj ${bindir}/javac
+ dosym /usr/bin/gjdoc ${bindir}/javadoc
+ dodir ${INSTALL_DIR}/jre/lib
+ dosym ${CLASSPATH_DIR}/share/classpath/glibj.zip ${INSTALL_DIR}/jre/lib/rt.jar
+ dodir ${INSTALL_DIR}/lib
+ dosym ${CLASSPATH_DIR}/share/classpath/tools.zip ${INSTALL_DIR}/lib/tools.jar
+ for file in ${CLASSPATH_DIR}/bin/*; do
+ base=$(basename ${file})
+ create_launcher ${base#g}
+ done
+}