/[gentoo-x86]/dev-java/jamvm/jamvm-1.5.4-r2.ebuild
Gentoo

Contents of /dev-java/jamvm/jamvm-1.5.4-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Mon May 14 19:17:32 2012 UTC (2 years, 3 months ago) by sera
Branch: MAIN
Only provide JRE. #371461

(Portage version: 2.1.10.58/cvs/Linux x86_64)

1 sera 1.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-java/jamvm/jamvm-1.5.4-r1.ebuild,v 1.4 2010/05/24 18:50:27 pacho Exp $
4    
5     EAPI=4
6    
7     inherit eutils flag-o-matic multilib java-vm-2 autotools
8    
9     DESCRIPTION="An extremely small and specification-compliant virtual machine."
10     HOMEPAGE="http://jamvm.sourceforge.net/"
11     SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
12    
13     LICENSE="GPL-2"
14     SLOT="0"
15     KEYWORDS="~amd64 ~ppc ~x86"
16     IUSE="debug libffi"
17    
18     CLASSPATH_SLOT=0.98
19     DEPEND="dev-java/gnu-classpath:${CLASSPATH_SLOT}
20     libffi? ( virtual/libffi )
21     amd64? ( virtual/libffi )"
22     RDEPEND="${DEPEND}"
23    
24     src_prepare() {
25     # without this patch, classes.zip is not found at runtime
26     epatch "${FILESDIR}/classes-location.patch"
27     eautoreconf
28    
29     # These come precompiled.
30     # configure script uses detects the compiler
31     # from PATH. I guess we should compile this from source.
32     # Then just make sure not to hit
33     # https://bugs.gentoo.org/show_bug.cgi?id=163801
34     #rm -v lib/classes.zip || die
35     }
36    
37     CLASSPATH_DIR="/usr/gnu-classpath-${CLASSPATH_SLOT}"
38    
39     src_configure() {
40     # Keep libjvm.so out of /usr
41     # http://bugs.gentoo.org/show_bug.cgi?id=181896
42     INSTALL_DIR="/usr/$(get_libdir)/${PN}"
43    
44     filter-flags "-fomit-frame-pointer"
45    
46     if use amd64 || use libffi; then
47     append-cflags "$(pkg-config --cflags-only-I libffi)"
48     fi
49    
50     local fficonf="--enable-ffi"
51     use !amd64 && fficonf="$(use_enable libffi ffi)"
52    
53     econf ${fficonf} \
54     --disable-dependency-tracking \
55     $(use_enable debug trace) \
56     --prefix=${INSTALL_DIR} \
57     --datadir=/usr/$(get_libdir) \
58     --bindir=/usr/bin \
59     --libdir=${INSTALL_DIR}/lib \
60     --with-classpath-install-dir=${CLASSPATH_DIR}
61     }
62    
63     create_launcher() {
64     local script="${D}/${INSTALL_DIR}/bin/${1}"
65     cat > "${script}" <<-EOF
66     #!/bin/sh
67     exec /usr/bin/jamvm \
68     -Xbootclasspath/p:"${CLASSPATH_DIR}/share/classpath/tools.zip" \
69     gnu.classpath.tools.${1}.Main "\$@"
70     EOF
71     chmod +x "${script}"
72     }
73    
74     src_install() {
75     emake DESTDIR="${D}" install
76    
77     dodoc ACKNOWLEDGEMENTS AUTHORS ChangeLog NEWS README
78    
79     set_java_env "${FILESDIR}/${PN}-1.5.4-r2.env"
80    
81     dosym /usr/bin/jamvm ${INSTALL_DIR}/bin/java
82     dosym ${CLASSPATH_DIR}/share/classpath/glibj.zip ${INSTALL_DIR}/jre/lib/rt.jar
83     dosym ${CLASSPATH_DIR}/share/classpath/tools.zip ${INSTALL_DIR}/lib/tools.jar
84     for file in ${CLASSPATH_DIR}/bin/*; do
85     base=$(basename ${file})
86     create_launcher ${base#g}
87     done
88     }

  ViewVC Help
Powered by ViewVC 1.1.20