summaryrefslogtreecommitdiff
path: root/sci-misc/h5utils
diff options
context:
space:
mode:
Diffstat (limited to 'sci-misc/h5utils')
-rw-r--r--sci-misc/h5utils/Manifest7
-rw-r--r--sci-misc/h5utils/files/h5utils-1.12.1-automagic.patch63
-rw-r--r--sci-misc/h5utils/files/h5utils-1.12.1-png15.patch43
-rw-r--r--sci-misc/h5utils/h5utils-1.12.1-r2.ebuild41
-rw-r--r--sci-misc/h5utils/metadata.xml20
5 files changed, 174 insertions, 0 deletions
diff --git a/sci-misc/h5utils/Manifest b/sci-misc/h5utils/Manifest
new file mode 100644
index 000000000000..9804b1bedd56
--- /dev/null
+++ b/sci-misc/h5utils/Manifest
@@ -0,0 +1,7 @@
+AUX h5utils-1.12.1-automagic.patch 2226 SHA256 e69b005a086749e530a037f37ca5069473947bfb21b2f9dc98e470c26cc0c69c SHA512 ae8513c6c214fdd17886b65e77c707c08c97b7c72943ea0608cd8f4d269a4f2ef7df579b5746b76b307a77d68b9993860b6cce8cb6793da21123ad9892769999 WHIRLPOOL 2ee48d8bd4847570fcaa9e13daec52689458ccce9db0809933b80e4f9bffec4d7c1be426bd8a12930c835204f6934867341aa65e9b3f3f9ae930579b5b6cf679
+AUX h5utils-1.12.1-png15.patch 1420 SHA256 45e326080589e9e05da81d5a4ce15e0df5991e13f2ded1d3d34e30fa94593c7a SHA512 babc34ab9d585468dabae50d16b7cb59a9326f541c69be5f347189bc6386273a61b9ec3a8a09e00fb2da386ee1fd592f0c85d2c3290134c74d8aa5d1057bd563 WHIRLPOOL d7fd4a9f96d26a34a7e2c312a59ade3bde50ef47712c2bb1c46b4a359534101009c6f22539b4861ec8cfeca8ffc56466fef7c55532bc917c8b8bd1cf7a38d2e7
+DIST h5utils-1.12.1.tar.gz 156785 SHA256 7290290ca5d5d4451d757a70c86baaa70d23a28edb09c951b6b77c22b924a38d SHA512 b4295ac52ddfe922ed9f0a9079c69d6fdba5a261558d8c820a8feae592db3bd57a3394ab1fc9ceead00038a80bc70f32e0a8aa437cb33182899553bfdbf1f547 WHIRLPOOL c717c41545533eb0ba9f7d4813c42e3fbbec3ef292f8461ead0f0dcbe4e7530d64740dffb94cf25e839420ac4633082c06833ea5013a1a9eb276ef516d632f14
+EBUILD h5utils-1.12.1-r2.ebuild 782 SHA256 216d3227a0718003b7c39a8fef8c87595f577a07c043baca69c54ebfc994b6f3 SHA512 45c664a647f17326dc16cf28cfbfe75ad4685122ad9ccfd1ed952d6e4ed2fefd6a234875ebeccea5d063e1210eeaae5f4e3ddbe5430437ec59dff9f3c72ad29c WHIRLPOOL 0627e4bfebf9f83c2f345bf8cd957dc0687ac5dbe6c9b47567bdfc9ee1658df81939c9790f5b1e588928ac64a4e7fa077a3d922bf2a75a45551c7e9fefecc0f9
+MISC ChangeLog 2644 SHA256 1967dabd83740b5b67126ada96e75f5d50c34e3f5a8465177a5005074e57161f SHA512 fd856cf8f8a8e7f42c38a1541de4c2b94449ac6669bd29026bb6fc36ad9346df488c8b91ef86a7e057aadfce3ab97a4be25497e2f0d115d020a0c15951491f9d WHIRLPOOL 9973a8f26de96f4bc177760444bc5a64a209e621648c2b8a8b25857500c52ccc0e5f331813d9bdabee05d8420082eac4a534abb81b25c288795c69eec22fc157
+MISC ChangeLog-2015 3596 SHA256 f1f72b55ff17aa4d651d72f3f63cb5fe00f5285bc507098c2a6954663bb3a37c SHA512 b582a8c5dce6ee42b4024a29f86a9e5a40a729cbe662d71ddfd4f5c7508356a08b3e6c2151d22d59510684bcf050aa75f321892693711863d07054b43e86625a WHIRLPOOL e244545dc2583a7da0eff329a69489c2a57f6ec5ffc804e3d2556539f056f0803ccb5d94dac91ea59bb986b9dd05b610def0aeed2b329c815a8ab9828e5a063e
+MISC metadata.xml 776 SHA256 5b09721d6677567cc38fe570312ecff24448c85233e24bb4a9ec22886ab119a6 SHA512 12bda28a2fd9022d8472f81afc827b1329ab84598e8a91a7170bfeffb4b55953b37a9504bffc58933c352ebbdd25beb781e570d5f8de9759a290c4476a40afd1 WHIRLPOOL f128335014d993436afc73bedda18101743f943bf271528a399e550fb107b0c5d9f71b57cf2d424e0edd25ab32950bd6668675c108a1ace5be6d065f31b8ebfa
diff --git a/sci-misc/h5utils/files/h5utils-1.12.1-automagic.patch b/sci-misc/h5utils/files/h5utils-1.12.1-automagic.patch
new file mode 100644
index 000000000000..8de8580cfe38
--- /dev/null
+++ b/sci-misc/h5utils/files/h5utils-1.12.1-automagic.patch
@@ -0,0 +1,63 @@
+--- configure.ac
++++ configure.ac
+@@ -74,44 +74,23 @@
+
+ ###########################################################################
+
+-# Only build h5fromh4 if we are using a version of HDF5 prior to 1.4, and
+-# thus don't have the superior h4toh5 utility. Similarly for h5toh4.
+-AC_CHECK_PROG(H4TOH5, h4toh5, h4toh5)
+-AC_CHECK_PROG(H5TOH4, h5toh4, h5toh4)
+-
+-AC_ARG_WITH(hdf4,
+- [AC_HELP_STRING([--with-hdf4], [build hdf4 utils even if h4toh5 and h5toh4 are present])],
+- ok=$withval, ok=maybe)
+-if test "x$ok" = xyes; then
+- H4TOH5=""
+- H5TOH4=""
+-elif test "x$ok" = xno; then
+- H4TOH5="h4toh5"
+- H5TOH4="h5toh4"
+-fi
+-
+-HDF4=no
+-if test "x$H4TOH5" != xh4toh5 -o "x$H5TOH4" != xh5toh4; then
+- AC_CHECK_LIB(jpeg, jpeg_start_compress,
+- [AC_CHECK_LIB(df, DFSDgetdata,
+- [H4_LIBS="-ldf -ljpeg"; HDF4=yes],
+- [AC_MSG_WARN([can't find libdf (HDF4): won't be able to compile h5fromh4 or h4fromh5])], -ljpeg)],
+- [AC_MSG_WARN([can't find libjpeg: won't be able to compile h5fromh4 or h4fromh5])])
+-
+- if test $HDF4 = yes; then
+- if test "x$H4TOH5" != xh4toh5; then
+- MORE_H5UTILS="h5fromh4\$(EXEEXT) $MORE_H5UTILS"
+- MORE_H5UTILS_MANS="h5fromh4.1 $MORE_H5UTILS_MANS"
+- fi
+- if test "x$H5TOH4" != xh5toh4; then
+- MORE_H5UTILS="h4fromh5\$(EXEEXT) $MORE_H5UTILS"
+- # MORE_H5UTILS_MANS="h4fromh5.1 $MORE_H5UTILS_MANS"
+- fi
+- fi
+-fi
+-AC_CHECK_HEADERS(hdf.h hdf/hdf.h)
++AC_ARG_WITH([hdf], AS_HELP_STRING([--with-hdf], [build hdf4 utils even if h4toh5 and h5toh4 are present]))
+
+-AC_SUBST(H4_LIBS)
++AS_IF([test "x$with_hdf" = "xyes"], [
++ AC_CHECK_HEADERS(hdf.h hdf/hdf.h)
++ AC_CHECK_LIB(jpeg, jpeg_start_compress,
++ [AC_CHECK_LIB(df, DFSDgetdata,
++ [H4_LIBS="-ldf -ljpeg"; HDF4=yes],
++ [AC_MSG_WARN([can't find libdf (HDF4): won't be able to compile h5fromh4 or h4fromh5])], -ljpeg)],
++ [AC_MSG_WARN([can't find libjpeg: won't be able to compile h5fromh4 or h4fromh5])])
++ if test $HDF4 = yes; then
++ MORE_H5UTILS="h5fromh4\$(EXEEXT) $MORE_H5UTILS"
++ MORE_H5UTILS_MANS="h5fromh4.1 $MORE_H5UTILS_MANS"
++ MORE_H5UTILS="h4fromh5\$(EXEEXT) $MORE_H5UTILS"
++ fi
++
++ AC_SUBST(H4_LIBS)
++])
+
+ ###########################################################################
+
diff --git a/sci-misc/h5utils/files/h5utils-1.12.1-png15.patch b/sci-misc/h5utils/files/h5utils-1.12.1-png15.patch
new file mode 100644
index 000000000000..e611310145eb
--- /dev/null
+++ b/sci-misc/h5utils/files/h5utils-1.12.1-png15.patch
@@ -0,0 +1,43 @@
+Fix build with png-1.5.
+
+https://bugs.gentoo.org/show_bug.cgi?id=378919
+
+Patch stolen from NetBSD
+--- writepng.c
++++ writepng.c
+@@ -240,6 +240,8 @@ void writepng(char *filename,
+ double skewsin = sin(skew), skewcos = cos(skew);
+ REAL minoverlay = 0, maxoverlay = 0;
+ png_byte mask_byte;
++ png_colorp palette = NULL;
++
+
+ /* we must use direct color for translucent overlays */
+ if (overlay)
+@@ -309,7 +311,7 @@ void writepng(char *filename,
+ }
+ /* Set error handling. REQUIRED if you aren't supplying your own *
+ * error hadnling functions in the png_create_write_struct() call. */
+- if (setjmp(png_ptr->jmpbuf)) {
++ if (setjmp(png_jmpbuf(png_ptr))) {
+ /* If we get here, we had a problem reading the file */
+ fclose(fp);
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+@@ -334,8 +336,6 @@ void writepng(char *filename,
+ PNG_INTERLACE_NONE,
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+ else {
+- png_colorp palette;
+-
+ png_set_IHDR(png_ptr, info_ptr, width, height, 8 /* bit_depth */ ,
+ PNG_COLOR_TYPE_PALETTE,
+ PNG_INTERLACE_NONE,
+@@ -434,7 +434,7 @@ void writepng(char *filename,
+ png_write_end(png_ptr, info_ptr);
+
+ /* if you malloced the palette, free it here */
+- free(info_ptr->palette);
++ free(palette);
+
+ /* if you allocated any text comments, free them here */
+
diff --git a/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild b/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild
new file mode 100644
index 000000000000..21e5cd401489
--- /dev/null
+++ b/sci-misc/h5utils/h5utils-1.12.1-r2.ebuild
@@ -0,0 +1,41 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+AUTOTOOLS_AUTORECONF=true
+
+inherit autotools-utils
+
+DESCRIPTION="Utilities for visualization and conversion of HDF5 files"
+HOMEPAGE="http://ab-initio.mit.edu/h5utils/"
+SRC_URI="http://ab-initio.mit.edu/h5utils/${P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~ppc x86 ~amd64-linux ~x86-linux"
+IUSE="hdf octave"
+
+DEPEND="
+ media-libs/libpng:0=
+ sci-libs/hdf5:0=
+ sys-libs/zlib:0=
+ hdf? (
+ sci-libs/hdf:0=
+ virtual/jpeg:0
+ )"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-automagic.patch
+ "${FILESDIR}"/${P}-png15.patch
+)
+
+src_configure() {
+ local myeconfargs=(
+ --without-v5d
+ $(use_with octave)
+ $(use_with hdf)
+ )
+ autotools-utils_src_configure
+}
diff --git a/sci-misc/h5utils/metadata.xml b/sci-misc/h5utils/metadata.xml
new file mode 100644
index 000000000000..8e79e03dfc80
--- /dev/null
+++ b/sci-misc/h5utils/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>sci@gentoo.org</email>
+ <name>Gentoo Science Project</name>
+</maintainer>
+<longdescription>
+ h5utils is a set of utilities for visualization and conversion of
+ scientific data in the free, portable HDF5 format.
+ Besides providing a simple tool for batch visualization as PNG images,
+ h5utils also includes programs to convert HDF5 datasets into the
+ formats required by other free visualization software (e.g. plain
+ text, Vis5d, and VTK).
+</longdescription>
+<use>
+ <flag name="octave">Build Octave plugins</flag>
+ <flag name="hdf">Build hdf to hdf5 (and vice-versa) converter</flag>
+</use>
+</pkgmetadata>