commit 3b15bf5ead0a26fdb76af54c3cea98ada6a41ae8
Author: Jakub Bogusz <[email protected]>
Date:   Sun Apr 17 21:12:18 2022 +0200

    - added glut patch (workaround cmake/freeglut 3.x detection issue); release 
4

 pfstools-glut.patch | 12 ++++++++++++
 pfstools.spec       | 21 +++++++++++++--------
 2 files changed, 25 insertions(+), 8 deletions(-)
---
diff --git a/pfstools.spec b/pfstools.spec
index ae40f98..8d44f94 100644
--- a/pfstools.spec
+++ b/pfstools.spec
@@ -1,18 +1,21 @@
-#
 # TODO:
 # - jpeghdr (libjpeghdr doesn't seem to be freely available; was attached to 
some book?); not supported by CMakeLists
 # - split progs package by libraries required
 #
+# Conditional build:
+%bcond_with    opencv  # pfsalign utility (using OpenCV)
+
 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:       2.2.0
-Release:       3
+Release:       4
 License:       LGPL v2.1+
 Group:         Libraries
 Source0:       http://downloads.sourceforge.net/pfstools/%{name}-%{version}.tgz
 # Source0-md5: 8f026213e567bc72dd23253ced5417a4
 Patch0:                imagemagick7.patch
+Patch1:                %{name}-glut.patch
 URL:           http://pfstools.sourceforge.net/
 BuildRequires: ImageMagick-c++-devel >= 6.0
 BuildRequires: OpenEXR-devel >= 1.0
@@ -27,11 +30,13 @@ BuildRequires:      fftw3-single-devel >= 3
 BuildRequires: gsl-devel
 BuildRequires: libexif-devel
 BuildRequires: libgomp-devel
+BuildRequires: libstdc++-devel >= 6:4.7
 BuildRequires: libtiff-devel
 BuildRequires: netpbm-devel
 BuildRequires: octave-devel
-BuildRequires: opencv-devel
+%{?with_opencv:BuildRequires:  opencv-devel}
 BuildRequires: perl-base
+BuildRequires: pkgconfig
 BuildRequires: qt5-build >= 5
 BuildRequires: texlive-format-pdflatex
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -99,14 +104,15 @@ Wiązania języka Octave do pfstools.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 install -d build
 cd build
 export CXXFLAGS="%{rpmcxxflags} -std=c++11"
-%cmake \
-       -DWITH_OpenCV=OFF \
-       ../
+%cmake .. \
+       %{!?with_opencv:-DWITH_OpenCV=OFF}
+
 %{__make}
 
 cd ../doc
@@ -115,8 +121,7 @@ pdflatex pfs_format_spec.tex
 %install
 rm -rf $RPM_BUILD_ROOT
 
-cd build
-%{__make} install \
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
 %clean
diff --git a/pfstools-glut.patch b/pfstools-glut.patch
new file mode 100644
index 0000000..6d7d712
--- /dev/null
+++ b/pfstools-glut.patch
@@ -0,0 +1,12 @@
+Workaround some cmake 3.2x (free)glut library detection breakage (it refers to 
GLUT_glut_LIBRARY, but never defines it)
+--- pfstools-2.2.0/src/pfsglview/CMakeLists.txt.orig   2021-08-12 
11:36:12.000000000 +0200
++++ pfstools-2.2.0/src/pfsglview/CMakeLists.txt        2022-04-17 
21:08:09.744383018 +0200
+@@ -12,7 +12,7 @@ endif()
+ add_executable(pfsglview pfsglview.cpp picture_io.cpp module.cpp 
m_histogram.cpp m_status.cpp m_on_screen_display.cpp)
+ 
+ # TODO: Use ${GLUT_LIBRARY} instead.
+-target_link_libraries(pfsglview ${OPENGL_LIBRARIES} ${GLUT_glut_LIBRARY} pfs)
++target_link_libraries(pfsglview ${OPENGL_LIBRARIES} ${GLUT_LIBRARIES} 
${GLUT_glut_LIBRARY} pfs)
+ 
+ install (TARGETS pfsglview DESTINATION bin)
+ install (FILES pfsglview.1 DESTINATION ${MAN_DIR})
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/pfstools.git/commitdiff/3b15bf5ead0a26fdb76af54c3cea98ada6a41ae8

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to