[packages/pfstools] - updated to 2.0.4 - added patches from fedora to build with octave 4.x - removed obsolete patches

baggins baggins at pld-linux.org
Sun Nov 22 22:15:12 CET 2015


commit 089faca0faa7fa9af87afa34880e1bbd233b44c9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Nov 22 22:14:43 2015 +0100

    - updated to 2.0.4
    - added patches from fedora to build with octave 4.x
    - removed obsolete patches

 pfstools-2.0.4-maptype.patch    | 104 ++++++++++++++++++++++++++++++++++++++++
 pfstools-2.0.4-octinstall.patch |  39 +++++++++++++++
 pfstools-gdal.patch             |  28 -----------
 pfstools-opt.patch              |  18 -------
 pfstools.spec                   |  59 ++++++++---------------
 5 files changed, 163 insertions(+), 85 deletions(-)
---
diff --git a/pfstools.spec b/pfstools.spec
index fe29e96..e40c755 100644
--- a/pfstools.spec
+++ b/pfstools.spec
@@ -6,14 +6,14 @@
 Summary:	pfstools for High Dynamic Range Images and Video
 Summary(pl.UTF-8):	Narzędzia do obrazów i wideo o dużym zakresie luminancji
 Name:		pfstools
-Version:	1.9.1
-Release:	4
+Version:	2.0.4
+Release:	1
 License:	LGPL v2.1+
 Group:		Libraries
-Source0:	http://downloads.sourceforge.net/pfstools/%{name}-%{version}.tar.gz
-# Source0-md5:	f6f5966e248fd6979e6339725ea19c99
-Patch0:		%{name}-opt.patch
-Patch1:		%{name}-gdal.patch
+Source0:	http://downloads.sourceforge.net/pfstools/%{name}-%{version}.tgz
+# Source0-md5:	f17e2834798cda75d32b2fcd11826d82
+Patch0:		pfstools-2.0.4-maptype.patch
+Patch1:		pfstools-2.0.4-octinstall.patch
 Patch2:		%{name}-pc.patch
 URL:		http://pfstools.sourceforge.net/
 BuildRequires:	ImageMagick-c++-devel >= 6.0
@@ -55,6 +55,7 @@ Summary:	Header files for pfstools
 Summary(pl.UTF-8):	Pliki nagłówkowe pfstools
 Group:		Development/Libraries
 Requires:	%{name} = %{version}-%{release}
+Obsoletes:	pfstools-static
 
 %description devel
 The header files are only needed for development of programs using the
@@ -64,18 +65,6 @@ pfstools.
 W pakiecie tym znajdują się pliki nagłówkowe, przeznaczone dla
 programistów używających bibliotek pfstools.
 
-%package static
-Summary:	Static pfstools libraries
-Summary(pl.UTF-8):	Biblioteki statyczne pfstools
-Group:		Development/Libraries
-Requires:	%{name}-devel = %{version}-%{release}
-
-%description static
-Static pfstools libraries.
-
-%description static -l pl.UTF-8
-Biblioteki statyczne pfstools.
-
 %package progs
 Summary:	pfstools utility programs
 Summary(pl.UTF-8):	Narzędzia pfstools
@@ -107,27 +96,21 @@ Wiązania języka Octave do pfstools.
 %patch2 -p1
 
 %build
-%{__libtoolize}
-%{__aclocal}
-%{__autoconf}
-%{__autoheader}
-%{__automake}
-
-%configure \
-	--disable-matlab \
-	%{?debug:--enable-debug}
-
+install -d build
+cd build
+%cmake ../
 %{__make}
 
+cd ../doc
+pdflatex pfs_format_spec.tex
+
 %install
 rm -rf $RPM_BUILD_ROOT
 
+cd build
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-# obsoleted by pkg-config
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/libpfs-1.2.la
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -137,24 +120,22 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog README TODO doc/faq.txt doc/pfs_format_spec.pdf
-%attr(755,root,root) %{_libdir}/libpfs-1.2.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libpfs-1.2.so.0
+%attr(755,root,root) %{_libdir}/libpfs.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libpfs.so.2
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libpfs-1.2.so
+%attr(755,root,root) %{_libdir}/libpfs.so
 %{_pkgconfigdir}/pfs.pc
