--- R-2.13.1-r1.ebuild 2011-09-25 08:23:59.000000000 +0200 +++ R-2.13.1-r1.ebuild 2011-09-27 22:21:18.781641743 +0200 @@ -4,7 +4,7 @@ EAPI=4 -inherit bash-completion eutils flag-o-matic fortran-2 versionator +inherit autotools bash-completion eutils flag-o-matic fortran-2 versionator java-pkg-opt-2 DESCRIPTION="Language and environment for statistical computing and graphics" HOMEPAGE="http://www.r-project.org/" @@ -37,7 +37,8 @@ dev-util/pkgconfig doc? ( virtual/latex-base || ( dev-texlive/texlive-fontsrecommended - app-text/ptex ) )" + app-text/ptex ) ) + java? ( >=virtual/jdk-1.5 )" RDEPEND="${CDEPEND} ( || ( =sys-libs/zlib-1.2.5.1-r2[minizip] ) ) @@ -54,6 +55,10 @@ tc-has-openmp || die "Please enable openmp support in your compiler" fi fortran-2_pkg_setup + # Selects the build VM according to DEPEND and user preferences. + # Also sets VM specific addpredict and environment variables. + # Does nothing if java is disabled. + java-pkg-opt-2_pkg_setup filter-ldflags -Wl,-Bdirect -Bdirect # avoid using existing R installation unset R_HOME @@ -105,9 +110,16 @@ fi use perl && \ export PERL5LIB="${S}/share/perl:${PERL5LIB:+:}${PERL5LIB}" + + java-pkg-opt-2_src_prepare } src_configure() { + # configure shouldn't run checks for java if disabled. + # Requires properly setup JVM or a addpredict hack for + # /proc/self/coredump_filter and possibly others. + # $(use_enable java) + econf \ --enable-byte-compiled-packages \ --enable-R-shlib \