Compare commits

...

1 Commits
rawhide ... 2.0

Author SHA1 Message Date
Orion Poplawski
b8b56048bd Initial attempt at 2.0.3 2015-07-07 11:19:19 -06:00
11 changed files with 266 additions and 77 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
pfstools-1.8.1.tar.gz pfstools-1.8.1.tar.gz
/pfstools-1.8.3.tar.gz /pfstools-1.8.3.tar.gz
/pfstools-1.8.5.tar.gz /pfstools-1.8.5.tar.gz
/pfstools-2.0.3.tgz

View File

@ -1,12 +0,0 @@
diff -up pfstools-1.7.0/src/fileformat/Makefile.am-old pfstools-1.7.0/src/fileformat/Makefile.am
--- pfstools-1.7.0/src/fileformat/Makefile.am-old 2009-01-02 13:17:32.000000000 -0800
+++ pfstools-1.7.0/src/fileformat/Makefile.am 2009-01-02 13:18:14.000000000 -0800
@@ -96,6 +96,7 @@ endif
if GDAL_SUPPORT
pfsingdal_SOURCES = pfsingdal.cpp
+pfsingdal_CXXFLAGS = $(shell /usr/bin/gdal-config --cflags)
pfsingdal_LDADD = $(GDAL_LIBS)
endif
diff -up pfstools-1.7.0/src/fileformat/pfsingdal.cpp-old pfstools-1.7.0/src/fileformat/pfsingdal.cpp

View File

@ -1,12 +0,0 @@
diff -up pfstools-1.7.0/configure.ac~ pfstools-1.7.0/configure.ac
--- pfstools-1.7.0/configure.ac~ 2008-10-15 01:38:00.000000000 +0300
+++ pfstools-1.7.0/configure.ac 2009-05-08 22:55:28.000000000 +0300
@@ -29,8 +29,6 @@ AC_ARG_ENABLE(debug,
AC_DEFINE([DEBUG])
fi],
[enable_debug="no"
- temp_CXXFLAGS=`echo $CXXFLAGS | sed "s/-O./ /; s/-g//"`
- CXXFLAGS="-O3 $temp_CXXFLAGS"
AC_DEFINE(NDEBUG, 1, [Disable assertion checks])
])

View File

@ -1,12 +0,0 @@
diff -up pfstools-1.8.5/src/pfs/pfs.cpp.wformat pfstools-1.8.5/src/pfs/pfs.cpp
--- pfstools-1.8.5/src/pfs/pfs.cpp.wformat 2013-12-06 12:46:04.196939099 +0100
+++ pfstools-1.8.5/src/pfs/pfs.cpp 2013-12-06 12:47:58.167480681 +0100
@@ -525,7 +525,7 @@ static void writeTags( const TagContaine
TagList::const_iterator it;
fprintf( out, "%d" PFSEOL, tags->getSize() );
for( it = tags->tagsBegin(); it != tags->tagsEnd(); it++ ) {
- fprintf( out, (const char*)(it->c_str()) );
+ fprintf( out, "%s", (const char*)(it->c_str()) );
fprintf( out, PFSEOL );
}
}

19
pfstools-lib64.patch Normal file
View File

@ -0,0 +1,19 @@
diff -up pfstools-2.0.3/src/pfs/CMakeLists.txt.lib64 pfstools-2.0.3/src/pfs/CMakeLists.txt
--- pfstools-2.0.3/src/pfs/CMakeLists.txt.lib64 2015-04-28 09:50:53.000000000 -0600
+++ pfstools-2.0.3/src/pfs/CMakeLists.txt 2015-07-07 09:49:59.570654842 -0600
@@ -20,12 +20,12 @@ string(REGEX REPLACE "(@PACKAGE_VERSION@
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/pfs.pc" "${file_content_res}")
install (TARGETS pfs
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib )
+ LIBRARY DESTINATION lib${LIB_SUFFIX}
+ ARCHIVE DESTINATION lib${LIB_SUFFIX})
#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/pkgconfig)
+install (FILES ${CMAKE_CURRENT_BINARY_DIR}/pfs.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig)
#install (FILES pfsoutppm.1 DESTINATION ${MAN_DIR})