-%{_includedir}/pfs-1.2
-
-%files static
-%defattr(644,root,root,755)
-%{_libdir}/libpfs-1.2.a
+%{_includedir}/pfs
 
 %files progs
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/pfs*
+%attr(755,root,root) %{_bindir}/*2hdrgen
 %{_datadir}/pfstools
 %{_mandir}/man1/pfs*.1*
+%{_mandir}/man1/*2hdrgen.1*
 
 %files -n octave-pfstools
 %defattr(644,root,root,755)
diff --git a/pfstools-2.0.4-maptype.patch b/pfstools-2.0.4-maptype.patch
new file mode 100644
index 0000000..f6d4653
--- /dev/null
+++ b/pfstools-2.0.4-maptype.patch
@@ -0,0 +1,104 @@
+diff -up pfstools-2.0.4/src/octave/pfsput.cpp.maptype pfstools-2.0.4/src/octave/pfsput.cpp
+--- pfstools-2.0.4/src/octave/pfsput.cpp.maptype	2015-07-15 11:58:23.000000000 +0200
++++ pfstools-2.0.4/src/octave/pfsput.cpp	2015-07-20 11:49:05.445680473 +0200
+@@ -52,9 +52,9 @@ DEFUN_DLD( pfsput, args, , helpString)
+     return retval;
+   }
+   
+-  octave_scalar_map pfsStream = args(0).map_value();
++  octave_map pfsStream = args(0).map_value();
+ 
+-  octave_scalar_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_scalar_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_scalar_map::const_iterator itCols = pfsStream.seek( "columns" );
+-    octave_scalar_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_scalar_map channels;
++  octave_map channels;
+   {
+-    octave_scalar_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_scalar_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_scalar_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_scalar_map_map tags = pfsStream.contents( itTags )(0).map_value();
+-        for( octave_scalar_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_scalar_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_scalar_map tagChannels = pfsStream.contents( itChTags )(0).map_value();
+-        for( octave_scalar_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_scalar_map tags = tagChannels.contents( itCh )(0).map_value();
+-          for( octave_scalar_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/pfstools-2.0.4-octinstall.patch b/pfstools-2.0.4-octinstall.patch
new file mode 100644
index 0000000..bbb6c58
--- /dev/null
+++ b/pfstools-2.0.4-octinstall.patch
@@ -0,0 +1,39 @@
+diff -up pfstools-2.0.4/CMakeLists.txt.octinstall pfstools-2.0.4/CMakeLists.txt
+--- pfstools-2.0.4/CMakeLists.txt.octinstall	2015-07-20 13:06:32.533996797 +0200
++++ pfstools-2.0.4/CMakeLists.txt	2015-07-20 13:11:35.728808062 +0200
+@@ -277,8 +277,6 @@ OPTION(WITH_HDRVC "Compile HDRVC (intern
+ # ======== MKOCTFILE/OCTAVE ===========
+ 
+ OPTION(WITH_Octave "Compile Octave files" ON)
+-SET (OCTAVE_DEST_DIR "${CMAKE_INSTALL_PREFIX}/share/pfstools/octave"
+-CACHE PATH  "Copy octave functions to this directory")
+ 
+ if( WITH_Octave )
+   
+@@ -289,7 +287,8 @@ if( WITH_Octave )
+   if(MKOCTFILE)
+     message(STATUS "mkoctfile found.")
+   endif()
+-
++  execute_process(COMMAND octave-config --oct-site-dir OUTPUT_VARIABLE OCTAVE_OCT_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
++  execute_process(COMMAND octave-config --m-site-dir OUTPUT_VARIABLE OCTAVE_M_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
+ endif( WITH_Octave )
+ 
+ # ======== OpenCV ===========
+diff -up pfstools-2.0.4/src/octave/CMakeLists.txt.octinstall pfstools-2.0.4/src/octave/CMakeLists.txt
+--- pfstools-2.0.4/src/octave/CMakeLists.txt.octinstall	2015-07-20 13:03:30.448679088 +0200
++++ pfstools-2.0.4/src/octave/CMakeLists.txt	2015-07-20 13:12:42.873544809 +0200
+@@ -40,11 +40,11 @@ endforeach(SRC)
+ foreach(SRC ${SRC_OCT}) 
+ 	install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${SRC}.oct 
+ 	         PERMISSIONS OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE OWNER_WRITE WORLD_READ GROUP_READ OWNER_READ
+-	         DESTINATION ${OCTAVE_DEST_DIR})
++	         DESTINATION "${OCTAVE_OCT_DIR}/pfstools")
+ endforeach(SRC)
+ 
+ foreach(SRC ${SRC_M}) 
+-	install (FILES ${SRC} DESTINATION ${OCTAVE_DEST_DIR})
++	install (FILES ${SRC} DESTINATION "${OCTAVE_M_DIR}/pfstools")
+ endforeach(SRC)
+ 
+ install (FILES ${OCT_SCRIPTS} 
diff --git a/pfstools-gdal.patch b/pfstools-gdal.patch
deleted file mode 100644
index 7cc269e..0000000
--- a/pfstools-gdal.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- pfstools-1.9.1/configure.ac~	2014-11-10 22:14:16.000000000 +0100
-+++ pfstools-1.9.1/configure.ac	2014-11-10 23:55:31.223091067 +0100
-@@ -449,6 +449,7 @@
-   [AC_DEFINE( HAVE_LIBGDAL,1,
- 	      [Define this if you have the GDAL library])
- 	      GDAL_LIBS="-lgdal"
-+	      GDAL_CFLAGS="-I/usr/include/gdal"
-               gdal_support="yes"],[gdal_support="no"],)
- else
-   gdal_support="no"
-@@ -508,6 +509,7 @@
- AC_SUBST(IMAGEMAGICK_CFLAGS)
- AC_SUBST(JPEGHDR_LIBS)
- AC_SUBST(GDAL_LIBS)
-+AC_SUBST(GDAL_CFLAGS)
- AC_SUBST(QT_LIBS)
- AC_SUBST(QT_CFLAGS)
- AC_SUBST(GL_LIBS)
---- pfstools-1.9.1/src/fileformat/Makefile.am~	2014-11-06 13:50:48.000000000 +0100
-+++ pfstools-1.9.1/src/fileformat/Makefile.am	2014-11-10 23:56:27.736422407 +0100
-@@ -97,6 +97,7 @@
- if GDAL_SUPPORT
- pfsingdal_SOURCES = pfsingdal.cpp
- pfsingdal_LDADD = $(GDAL_LIBS)
-+INCLUDES += $(GDAL_CFLAGS)
- endif
- 
- pfsinrgbe_SOURCES = pfsinrgbe.cpp rgbeio.cpp rgbeio.h
diff --git a/pfstools-opt.patch b/pfstools-opt.patch
deleted file mode 100644
index 9f24b86..0000000
--- a/pfstools-opt.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- pfstools-1.8.5/configure.ac.orig	2011-10-27 10:40:19.000000000 +0200
-+++ pfstools-1.8.5/configure.ac	2012-02-04 15:06:39.774740606 +0100
-@@ -24,13 +24,12 @@
- AC_ARG_ENABLE(debug,
- 		AS_HELP_STRING([--enable-debug],[Enable debug symbols and asserts]),
- 		 [if test "$enable_debug" = "yes" ; then
--                     temp_CXXFLAGS=`echo $CXXFLAGS | sed "s/-O./ /; s/-g//"`
-+                     temp_CXXFLAGS=`echo $CXXFLAGS | sed "s/-O[0-9]/ /"`
- 		     CXXFLAGS="-g $temp_CXXFLAGS"
- 		     AC_DEFINE([DEBUG])
- 		  fi],
-                   [enable_debug="no"
--                     temp_CXXFLAGS=`echo $CXXFLAGS | sed "s/-O./ /; s/-g//"`
--   	             CXXFLAGS="-O3 $temp_CXXFLAGS"
-+   	             CXXFLAGS="-O3 $CXXFLAGS"
-                      AC_DEFINE(NDEBUG, 1, [Disable assertion checks])
-                   ])
- 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pfstools.git/commitdiff/089faca0faa7fa9af87afa34880e1bbd233b44c9



More information about the pld-cvs-commit mailing list