diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2007-10-01 04:42:44 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2007-10-01 04:42:44 +0000 |
commit | 77adbf0b1c55fde65c75ef328ed72a19e210c4dc (patch) | |
tree | 1d105b5f7beb88452e804bbcae09782a3b9f6ab0 /dev-java/rjava | |
parent | Remove libgnomecanvas dependency as gailcanvas moved to the new libgnomecanva... (diff) | |
download | historical-77adbf0b1c55fde65c75ef328ed72a19e210c4dc.tar.gz historical-77adbf0b1c55fde65c75ef328ed72a19e210c4dc.tar.bz2 historical-77adbf0b1c55fde65c75ef328ed72a19e210c4dc.zip |
initial import of rjava interface package
Package-Manager: portage-2.1.3.9
Diffstat (limited to 'dev-java/rjava')
-rw-r--r-- | dev-java/rjava/ChangeLog | 12 | ||||
-rw-r--r-- | dev-java/rjava/Manifest | 16 | ||||
-rw-r--r-- | dev-java/rjava/files/digest-rjava-0.5.1 | 3 | ||||
-rw-r--r-- | dev-java/rjava/metadata.xml | 13 | ||||
-rw-r--r-- | dev-java/rjava/rjava-0.5.1.ebuild | 145 |
5 files changed, 189 insertions, 0 deletions
diff --git a/dev-java/rjava/ChangeLog b/dev-java/rjava/ChangeLog new file mode 100644 index 000000000000..4858c659b20d --- /dev/null +++ b/dev-java/rjava/ChangeLog @@ -0,0 +1,12 @@ +# ChangeLog for dev-java/rjava +# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/rjava/ChangeLog,v 1.1 2007/10/01 04:42:43 nerdboy Exp $ + +*rjava-0.5.1 (01 Oct 2007) + + 01 Oct 2007; Steve Arnold <nerdboy@gentoo.org> +metadata.xml, + +rjava-0.5.1.ebuild: + Initial import of rjava, the Java-R interface. Note that building an R + package in portage is a little weird, but works. Recommend all external + R packages (if any) be installed under site-library. + diff --git a/dev-java/rjava/Manifest b/dev-java/rjava/Manifest new file mode 100644 index 000000000000..421f3fb4018e --- /dev/null +++ b/dev-java/rjava/Manifest @@ -0,0 +1,16 @@ +DIST rJava_0.5-1.tar.gz 226783 RMD160 354f7752a547b0ac24cf535c3e09579b266cc6c9 SHA1 22c8a068cda394b72216309a7e0a0c51757517ad SHA256 dc46959b52b9014d05d2f7ce101984124c0cb51190adfb4b65454846a0914c59 +EBUILD rjava-0.5.1.ebuild 3806 RMD160 73b42cde50cfce7756578012f21c54d45c5ab6e0 SHA1 d43891d360bc08966ad71aa73ca9257e85448479 SHA256 c3d256b168e7be0b6585128949341b80b996a28dcfc7b4da2e26838dc39d4a12 +MD5 11ede5b10fc14f69921c97e63fc70be3 rjava-0.5.1.ebuild 3806 +RMD160 73b42cde50cfce7756578012f21c54d45c5ab6e0 rjava-0.5.1.ebuild 3806 +SHA256 c3d256b168e7be0b6585128949341b80b996a28dcfc7b4da2e26838dc39d4a12 rjava-0.5.1.ebuild 3806 +MISC ChangeLog 522 RMD160 0e57ea5509ac66dc3db92970c475a0cc1db742b1 SHA1 9d0a2fee90cd0c92dce7914b2421ab8aadc922e9 SHA256 425936e8149380bdf2332675a04b80ded48f5934a6a25647109b0ecab0738421 +MD5 90589f3301f325ad2ff03df5fce87894 ChangeLog 522 +RMD160 0e57ea5509ac66dc3db92970c475a0cc1db742b1 ChangeLog 522 +SHA256 425936e8149380bdf2332675a04b80ded48f5934a6a25647109b0ecab0738421 ChangeLog 522 +MISC metadata.xml 608 RMD160 98a89fdf94e409c22893cc19e3700c8330d57688 SHA1 b0d1e7475373d57d0c7a96c327fbaf7eeea8d40f SHA256 73860a49b7c97e5788449dee0a53688a5235bb364a7b42a7a104231e549890ff +MD5 7120e86887170ba111d0f0fdd60b239f metadata.xml 608 +RMD160 98a89fdf94e409c22893cc19e3700c8330d57688 metadata.xml 608 +SHA256 73860a49b7c97e5788449dee0a53688a5235bb364a7b42a7a104231e549890ff metadata.xml 608 +MD5 22f6f75fc026682cde73a5efb0ee9ae1 files/digest-rjava-0.5.1 235 +RMD160 385400eae70f981ed2a008818346961a5eaf5563 files/digest-rjava-0.5.1 235 +SHA256 5896d4934d29d4b62934e20c37a8510d9dc2a49bd902f92c76229aee884d2ead files/digest-rjava-0.5.1 235 diff --git a/dev-java/rjava/files/digest-rjava-0.5.1 b/dev-java/rjava/files/digest-rjava-0.5.1 new file mode 100644 index 000000000000..c277865141f1 --- /dev/null +++ b/dev-java/rjava/files/digest-rjava-0.5.1 @@ -0,0 +1,3 @@ +MD5 49cb1da46d3be3bd115dcdfca698af05 rJava_0.5-1.tar.gz 226783 +RMD160 354f7752a547b0ac24cf535c3e09579b266cc6c9 rJava_0.5-1.tar.gz 226783 +SHA256 dc46959b52b9014d05d2f7ce101984124c0cb51190adfb4b65454846a0914c59 rJava_0.5-1.tar.gz 226783 diff --git a/dev-java/rjava/metadata.xml b/dev-java/rjava/metadata.xml new file mode 100644 index 000000000000..1b4f63ba0d6d --- /dev/null +++ b/dev-java/rjava/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci</herd> +<longdescription lang="en"> +rJava is a simple R-to-Java interface. It is comparable to the .C/.Call C +interface. rJava provides a low-level bridge between R and Java (via JNI). +In a sense the inverse of rJava is JRI (Java/R Interface) which provides +the opposite direction - calling R from Java. JRI is now shipped as a part +of the rJava package, although it still can be used as a separate entity +(especially for development). +</longdescription> +</pkgmetadata> diff --git a/dev-java/rjava/rjava-0.5.1.ebuild b/dev-java/rjava/rjava-0.5.1.ebuild new file mode 100644 index 000000000000..76d5b3bbca4d --- /dev/null +++ b/dev-java/rjava/rjava-0.5.1.ebuild @@ -0,0 +1,145 @@ +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-java/rjava/rjava-0.5.1.ebuild,v 1.1 2007/10/01 04:42:43 nerdboy Exp $ + +JAVA_PKG_IUSE="examples" + +inherit eutils java-pkg-2 versionator + +MY_PN=rJava +MY_PV=$(replace_version_separator 2 '-' ) +MY_P=${MY_PN}_${MY_PV} +S=${WORKDIR}/${MY_PN} + +DESCRIPTION="The current rJava interface (also includes JRI)" +HOMEPAGE="http://www.rforge.net/rJava/" +SRC_URI="http://www.rforge.net/${MY_PN}/snapshot/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86" +IUSE="" + +COMMON_DEP=">=dev-lang/R-2.5.0" + +RDEPEND=">=virtual/jre-1.5 + ${COMMON_DEP}" + +DEPEND=">=virtual/jdk-1.5 + ${COMMON_DEP}" + +pkg_setup() { + java-pkg-2_pkg_setup + + if use x86; then + jvmarch=i386 + else + jvmarch=${ARCH} + fi +} + +src_unpack() { + unpack ${A} + cd "${S}" + setup-jvm-opts +} + +src_compile() { + export R_HOME="/usr/$(get_libdir)/R" + + # use R's check command to test package (really needs to come before + # the src_compile section) + if has test ${FEATURES}; then + cd ${WORKDIR} + R CMD check ${MY_PN} + fi + + cd "${S}" + local my_conf="--enable-jri" + econf ${my_conf} || die "econf failed" + cd src/ + make -f Makevars all || die "make failed" +} + +src_install() { + export R_LIBS_SITE="${R_HOME}/site-library" + keepdir ${R_LIBS_SITE} + cd ${WORKDIR} + R CMD INSTALL --no-configure -l "${D}${R_LIBS_SITE}" ${MY_PN} \ + || die "install failed" + cd ${S} + + local jri_dir="/usr/$(get_libdir)/jri" + java-pkg_jarinto ${jri_dir} + java-pkg_dojar inst/jri/JRI.jar + + insinto ${jri_dir} + insopts -m0755 + doins inst/jri/libjri.so + java-pkg_regso "${D}${jri_dir}/libjri.so" + + echo "R_HOME=${R_HOME}">25rjava + echo "LD_LIBRARY_PATH=${R_HOME}/lib:${JAVA_LIB_DIR}">>25rjava + echo "R_INCLUDE_DIR=${R_HOME}/include">>25rjava + echo "R_SHARE_DIR=${R_HOME}/share">>25rjava + echo "R_DOC_DIR=${R_HOME}/doc">>25rjava + + insopts -m0644 + doenvd 25rjava + + dodoc NEWS + newdoc jri/README README.jri + use examples && java-pkg_doexamples jri/examples +} + +setup-jvm-opts() { + # Figure out correct boot classpath + # stolen from eclipse-sdk ebuild + local bp="$(java-config --jdk-home)/jre/lib" + local bootclasspath=$(java-config --runtime) + if [[ ! -z "`java-config --java-version | grep IBM`" ]] ; then + # IBM JDK + JAVA_LIB_DIR="$(java-config --jdk-home)/jre/bin" + else + # Sun derived JDKs (Blackdown, Sun) + JAVA_LIB_DIR="$(java-config --jdk-home)/jre/lib/${jvmarch}" + fi + + einfo "Using bootclasspath ${bootclasspath}" + einfo "Using JVM library path ${JAVA_LIB_DIR}" + + if [[ ! -f ${JAVA_LIB_DIR}/libawt.so ]] ; then + die "Could not find libawt.so native library" + fi + + export AWT_LIB_PATH=${JAVA_LIB_DIR} +} + +pkg_postinst () { + elog + elog "The rJava package also includes the JRI tools, so rJava now" + elog "provides both sides of the overall interface. The rJava piece" + elog "is installed as an R package, while JRI is composed of the .jar" + elog "file and libjri.so, which are registered with the Java packaging" + elog "tools." + elog + elog "Some documentation on JRI can be found in the usual place," + elog "along with the internal R docs in various formats." + elog + elog "Note: JRI is also installed under the R site-library dir." + elog "(see the 'run' script installed with the R package for one" + elog "way to run the JRI examples, however, the environment setup" + elog "should be taken care of by the java eclass functions and the" + elog "env.d file installed by the ebuild)." + elog + elog "http://www.rforge.net/rJava/index.html" + elog "The above URL is the correct home page for the current rJava release." + elog "The sourceforge page called RJava is old and no longer maintained." + elog + + ewarn "Please perform" + ewarn " env-update" + ewarn " source /etc/profile" + ewarn "prior to using JRI." + elog +} |