View File

@ -1,11 +0,0 @@
--- pfstools-1.6.5/src/octave/Makefile.am-old 2008-10-12 09:57:46.000000000 -0700
+++ pfstools-1.6.5/src/octave/Makefile.am 2008-10-12 09:57:58.000000000 -0700
@@ -15,7 +15,7 @@
help_h_files = $(help_files:.help=_help.h)
oct_SCRIPTS = $(linked_oct_files)
-m_SCRIPTS = $(m_oct_files)
+m_DATA = $(m_oct_files)
bin_SCRIPTS = pfsoctavelum pfsoctavergb pfsstat
man_MANS = pfsoctavelum.1 pfsoctavergb.1 pfsstat.1

199
pfstools-octave4.patch Normal file
View File

@ -0,0 +1,199 @@
diff -up pfstools-2.0.3/src/octave/pfsclose.cpp.octave4 pfstools-2.0.3/src/octave/pfsclose.cpp
--- pfstools-2.0.3/src/octave/pfsclose.cpp.octave4 2015-04-28 09:50:54.000000000 -0600
+++ pfstools-2.0.3/src/octave/pfsclose.cpp 2015-07-07 10:33:42.020303959 -0600
@@ -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 -up pfstools-2.0.3/src/octave/pfsget.cpp.octave4 pfstools-2.0.3/src/octave/pfsget.cpp
--- pfstools-2.0.3/src/octave/pfsget.cpp.octave4 2015-04-28 09:50:54.000000000 -0600
+++ pfstools-2.0.3/src/octave/pfsget.cpp 2015-07-07 10:56:34.752852324 -0600
@@ -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_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_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_map channelTagList;
//Copy all channel tags
pfs::ChannelIteratorPtr cit( frame->getChannelIterator() );
while( cit->hasNext() ) {
pfs::Channel *ch = cit->getNext();
- Octave_map channelTags;
+ octave_map channelTags;
pfs::TagIteratorPtr tit( ch->getTags()->getIterator() );
while( tit->hasNext() ) {
diff -up pfstools-2.0.3/src/octave/pfsopen.cpp.octave4 pfstools-2.0.3/src/octave/pfsopen.cpp
--- pfstools-2.0.3/src/octave/pfsopen.cpp.octave4 2015-04-28 09:50:54.000000000 -0600
+++ pfstools-2.0.3/src/octave/pfsopen.cpp 2015-07-07 10:57:06.345705516 -0600
@@ -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 -up pfstools-2.0.3/src/octave/pfsput.cpp.octave4 pfstools-2.0.3/src/octave/pfsput.cpp
--- pfstools-2.0.3/src/octave/pfsput.cpp.octave4 2015-04-28 09:50:54.000000000 -0600
+++ pfstools-2.0.3/src/octave/pfsput.cpp 2015-07-07 10:56:05.153989866 -0600
@@ -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" );

11
pfstools-pfsvman.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up pfstools-2.0.3/src/pfsview/CMakeLists.txt.pfsvman pfstools-2.0.3/src/pfsview/CMakeLists.txt
--- pfstools-2.0.3/src/pfsview/CMakeLists.txt.pfsvman 2015-04-28 09:50:52.000000000 -0600
+++ pfstools-2.0.3/src/pfsview/CMakeLists.txt 2015-07-07 10:06:18.998083122 -0600
@@ -26,6 +26,7 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/
install (FILES "${CMAKE_CURRENT_BINARY_DIR}/pfsv"
PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE OWNER_WRITE WORLD_READ GROUP_READ OWNER_READ
DESTINATION bin)
+install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/pfsv.1 DESTINATION ${MAN_DIR})
ADD_EXECUTABLE(pfsview ${pfsview_SOURCES}

11
pfstools-soversion.patch Normal file
View File

@ -0,0 +1,11 @@
diff -up pfstools-2.0.3/src/pfs/CMakeLists.txt.soversion pfstools-2.0.3/src/pfs/CMakeLists.txt
--- pfstools-2.0.3/src/pfs/CMakeLists.txt.soversion 2015-07-07 09:51:04.339350707 -0600
+++ pfstools-2.0.3/src/pfs/CMakeLists.txt 2015-07-07 09:56:03.927943522 -0600
@@ -4,6 +4,7 @@ if( NOT HAS_GETOPT )
include_directories ("${GETOPT_INCLUDE}")
endif( NOT HAS_GETOPT )
add_library(pfs ${LIB_TYPE} colorspace.cpp pfs.cpp pfsutils.cpp array2d.h pfs.h "${GETOPT_OBJECT}")
+set_target_properties(pfs PROPERTIES VERSION 0.0.0 SOVERSION 0)
# TODO: Make it platform dependent - only GCC linux / perhaps Mac
# This is needed when linking with matlab mex files

View File

@ -1,22 +1,29 @@
Name: pfstools Name: pfstools
Version: 1.8.5 Version: 2.0.3
Release: 23%{?dist} Release: 1%{?dist}
Summary: Programs for handling high-dynamic range images Summary: Programs for handling high-dynamic range images
Group: Applications/Multimedia Group: Applications/Multimedia
License: GPLv2+ License: GPLv2+
URL: http://pfstools.sourceforge.net/ URL: http://pfstools.sourceforge.net/
Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tgz
Patch1: pfstools-mDATA.patch # Support lib64
Patch2: pfstools-1.7.0-bf1.patch # https://sourceforge.net/p/pfstools/patches/7/
Patch0: pfstools-lib64.patch
# Set SOVERSION
# https://sourceforge.net/p/pfstools/patches/8/
Patch1: pfstools-soversion.patch
# Install psfv.1
Patch2: pfstools-pfsvman.patch
Patch3: pfstools-1.7.0-gcc44.patch Patch3: pfstools-1.7.0-gcc44.patch
Patch4: pfstools-1.7-strcmp.patch Patch4: pfstools-1.7-strcmp.patch
Patch5: pfstools-1.7.0-debuginfo.patch # Fixes for octave 4.0.o
Patch6: pfstools-1.8.5-wformat.patch Patch5: pfstools-octave4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: automake BuildRequires: cmake
BuildRequires: libtool BuildRequires: libtool
BuildRequires: libexif-devel
BuildRequires: libtiff-devel BuildRequires: libtiff-devel
BuildRequires: openexr-devel BuildRequires: openexr-devel
BuildRequires: octave-devel BuildRequires: octave-devel
@ -120,24 +127,20 @@ etc., for developing programs which can handle HDR graphics files.
%prep %prep
%setup -q %setup -q
%patch1 -p1 -b .mDATA %patch0 -p1 -b .lib64
%patch2 -p1 -b .bf1 %patch1 -p1 -b .soversion
%patch2 -p1 -b .pfsvman
%patch3 -p1 -b .gcc44 %patch3 -p1 -b .gcc44
%patch4 -p1 -b .strcmp %patch4 -p1 -b .strcmp
%patch5 -p1 -b .debuginfo %patch5 -p1 -b .octave4
%patch6 -p1 -b .wformat
# Remove the following once the patches for configure.ac and Makefile.am
# are not necessary anymore.
autoreconf -ifv
%build %build
%configure --disable-static --disable-dependency-tracking %cmake .
make %{?_smp_mflags} make #{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT
mkdir -p ${RPM_BUILD_ROOT}%{_prefix} mkdir -p ${RPM_BUILD_ROOT}%{_prefix}
make DESTDIR=$RPM_BUILD_ROOT "INSTALL=install -p" install make DESTDIR=$RPM_BUILD_ROOT "INSTALL=install -p" install
@ -149,10 +152,6 @@ make DESTDIR=$RPM_BUILD_ROOT "INSTALL=install -p" install
} }
%clean
rm -rf $RPM_BUILD_ROOT
%post libs -p /sbin/ldconfig %post libs -p /sbin/ldconfig
@ -171,13 +170,11 @@ rm -rf $RPM_BUILD_ROOT
%{_bindir}/pfsgamma %{_bindir}/pfsgamma
%{_bindir}/pfsin %{_bindir}/pfsin
%{_bindir}/pfsindcraw %{_bindir}/pfsindcraw
%{_bindir}/pfsinmulti
%{_bindir}/pfsinpfm %{_bindir}/pfsinpfm
%{_bindir}/pfsinppm %{_bindir}/pfsinppm
%{_bindir}/pfsinrgbe %{_bindir}/pfsinrgbe
%{_bindir}/pfsintiff %{_bindir}/pfsintiff
%{_bindir}/pfsout %{_bindir}/pfsout
%{_bindir}/pfsoutffmpeg
%{_bindir}/pfsouthdrhtml %{_bindir}/pfsouthdrhtml
%{_bindir}/pfsoutpfm %{_bindir}/pfsoutpfm
%{_bindir}/pfsoutppm %{_bindir}/pfsoutppm
@ -208,13 +205,11 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man1/pfsgamma.1.gz %{_mandir}/man1/pfsgamma.1.gz
%{_mandir}/man1/pfsin.1.gz %{_mandir}/man1/pfsin.1.gz
%{_mandir}/man1/pfsindcraw.1.gz %{_mandir}/man1/pfsindcraw.1.gz
%{_mandir}/man1/pfsinmulti.1.gz
%{_mandir}/man1/pfsinpfm.1.gz %{_mandir}/man1/pfsinpfm.1.gz
%{_mandir}/man1/pfsinppm.1.gz %{_mandir}/man1/pfsinppm.1.gz
%{_mandir}/man1/pfsinrgbe.1.gz %{_mandir}/man1/pfsinrgbe.1.gz
%{_mandir}/man1/pfsintiff.1.gz %{_mandir}/man1/pfsintiff.1.gz
%{_mandir}/man1/pfsout.1.gz %{_mandir}/man1/pfsout.1.gz
%{_mandir}/man1/pfsoutffmpeg.1.gz
%{_mandir}/man1/pfsouthdrhtml.1.gz %{_mandir}/man1/pfsouthdrhtml.1.gz
%{_mandir}/man1/pfsoutpfm.1.gz %{_mandir}/man1/pfsoutpfm.1.gz
%{_mandir}/man1/pfsoutppm.1.gz %{_mandir}/man1/pfsoutppm.1.gz
@ -228,8 +223,8 @@ rm -rf $RPM_BUILD_ROOT
%doc %doc
%files libs %files libs
%{_libdir}/libpfs-1.2.so.0 %{_libdir}/libpfs.so.0
%{_libdir}/libpfs-1.2.so.0.0.0 %{_libdir}/libpfs.so.0.0.0
%files qt %files qt
%{_bindir}/pfsv %{_bindir}/pfsv
@ -269,7 +264,7 @@ rm -rf $RPM_BUILD_ROOT
%files devel %files devel
%doc doc/pfs_format_spec.pdf %doc doc/pfs_format_spec.pdf
%{_libdir}/libpfs-1.2.so %{_libdir}/libpfs.so
%{_libdir}/pkgconfig/pfs.pc %{_libdir}/pkgconfig/pfs.pc
%{_includedir}/pfs-1.2 %{_includedir}/pfs-1.2

View File

@ -1 +1 @@
80dac70bfb6359a6749453477e74b112 pfstools-1.8.5.tar.gz c34b3df1f0950120138f13f521f2a5d6 pfstools-2.0.3.tgz