aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Savchenko <bircoph@gmail.com>2012-11-26 01:14:21 +0400
committerAndrew Savchenko <bircoph@gmail.com>2012-11-26 01:14:21 +0400
commit8a004bcf5b2cf128738df217abaece8950b687ae (patch)
tree95a9f435bbc7e44835eb1ff22bf2417ca522a374
parentflexdock: fix outdated SRC_URI and broken Manifest (diff)
downloadsci-8a004bcf5b2cf128738df217abaece8950b687ae.tar.gz
sci-8a004bcf5b2cf128738df217abaece8950b687ae.tar.bz2
sci-8a004bcf5b2cf128738df217abaece8950b687ae.zip
hdf-java: version bump
Sources for older versions are not available.
-rw-r--r--dev-java/hdf-java/ChangeLog6
-rw-r--r--dev-java/hdf-java/Manifest1
-rw-r--r--dev-java/hdf-java/files/hdf-java-2.9-shared.patch118
-rw-r--r--dev-java/hdf-java/hdf-java-2.9.ebuild128
4 files changed, 253 insertions, 0 deletions
diff --git a/dev-java/hdf-java/ChangeLog b/dev-java/hdf-java/ChangeLog
index 7f87c8257..960087910 100644
--- a/dev-java/hdf-java/ChangeLog
+++ b/dev-java/hdf-java/ChangeLog
@@ -2,6 +2,12 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+*hdf-java-2.9 (25 Nov 2012)
+
+ 25 Nov 2012; Andrew Savchenko <bircoph@gmail.com> +hdf-java-2.9.ebuild,
+ +files/hdf-java-2.9-shared.patch:
+ Version bump. Sources for older versions are not available.
+
23 May 2012; S├ębastien Fabbro <bicatali@gentoo.org> hdf-java-2.8.ebuild:
add hack for hdf5[mpi]
diff --git a/dev-java/hdf-java/Manifest b/dev-java/hdf-java/Manifest
index f3e8ea24b..e4d67d5d5 100644
--- a/dev-java/hdf-java/Manifest
+++ b/dev-java/hdf-java/Manifest
@@ -1,2 +1,3 @@
DIST hdf-java-2.7-src.tar 13209600 SHA256 091c999cf53266ba113bef45a83912b12444624cfe0253d5eb565b95e0832706 SHA512 895dcf69d02d41b2c8ae4ba2ab5dd30be21e320cb11e222deea6ac592374bdb22f3c0d5001fcda30b683dc3d9a59b16de1ead40179d3e211f5181b957a5134f1 WHIRLPOOL 3854db0df6e39b1b12814850bbc4dd6ea36daa7a4fcd4ef20dc11a42ce0b6663fea7f964424c6ff67bb78a901fda60f57570e051d21ca36e6b0686074065c198
DIST hdf-java-2.8-src.tar 13670400 SHA256 bc1b1eb2b9e40c2a23aff295818526ba007cdf8d43bb9a3d1cb117304b56fbb5 SHA512 2109a1eb27bbd359b032e8a61fd4d0816b55e7f1ba403b37abdc81f180a920fb64285fef8062908b749e4f9572f2c44e3df684edc0bc4d9c6f81d9461ac399ba WHIRLPOOL 1b76bdabeb72b313eeb06f4839d67ba013948ac8a6f6907e4e6d02d3ae93bf5538b1f8d14673652c8a64d3c9cc10ff974e6036f6c8cf1591f433f5370025bba4
+DIST hdf-java-2.9-src.tar 14161920 SHA256 6c7d362b808df3671ab3d600ac664e500b25158e693168ef6b35d100ebb048e3 SHA512 6ff9baa2264873411b05f8b6c190d9b72a25deb1e20c4b8633ba192bcf8700e03977e1ef9839e178a3856f3483468bdde432b753e8298e7e09c3a3b669b4c207 WHIRLPOOL 5b2545e2681e87afc1ca0373460c1209c4b94876efcd5b3310c5bf9ac23ac920821fe98d82301c3ec1520aa23561151b57755e66d527a0ff5b9e5e6a597cf590
diff --git a/dev-java/hdf-java/files/hdf-java-2.9-shared.patch b/dev-java/hdf-java/files/hdf-java-2.9-shared.patch
new file mode 100644
index 000000000..c0894807b
--- /dev/null
+++ b/dev-java/hdf-java/files/hdf-java-2.9-shared.patch
@@ -0,0 +1,118 @@
+--- hdf-java/configure.in.orig 2012-11-13 03:12:03.000000000 +0400
++++ hdf-java/configure.in 2012-11-25 21:12:40.074363619 +0400
+@@ -177,7 +177,7 @@
+ *)
+ if test -n "$withval" ; then
+ z_lib="`echo $withval |cut -f2 -d, -s`"
+- ZLIB=$z_lib"/libz."$LLEXT
++ ZLIB="-L$z_lib -lz"
+ HAVE_ZLIB="yes"
+ else
+ ZLIB=""
+@@ -211,7 +211,7 @@
+ *)
+ if test -n "$withval" ; then
+ jpeg_lib="`echo $withval |cut -f2 -d, -s`"
+- JPEGLIB=$jpeg_lib"/libjpeg."$LLEXT
++ JPEGLIB="-L$jpeg_lib -ljpeg"
+ dnl AC_MSG_RESULT([jpeg found: $JPEGLIB]);
+ HAVE_JPEG="yes"
+ else
+@@ -246,7 +246,7 @@
+ *)
+ if test -n "$withval" ; then
+ sz_lib="`echo $withval |cut -f2 -d, -s`"
+- SZLIB=$sz_lib"/libsz."$LLEXT
++ SZLIB="-L$sz_lib -lsz"
+ dnl AC_MSG_RESULT([szlib found: $SZLIB]);
+ HAVE_SZIP="yes"
+ else
+@@ -302,7 +302,7 @@
+ ;;
+ esac
+ if test -n "$HDF4LIB"; then
+- LIBS="$HDF4LIB/libdf.$LLEXT $HDF4LIB/libmfhdf.$LLEXT $LIBS"
++ LIBS="-L$HDF4LIB -ldf -lmfhdf $LIBS"
+ HAVE_HDF4="yes"
+ fi
+ AC_MSG_RESULT([$HAVE_HDF4])
+@@ -363,7 +363,7 @@
+ *)
+ if test -n "$withval" ; then
+ hdf5_lib="`echo $withval |cut -f2 -d, -s`"
+- HDF5LIB=$hdf5_lib"/libhdf.$LLEXT"
++ HDF5LIB="-L$hdf5_lib -lhdf"
+ hdf5_inc="`echo $withval |cut -f1 -d,`"
+ if test -n "$hdf5_inc"; then
+ HDF5INC="$hdf5_inc"
+@@ -380,7 +380,7 @@
+ ;;
+ esac
+ if test -n "$HDF5LIB"; then
+- LIBS="$HDF5LIB/libhdf5.$LLEXT $LIBS"
++ LIBS="-L$HDF5LIB -lhdf5 $LIBS"
+ HAVE_HDF5="yes"
+ fi
+ AC_MSG_RESULT([$HAVE_HDF5])
+@@ -637,10 +637,6 @@
+ if test \( ! -d "$JH45INST" \); then
+ JH45INST_FOUND=0
+ fi
+- if test \( ! -w "$JH45INST" \); then
+- AC_MSG_ERROR( [ $JH45INST : not writable ])
+- JH45INST_FOUND=0
+- fi
+ fi
+ until test $JH45INST_FOUND -eq 1; do
+ echo "Please type the directory in which to install the JH45"
+@@ -649,10 +645,6 @@
+ if test \( ! -d "$JH45INST" \); then
+ JH45INST_FOUND=0
+ fi
+- if test \( ! -w "$JH45INST" \); then
+- AC_MSG_ERROR( [ $JH45INST : not writable ])
+- JH45INST_FOUND=0
+- fi
+ done
+
+ ac_cv_lib_JH45INST=$JH45INST
+--- a/native/hdf5lib/Makefile.in
++++ b/native/hdf5lib/Makefile.in
+@@ -35,7 +35,7 @@
+
+ CFLAGS = -D_FILE_OFFSET_BITS=64 $(DEFS) -I. -I$(HDF5INC) -I$(JAVAINC1) -I$(JAVAINC2)
+
+-LIBS = $(HDF5LIB)/libhdf5.$(LLEXT) $(ZLIB) $(SZLIB) -lm
++LIBS = -L$(HDF5LIB) -lhdf5 $(ZLIB) $(SZLIB) -lm
+
+ # Macro def: object filename used
+ OBJECTS = exceptionImp.o h5Constants.o h5Imp.o h5aImp.o h5dImp.o h5eImp.o h5fImp.o h5gImp.o h5iImp.o h5lImp.o h5oImp.o h5pImp.o h5rImp.o h5sImp.o h5tImp.o nativeData.o h5util.o h5zImp.o
+@@ -47,7 +47,7 @@
+
+ libjhdf5: $(OBJECTS)
+ -mkdir -p $(LIBDIR);
+- $(LD) $(LDOPT) -o $(LIBDIR)/libjhdf5.$(JSLEXT) $(LDOPT2) $(OBJECTS) $(LIBS)
++ $(LD) $(LDOPT) $(LDFLAGS) -o $(LIBDIR)/libjhdf5.$(JSLEXT) $(LDOPT2) $(OBJECTS) $(LIBS)
+
+ clean:
+ $(RM) -f *.o so_locations $(LIBDIR)/libjhdf5.$(JSLEXT)
+--- a/native/hdflib/Makefile.in
++++ b/native/hdflib/Makefile.in
+@@ -41,7 +41,7 @@
+ CFLAGS = $(DEFS) -I. -I$(JAVAINC1) -I$(JAVAINC2) -I$(HDFINC)
+
+ # Be sure to add -lbsd if compiling in a SYSV environment
+-LIBS = $(HDFLIB)/libmfhdf.$(LLEXT) $(HDFLIB)/libdf.$(LLEXT) $(SZLIB) $(ZLIB) $(JPEGLIB) -lm
++LIBS = -L$(HDFLIB) -lmfhdf -ldf $(SZLIB) $(ZLIB) $(JPEGLIB) -lm
+
+ # Macro def: object filename used
+ OBJECTS = hdfstructsutil.o \
+@@ -60,7 +60,7 @@
+
+ libjhdf: $(OBJECTS)
+ -mkdir -p $(LIBDIR);
+- $(LD) $(LDOPT) -o $(LIBDIR)/libjhdf.$(JSLEXT) $(LDOPT2) $(OBJECTS) $(LIBS)
++ $(LD) $(LDOPT) $(LDFLAGS) -o $(LIBDIR)/libjhdf.$(JSLEXT) $(LDOPT2) $(OBJECTS) $(LIBS)
+
+ clean:
+ $(RM) -f *.o so_locations $(LIBDIR)/libjhdf.$(JSLEXT)
diff --git a/dev-java/hdf-java/hdf-java-2.9.ebuild b/dev-java/hdf-java/hdf-java-2.9.ebuild
new file mode 100644
index 000000000..98c9248f2
--- /dev/null
+++ b/dev-java/hdf-java/hdf-java-2.9.ebuild
@@ -0,0 +1,128 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+JAVA_PKG_IUSE="doc examples"
+inherit eutils java-pkg-2 autotools fdo-mime
+
+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 hdfview szip test zlib"
+
+CDEPEND=">=sci-libs/hdf5-1.8[szip=,zlib=]
+ hdf? ( sci-libs/hdf virtual/jpeg )
+ hdfview? ( dev-java/fits dev-java/netcdf )"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.5"
+
+DEPEND="${CDEPEND}
+ >=virtual/jdk-1.5
+ test? ( >=dev-java/junit-4 )"
+
+REQUIRED_USE="hdfview? ( hdf )"
+
+# buggy test with incompatible hdf5 library versions
+RESTRICT="test"
+
+S="${WORKDIR}/${PN}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-shared.patch
+ eautoreconf
+ rm lib/*.jar
+ if use hdfview; then
+ java-pkg_jar-from --into lib fits fits.jar
+ java-pkg_jar-from --into lib netcdf netcdf.jar
+ fi
+ use test && java-pkg_jar-from --into lib junit-4 junit.jar
+}
+
+src_configure() {
+ local stdpath="${EPREFIX}/usr/include,${EPREFIX}/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() {
+ # gentoo bug #302621
+ has_version sci-libs/hdf5[mpi] && export CXX=mpicxx CC=mpicc
+
+ # parallel needs work. anyone?
+ emake -j1 ncsa just-hdf5
+
+ if use hdf; then
+ sed -i \
+ -e "s/MAX_VAR_DIMS/H4_MAX_VAR_DIMS/" \
+ native/hdflib/hdfstructsutil.c || die
+ sed -i \
+ -e "s/MAX_NC_NAME/H4_MAX_NC_NAME/" \
+ native/hdflib/hdf{vdata,sds}Imp.c || die
+ emake -j1 just-hdf4
+ fi
+
+ use hdfview && emake -j1 packages
+ use examples && emake -j1 do-examples
+ use doc && emake -j1 javadocs
+}
+
+src_test() {
+ emake -j1 check
+}
+
+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
+
+ if use hdfview; then
+ java-pkg_dojar lib/jhdf5obj.jar
+ java-pkg_dojar lib/jhdfobj.jar
+ java-pkg_dojar lib/ext/nc2obj.jar
+ java-pkg_dojar lib/ext/fitsobj.jar
+ java-pkg_dojar lib/jhdfview.jar
+ cat <<-EOF > hdfview
+ #!/bin/sh
+ export CLASSPATH=\$(java-config --classpath hdf-java)
+ \$(java-config --java) \
+ -Xmx1000m \
+ -Djava.library.path=\$(java-config --library hdf-java) \
+ ncsa.hdf.view.HDFView \
+ -root "${EROOT}" \$*
+ EOF
+ dobin hdfview
+ insinto /usr/share/mime/packages
+ doins "${FILESDIR}"/hdfview.xml
+ newicon ncsa/hdf/view/icons/hdf_large.gif hdfview.gif
+ make_desktop_entry hdfview "HDF Viewer" hdfview
+ fi
+
+ use doc && java-pkg_dojavadoc docs/javadocs
+ use examples && java-pkg_doexamples examples
+}
+
+pkg_postinst() {
+ use hdfview && fdo-mime_desktop_database_update
+}
+
+pkg_postrm() {
+ use hdfview && fdo-mime_desktop_database_update
+}