package created using the webbuild interface [release 1.12.1-1mamba;Tue Jan 28 2014]

This commit is contained in:
Silvan Calarco 2024-01-05 23:37:19 +01:00
parent d7399bd4f5
commit eb077a9007
3 changed files with 107 additions and 0 deletions

View File

@ -1,2 +1,5 @@
# h5utils
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).

View File

@ -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 */

61
h5utils.spec Normal file
View File

@ -0,0 +1,61 @@
Name: h5utils
Version: 1.12.1
Release: 1mamba
Summary: A set of utilities for visualization and conversion of scientific data in the free, portable HDF5 format
Group: Applications/Scientific
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://ab-initio.mit.edu/wiki/index.php/H5utils
Source: http://ab-initio.mit.edu/h5utils/h5utils-%{version}.tar.gz
Patch0: h5utils-1.12.1-libpng-1.5.patch
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libhdf5-devel
BuildRequires: libpng-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
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).
%debug_package
%prep
%setup -q
%patch0 -p0
%build
%configure
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%files
%defattr(-,root,root)
%{_bindir}/h5fromtxt
%{_bindir}/h5topng
%{_bindir}/h5totxt
%{_bindir}/h5tovtk
%{_libdir}/octave/*/site/oct/*-openmamba-linux-gnu/h5read.oct
%dir %{_datadir}/h5utils
%dir %{_datadir}/h5utils/colormaps
%{_datadir}/h5utils/colormaps/*
%{_mandir}/man1/h5fromtxt.1*
%{_mandir}/man1/h5topng.1*
%{_mandir}/man1/h5totxt.1*
%{_mandir}/man1/h5tovtk.1*
%doc AUTHORS COPYING
#%doc ChangeLog NEWS README
%changelog
* Tue Jan 28 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 1.12.1-1mamba
- package created using the webbuild interface