diff options
author | Kacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com> | 2011-06-07 12:19:21 +0200 |
---|---|---|
committer | Kacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com> | 2011-06-07 12:19:21 +0200 |
commit | 06f124b547b8a3a257c86cee7705d2df08008529 (patch) | |
tree | c3582555f746a068ac50bcc5631e9c88a4df2187 /dev-java/hdf-java/hdf-java-2.7.ebuild | |
parent | sci-chemistry/ambertools: Version bump to 1.5 (diff) | |
download | sci-06f124b547b8a3a257c86cee7705d2df08008529.tar.gz sci-06f124b547b8a3a257c86cee7705d2df08008529.tar.bz2 sci-06f124b547b8a3a257c86cee7705d2df08008529.zip |
[dev-java/hdf-java] version bump
Diffstat (limited to 'dev-java/hdf-java/hdf-java-2.7.ebuild')
-rw-r--r-- | dev-java/hdf-java/hdf-java-2.7.ebuild | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/dev-java/hdf-java/hdf-java-2.7.ebuild b/dev-java/hdf-java/hdf-java-2.7.ebuild new file mode 100644 index 000000000..5c826052d --- /dev/null +++ b/dev-java/hdf-java/hdf-java-2.7.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +EAPI=2 +JAVA_PKG_IUSE="doc examples" +inherit eutils java-pkg-2 autotools + +DESCRIPTION="Java interface to the HDF5 library" +HOMEPAGE="http://www.hdfgroup.org/hdf-java-html/index.html" +SRC_URI="http://www.hdfgroup.org/ftp/HDF5/hdf-java/src/${P}-src.tar" + +LICENSE="NCSA-HDF" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="hdf szip zlib test" + +CDEPEND=">=sci-libs/hdf5-1.8[szip?,zlib?] + hdf? ( + sci-libs/hdf + virtual/jpeg + )" + +RDEPEND="${CDEPEND} + >=virtual/jre-1.5" + +DEPEND=">=virtual/jdk-1.5 + ${CDEPEND}" + +S=${WORKDIR}/${PN} + +src_prepare() { + epatch "${FILESDIR}"/${P}-shared.patch + eautoreconf + rm lib/*.jar +} + +src_configure() { + local stdpath="/usr/include,/usr/$(get_libdir)" + local myconf="--with-hdf4=no --with-libjpeg=no" + use hdf && \ + myconf="--with-libjpeg=${stdpath} --with-hdf4=${stdpath}" + use zlib && myconf="${myconf} --with-libz="${stdpath}"" + use szip && myconf="${myconf} --with-libsz="${stdpath}"" + + econf \ + ${myconf} \ + --with-hdf5="${stdpath}" \ + --with-jdk="$(java-config -o)/include,$(java-config -o)/jre/lib" +} + +src_compile() { + # parallel needs work. anyone? + emake -j1 just-hdf5 || die + + if use hdf; then + sed -i "s/MAX_VAR_DIMS/H4_MAX_VAR_DIMS/" \ + native/hdflib/hdfstructsutil.c || die + sed -i "s/MAX_NC_NAME/H4_MAX_NC_NAME/" \ + native/hdflib/hdfvdataImp.c || die + sed -i "s/MAX_NC_NAME/H4_MAX_NC_NAME/" \ + native/hdflib/hdfsdsImp.c || die + emake -j1 just-hdf4|| die + fi + + if use examples; then + emake -j1 do-examples || die + fi + + if use doc; then + emake -j1 javadocs || die + fi +} + +src_install() { + java-pkg_dojar "lib/jhdf5.jar" + java-pkg_doso "lib/linux/libjhdf5.so" + + if use hdf; then + java-pkg_dojar "lib/jhdf.jar" + java-pkg_doso "lib/linux/libjhdf.so" + fi + use doc && java-pkg_dojavadoc "docs/javadocs" + use examples && java-pkg_doexamples "examples" +} |