aboutsummaryrefslogtreecommitdiff
path: root/graphics/pfstools
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-03-20 06:33:01 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-03-20 06:33:01 +0000
commit54975cd08c68b62b6b079b6c30c7868ffd7db5a8 (patch)
tree26ee11762268f4c16b74fc0b9210b6c16cbc941b /graphics/pfstools
parentb5c93165bb2ac0d6752163394da8995f2c5f03f2 (diff)
downloadports-54975cd08c68b62b6b079b6c30c7868ffd7db5a8.tar.gz
ports-54975cd08c68b62b6b079b6c30c7868ffd7db5a8.zip
Notes
Diffstat (limited to 'graphics/pfstools')
-rw-r--r--graphics/pfstools/Makefile118
-rw-r--r--graphics/pfstools/distinfo5
-rw-r--r--graphics/pfstools/files/patch-CMakeLists.txt36
-rw-r--r--graphics/pfstools/files/patch-config.h.in19
-rw-r--r--graphics/pfstools/files/patch-configure11
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-exrio.cpp28
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp96
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-pfsinexr.cpp11
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-pfsinimgmagick.cpp19
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-pfsinjpeghdr.cpp22
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-pfsoutimgmagick.cpp10
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-pfsoutjpeghdr.cpp40
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-ppmio.cpp11
-rw-r--r--graphics/pfstools/files/patch-src-fileformat-rgbeio.cpp29
-rw-r--r--graphics/pfstools/files/patch-src-filter-Makefile.am20
-rw-r--r--graphics/pfstools/files/patch-src-filter-Makefile.in58
-rw-r--r--graphics/pfstools/files/patch-src-filter-pfscat.cpp37
-rw-r--r--graphics/pfstools/files/patch-src-filter-pfsclamp.cpp13
-rw-r--r--graphics/pfstools/files/patch-src-filter-pfsextractchannels.cpp11
-rw-r--r--graphics/pfstools/files/patch-src-filter-pfspanoramic.cpp38
-rw-r--r--graphics/pfstools/files/patch-src-filter-pfstag.cpp23
-rw-r--r--graphics/pfstools/files/patch-src-filter-pfswb.cpp302
-rw-r--r--graphics/pfstools/files/patch-src-hdrhtml-hdrhtml.cpp192
-rw-r--r--graphics/pfstools/files/patch-src-matlab-compatibility.h10
-rw-r--r--graphics/pfstools/files/patch-src-octave-pfsclose.cpp14
-rw-r--r--graphics/pfstools/files/patch-src-octave-pfsget.cpp58
-rw-r--r--graphics/pfstools/files/patch-src-octave-pfsopen.cpp20
-rw-r--r--graphics/pfstools/files/patch-src-octave-pfsput.cpp103
-rw-r--r--graphics/pfstools/files/patch-src-pfs-pfs.cpp29
-rw-r--r--graphics/pfstools/files/patch-src-pfs-pfsutils.cpp11
-rw-r--r--graphics/pfstools/files/patch-src-pfsglview-picture_io.cpp29
-rw-r--r--graphics/pfstools/files/patch-src-pfsglview-picture_io.h13
-rw-r--r--graphics/pfstools/files/patch-src_camera_pfsalign.cpp11
-rw-r--r--graphics/pfstools/files/patch-src_fileformat_exrio.cpp11
-rw-r--r--graphics/pfstools/files/patch-src_fileformat_pfsoutpfm.cpp (renamed from graphics/pfstools/files/patch-src-fileformat-pfsoutpfm.cpp)6
-rw-r--r--graphics/pfstools/files/patch-src_hdrhtml_hdrhtml.cpp18
-rw-r--r--graphics/pfstools/files/patch-src_octave_pfsstat11
-rw-r--r--graphics/pfstools/files/patch-src_pfs_CMakeLists.txt11
-rw-r--r--graphics/pfstools/files/patch-src_pfs_pfs.h (renamed from graphics/pfstools/files/patch-src-pfs-pfs.h)28
-rw-r--r--graphics/pfstools/files/patch-src_pfs_pfsutils.cpp16
-rw-r--r--graphics/pfstools/files/patch-src_pfsglview_m__histogram.cpp11
-rw-r--r--graphics/pfstools/files/patch-src_pfsview_pfsview__widget.cpp (renamed from graphics/pfstools/files/patch-src-pfsview-pfsview_widget.cpp)6
-rw-r--r--graphics/pfstools/pkg-plist204
43 files changed, 328 insertions, 1441 deletions
diff --git a/graphics/pfstools/Makefile b/graphics/pfstools/Makefile
index d73fbadd9d0b..baa85f285334 100644
--- a/graphics/pfstools/Makefile
+++ b/graphics/pfstools/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= pfstools
-PORTVERSION= 1.8.5
-PORTREVISION= 5
+DISTVERSION= 2.1.0
CATEGORIES= graphics
MASTER_SITES= SF
@@ -11,73 +10,104 @@ MAINTAINER= fbsd@any.com.ru
COMMENT= Tools for manipulating HDR images and video frames
LICENSE= LGPL21
+LICENSE_FILE= ${WRKSRC}/COPYING
-RUN_DEPENDS+= bash:shells/bash
+RUN_DEPENDS= bash:shells/bash
-PFS_BUILD= ${MACHINE_ARCH}-portbld-freebsd${OSREL}
-PLIST_SUB+= PFS_BASE=${PREFIX}
+CONFLICTS= pfstmo-1.* pfscalibration-1.*
-USES= gmake libtool pathfix pkgconfig
-GNU_CONFIGURE= yes
-CONFIGURE_TARGET= ${PFS_BUILD}
-CONFIGURE_ARGS+= --disable-jpeghdr --disable-matlab \
- --with-bash=${LOCALBASE}/bin/bash
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
+LDFLAGS+= -lthr
+
+USES= cmake:outsource tar:tgz dos2unix jpeg perl5
+USE_PERL5= run
USE_LDCONFIG= yes
-OPTIONS_DEFINE= NETPBM OPENEXR TIFF QT IMAGEMAGICK GDAL OCTAVE OPENGL
-QT_DESC= Compile programs that use QT library
-GDAL_DESC= Compile programs that use GDAL library
+CMAKE_VERBOSE= yes
+CMAKE_ARGS= -DBUILD_SHARED_LIBS=ON \
+ -DWITH_MATLAB=OFF \
+ -DBASH_EXECUTABLE:STRING=${LOCALBASE}/bin/bash \
+ -DPERL_EXECUTABLE:STRING=${PERL}
+
+DOS2UNIX_GLOB= *.txt *.cmake \
+ *.h *.c *.cpp \
+ *.1
+
+MANCOMPRESSED= yes
+
+OPTIONS_DEFINE= TIFF OPENEXR IMAGEMAGICK NETPBM \
+ OCTAVE FFTW GSL \
+ ALIGN GLVIEW VIEW \
+ OPENMP
+OPTIONS_DEFAULT= TIFF FFTW GSL
+NO_OPTIONS_SORT= yes
+OPTIONS_SUB= yes
OCTAVE_DESC= Compile octave interface functions
+GSL_DESC= Use Gnu Scientific Libarary required for some TMOs
+ALIGN_DESC= Compile pfsalign, requires OpenCV w/NONFREE and libexif
+VIEW_DESC= Compile pfsview, requires QT5
+GLVIEW_DESC= Compile pfsglview, requires GLUT
+
+TIFF_CMAKE_BOOL= WITH_TIFF
+TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
-OPTIONS_DEFAULT= TIFF
-OPTIONS_SUB= yes
+OPENEXR_CMAKE_BOOL= WITH_OpenEXR
+OPENEXR_LIB_DEPENDS= libIlmImf.so:graphics/OpenEXR \
+ libIex-2_2.so:graphics/ilmbase
-NETPBM_CONFIGURE_ENABLE= netpbm
-NETPBM_LIB_DEPENDS= libnetpbm.so:graphics/netpbm
+IMAGEMAGICK_CMAKE_BOOL= WITH_ImageMagick
+IMAGEMAGICK_LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick
-OPENEXR_CONFIGURE_ENABLE= openexr
-OPENEXR_CONFIGURE_ON= --with-exrdir=${LOCALBASE}/include/OpenEXR
-OPENEXR_LIB_DEPENDS= libIlmImf.so:graphics/OpenEXR
+NETPBM_CMAKE_BOOL= WITH_NetPBM
+NETPBM_LIB_DEPENDS= libnetpbm.so:graphics/netpbm
+NETPBM_IMPLIES= TIFF
-TIFF_CONFIGURE_ENABLE= tiff
-TIFF_LIB_DEPENDS= libtiff.so:graphics/tiff
+OCTAVE_CMAKE_BOOL= WITH_Octave
+OCTAVE_PATCH_DEPENDS= octave-config:math/octave
+OCTAVE_BUILD_DEPENDS= mkoctfile:math/octave
+OCTAVE_RUN_DEPENDS= octave:math/octave
+OCTAVE_USES= shebangfix
+OCTAVE_CXXFLAGS= -std=c++11
-QT_CONFIGURE_ENABLE= qt
-QT_USE= QT4=moc_build,corelib,gui
+FFTW_CMAKE_BOOL= WITH_FFTW
+FFTW_CMAKE_ON= -DFFTW_INCLUDE_DIRS=${LOCALBASE}/include
+FFTW_LIB_DEPENDS= libfftw3.so:math/fftw3 \
+ libfftw3f.so:math/fftw3-float
-IMAGEMAGICK_CONFIGURE_ENABLE= imagemagick
-IMAGEMAGICK_LIB_DEPENDS= libMagick++-6.so:graphics/ImageMagick
+GSL_CMAKE_BOOL= WITH_GSL
+GSL_LIB_DEPENDS= libgsl.so:math/gsl
-GDAL_CONFIGURE_ENABLE= gdal
-GDAL_LIB_DEPENDS= libgdal.so:graphics/gdal
+ALIGN_CMAKE_BOOL= WITH_OpenCV # requires NONFREE=on which isn't a default
+ALIGN_LIB_DEPENDS= libopencv_nonfree.so:graphics/opencv \
+ libexif.so:graphics/libexif
-OPENGL_CONFIGURE_ENABLE= opengl
-OPENGL_USE= GL=glut
+GLVIEW_CMAKE_BOOL= WITH_pfsglview
+GLVIEW_CMAKE_ON= -DGLUT_INCLUDE_DIRS=${LOCALBASE}/include
+GLVIEW_USE= GL=glut GL=gl,glu
-OCTAVE_CONFIGURE_ENABLE= octave
-OCTAVE_PATCH_DEPENDS= octave-config:math/octave
-OCTAVE_BUILD_DEPENDS= mkoctfile:math/octave
-OCTAVE_RUN_DEPENDS= octave:math/octave
-OCTAVE_USES= shebangfix
+VIEW_CMAKE_BOOL= WITH_QT
+VIEW_USE= QT5=buildtools_build,qmake_build,widgets
+VIEW_USE= GL=glut GL=gl,glu QT5=core,gui,widgets
+
+OPENMP_USES= compiler:openmp
.include <bsd.port.options.mk>
+.if ${PORT_OPTIONS:MIMAGEMAGICK} && !${PORT_OPTIONS:MOPENMP}
+USES+= compiler:c++11-lib
+.endif
+
.if ${PORT_OPTIONS:MOCTAVE}
OCTAVE_BASE?= ${LOCALBASE}
OCTAVE_VERSION!=${OCTAVE_BASE}/bin/octave-config -v 2>&1 || ${ECHO} "0"
OCTAVE_SITE_OCT!=${OCTAVE_BASE}/bin/octave-config --oct-site-dir 2>&1 || ${ECHO} ""
OCTAVE_SITE_M!= ${OCTAVE_BASE}/bin/octave-config --m-site-dir 2>&1 || ${ECHO} ""
-PLIST_SUB+= \
- OCTAVE_BASE=${OCTAVE_BASE} \
+PLIST_SUB= OCTAVE_BASE=${OCTAVE_BASE} \
OCTAVE_SITE_M=${OCTAVE_SITE_M:S|^${OCTAVE_BASE}/||} \
OCTAVE_SITE_OCT=${OCTAVE_SITE_OCT:S|^${OCTAVE_BASE}/||}
-SHEBANG_FILES= src/octave/*
-SHEBANG_LANG+= octave
+SHEBANG_FILES= src/octave/pfs*
+SHEBANG_LANG= octave
+octave_OLD_CMD?=/usr/bin/octave
+octave_CMD?= ${OCTAVE_BASE}/bin/octave-cli
.endif
-post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib//libpfs-1.2.so.0.0.0
-
.include <bsd.port.mk>
diff --git a/graphics/pfstools/distinfo b/graphics/pfstools/distinfo
index 4d277bbeb8f8..3f7dba7cfb10 100644
--- a/graphics/pfstools/distinfo
+++ b/graphics/pfstools/distinfo
@@ -1,2 +1,3 @@
-SHA256 (pfstools-1.8.5.tar.gz) = 2cf958d39ee3b65b034796b0abeea727590561936e295461de6365a750167306
-SIZE (pfstools-1.8.5.tar.gz) = 846001
+TIMESTAMP = 1515923190
+SHA256 (pfstools-2.1.0.tgz) = 3dea4248e41bf433fe4760b0a11d138ad2d240f62db9e519bcb1d557c0593413
+SIZE (pfstools-2.1.0.tgz) = 596136
diff --git a/graphics/pfstools/files/patch-CMakeLists.txt b/graphics/pfstools/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..d0f501fd845c
--- /dev/null
+++ b/graphics/pfstools/files/patch-CMakeLists.txt
@@ -0,0 +1,36 @@
+--- CMakeLists.txt.orig 2018-03-20 06:20:43 UTC
++++ CMakeLists.txt
+@@ -29,7 +29,7 @@ set (pfstools_VERSION_MINOR ${CPACK_PACK
+ set (pfslib_version 1.2)
+ set(CMAKE_LEGACY_CYGWIN_WIN32 0)
+
+-set (MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man/man1" CACHE PATH "The directory where the man pages are")
++set (MAN_DIR "${CMAKE_INSTALL_PREFIX}/man/man1" CACHE PATH "The directory where the man pages are")
+
+ include( CheckCXXSourceCompiles )
+
+@@ -57,12 +57,12 @@ endif( HAS_BRANCH_PREDICTION )
+ # ======== Find bash =======
+
+ # TODO: What if the check fails
+-find_program (BASH_EXECUTABLE bash)
++#find_program (BASH_EXECUTABLE bash)
+ message( "Using bash: ${BASH_EXECUTABLE}" )
+
+ # ======== Find perl =======
+
+-find_program (PERL_EXECUTABLE perl)
++#find_program (PERL_EXECUTABLE perl) # XXX Isn't found in poudriere builds for some reasoson, providing it as an argument
+ if( PERL_EXECUTABLE )
+ message( "Using perl: ${PERL_EXECUTABLE}" )
+ else( PERL_EXECUTABLE )
+@@ -250,6 +250,9 @@ if( WITH_FFTW )
+ else( NOT FFTW_FOUND )
+ set( HAVE_FFTW3F 1 )
+ set( HAVE_FFTW3 1 )
++ if( NOT "${FFTW_INCLUDE_DIRS}" STREQUAL "" )
++ include_directories ("${FFTW_INCLUDE_DIRS}")
++ endif( NOT "${FFTW_INCLUDE_DIRS}" STREQUAL "" )
+ endif( NOT FFTW_FOUND )
+
+ else( WITH_FFTW )
diff --git a/graphics/pfstools/files/patch-config.h.in b/graphics/pfstools/files/patch-config.h.in
deleted file mode 100644
index c8fcc2950043..000000000000
--- a/graphics/pfstools/files/patch-config.h.in
+++ /dev/null
@@ -1,19 +0,0 @@
---- config.h.in.orig 2011-10-27 08:40:42 UTC
-+++ config.h.in
-@@ -99,13 +99,13 @@
-
- /* Output stream for debug messages. */
- #ifdef DEBUG
--#define DEBUG_STR cerr
-+#define DEBUG_STR std::cerr
- #else
--#define DEBUG_STR if(1); else cerr
-+#define DEBUG_STR if(1); else std::cerr
- #endif
- /* Output stream for verbose messages */
- #define VERBOSE_STR if(verbose) std::cerr << PROG_NAME << ": "
-
-
- /* On some systems iostream, string etc are in 'std' namespace */
--using namespace std;
-+//using namespace std;
diff --git a/graphics/pfstools/files/patch-configure b/graphics/pfstools/files/patch-configure
deleted file mode 100644
index 3d529a694666..000000000000
--- a/graphics/pfstools/files/patch-configure
+++ /dev/null
@@ -1,11 +0,0 @@
---- configure.orig 2011-10-27 08:40:31 UTC
-+++ configure
-@@ -15411,7 +15411,7 @@ fi #end of PKG_CHECK_MODULES
- if test -z "$QTDIR"; then
- MOC="moc-qt4"
- else
-- MOC="$QTDIR/bin/moc"
-+ MOC="$QTDIR/bin/moc-qt4"
- fi
-
- # Check whether --with-moc was given.
diff --git a/graphics/pfstools/files/patch-src-fileformat-exrio.cpp b/graphics/pfstools/files/patch-src-fileformat-exrio.cpp
deleted file mode 100644
index 77297cd1cb56..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-exrio.cpp
+++ /dev/null
@@ -1,28 +0,0 @@
---- src/fileformat/exrio.cpp.orig 2005-06-15 13:36:54 UTC
-+++ src/fileformat/exrio.cpp
-@@ -54,14 +54,14 @@ OpenEXRReader::OpenEXRReader( const char
- }
-
- DEBUG_STR << "OpenEXR file \"" << filename << "\" ("
-- << width << "x" << height << ")" << endl;
-+ << width << "x" << height << ")" << std::endl;
- }
-
- void OpenEXRReader::readImage( pfs::Array2D *R, pfs::Array2D *G,
- pfs::Array2D *B )
- {
- assert(file!=NULL);
-- DEBUG_STR << "Reading OpenEXR file... " << endl;
-+ DEBUG_STR << "Reading OpenEXR file... " << std::endl;
-
- Imf::Rgba* tmp_img = new Imf::Rgba[width*height];
-
-@@ -93,7 +93,7 @@ void OpenEXRReader::readImage( pfs::Arra
- OpenEXRReader::~OpenEXRReader()
- {
- delete file;
-- file==NULL;
-+ file=NULL;
- }
-
- OpenEXRWriter::OpenEXRWriter(const char* filename)
diff --git a/graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp b/graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp
deleted file mode 100644
index c40caf9b0784..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-hdrtiffio.cpp
+++ /dev/null
@@ -1,96 +0,0 @@
---- src/fileformat/hdrtiffio.cpp.orig 2011-10-27 08:39:07 UTC
-+++ src/fileformat/hdrtiffio.cpp
-@@ -66,7 +66,7 @@ HDRTiffReader::HDRTiffReader( const char
- }
-
- DEBUG_STR << "TIFF file \"" << filename << "\" ("
-- << width << "x" << height << ")" << endl;
-+ << width << "x" << height << ")" << std::endl;
-
- //--- image parameters
- if(!TIFFGetField(tif, TIFFTAG_COMPRESSION, &comp)) // compression type
-@@ -81,7 +81,7 @@ HDRTiffReader::HDRTiffReader( const char
- switch(phot)
- {
- case PHOTOMETRIC_LOGLUV:
-- DEBUG_STR << "Photometric data: LogLuv" << endl;
-+ DEBUG_STR << "Photometric data: LogLuv" << std::endl;
- if (comp != COMPRESSION_SGILOG && comp != COMPRESSION_SGILOG24)
- {
- TIFFClose(tif);
-@@ -96,7 +96,7 @@ HDRTiffReader::HDRTiffReader( const char
- relative_values=true;
- break;
- case PHOTOMETRIC_RGB:
-- DEBUG_STR << "Photometric data: RGB" << endl;
-+ DEBUG_STR << "Photometric data: RGB" << std::endl;
- // read extra samples (# of alpha channels)
- if (TIFFGetField( tif, TIFFTAG_EXTRASAMPLES,
- &extra_samples_per_pixel, &extra_sample_types )!=1)
-@@ -121,36 +121,36 @@ HDRTiffReader::HDRTiffReader( const char
- if( bps==8 )
- {
- TypeOfData = BYTE;
-- DEBUG_STR << "8bit per channel" << endl;
-+ DEBUG_STR << "8bit per channel" << std::endl;
- strcpy(format_string,"linear 8bit RGB");
- relative_values=false; //!! TODO: verify if 8bit is always gamma corrected
- }
- else if( bps==16 )
- {
- TypeOfData = WORD;
-- DEBUG_STR << "16bit per channel" << endl;
-+ DEBUG_STR << "16bit per channel" << std::endl;
- strcpy(format_string,"linear 16bit RGB");
- relative_values=true; //!! TODO: verify this case!!
- }
- else
- {
- TypeOfData = FLOAT;
-- DEBUG_STR << "32bit float per channel" << endl;
-+ DEBUG_STR << "32bit float per channel" << std::endl;
- strcpy(format_string,"linear 32bit float RGB");
- relative_values=true;
- }
- break;
- case PHOTOMETRIC_MINISBLACK: // HDR video camera format (grayscale)
-- DEBUG_STR << "Photometric data: MINISBLACK (hdrv camera)" << endl;
-+ DEBUG_STR << "Photometric data: MINISBLACK (hdrv camera)" << std::endl;
- if (!TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &bps) || !bps==1)
- {
- TIFFClose(tif);
- throw pfs::Exception("TIFF: Unsupported samples per pixel for "
- "grayscale image");
- }
-- if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bps) || !bps==16)
-+ if (!TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bps) || !(bps==16))
- {
-- DEBUG_STR << "Detected bits per sample: " << bps << endl;
-+ DEBUG_STR << "Detected bits per sample: " << bps << std::endl;
- TIFFClose(tif);
- throw pfs::Exception("TIFF: unsupported bits per sample for "
- "grayscale image.");
-@@ -160,7 +160,7 @@ HDRTiffReader::HDRTiffReader( const char
- relative_values=true;
- break;
- default:
-- DEBUG_STR << "Unsupported photometric type: " << phot << endl;
-+ DEBUG_STR << "Unsupported photometric type: " << phot << std::endl;
- TIFFClose(tif);
- strcpy(format_string,"unknown");
- relative_values=false;
-@@ -184,12 +184,12 @@ void HDRTiffReader::readImage( pfs::Arra
- //--- image length
- uint32 imagelength;
- TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &imagelength);
-- DEBUG_STR << "Image length: " << imagelength << endl;
-+ DEBUG_STR << "Image length: " << imagelength << std::endl;
-
- //--- image scanline size
- uint32 scanlinesize = TIFFScanlineSize(tif);
- buf.vp = _TIFFmalloc(scanlinesize);
--// DEBUG_STR << "Scanline size: " << scanlinesize << endl;
-+// DEBUG_STR << "Scanline size: " << scanlinesize << std::endl;
-
-
- //--- read scan lines
diff --git a/graphics/pfstools/files/patch-src-fileformat-pfsinexr.cpp b/graphics/pfstools/files/patch-src-fileformat-pfsinexr.cpp
deleted file mode 100644
index 2d1a1be1f8ac..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-pfsinexr.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/fileformat/pfsinexr.cpp.orig 2008-01-01 13:01:21 UTC
-+++ src/fileformat/pfsinexr.cpp
-@@ -234,7 +234,7 @@ void readFrames( int argc, char* argv[]
- }
-
- file.setFrameBuffer( frameBuffer );
-- file.readPixels( dw.min.y, dw.max.y );
-+ file.readPixels( dtw.min.y, dtw.max.y );
-
- VERBOSE_STR << "reading file (linear) '" << ff.fileName << "'" << std::endl;
-
diff --git a/graphics/pfstools/files/patch-src-fileformat-pfsinimgmagick.cpp b/graphics/pfstools/files/patch-src-fileformat-pfsinimgmagick.cpp
deleted file mode 100644
index d9bed8d63518..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-pfsinimgmagick.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
---- src/fileformat/pfsinimgmagick.cpp.orig 2008-10-03 19:07:34 UTC
-+++ src/fileformat/pfsinimgmagick.cpp
-@@ -108,6 +108,7 @@ void readFrames( int argc, char* argv[]
- if( ff.fh == NULL ) break; // No more frames
- it.closeFrameFile( ff );
-
-+ Magick::InitializeMagick(*argv);
- VERBOSE_STR << "reading file '" << ff.fileName << "'" << std::endl;
- Magick::Image imImage( ff.fileName );
-
-@@ -172,7 +173,7 @@ void readFrames( int argc, char* argv[]
- frame->getTags()->setString( "FILE_NAME", fileNameTag );
-
- char strbuf[3];
-- snprintf( strbuf, 3, "%d", imImage.depth() );
-+ snprintf( strbuf, 3, "%lu", imImage.depth() );
- frame->getTags()->setString("BITDEPTH", strbuf );
-
- pfsio.writeFrame( frame, stdout );
diff --git a/graphics/pfstools/files/patch-src-fileformat-pfsinjpeghdr.cpp b/graphics/pfstools/files/patch-src-fileformat-pfsinjpeghdr.cpp
deleted file mode 100644
index b6c15dd9255e..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-pfsinjpeghdr.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
---- src/fileformat/pfsinjpeghdr.cpp.orig 2005-11-04 08:54:27 UTC
-+++ src/fileformat/pfsinjpeghdr.cpp
-@@ -123,8 +123,8 @@ void readFrames( int argc, char* argv[]
- case JPEG_HEADER_HDR: // HDR image
- jpeghdr_start_decompress(&jhinf);
- frame = pfsio.createFrame( jhinf.cinfo.output_width, jhinf.cinfo.output_height );
-- hdrscan = (JHSAMPLE *)malloc(jhinf.cinfo.output_width * jhinf.cinfo.output_height *
-- sizeof(JHSAMPLE)*3);
-+ hdrscan =
-+ new JHSAMPLE[jhinf.cinfo.output_width * jhinf.cinfo.output_height * 3];
- // Important: test jhinf.output_scanline, not jhinf.cinfo
- int index ;
- index = 0;
-@@ -144,7 +144,7 @@ void readFrames( int argc, char* argv[]
- (Z->getRawData())[i] = hdrscan[3*i + 2];
- }
- pfs::transformColorSpace( pfs::CS_RGB, X, Y, Z, pfs::CS_XYZ, X, Y, Z );
-- free((void *)hdrscan);
-+ delete[] hdrscan;
- break;
- case JPEG_HEADER_OK: // LDR image
- case JPEG_SUSPENDED:
diff --git a/graphics/pfstools/files/patch-src-fileformat-pfsoutimgmagick.cpp b/graphics/pfstools/files/patch-src-fileformat-pfsoutimgmagick.cpp
deleted file mode 100644
index d7f63f935239..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-pfsoutimgmagick.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/fileformat/pfsoutimgmagick.cpp.orig 2011-03-15 08:47:24 UTC
-+++ src/fileformat/pfsoutimgmagick.cpp
-@@ -190,6 +190,7 @@ void writeFrames( int argc, char* argv[]
- if( alpha != NULL )
- imgBuffer[i++] = (unsigned short)(maxValue-clamp((*alpha)(pix),0.f,1.f)*maxValue);
- }
-+ Magick::InitializeMagick(*argv);
- Magick::Image imImage( frame->getWidth(), frame->getHeight(),
- (alpha == NULL ? "RGB" : "RGBA"), Magick::ShortPixel, imgBuffer );
- imImage.quality( quality );
diff --git a/graphics/pfstools/files/patch-src-fileformat-pfsoutjpeghdr.cpp b/graphics/pfstools/files/patch-src-fileformat-pfsoutjpeghdr.cpp
deleted file mode 100644
index 96e3b81ce47e..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-pfsoutjpeghdr.cpp
+++ /dev/null
@@ -1,40 +0,0 @@
---- src/fileformat/pfsoutjpeghdr.cpp.orig 2005-11-04 08:54:27 UTC
-+++ src/fileformat/pfsoutjpeghdr.cpp
-@@ -69,8 +69,7 @@ void writeHDRJPEGGray( FILE *fh, int wid
- jhinf.correction = correction;
- jpeg_stdio_dest(&jhinf.cinfo, fh);
-
-- image = (JHSAMPLE *)malloc(width * height *
-- sizeof(JHSAMPLE)*3);
-+ image = new JHSAMPLE[width * height * 3];
-
- for(int i=0;i<width * height;i++)
- {
-@@ -91,7 +90,7 @@ void writeHDRJPEGGray( FILE *fh, int wid
- // Or, assign jhinf.tmi 8-bit grayscale values in scanline order
- jpeghdr_do_compress(&jhinf);
- jpeghdr_destroy_compress(&jhinf);
-- fclose(fh);
-+ delete[] image;
- }
-
- void writeHDRJPEGRGB( FILE *fh, int width, int height,
-@@ -111,8 +110,7 @@ void writeHDRJPEGRGB( FILE *fh, int widt
- jhinf.beta = beta;
- jpeg_stdio_dest(&jhinf.cinfo, fh);
-
-- image = (JHSAMPLE *)malloc(width * height *
-- sizeof(JHSAMPLE)*3);
-+ image = new JHSAMPLE[width * height * 3];
-
- for(int i=0;i<width * height;i++)
- {
-@@ -135,7 +133,7 @@ void writeHDRJPEGRGB( FILE *fh, int widt
- jpeghdr_do_compress(&jhinf);
- jpeghdr_destroy_compress(&jhinf);
-
-- free( image );
-+ delete[] image;
- }
-
- void writeFrames( int argc, char* argv[] )
diff --git a/graphics/pfstools/files/patch-src-fileformat-ppmio.cpp b/graphics/pfstools/files/patch-src-fileformat-ppmio.cpp
deleted file mode 100644
index ba0c3d707541..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-ppmio.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/fileformat/ppmio.cpp.orig 2009-05-25 19:24:49 UTC
-+++ src/fileformat/ppmio.cpp
-@@ -34,6 +34,8 @@ extern "C" {
- #include <math.h>
- #include <assert.h>
-
-+#define log2(x) ((float)log(x)/log(2))
-+
- struct PPMData
- {
- pixval maxPV;
diff --git a/graphics/pfstools/files/patch-src-fileformat-rgbeio.cpp b/graphics/pfstools/files/patch-src-fileformat-rgbeio.cpp
deleted file mode 100644
index f9af959e1aaa..000000000000
--- a/graphics/pfstools/files/patch-src-fileformat-rgbeio.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/fileformat/rgbeio.cpp.orig 2007-12-06 11:00:49 UTC
-+++ src/fileformat/rgbeio.cpp
-@@ -141,7 +141,7 @@ void rgb2rgbe( float r, float g, float b
- // Reading RGBE files
- void readRadianceHeader( FILE *file, int &width, int &height, float &exposure )
- {
-- DEBUG_STR << "RGBE: reading header..." << endl;
-+ DEBUG_STR << "RGBE: reading header..." << std::endl;
-
- // read header information
- char head[255];
-@@ -208,7 +208,7 @@ void readRadianceHeader( FILE *file, int
- height = height - width;
- }
- */
-- DEBUG_STR << "RGBE: image size " << width << "x" << height << endl;
-+ DEBUG_STR << "RGBE: image size " << width << "x" << height << std::endl;
- }
-
-
-@@ -389,7 +389,7 @@ void writeRadiance( FILE *file, pfs::Arr
- int width = X->getCols();
- int height = X->getRows();
-
-- DEBUG_STR << "RGBE: writing image " << width << "x" << height << endl;
-+ DEBUG_STR << "RGBE: writing image " << width << "x" << height << std::endl;
-
- if( Y->getCols() != width || Y->getRows() != height ||
- Z->getCols() != width || Z->getRows() != height )
diff --git a/graphics/pfstools/files/patch-src-filter-Makefile.am b/graphics/pfstools/files/patch-src-filter-Makefile.am
deleted file mode 100644
index 4614d0c434ab..000000000000
--- a/graphics/pfstools/files/patch-src-filter-Makefile.am
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/filter/Makefile.am.orig 2009-05-30 06:59:10 UTC
-+++ src/filter/Makefile.am
-@@ -1,6 +1,7 @@
- ###
- bin_PROGRAMS = pfsgamma pfsclamp pfstag pfssize pfsextractchannels pfspanoramic \
-- pfsrotate pfsflip pfscut pfspad pfscat pfsabsolute pfsdisplayfunction
-+ pfsrotate pfsflip pfscut pfspad pfscat pfsabsolute pfsdisplayfunction \
-+ pfswb
-
- man_MANS = pfsgamma.1 pfsclamp.1 pfstag.1 pfssize.1 pfsextractchannels.1 \
- pfspanoramic.1 pfsrotate.1 pfsflip.1 pfscut.1 pfspad.1 pfscat.1 \
-@@ -34,6 +35,8 @@ pfscat_SOURCES = pfscat.cpp
-
- pfsabsolute_SOURCES = pfsabsolute.cpp
-
-+pfswb_SOURCES = pfswb.cpp
-+
- LIBS += ../pfs/libpfs-1.2.la
- INCLUDES = -I${srcdir}/../pfs
-
diff --git a/graphics/pfstools/files/patch-src-filter-Makefile.in b/graphics/pfstools/files/patch-src-filter-Makefile.in
deleted file mode 100644
index 848ece1541dd..000000000000
--- a/graphics/pfstools/files/patch-src-filter-Makefile.in
+++ /dev/null
@@ -1,58 +0,0 @@
---- src/filter/Makefile.in.orig 2011-10-27 08:40:29 UTC
-+++ src/filter/Makefile.in
-@@ -38,7 +38,8 @@ bin_PROGRAMS = pfsgamma$(EXEEXT) pfsclam
- pfssize$(EXEEXT) pfsextractchannels$(EXEEXT) \
- pfspanoramic$(EXEEXT) pfsrotate$(EXEEXT) pfsflip$(EXEEXT) \
- pfscut$(EXEEXT) pfspad$(EXEEXT) pfscat$(EXEEXT) \
-- pfsabsolute$(EXEEXT) pfsdisplayfunction$(EXEEXT)
-+ pfsabsolute$(EXEEXT) pfsdisplayfunction$(EXEEXT) \
-+ pfswb$(EXEEXT)
- subdir = src/filter
- DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-@@ -54,6 +55,9 @@ CONFIG_CLEAN_FILES =
- CONFIG_CLEAN_VPATH_FILES =
- am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
- PROGRAMS = $(bin_PROGRAMS)
-+am_pfswb_OBJECTS = pfswb.$(OBJEXT)
-+pfswb_OBJECTS = $(am_pfswb_OBJECTS)
-+pfswb_LDADD = $(LDADD)
- am_pfsabsolute_OBJECTS = pfsabsolute.$(OBJEXT)
- pfsabsolute_OBJECTS = $(am_pfsabsolute_OBJECTS)
- pfsabsolute_LDADD = $(LDADD)
-@@ -120,13 +124,15 @@ SOURCES = $(pfsabsolute_SOURCES) $(pfsca
- $(pfscut_SOURCES) $(pfsdisplayfunction_SOURCES) \
- $(pfsextractchannels_SOURCES) $(pfsflip_SOURCES) \
- $(pfsgamma_SOURCES) $(pfspad_SOURCES) $(pfspanoramic_SOURCES) \
-- $(pfsrotate_SOURCES) $(pfssize_SOURCES) $(pfstag_SOURCES)
-+ $(pfsrotate_SOURCES) $(pfssize_SOURCES) $(pfstag_SOURCES) \
-+ $(pfswb_SOURCES)
- DIST_SOURCES = $(pfsabsolute_SOURCES) $(pfscat_SOURCES) \
- $(pfsclamp_SOURCES) $(pfscut_SOURCES) \
- $(pfsdisplayfunction_SOURCES) $(pfsextractchannels_SOURCES) \
- $(pfsflip_SOURCES) $(pfsgamma_SOURCES) $(pfspad_SOURCES) \
- $(pfspanoramic_SOURCES) $(pfsrotate_SOURCES) \
-- $(pfssize_SOURCES) $(pfstag_SOURCES)
-+ $(pfssize_SOURCES) $(pfstag_SOURCES) \
-+ $(pfswb_SOURCES)
- am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
- am__vpath_adj = case $$p in \
- $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-@@ -314,6 +320,7 @@ pfscut_SOURCES = pfscut.cpp
- pfspad_SOURCES = pfspad.cpp
- pfscat_SOURCES = pfscat.cpp
- pfsabsolute_SOURCES = pfsabsolute.cpp
-+pfswb_SOURCES = pfswb.cpp
- INCLUDES = -I${srcdir}/../pfs
- all: all-am
-
-@@ -392,6 +399,9 @@ clean-binPROGRAMS:
- list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f" $$list; \
- rm -f $$list
-+pfswb$(EXEEXT): $(pfswb_OBJECTS) $(pfswb_DEPENDENCIES)
-+ @rm -f pfswb$(EXEEXT)
-+ $(CXXLINK) $(pfswb_LDFLAGS) $(pfswb_OBJECTS) $(pfswb_LDADD) $(LIBS)
- pfsabsolute$(EXEEXT): $(pfsabsolute_OBJECTS) $(pfsabsolute_DEPENDENCIES)
- @rm -f pfsabsolute$(EXEEXT)
- $(CXXLINK) $(pfsabsolute_OBJECTS) $(pfsabsolute_LDADD) $(LIBS)
diff --git a/graphics/pfstools/files/patch-src-filter-pfscat.cpp b/graphics/pfstools/files/patch-src-filter-pfscat.cpp
deleted file mode 100644
index cc74d5438fc2..000000000000
--- a/graphics/pfstools/files/patch-src-filter-pfscat.cpp
+++ /dev/null
@@ -1,37 +0,0 @@
---- src/filter/pfscat.cpp.orig 2008-01-01 13:01:21 UTC
-+++ src/filter/pfscat.cpp
-@@ -27,6 +27,7 @@
- #include <pfs.h>
- #include <climits>
- #include <iostream>
-+#include <vector>
- #include <getopt.h>
- #include <fcntl.h>
- #include <stdlib.h>
-@@ -202,16 +203,12 @@ if (alignment==UNSP) throw pfs::Exceptio
-
- pfs::FrameFileIterator it ( argc, argv, "rb", NULL, NULL, optString, cmdLineOptions);
- int pipe_no = 0;
--pfs::FrameFile * ff;
--ff = (pfs::FrameFile *) malloc ((pipe_no+1) * sizeof(pfs::FrameFile));
--
-+std::vector<pfs::FrameFile> ff;
- while (1) {
-- ff[pipe_no] = it.getNextFrameFile();
-+ ff.push_back(it.getNextFrameFile());
- if (ff[pipe_no].fh == NULL) break; // no more files
- pipe_no++;
-- ff=(pfs::FrameFile *) realloc(ff, (pipe_no+1)*sizeof(pfs::FrameFile));
- }
--
- if(pipe_no == 0) { // no named pipes
- pipe_no = 1;
- pipes = false;
-@@ -408,7 +405,6 @@ if(!pipes) {
- }
-
- for (int i=0; i<pipe_no; i++) it.closeFrameFile(ff[i]);
--free(ff);
- }
-
-
diff --git a/graphics/pfstools/files/patch-src-filter-pfsclamp.cpp b/graphics/pfstools/files/patch-src-filter-pfsclamp.cpp
deleted file mode 100644
index 0ad65acc9a76..000000000000
--- a/graphics/pfstools/files/patch-src-filter-pfsclamp.cpp
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/filter/pfsclamp.cpp.orig 2005-11-02 13:35:42 UTC
-+++ src/filter/pfsclamp.cpp
-@@ -151,8 +151,8 @@ void clampFrames( int argc, char* argv[]
- }
- else
- {
-- clampMin = (clampMin>1e-4) ? clampMin : 1e-4;
-- clampMax = (clampMax<1e8) ? clampMax : 1e8;
-+ clampMin = (clampMin>1e-20) ? clampMin : 1e-20;
-+ clampMax = (clampMax<1e+20) ? clampMax : 1e+20;
- if( clampMin >= clampMax )
- throw pfs::Exception("incorrect clamping range");
- }
diff --git a/graphics/pfstools/files/patch-src-filter-pfsextractchannels.cpp b/graphics/pfstools/files/patch-src-filter-pfsextractchannels.cpp
deleted file mode 100644
index d5716625bfe7..000000000000
--- a/graphics/pfstools/files/patch-src-filter-pfsextractchannels.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/filter/pfsextractchannels.cpp.orig 2005-06-15 13:36:54 UTC
-+++ src/filter/pfsextractchannels.cpp
-@@ -46,7 +46,7 @@ void printHelp()
- "See man page for more information.\n" );
- }
-
--static void errorCheck( bool condition, char *string )
-+static void errorCheck( bool condition, char const *string )
- {
- if( !condition ) {
- fprintf( stderr, PROG_NAME " error: %s\n", string );
diff --git a/graphics/pfstools/files/patch-src-filter-pfspanoramic.cpp b/graphics/pfstools/files/patch-src-filter-pfspanoramic.cpp
deleted file mode 100644
index 48c2c4d2d550..000000000000
--- a/graphics/pfstools/files/patch-src-filter-pfspanoramic.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
---- src/filter/pfspanoramic.cpp.orig 2010-02-18 11:27:03 UTC
-+++ src/filter/pfspanoramic.cpp
-@@ -93,7 +93,7 @@ class Vector3D
- }
-
- //TODO: optimize rotations by precomputing sines and cosines
-- Vector3D rotateX(double angle)
-+ void rotateX(double angle)
- {
- angle *= (M_PI / 180);
-
-@@ -107,7 +107,7 @@ class Vector3D
- z = z2;
- }
-
-- Vector3D rotateY(double angle)
-+ void rotateY(double angle)
- {
- angle *= (M_PI / 180);
-
-@@ -121,7 +121,7 @@ class Vector3D
- z = z2;
- }
-
-- Vector3D rotateZ(double angle)
-+ void rotateZ(double angle)
- {
- angle *= (M_PI / 180);
-
-@@ -195,7 +195,7 @@ class ProjectionFactory
- {
- char *opts;
-
-- if(opts = strchr(name, '/'))
-+ if ((opts = strchr(name, '/')))
- {
- *opts++ = '\0';
- }
diff --git a/graphics/pfstools/files/patch-src-filter-pfstag.cpp b/graphics/pfstools/files/patch-src-filter-pfstag.cpp
deleted file mode 100644
index de37ee52ed6d..000000000000
--- a/graphics/pfstools/files/patch-src-filter-pfstag.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
---- src/filter/pfstag.cpp.orig 2005-06-15 13:36:54 UTC
-+++ src/filter/pfstag.cpp
-@@ -58,7 +58,7 @@ struct TagOperation
- string channel;
- };
-
--typedef list<TagOperation> ListOfTags;
-+typedef std::list<TagOperation> ListOfTags;
-
- TagOperation parseTagOperation( const char *tag, bool remove )
- {
-@@ -133,9 +133,9 @@ void setTagsOnFrames( int argc, char* ar
- for( it = setTags.begin(); it != setTags.end(); it++ ) {
- TagOperation &tagop = *it;
- if( tagop.remove )
-- cerr << PROG_NAME ": remove tag '" << tagop.name << "'\n";
-+ std::cerr << PROG_NAME ": remove tag '" << tagop.name << "'\n";
- else
-- cerr << PROG_NAME ": set tag '" << tagop.name << "' to '" << tagop.value << "'\n";
-+ std::cerr << PROG_NAME ": set tag '" << tagop.name << "' to '" << tagop.value << "'\n";
- }
-
- }
diff --git a/graphics/pfstools/files/patch-src-filter-pfswb.cpp b/graphics/pfstools/files/patch-src-filter-pfswb.cpp
deleted file mode 100644
index e579100e1852..000000000000
--- a/graphics/pfstools/files/patch-src-filter-pfswb.cpp
+++ /dev/null
@@ -1,302 +0,0 @@
---- src/filter/pfswb.cpp.orig 2016-08-12 19:10:44 UTC
-+++ src/filter/pfswb.cpp
-@@ -0,0 +1,299 @@
-+/**
-+ * @file pfswb.cpp
-+ * @brief Adjust white balance in RGB color space
-+ *
-+ * This file is a part of PFSTOOLS package.
-+ * ----------------------------------------------------------------------
-+ * Copyright (C) 2008 Iouri V. Ivliev
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ * This program is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-+ * GNU General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU General Public License
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-+ * ----------------------------------------------------------------------
-+ *
-+ * @author Iouri V. Ivliev <ii@any.com.ru>
-+ *
-+ * $Id: $
-+ */
-+
-+#include <config.h>
-+
-+#include <exception>
-+#include <iostream>
-+#include <sys/limits.h>
-+#include <stdlib.h>
-+#include <getopt.h>
-+
-+#include <pfs.h>
-+
-+#define PROG_NAME "pfswb"
-+
-+class QuietException
-+{
-+};
-+
-+static void printHelp()
-+{
-+ std::cerr << PROG_NAME " (" PACKAGE_STRING ") :\n"
-+ "\t[--red <val>] [--green <val>] [--blue <val>]\n"
-+ "\t[--auto] [--x <val>] [--y <val>] [--width <val>] [--height <val>]\n"
-+ "\t[--keep-lum]\n"
-+ "\t[--verbose] [--help]\n"
-+ "See man page for more information.\n";
-+}
-+
-+// verbose mode
-+static bool verbose = false;
-+
-+// auto WB
-+static bool autowb = false;
-+// default gray box bounds
-+static int x = 0;
-+static int y = 0;
-+static int width = INT_MAX/2;
-+static int height = INT_MAX/2;
-+
-+// keep original luminance
-+static bool keep = false;
-+
-+// default WB multipliers
-+static float red = 1.f;
-+static float green = 1.f;
-+static float blue = 1.f;
-+
-+static void multipliers(
-+ const pfs::Array2D &R, const pfs::Array2D &G, const pfs::Array2D &B,
-+ float &r, float &g, float &b)
-+{
-+ r = red;
-+ g = green;
-+ b = blue;
-+ if (!autowb) return;
-+ // auto WB gray box
-+ int w = R.getCols();
-+ int h = R.getRows();
-+ if (x>=w || y>=h)
-+ throw pfs::Exception("gray box is out of frame bounds");
-+ int x1 = width+x;
-+ if (x1>w) x1 = w;
-+ int y1 = height+y;
-+ if (y1>h) y1 = h;
-+ VERBOSE_STR
-+ << "auto WB gray box: "
-+ << (x1-x) << "x" << (y1-y) << "+" << x << "+" << y << std::endl;
-+ // auto WB multipliers
-+ double ar = 0.;
-+ double ag = 0.;
-+ double ab = 0.;
-+ for (int y0=y; y0<y1; ++y0)
-+ {
-+ for (int x0=x; x0<x1; ++x0)
-+ {
-+ ar += R(x0,y0);
-+ ag += G(x0,y0);
-+ ab += B(x0,y0);
-+ }
-+ }
-+ int n = (x1-x)*(y1-y);
-+ ar /= n;
-+ ag /= n;
-+ ab /= n;
-+ VERBOSE_STR << "average red value: " << ar << std::endl;
-+ VERBOSE_STR << "average green value: " << ag << std::endl;
-+ VERBOSE_STR << "average blue value: " << ab << std::endl;
-+ float a = (float)((ar+ag+ab)/3.);
-+ r *= a/ar;
-+ g *= a/ag;
-+ b *= a/ab;
-+}
-+
-+static void pfswb()
-+{
-+ pfs::DOMIO pfsio;
-+ VERBOSE_STR << "auto WB: " << (autowb ? "yes" : "no" ) << std::endl;
-+ VERBOSE_STR << "base red multiplier value: " << red << std::endl;
-+ VERBOSE_STR << "base green multiplier value: " << green << std::endl;
-+ VERBOSE_STR << "base blue multiplier value: " << blue << std::endl;
-+ VERBOSE_STR << "keep original luminance: " << (keep ? "yes" : "no" ) << std::endl;
-+ while (true)
-+ {
-+ // Read frame
-+ pfs::Frame *frame = pfsio.readFrame( stdin );
-+ if (!frame)
-+ {
-+ break; // No more frames
-+ }
-+ // Get channels
-+ pfs::Channel *X, *Y, *Z;
-+ frame->getXYZChannels(X, Y, Z);
-+ if (!(Y && X && Z))
-+ {
-+ throw pfs::Exception( "Missing X, Y, Z channels in the PFS stream" );
-+ }
-+ int w = Y->getCols();
-+ int h = Y->getRows();
-+ int s = w*h;
-+ float min = 1e20, max = -1e20;
-+ for (int i=s; i--; )
-+ {
-+ float const &l = (*Y)(i);
-+ if (min > l) min = l;
-+ if (max < l) max = l;
-+ }
-+ VERBOSE_STR << "luminance range of original frame: " << min << ":" << max << std::endl;
-+ // Convert from XYZ to RGB
-+ pfs::transformColorSpace(pfs::CS_XYZ, X, Y, Z, pfs::CS_RGB, X, Y, Z);
-+ // WB adjustment
-+ float r, g, b;
-+ multipliers(*X,*Y,*Z,r,g,b);
-+ VERBOSE_STR << "red multiplier value: " << r << std::endl;
-+ VERBOSE_STR << "green multiplier value: " << g << std::endl;
-+ VERBOSE_STR << "blue multiplier value: " << b << std::endl;
-+ for (int i=s; i--; )
-+ {
-+ (*X)(i) *= r;
-+ (*Y)(i) *= g;
-+ (*Z)(i) *= b;
-+ }
-+ // Convert back to XYZ
-+ pfs::transformColorSpace(pfs::CS_RGB, X, Y, Z, pfs::CS_XYZ, X, Y, Z);
-+ float amin = 1e20, amax = -1e20;
-+ for (int i=s; i--; )
-+ {
-+ float const &l = (*Y)(i);
-+ if (amin > l) amin = l;
-+ if (amax < l) amax = l;
-+ }
-+ VERBOSE_STR << "luminance range of adjusted frame: " << amin << ":" << amax << std::endl;
-+ if (keep)
-+ {
-+ float k = (max-min)/(amax-amin);
-+ float nmin = 1e20, nmax = -1e20;
-+ for (int i=s; i--; )
-+ {
-+ float const l = ((*Y)(i)-amin)*k+min;
-+ if (nmin > l) nmin = l;
-+ if (nmax < l) nmax = l;
-+ (*Y)(i) = l;
-+ (*X)(i) *= k;
-+ (*Z)(i) *= k;
-+ }
-+ VERBOSE_STR << "restored luminance range: " << nmin << ":" << nmax << std::endl;
-+ }
-+ // Write frame
-+ pfsio.writeFrame(frame, stdout);
-+ pfsio.freeFrame(frame);
-+ }
-+}
-+
-+int main(int argc, char *const argv[])
-+{
-+ static const struct option cmdLineOptions[] = {
-+ { "help", no_argument, NULL, 'h' },
-+ { "verbose", no_argument, NULL, 'v' },
-+ { "auto", no_argument, NULL, 'A' },
-+ { "x", required_argument, NULL, 'X' },
-+ { "y", required_argument, NULL, 'Y' },
-+ { "width", required_argument, NULL, 'W' },
-+ { "height", required_argument, NULL, 'H' },
-+ { "keep-lum", no_argument, NULL, 'k' },
-+ { "red", required_argument, NULL, 'r' },
-+ { "green", required_argument, NULL, 'g' },
-+ { "blue", required_argument, NULL, 'b' },
-+ { NULL, 0, NULL, 0 }
-+ };
-+
-+ try
-+ {
-+ int optionIndex = 0;
-+ while (true)
-+ {
-+ int c = getopt_long(argc, argv, "hvAX:Y:W:H:kr:g:b:", cmdLineOptions, &optionIndex);
-+ if (c == -1)
-+ {
-+ break;
-+ }
-+ switch (c)
-+ {
-+ case 'h':
-+ printHelp();
-+ throw QuietException();
-+ case 'v':
-+ verbose = true;
-+ break;
-+ case 'A':
-+ autowb = true;
-+ break;
-+ case 'X':
-+ x = (int)strtol(optarg, NULL, 10);
-+ if (x<=0)
-+ throw pfs::Exception("gray box x value out of range, should be >0");
-+ break;
-+ case 'Y':
-+ y = (int)strtol(optarg, NULL, 10);
-+ if (y<=0)
-+ throw pfs::Exception("gray box y value out of range, should be >0");
-+ break;
-+ case 'W':
-+ width = (int)strtol(optarg, NULL, 10);
-+ if (width<=0)
-+ throw pfs::Exception("gray box width value out of range, should be >0");
-+ break;
-+ case 'H':
-+ height = (int)strtol(optarg, NULL, 10);
-+ if (height<=0)
-+ throw pfs::Exception("gray box height value out of range, should be >0");
-+ break;
-+ case 'k':
-+ keep = true;
-+ break;
-+ case 'r':
-+ red = strtof(optarg, NULL);
-+ if (red<=0.0f)
-+ throw pfs::Exception("red multiplier value out of range, should be >0");
-+ break;
-+ case 'g':
-+ green = strtof(optarg, NULL);
-+ if (green<=0.0f)
-+ throw pfs::Exception("green multiplier value out of range, should be >0");
-+ break;
-+ case 'b':
-+ blue = strtof(optarg, NULL);
-+ if (blue<=0.0f)
-+ throw pfs::Exception("blue multiplier value out of range, should be >0");
-+ break;
-+ case '?':
-+ throw QuietException();
-+ case ':':
-+ throw QuietException();
-+ }
-+ }
-+
-+ pfswb();
-+ }
-+ catch (std::exception ex)
-+ {
-+ std::cerr << PROG_NAME" std error: " << ex.what() << std::endl;
-+ return EXIT_FAILURE;
-+ }
-+ catch (pfs::Exception ex)
-+ {
-+ std::cerr << PROG_NAME" error: " << ex.getMessage() << std::endl;
-+ return EXIT_FAILURE;
-+ }
-+ catch (QuietException ex)
-+ {
-+ return EXIT_FAILURE;
-+ }
-+ return EXIT_SUCCESS;
-+}
diff --git a/graphics/pfstools/files/patch-src-hdrhtml-hdrhtml.cpp b/graphics/pfstools/files/patch-src-hdrhtml-hdrhtml.cpp
deleted file mode 100644
index 12df8e86dd09..000000000000
--- a/graphics/pfstools/files/patch-src-hdrhtml-hdrhtml.cpp
+++ /dev/null
@@ -1,192 +0,0 @@
---- src/hdrhtml/hdrhtml.cpp.orig 2009-03-11 21:45:55 UTC
-+++ src/hdrhtml/hdrhtml.cpp
-@@ -27,6 +27,7 @@
-
- #include "hdrhtml.h"
-
-+#include <limits>
- #include <algorithm>
- #include <math.h>
- #include <fstream>
-@@ -48,6 +49,8 @@
-
- #include <config.h>
-
-+#define log2f(x) ((float)logf(x)/logf(2))
-+
- // ================================================
- // Parameters controllig the web page
- // ================================================
-@@ -94,8 +97,8 @@ public:
-
- if( min_val > max_val ) // missing min/max info
- {
-- min_val = numeric_limits<T>::max();
-- max_val = numeric_limits<T>::min();
-+ min_val = std::numeric_limits<T>::max();
-+ max_val = std::numeric_limits<T>::min();
-
- for( int k=0; k < d_size; k++ ) {
- if( data[k] > max_val ) max_val = data[k];
-@@ -195,6 +198,7 @@ public:
- this->y_i = new float[lut_size];
- own_y_i = true;
- memcpy(this->y_i, other.y_i, lut_size * sizeof(float));
-+ return *this;
- }
-
- ~UniformArrayLUT()
-@@ -341,7 +345,7 @@ public:
- for( int k = 1; k < bin_n; k++ )
- hist.n[k] += hist.n[k-1];
-
--// cerr << "d_size: " << d_size << " hist.n: " << hist.n[bin_n-1] << "\n";
-+// std::cerr << "d_size: " << d_size << " hist.n: " << hist.n[bin_n-1] << "\n";
- assert( hist.n[bin_n-1] == d_size );
- }
-
-@@ -361,7 +365,7 @@ public:
- // Text template file utils
- // ================================================
-
--typedef void (*replace_callback)( ostream &out, void *user_data, const char *parameter );
-+typedef void (*replace_callback)( std::ostream &out, void *user_data, const char *parameter );
-
- class ReplacePattern
- {
-@@ -403,7 +407,7 @@ public:
- {
- }
-
-- virtual void write_replacement( ostream &out, const char *parameter = NULL )
-+ virtual void write_replacement( std::ostream &out, const char *parameter = NULL )
- {
- if( callback != NULL )
- callback( out, user_data, parameter );
-@@ -567,7 +571,7 @@ public:
- // Skip white spaces
- while( line_str[pos] == ' ' || line_str[pos] == '\t' ) pos++;
- int new_pos = line_str.find_first_of( ',', pos );
-- int len;
-+ size_t len;
- if( new_pos == std::string::npos ) {
- if( k != columns-1 ) {
- std::string full_message( "Missing column data in the file: " );
-@@ -576,16 +580,16 @@ public:
- }
- len = std::string::npos;
- } else
-- len = new_pos-pos;
-+ len = (size_t)(new_pos-pos);
-
- float value;
- if( len == 0 ) {
-- value = numeric_limits<float>::quiet_NaN();
-+ value = std::numeric_limits<float>::quiet_NaN();
- } else {
- std::string token = line_str.substr( pos, len );
- const char *str_beg = token.c_str();
- char *str_end;
--// cerr << "token: " << str_beg << "\n";
-+// std::cerr << "token: " << str_beg << "\n";
- value = strtof( str_beg, &str_end );
- if( str_beg == str_end ) {
- std::ostringstream error_message;
-@@ -643,15 +647,15 @@ void HDRHTMLSet::add_image( int width, i
- basis_table.data[0][k] = log2f( basis_table.data[0][k] );
-
- // Fix zero and negative values in the image, convert to log2 space, find min and max values
-- float img_min = numeric_limits<float>::max();
-- float img_max = numeric_limits<float>::min();
-+ float img_min = std::numeric_limits<float>::max();
-+ float img_max = std::numeric_limits<float>::min();
- {
- float *arrays[] = { R, G, B, Y };
- int k;
-
- for( k = 0; k < 4; k++ ) {
- float *x = arrays[k];
-- float min_val = numeric_limits<float>::max(), max_val = numeric_limits<float>::min();
-+ float min_val = std::numeric_limits<float>::max(), max_val = std::numeric_limits<float>::min();
- for( int i=0; i < pixels; i++ ) {
- if( x[i] < min_val && x[i] > 0)
- min_val = x[i];
-@@ -741,7 +745,7 @@ void HDRHTMLSet::add_image( int width, i
- for( int k=1; k <= f8_stops+1; k++ ) {
-
-
-- float max_value = (float)numeric_limits<unsigned short>::max(); //(1<<16) -1;
-+ float max_value = (float)std::numeric_limits<unsigned short>::max(); //(1<<16) -1;
-
- float exp_multip = log2f(1/powf( 2, l_start + k*8 ));
-
-@@ -796,9 +800,9 @@ void HDRHTMLSet::add_image( int width, i
-
- }
-
--void print_image_objects( ostream &out, void *user_data, const char *parameter );
--void print_cf_table( ostream &out, void *user_data, const char *parameter );
--void print_image_htmlcode( ostream &out, void *user_data, const char *parameter );
-+void print_image_objects( std::ostream &out, void *user_data, const char *parameter );
-+void print_cf_table( std::ostream &out, void *user_data, const char *parameter );
-+void print_image_htmlcode( std::ostream &out, void *user_data, const char *parameter );
-
- void HDRHTMLSet::generate_webpage( const char *page_template, const char *image_template,
- const char *object_output, const char *html_output)
-@@ -852,11 +856,11 @@ void HDRHTMLSet::generate_webpage( const
-
- }
-
--void print_image_objects( ostream &out, void *user_data, const char *parameter )
-+void print_image_objects( std::ostream &out, void *user_data, const char *parameter )
- {
- HDRHTMLSet *hdrhtml_set = (HDRHTMLSet*)user_data;
-
-- list<HDRHTMLImage>::iterator it;
-+ std::list<HDRHTMLImage>::iterator it;
- for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) {
- std::string obj_name( "hdr_" );
- obj_name.append( it->base_name );
-@@ -882,7 +886,7 @@ void print_image_objects( ostream &out,
-
- }
-
--void print_image_htmlcode( ostream &out, HDRHTMLSet *hdrhtml_set, const HDRHTMLImage &it )
-+void print_image_htmlcode( std::ostream &out, HDRHTMLSet *hdrhtml_set, const HDRHTMLImage &it )
- {
- std::string obj_name( "hdr_" );
- obj_name.append( it.base_name );
-@@ -907,13 +911,13 @@ void print_image_htmlcode( ostream &out,
-
- }
-
--void print_image_htmlcode( ostream &out, void *user_data, const char *parameter )
-+void print_image_htmlcode( std::ostream &out, void *user_data, const char *parameter )
- {
- HDRHTMLSet *hdrhtml_set = (HDRHTMLSet*)user_data;
-
- if( parameter != NULL ) {
-
-- list<HDRHTMLImage>::iterator it;
-+ std::list<HDRHTMLImage>::iterator it;
- for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) {
- if( it->base_name.compare( parameter ) == 0 )
- break;
-@@ -925,7 +929,7 @@ void print_image_htmlcode( ostream &out,
-
- } else {
-
-- list<HDRHTMLImage>::iterator it;
-+ std::list<HDRHTMLImage>::iterator it;
- for( it = hdrhtml_set->image_list.begin(); it != hdrhtml_set->image_list.end(); it++ ) {
-
- print_image_htmlcode( out, hdrhtml_set, *it );
-@@ -935,7 +939,7 @@ void print_image_htmlcode( ostream &out,
-
- }
-
--void print_cf_table( ostream &out, void *user_data, const char *parameter )
-+void print_cf_table( std::ostream &out, void *user_data, const char *parameter )
- {
- CSVTable *cf = (CSVTable*)user_data;
-
diff --git a/graphics/pfstools/files/patch-src-matlab-compatibility.h b/graphics/pfstools/files/patch-src-matlab-compatibility.h
deleted file mode 100644
index 2140ba13a717..000000000000
--- a/graphics/pfstools/files/patch-src-matlab-compatibility.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- src/matlab/compatibility.h.orig 2007-03-01 14:10:57 UTC
-+++ src/matlab/compatibility.h
-@@ -59,6 +59,6 @@
-
- #endif
-
--#define DEBUG_STR if(1); else cerr
-+#define DEBUG_STR if(1); else std::cerr
-
- #endif
diff --git a/graphics/pfstools/files/patch-src-octave-pfsclose.cpp b/graphics/pfstools/files/patch-src-octave-pfsclose.cpp
deleted file mode 100644
index e7cab86f01bc..000000000000
--- a/graphics/pfstools/files/patch-src-octave-pfsclose.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
---- src/octave/pfsclose.cpp.orig 2016-02-12 17:10:27 UTC
-+++ src/octave/pfsclose.cpp
-@@ -53,9 +53,9 @@ DEFUN_DLD( pfsclose, args, , helpString
- return retval;
- }
-
-- Octave_map pfsStream = args(0).map_value();
-+ octave_map pfsStream = args(0).map_value();
-
-- Octave_map::const_iterator itFH = pfsStream.seek( "FH" );
-+ octave_map::const_iterator itFH = pfsStream.seek( "FH" );
- if( itFH == pfsStream.end() ||
- !pfsStream.contents( itFH )(0).is_real_scalar() )
- {
diff --git a/graphics/pfstools/files/patch-src-octave-pfsget.cpp b/graphics/pfstools/files/patch-src-octave-pfsget.cpp
deleted file mode 100644
index fe425df72302..000000000000
--- a/graphics/pfstools/files/patch-src-octave-pfsget.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
---- src/octave/pfsget.cpp.orig 2016-02-12 17:10:27 UTC
-+++ src/octave/pfsget.cpp
-@@ -52,9 +52,9 @@ DEFUN_DLD( pfsget, args, , helpString)
- return retval;
- }
-
-- Octave_map pfsStream = args(0).map_value();
-+ octave_map pfsStream = args(0).map_value();
-
-- Octave_map::const_iterator itFH = pfsStream.seek( "FH" );
-+ octave_map::const_iterator itFH = pfsStream.seek( "FH" );
- if( itFH == pfsStream.end() ||
- !pfsStream.contents( itFH )(0).is_real_scalar() )
- {
-@@ -63,7 +63,7 @@ DEFUN_DLD( pfsget, args, , helpString)
- }
- FILE *fh = (FILE*)((long)(pfsStream.contents( itFH )(0).double_value()));
-
-- Octave_map::const_iterator itMode = pfsStream.seek( "MODE" );
-+ octave_map::const_iterator itMode = pfsStream.seek( "MODE" );
- if( itMode == pfsStream.end() || !pfsStream.contents( itMode )(0).is_string() )
- {
- error( SCRIPT_NAME ": MODE field missing in the structure or it has wrong type");
-@@ -95,7 +95,7 @@ DEFUN_DLD( pfsget, args, , helpString)
-
- // Add channels as matrices to pfs stream struct
- {
-- Octave_map channels;
-+ octave_scalar_map channels;
-
- pfs::ChannelIteratorPtr cit( frame->getChannelIterator() );
- while( cit->hasNext() ) {
-@@ -115,7 +115,7 @@ DEFUN_DLD( pfsget, args, , helpString)
-
- //Add tags
- {
-- Octave_map tags;
-+ octave_scalar_map tags;
-
- pfs::TagIteratorPtr it( frame->getTags()->getIterator() );
- while( it->hasNext() ) {
-@@ -124,14 +124,14 @@ DEFUN_DLD( pfsget, args, , helpString)
- }
- pfsStream.assign( "tags", tags );
-
-- Octave_map channelTagList;
-+ octave_scalar_map channelTagList;
-
- //Copy all channel tags
- pfs::ChannelIteratorPtr cit( frame->getChannelIterator() );
- while( cit->hasNext() ) {
- pfs::Channel *ch = cit->getNext();
-
-- Octave_map channelTags;
-+ octave_scalar_map channelTags;
-
- pfs::TagIteratorPtr tit( ch->getTags()->getIterator() );
- while( tit->hasNext() ) {
diff --git a/graphics/pfstools/files/patch-src-octave-pfsopen.cpp b/graphics/pfstools/files/patch-src-octave-pfsopen.cpp
deleted file mode 100644
index ad831023290a..000000000000
--- a/graphics/pfstools/files/patch-src-octave-pfsopen.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- src/octave/pfsopen.cpp.orig 2016-02-12 17:10:27 UTC
-+++ src/octave/pfsopen.cpp
-@@ -137,7 +137,7 @@ DEFUN_DLD( pfsopen, args, , helpString)
- }
- }
-
-- Octave_map pfsStream;
-+ octave_map pfsStream;
- pfsStream.assign( "FH", octave_value((double)((long)fh)) );
- pfsStream.assign( "MODE", writeMode ? octave_value("W") : octave_value("R") );
- pfsStream.assign( "EOF", octave_value(false) );
-@@ -145,7 +145,7 @@ DEFUN_DLD( pfsopen, args, , helpString)
- if( writeMode ) {
- pfsStream.assign( "columns", octave_value(width) );
- pfsStream.assign( "rows", octave_value(height) );
-- Octave_map channels;
-+ octave_map channels;
- pfsStream.assign( "channels", octave_value(channels) );
- }
-
diff --git a/graphics/pfstools/files/patch-src-octave-pfsput.cpp b/graphics/pfstools/files/patch-src-octave-pfsput.cpp
deleted file mode 100644
index 48fbc45f44dc..000000000000
--- a/graphics/pfstools/files/patch-src-octave-pfsput.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
---- src/octave/pfsput.cpp.orig 2016-02-12 17:10:27 UTC
-+++ src/octave/pfsput.cpp
-@@ -52,9 +52,9 @@ DEFUN_DLD( pfsput, args, , helpString)
- return retval;
- }
-
-- Octave_map pfsStream = args(0).map_value();
-+ octave_map pfsStream = args(0).map_value();
-
-- Octave_map::const_iterator itFH = pfsStream.seek( "FH" );
-+ octave_map::const_iterator itFH = pfsStream.seek( "FH" );
- if( itFH == pfsStream.end() ||
- !pfsStream.contents( itFH )(0).is_real_scalar() )
- {
-@@ -65,7 +65,7 @@ DEFUN_DLD( pfsput, args, , helpString)
-
- // Check mode
- {
-- Octave_map::const_iterator itMode = pfsStream.seek( "MODE" );
-+ octave_map::const_iterator itMode = pfsStream.seek( "MODE" );
- if( itMode == pfsStream.end() || !pfsStream.contents( itMode )(0).is_string() )
- {
- error( SCRIPT_NAME ": MODE field missing in the structure or it has wrong type");
-@@ -80,8 +80,8 @@ DEFUN_DLD( pfsput, args, , helpString)
- // Get width & height
- int width, height;
- {
-- Octave_map::const_iterator itCols = pfsStream.seek( "columns" );
-- Octave_map::const_iterator itRows = pfsStream.seek( "rows" );
-+ octave_map::const_iterator itCols = pfsStream.seek( "columns" );
-+ octave_map::const_iterator itRows = pfsStream.seek( "rows" );
- if( itCols == pfsStream.end() || itRows == pfsStream.end() ||
- !pfsStream.contents( itCols )(0).is_real_scalar() ||
- !pfsStream.contents( itRows )(0).is_real_scalar() )
-@@ -94,9 +94,9 @@ DEFUN_DLD( pfsput, args, , helpString)
- }
-
- // Get channels
-- Octave_map channels;
-+ octave_map channels;
- {
-- Octave_map::const_iterator itChannels = pfsStream.seek( "channels" );
-+ octave_map::const_iterator itChannels = pfsStream.seek( "channels" );
- if( itChannels == pfsStream.end() ||
- !pfsStream.contents( itChannels )(0).is_map() )
- {
-@@ -111,7 +111,7 @@ DEFUN_DLD( pfsput, args, , helpString)
- pfs::Frame *frame = ctx.createFrame( width, height );
-
- // For each channel in the 'channels' map
-- for( Octave_map::iterator itCh = channels.begin(); itCh != channels.end(); itCh++ ) {
-+ for( octave_map::iterator itCh = channels.begin(); itCh != channels.end(); itCh++ ) {
- std::string channelName = channels.key(itCh);
-
- if( !channels.contents( itCh )(0).is_real_matrix() ) {
-@@ -135,15 +135,15 @@ DEFUN_DLD( pfsput, args, , helpString)
-
- // Copy frame tags
- {
-- Octave_map::const_iterator itTags = pfsStream.seek( "tags" );
-+ octave_map::const_iterator itTags = pfsStream.seek( "tags" );
- if( itTags != pfsStream.end() ) {
- if( !pfsStream.contents( itTags )(0).is_map() )
- {
- throw pfs::Exception( "'tags' field must be a structure" );
- }
-
-- Octave_map tags = pfsStream.contents( itTags )(0).map_value();
-- for( Octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) {
-+ octave_map tags = pfsStream.contents( itTags )(0).map_value();
-+ for( octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) {
- std::string tagName = tags.key(itTag);
-
- if( !tags.contents( itTag )(0).is_string() )
-@@ -156,14 +156,14 @@ DEFUN_DLD( pfsput, args, , helpString)
-
- // Copy channel tags
- {
-- Octave_map::const_iterator itChTags = pfsStream.seek( "channelTags" );
-+ octave_map::const_iterator itChTags = pfsStream.seek( "channelTags" );
- if( itChTags != pfsStream.end() ) {
- if( !pfsStream.contents( itChTags )(0).is_map() )
- {
- throw pfs::Exception( "'channelTags' field must be a structure" );
- }
-- Octave_map tagChannels = pfsStream.contents( itChTags )(0).map_value();
-- for( Octave_map::iterator itCh = tagChannels.begin(); itCh != tagChannels.end(); itCh++ ) {
-+ octave_map tagChannels = pfsStream.contents( itChTags )(0).map_value();
-+ for( octave_map::iterator itCh = tagChannels.begin(); itCh != tagChannels.end(); itCh++ ) {
- std::string channelName = tagChannels.key(itCh);
- if( !tagChannels.contents( itCh )(0).is_map() ) {
- throw pfs::Exception( "each channelTags file must be a structure" );
-@@ -173,8 +173,8 @@ DEFUN_DLD( pfsput, args, , helpString)
- throw pfs::Exception( "can not set channel tag if channel is missing" );
- }
-
-- Octave_map tags = tagChannels.contents( itCh )(0).map_value();
-- for( Octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) {
-+ octave_map tags = tagChannels.contents( itCh )(0).map_value();
-+ for( octave_map::iterator itTag = tags.begin(); itTag != tags.end(); itTag++ ) {
- std::string tagName = tags.key(itTag);
- if( !tags.contents( itTag )(0).is_string() )
- throw pfs::Exception( "all channel tags must be given as strings" );
diff --git a/graphics/pfstools/files/patch-src-pfs-pfs.cpp b/graphics/pfstools/files/patch-src-pfs-pfs.cpp
deleted file mode 100644
index 4187db3924ba..000000000000
--- a/graphics/pfstools/files/patch-src-pfs-pfs.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/pfs/pfs.cpp.orig 2010-07-14 09:44:27 UTC
-+++ src/pfs/pfs.cpp
-@@ -71,7 +71,7 @@ const char *PFSFILEID="PFS1\x0a";
- // TagContainer implementation
- //------------------------------------------------------------------------------
-
--typedef list<string> TagList;
-+typedef std::list<string> TagList;
-
- class TagIteratorImpl: public TagIterator
- {
-@@ -570,7 +570,7 @@ public:
-
- //Read channel IDs and tags
- // FrameImpl::ChannelID *channelID = new FrameImpl::ChannelID[channelCount];
-- list<ChannelImpl*> orderedChannel;
-+ std::list<ChannelImpl*> orderedChannel;
- for( int i = 0; i < channelCount; i++ ) {
- char channelName[MAX_CHANNEL_NAME+1], *rs;
- rs = fgets( channelName, MAX_CHANNEL_NAME, inputStream );
-@@ -592,7 +592,7 @@ public:
-
-
- //Read channels
-- list<ChannelImpl*>::iterator it;
-+ std::list<ChannelImpl*>::iterator it;
- for( it = orderedChannel.begin(); it != orderedChannel.end(); it++ ) {
- ChannelImpl *ch = *it;
- int size = frame->getWidth()*frame->getHeight();
diff --git a/graphics/pfstools/files/patch-src-pfs-pfsutils.cpp b/graphics/pfstools/files/patch-src-pfs-pfsutils.cpp
deleted file mode 100644
index 1d95541c72cb..000000000000
--- a/graphics/pfstools/files/patch-src-pfs-pfsutils.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
---- src/pfs/pfsutils.cpp.orig 2006-09-21 21:42:54 UTC
-+++ src/pfs/pfsutils.cpp
-@@ -81,7 +81,7 @@ class FrameFileIteratorImpl
- char fileName[1024];
- FILE *stdinout;
-
-- typedef list<FilePattern> PatternList;
-+ typedef std::list<FilePattern> PatternList;
-
- PatternList patternList;
- PatternList::iterator currentPattern;
diff --git a/graphics/pfstools/files/patch-src-pfsglview-picture_io.cpp b/graphics/pfstools/files/patch-src-pfsglview-picture_io.cpp
deleted file mode 100644
index 5eba88179435..000000000000
--- a/graphics/pfstools/files/patch-src-pfsglview-picture_io.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
---- src/pfsglview/picture_io.cpp.orig 2006-11-20 12:13:13 UTC
-+++ src/pfsglview/picture_io.cpp
-@@ -87,7 +87,7 @@ void PictureIO::setFrame(pfs::Frame *fra
- return;
-
- // only XYZ channels are taken into consideration
-- if( channel != "XYZ" && channel != "X00" && channel != "0Y0" && channel != "00Z" ) {
-+ if (strcmp(channel,"XYZ") && strcmp(channel,"X00") && strcmp(channel,"0Y0") && strcmp(channel,"00Z")) {
- if(verbose)
- fprintf( stderr, "WARNING: wrong channel (PictureIO::setFrame())\n");
- return;
-@@ -573,7 +573,7 @@ float PictureIO::getDynamicRange(void) {
- }
- std::sort(vec.begin(), vec.end());
-
-- printf("size: %d\n", vec.size());
-+ printf("size: %lu\n", vec.size());
-
- val = vec[0];
- std::vector<unsigned int> svec;
-@@ -589,7 +589,7 @@ float PictureIO::getDynamicRange(void) {
-
- float dr = svec[ svec.size()-1] / svec[0];
-
-- printf("min:%ld max:%ld svec size: %d dr:%f\n", vec[0], vec[ vec.size()-1], svec.size(), log10(dr));
-+ printf("min:%u max:%u svec size: %lu dr:%f\n", vec[0], vec[ vec.size()-1], svec.size(), log10(dr));
-
-
-
diff --git a/graphics/pfstools/files/patch-src-pfsglview-picture_io.h b/graphics/pfstools/files/patch-src-pfsglview-picture_io.h
deleted file mode 100644
index 535c2568f3bf..000000000000
--- a/graphics/pfstools/files/patch-src-pfsglview-picture_io.h
+++ /dev/null
@@ -1,13 +0,0 @@
---- src/pfsglview/picture_io.h.orig 2008-07-29 16:14:30 UTC
-+++ src/pfsglview/picture_io.h
-@@ -6,7 +6,9 @@
-
- #define MAX_FRAMES_IN_MEMORY 10
-
--class pfs::Frame;
-+namespace pfs {
-+class Frame;
-+};
- enum LumMappingMethod {
- MAP_LINEAR,
- MAP_GAMMA1_4,
diff --git a/graphics/pfstools/files/patch-src_camera_pfsalign.cpp b/graphics/pfstools/files/patch-src_camera_pfsalign.cpp
new file mode 100644
index 000000000000..63e9da5a29ff
--- /dev/null
+++ b/graphics/pfstools/files/patch-src_camera_pfsalign.cpp
@@ -0,0 +1,11 @@
+--- src/camera/pfsalign.cpp.orig 2018-03-01 12:03:22 UTC
++++ src/camera/pfsalign.cpp
+@@ -643,7 +643,7 @@ void alignFrames(int argc, char *argv[])
+
+ homoMC.push_back( trans );
+
+- double data[4][3] = { { 0, 0, 1 }, { frames[kk].size.width, 0, 1 }, { frames[kk].size.width, frames[kk].size.height, 1 }, { 0, frames[kk].size.height, 1 } };
++ double data[4][3] = { { 0.0, 0.0, 1.0 }, { static_cast<double>(frames[kk].size.width), 0.0, 1.0 }, { static_cast<double>(frames[kk].size.width), static_cast<double>(frames[kk].size.height), 1.0 }, { 0.0, static_cast<double>(frames[kk].size.height), 1.0 } };
+ Mat corners( 4, 3, CV_64F, data );
+
+ Mat corners_trans = trans * corners.t();
diff --git a/graphics/pfstools/files/patch-src_fileformat_exrio.cpp b/graphics/pfstools/files/patch-src_fileformat_exrio.cpp
new file mode 100644
index 000000000000..ea5b5889fb98
--- /dev/null
+++ b/graphics/pfstools/files/patch-src_fileformat_exrio.cpp
@@ -0,0 +1,11 @@
+--- src/fileformat/exrio.cpp.orig 2018-01-19 06:59:44 UTC
++++ src/fileformat/exrio.cpp
+@@ -93,7 +93,7 @@ void OpenEXRReader::readImage( pfs::Arra
+ OpenEXRReader::~OpenEXRReader()
+ {
+ delete file;
+- file==NULL;
++ file=NULL;
+ }
+
+ OpenEXRWriter::OpenEXRWriter(const char* filename)
diff --git a/graphics/pfstools/files/patch-src-fileformat-pfsoutpfm.cpp b/graphics/pfstools/files/patch-src_fileformat_pfsoutpfm.cpp
index ae6617b1fb53..43ddf1c6cf70 100644
--- a/graphics/pfstools/files/patch-src-fileformat-pfsoutpfm.cpp
+++ b/graphics/pfstools/files/patch-src_fileformat_pfsoutpfm.cpp
@@ -1,6 +1,6 @@
---- src/fileformat/pfsoutpfm.cpp.orig 2005-06-15 13:36:54 UTC
+--- src/fileformat/pfsoutpfm.cpp.orig 2018-01-19 06:59:44 UTC
+++ src/fileformat/pfsoutpfm.cpp
-@@ -74,7 +74,7 @@ void writePFMFileColor( FILE *fh, int wi
+@@ -85,7 +85,7 @@ void writePFMFileColor( FILE *fh, int wi
}
int written = fwrite( line, sizeof( float ), lineSize, fh );
if( written != lineSize )
@@ -9,7 +9,7 @@
}
delete[] line;
}
-@@ -94,7 +94,7 @@ void writePFMFileGrayscale( FILE *fh, in
+@@ -109,7 +109,7 @@ void writePFMFileGrayscale( FILE *fh, in
}
int written = fwrite( line, sizeof( float ), lineSize, fh );
if( written != lineSize )
diff --git a/graphics/pfstools/files/patch-src_hdrhtml_hdrhtml.cpp b/graphics/pfstools/files/patch-src_hdrhtml_hdrhtml.cpp
new file mode 100644
index 000000000000..1c91375a91aa
--- /dev/null
+++ b/graphics/pfstools/files/patch-src_hdrhtml_hdrhtml.cpp
@@ -0,0 +1,18 @@
+--- src/hdrhtml/hdrhtml.cpp.orig 2018-02-26 13:58:05 UTC
++++ src/hdrhtml/hdrhtml.cpp
+@@ -27,6 +27,7 @@
+
+ #include "hdrhtml.h"
+
++#include <limits>
+ #include <algorithm>
+ #include <math.h>
+ #include <fstream>
+@@ -197,6 +198,7 @@ public:
+ this->y_i = new float[lut_size];
+ own_y_i = true;
+ memcpy(this->y_i, other.y_i, lut_size * sizeof(float));
++ return *this;
+ }
+
+ ~UniformArrayLUT()
diff --git a/graphics/pfstools/files/patch-src_octave_pfsstat b/graphics/pfstools/files/patch-src_octave_pfsstat
new file mode 100644
index 000000000000..e7403907c34c
--- /dev/null
+++ b/graphics/pfstools/files/patch-src_octave_pfsstat
@@ -0,0 +1,11 @@
+--- src/octave/pfsstat.orig 2017-11-13 17:38:28 UTC
++++ src/octave/pfsstat
+@@ -25,6 +25,8 @@
+ #
+ # See man page for more information
+
++pkg load signal;
++
+ pin = pfsopen( "stdin" );
+
+ #fprintf( stderr, "l = %d\n", length( argv ) );
diff --git a/graphics/pfstools/files/patch-src_pfs_CMakeLists.txt b/graphics/pfstools/files/patch-src_pfs_CMakeLists.txt
new file mode 100644
index 000000000000..e7c004fe0976
--- /dev/null
+++ b/graphics/pfstools/files/patch-src_pfs_CMakeLists.txt
@@ -0,0 +1,11 @@
+--- src/pfs/CMakeLists.txt.orig 2018-01-19 06:59:44 UTC
++++ src/pfs/CMakeLists.txt
+@@ -29,7 +29,7 @@ install (TARGETS pfs
+
+ #install (FILES ${CMAKE_CURRENT_BINARY_DIR}/cygpfs.dll DESTINATION bin)
+ install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/pfs.h ${CMAKE_CURRENT_SOURCE_DIR}/array2d.h DESTINATION include/pfs)
+-install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pfs.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
++install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pfs.pc DESTINATION libdata/pkgconfig)
+
+ #install (FILES pfsoutppm.1 DESTINATION ${MAN_DIR})
+
diff --git a/graphics/pfstools/files/patch-src-pfs-pfs.h b/graphics/pfstools/files/patch-src_pfs_pfs.h
index 2003c7ad0c51..51b4d3c91a7d 100644
--- a/graphics/pfstools/files/patch-src-pfs-pfs.h
+++ b/graphics/pfstools/files/patch-src_pfs_pfs.h
@@ -1,14 +1,6 @@
---- src/pfs/pfs.h.orig 2006-03-01 17:21:16 UTC
+--- src/pfs/pfs.h.orig 2018-02-26 13:58:05 UTC
+++ src/pfs/pfs.h
-@@ -115,6 +115,7 @@ namespace pfs
- class TagIterator
- {
- public:
-+ virtual ~TagIterator() {};
- /**
- * Get next item on the list.
- *
-@@ -135,6 +136,7 @@ namespace pfs
+@@ -141,6 +141,7 @@ namespace pfs
class TagContainer
{
public:
@@ -16,7 +8,7 @@
/**
* Get a string tag of the name tagName from the TagContainer.
* @param tagName name of the tag to retrieve
-@@ -181,6 +183,7 @@ namespace pfs
+@@ -187,6 +188,7 @@ namespace pfs
*/
class Channel : public Array2D {
public:
@@ -24,15 +16,7 @@
/**
* Gets width of the channel (in pixels).
* This is a synonym for Array2D::getCols().
-@@ -226,6 +229,7 @@ namespace pfs
- class ChannelIterator
- {
- public:
-+ virtual ~ChannelIterator() {};
- /**
- * Get next item on the list.
- */
-@@ -580,7 +584,9 @@ namespace pfs
+@@ -596,7 +598,9 @@ namespace pfs
*/
Exception( const char* const message )
{
@@ -43,12 +27,12 @@
}
~Exception() {};
-@@ -590,7 +596,7 @@ namespace pfs
+@@ -606,7 +610,7 @@ namespace pfs
*
* @return text description of the cause for the exception
*/
- const char* getMessage()
-+ const char* getMessage() const
++ const char* getMessage() const throw()
{
return msg;
}
diff --git a/graphics/pfstools/files/patch-src_pfs_pfsutils.cpp b/graphics/pfstools/files/patch-src_pfs_pfsutils.cpp
new file mode 100644
index 000000000000..2a1d6e8c69f0
--- /dev/null
+++ b/graphics/pfstools/files/patch-src_pfs_pfsutils.cpp
@@ -0,0 +1,16 @@
+--- src/pfs/pfsutils.cpp.orig 2018-01-25 17:09:12 UTC
++++ src/pfs/pfsutils.cpp
+@@ -57,7 +57,13 @@ string getColorspaceString(ColorSpace cs
+ return "HLG YCbCr 2020";
+ case CS_RGB2020:
+ return "RGB2020";
++ case CS_YUV:
++ return "YUV";
++ case CS_Yxy:
++ return "Yxy";
++ default: ;
+ }
++ return "(unknown)";
+ }
+
+ string intToString(int a){
diff --git a/graphics/pfstools/files/patch-src_pfsglview_m__histogram.cpp b/graphics/pfstools/files/patch-src_pfsglview_m__histogram.cpp
new file mode 100644
index 000000000000..dd7ef9ae6727
--- /dev/null
+++ b/graphics/pfstools/files/patch-src_pfsglview_m__histogram.cpp
@@ -0,0 +1,11 @@
+--- src/pfsglview/m_histogram.cpp.orig 2018-01-19 06:59:44 UTC
++++ src/pfsglview/m_histogram.cpp
+@@ -176,7 +176,7 @@ void M_Histogram::drawHistogram() {
+
+ int array_pos ;
+ int ch = 0 ;
+- if(!strcmp(channel, "XYZ") == 0)
++ if(!(strcmp(channel, "XYZ") == 0))
+ switch(channel[0]) {
+ case 'X': ch = 1 ; break ;
+ case 'Y': ch = 2 ; break ;
diff --git a/graphics/pfstools/files/patch-src-pfsview-pfsview_widget.cpp b/graphics/pfstools/files/patch-src_pfsview_pfsview__widget.cpp
index 0f9f8811903d..afa67897ce14 100644
--- a/graphics/pfstools/files/patch-src-pfsview-pfsview_widget.cpp
+++ b/graphics/pfstools/files/patch-src_pfsview_pfsview__widget.cpp
@@ -1,6 +1,6 @@
---- src/pfsview/pfsview_widget.cpp.orig 2011-04-30 14:01:17 UTC
+--- src/pfsview/pfsview_widget.cpp.orig 2018-01-19 06:59:44 UTC
+++ src/pfsview/pfsview_widget.cpp
-@@ -142,7 +142,7 @@ void PFSViewWidget::setFrame( pfs::Frame
+@@ -147,7 +147,7 @@ void PFSViewWidget::setFrame( pfs::Frame
// Chose first available channel
pfs::ChannelIterator *it = frame->getChannels();
if( !it->hasNext() ) // TODO: failover
@@ -9,7 +9,7 @@
visibleChannel = it->getNext()->getName();
} else if( visibleChannel != COLOR_CHANNELS ) {
// Get a new pointer, as the old frame object
-@@ -335,8 +335,8 @@ static void mapFrameToImage( pfs::Array2
+@@ -340,8 +340,8 @@ static void mapFrameToImage( pfs::Array2
assert( !color || (color && B != NULL) );
diff --git a/graphics/pfstools/pkg-plist b/graphics/pfstools/pkg-plist
index 4ee3cd17aec3..432962f09cc8 100644
--- a/graphics/pfstools/pkg-plist
+++ b/graphics/pfstools/pkg-plist
@@ -1,134 +1,158 @@
-bin/pfsinrgbe
-bin/pfsoutrgbe
-bin/pfsinpfm
-bin/pfsoutpfm
-bin/pfsin
-bin/pfsout
-bin/pfsoutffmpeg
-bin/pfsinmulti
-bin/pfsindcraw
+bin/dcraw2hdrgen
+bin/jpeg2hdrgen
+bin/pfsabsolute
+%%ALIGN%%bin/pfsalign
+bin/pfscat
bin/pfsclamp
-bin/pfsgamma
-bin/pfstag
-bin/pfssize
-bin/pfsextractchannels
-bin/pfspanoramic
-bin/pfsrotate
-bin/pfsflip
+bin/pfscolortransform
bin/pfscut
-bin/pfspad
-bin/pfscat
-bin/pfsabsolute
bin/pfsdisplayfunction
-bin/pfswb
-%%IMAGEMAGICK%%bin/pfsouthdrhtml
-%%NETPBM%%bin/pfsinppm
-%%NETPBM%%bin/pfsoutppm
+bin/pfsextractchannels
+bin/pfsflip
+bin/pfsgamma
+%%GLVIEW%%bin/pfsglview
+bin/pfshdrcalibrate
+bin/pfsin
+bin/pfsindcraw
%%OPENEXR%%bin/pfsinexr
-%%OPENEXR%%bin/pfsoutexr
-%%TIFF%%bin/pfsintiff
-%%TIFF%%bin/pfsouttiff
+bin/pfsinhdrgen
%%IMAGEMAGICK%%bin/pfsinimgmagick
-%%IMAGEMAGICK%%bin/pfsoutimgmagick
-%%QT%%bin/pfsview
-%%QT%%bin/pfsv
+bin/pfsinme
+bin/pfsinpfm
+%%TIFF%%%%NETPBM%%bin/pfsinppm
+bin/pfsinrgbe
+%%TIFF%%bin/pfsintiff
+bin/pfsinyuv
%%OCTAVE%%bin/pfsoctavelum
%%OCTAVE%%bin/pfsoctavergb
+bin/pfsout
+%%OPENEXR%%bin/pfsoutexr
+%%IMAGEMAGICK%%bin/pfsouthdrhtml
+%%IMAGEMAGICK%%bin/pfsoutimgmagick
+bin/pfsoutpfm
+%%TIFF%%%%NETPBM%%bin/pfsoutppm
+bin/pfsoutrgbe
+%%TIFF%%bin/pfsouttiff
+bin/pfsoutyuv
+bin/pfspad
+bin/pfspanoramic
+bin/pfsplotresponse
+bin/pfsretime
+bin/pfsrotate
+bin/pfssize
%%OCTAVE%%bin/pfsstat
-%%OPENGL%%bin/pfsglview
-%%GDAL%%bin/pfsingdal
-include/pfs-1.2/pfs.h
-include/pfs-1.2/array2d.h
-lib/libpfs-1.2.so.0.0.0
-lib/libpfs-1.2.so.0
-lib/libpfs-1.2.so
-lib/libpfs-1.2.a
+bin/pfstag
+bin/pfstmo_drago03
+bin/pfstmo_durand02
+bin/pfstmo_fattal02
+%%FFTW%%bin/pfstmo_ferradans11
+bin/pfstmo_mai11
+bin/pfstmo_mantiuk06
+%%GSL%%bin/pfstmo_mantiuk08
+bin/pfstmo_pattanaik00
+bin/pfstmo_reinhard02
+bin/pfstmo_reinhard05
+%%VIEW%%bin/pfsv
+%%VIEW%%bin/pfsview
+include/pfs/array2d.h
+include/pfs/pfs.h
+lib/libpfs.so
+lib/libpfs.so.2
+lib/libpfs.so.2.0.0
+%%OCTAVE%%%%OCTAVE_SITE_OCT%%/pfstools/pfsclose.oct
+%%OCTAVE%%%%OCTAVE_SITE_OCT%%/pfstools/pfsget.oct
+%%OCTAVE%%%%OCTAVE_SITE_OCT%%/pfstools/pfsopen.oct
+%%OCTAVE%%%%OCTAVE_SITE_OCT%%/pfstools/pfsput.oct
+%%OCTAVE%%%%OCTAVE_SITE_OCT%%/pfstools/pfsread.oct
+%%OCTAVE%%%%OCTAVE_SITE_OCT%%/pfstools/pfstransform_colorspace.oct
+%%OCTAVE%%%%OCTAVE_SITE_OCT%%/pfstools/pfswrite.oct
libdata/pkgconfig/pfs.pc
+man/man1/dcraw2hdrgen.1.gz
+man/man1/jpeg2hdrgen.1.gz
man/man1/pfsabsolute.1.gz
+%%ALIGN%%man/man1/pfsalign.1.gz
man/man1/pfscat.1.gz
man/man1/pfsclamp.1.gz
+man/man1/pfscolortransform.1.gz
man/man1/pfscut.1.gz
man/man1/pfsdisplayfunction.1.gz
man/man1/pfsextractchannels.1.gz
man/man1/pfsflip.1.gz
man/man1/pfsgamma.1.gz
-%%OPENGL%%man/man1/pfsglview.1.gz
+%%GLVIEW%%man/man1/pfsglview.1.gz
+man/man1/pfshdrcalibrate.1.gz
man/man1/pfsin.1.gz
man/man1/pfsindcraw.1.gz
-man/man1/pfsinexr.1.gz
-man/man1/pfsingdal.1.gz
-man/man1/pfsinimgmagick.1.gz
-man/man1/pfsinjpeghdr.1.gz
-man/man1/pfsinmulti.1.gz
+%%OPENEXR%%man/man1/pfsinexr.1.gz
+man/man1/pfsinhdrgen.1.gz
+%%IMAGEMAGICK%%man/man1/pfsinimgmagick.1.gz
+man/man1/pfsinme.1.gz
man/man1/pfsinpfm.1.gz
-man/man1/pfsinppm.1.gz
+%%TIFF%%%%NETPBM%%man/man1/pfsinppm.1.gz
man/man1/pfsinrgbe.1.gz
-man/man1/pfsintiff.1.gz
+%%TIFF%%man/man1/pfsintiff.1.gz
+man/man1/pfsinyuv.1.gz
%%OCTAVE%%man/man1/pfsoctavelum.1.gz
%%OCTAVE%%man/man1/pfsoctavergb.1.gz
man/man1/pfsout.1.gz
-man/man1/pfsoutexr.1.gz
-man/man1/pfsoutffmpeg.1.gz
+%%OPENEXR%%man/man1/pfsoutexr.1.gz
%%IMAGEMAGICK%%man/man1/pfsouthdrhtml.1.gz
-man/man1/pfsoutimgmagick.1.gz
-man/man1/pfsoutjpeghdr.1.gz
+%%IMAGEMAGICK%%man/man1/pfsoutimgmagick.1.gz
man/man1/pfsoutpfm.1.gz
-man/man1/pfsoutppm.1.gz
+%%TIFF%%%%NETPBM%%man/man1/pfsoutppm.1.gz
man/man1/pfsoutrgbe.1.gz
-man/man1/pfsouttiff.1.gz
+%%TIFF%%man/man1/pfsouttiff.1.gz
+man/man1/pfsoutyuv.1.gz
man/man1/pfspad.1.gz
man/man1/pfspanoramic.1.gz
+man/man1/pfsplotresponse.1.gz
+man/man1/pfsretime.1.gz
man/man1/pfsrotate.1.gz
man/man1/pfssize.1.gz
%%OCTAVE%%man/man1/pfsstat.1.gz
man/man1/pfstag.1.gz
-%%QT%%man/man1/pfsv.1.gz
-%%QT%%man/man1/pfsview.1.gz
+man/man1/pfstmo_drago03.1.gz
+man/man1/pfstmo_durand02.1.gz
+man/man1/pfstmo_fattal02.1.gz
+%%FFTW%%man/man1/pfstmo_ferradans11.1.gz
+man/man1/pfstmo_mai11.1.gz
+man/man1/pfstmo_mantiuk06.1.gz
+%%GSL%%man/man1/pfstmo_mantiuk08.1.gz
+man/man1/pfstmo_pattanaik00.1.gz
+man/man1/pfstmo_reinhard02.1.gz
+man/man1/pfstmo_reinhard05.1.gz
+%%VIEW%%man/man1/pfsview.1.gz
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfs_close_frames.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfs_open_frames.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfs_read_luminance.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfs_read_rgb.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfs_read_xyz.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfs_write_rgb.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfssize.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfsview.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfsview_list.m
+%%OCTAVE%%%%OCTAVE_SITE_M%%/pfstools/pfsview_rgb.m
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_c_b2.csv
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_t_b2.csv
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_c_b3.csv
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_t_b3.csv
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_c_b4.csv
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_t_b4.csv
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_c_b5.csv
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_t_b5.csv
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_default_templ/hdrhtml_page_templ.html
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_default_templ/hdrhtml_image_templ.html
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/loading-spinner.gif
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/information-red.png
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/slider-red.png
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_default_templ/hdrhtml_page_templ.html
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.css
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.js
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/slider-black.png
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/information-red.png
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/information.png
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/mouse2touch.js
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/loading-spinner.gif
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/mootools-1.2.4.js
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/hdr_viewer.css
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/mouse2touch.js
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/slider-black.png
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/slider-red.png
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets/slider-white.png
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_page_templ.html
-%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_image_templ_slider-above.html
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_image_templ.html
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_image_templ_slider-above.html
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_page_templ.html
%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_page_templ_short.html
-@dir include/pfs-1.2
-%%IMAGEMAGICK%%@dir %%DATADIR%%/hdrhtml_hdrlabs_templ/hdrhtml_assets
-%%IMAGEMAGICK%%@dir %%DATADIR%%/hdrhtml_hdrlabs_templ
-%%IMAGEMAGICK%%@dir %%DATADIR%%/hdrhtml_default_templ
-%%IMAGEMAGICK%%@dir %%DATADIR%%
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_OCT%%/pfstools/pfsclose.oct
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_OCT%%/pfstools/pfsget.oct
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_OCT%%/pfstools/pfsopen.oct
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_OCT%%/pfstools/pfsput.oct
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_OCT%%/pfstools/pfsread.oct
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_OCT%%/pfstools/pfstransform_colorspace.oct
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_OCT%%/pfstools/pfswrite.oct
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfs_close_frames.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfs_open_frames.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfs_read_luminance.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfs_read_rgb.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfs_read_xyz.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfs_write_rgb.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfssize.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfsview.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfsview_list.m
-%%OCTAVE%%%%OCTAVE_BASE%%/%%OCTAVE_SITE_M%%/pfstools/pfsview_rgb.m
-%%OCTAVE%%@dir %%OCTAVE_SITE_OCT%%/pfstools
-%%OCTAVE%%@dir %%OCTAVE_SITE_M%%/pfstools
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_t_b2.csv
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_t_b3.csv
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_t_b4.csv
+%%IMAGEMAGICK%%%%DATADIR%%/hdrhtml_t_b5.csv