Update patches to build man pages.

This commit is contained in:
Richard Shaw 2017-11-03 10:30:08 -05:00
parent 4b19846297
commit 85af7b25c3
4 changed files with 73 additions and 15 deletions

20
OpenImageIO-dcmtk.patch Normal file
View File

@ -0,0 +1,20 @@
--- a/src/dicom.imageio/dicominput.cpp
+++ b/src/dicom.imageio/dicominput.cpp
@@ -288,7 +288,7 @@ DICOMInput::read_metadata ()
if (dataset->findAndGetFloat32 (tag, val).good())
m_spec.attribute (name, val);
} else if (evr == EVR_FD
-#if PACKAGE_VERSION_NUMBER >= 361
+#if PACKAGE_VERSION_NUMBER >= 362
|| evr == EVR_OD
#endif
) {
@@ -312,7 +312,7 @@ DICOMInput::read_metadata ()
evr == EVR_DT || evr == EVR_LT || evr == EVR_PN ||
evr == EVR_ST || evr == EVR_TM || evr == EVR_UI ||
evr == EVR_UT || evr == EVR_LO || evr == EVR_SH
-#if PACKAGE_VERSION_NUMBER >= 361
+#if PACKAGE_VERSION_NUMBER >= 362
|| evr == EVR_UC ||evr == EVR_UR
#endif
) {

View File

@ -1,6 +1,22 @@
--- a/src/doc/CMakeLists.txt
+++ b/src/doc/CMakeLists.txt
@@ -19,8 +19,7 @@ if (UNIX AND TXT2MAN AND PYTHONINTERP_FO
@@ -6,10 +6,11 @@ set (public_docs
"${OpenImageIO_SOURCE_DIR}/CHANGES.md"
)
-install (FILES ${public_docs}
- DESTINATION ${CMAKE_INSTALL_DOCDIR}
- COMPONENT documentation)
-
+if (INSTALL_DOCS)
+ install (FILES ${public_docs}
+ DESTINATION ${CMAKE_INSTALL_DOCDIR}
+ COMPONENT documentation)
+endif()
# generate man pages using txt2man and a tiny python script to munge the
# result of "$tool --help"
@@ -19,8 +20,7 @@ if (UNIX AND TXT2MAN AND PYTHONINTERP_FO
message (STATUS "Unix man page documentation will be generated")
set (cli_tools oiiotool iinfo maketx idiff igrep iconvert)
@ -10,3 +26,34 @@
list (APPEND cli_tools iv)
endif()
@@ -37,7 +37,9 @@ if (UNIX AND TXT2MAN AND PYTHONINTERP_FO
# force man page build before install
add_custom_target (man_pages ALL DEPENDS ${manpage_files})
+if (INSTALL_DOCS)
install (FILES ${manpage_files}
DESTINATION ${CMAKE_INSTALL_MANDIR}
COMPONENT documentation)
endif()
+endif()
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -101,6 +101,9 @@ set (TEX_BATCH_SIZE "" CACHE STRING "For
set (SOVERSION ${OIIO_VERSION_MAJOR}.${OIIO_VERSION_MINOR}
CACHE STRING "Set the SO version in the SO name of the output library")
option (BUILD_OIIOUTIL_ONLY "If ON, will build *only* libOpenImageIO_Util")
+option (BUILD_DOCS "If ON, build documentation and man pages.")
+option (INSTALL_DOCS "If ON, install documentation and man pages.")
+
if (NOT OIIO_THREAD_ALLOW_DCLP)
add_definitions ("-DOIIO_THREAD_ALLOW_DCLP=0")
@@ -188,7 +191,7 @@ if (USE_PYTHON AND NOT BUILD_OIIOUTIL_ON
endif ()
add_subdirectory (src/include)
-if (INSTALL_DOCS)
+if (BUILD_DOCS)
add_subdirectory (src/doc)
endif ()
add_subdirectory (src/fonts)

View File

@ -1,11 +0,0 @@
--- a/src/libtexture/texturesys.cpp
+++ b/src/libtexture/texturesys.cpp
@@ -2477,7 +2477,7 @@ TextureSystemImpl::sample_bicubic (int n
} else {
wx = evalBSplineWeights (float4(sfrac));
wy = evalBSplineWeights (float4(tfrac));
-#if (defined(__i386__) && !defined(__x86_64__)) || defined(__aarch64__)
+#if !defined(__x86_64__)
// Some platforms complain here about these being uninitialized,
// so initialize them. Don't waste the cycles for platforms that
// don't seem to have that error. It's a false positive -- this

View File

@ -15,7 +15,7 @@ Source0: https://github.com/%{name}/%{subname}/archive/Release-%{version}
#Source1: oiio-images.tar.gz
Patch0: OpenImageIO-man.patch
#Patch1: OpenImageIO-uninit.patch
Patch1: OpenImageIO-dcmtk.patch
Patch2: OpenImageIO-as_needed.patch
BuildRequires: cmake gcc-c++
@ -131,13 +131,14 @@ rm -rf build/linux && mkdir -p build/linux && pushd build/linux
-DCMAKE_SKIP_RPATH:BOOL=TRUE \
-DINCLUDE_INSTALL_DIR:PATH=/usr/include/%{name} \
-DPYLIB_INSTALL_DIR:PATH=%{python_sitearch} \
-DINSTALL_DOCS:BOOL=TRUE \
-DBUILD_DOCS:BOOL=TRUE \
-DINSTALL_DOCS:BOOL=FALSE \
-DINSTALL_FONTS:BOOL=FALSE \
-DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
-DUSE_OPENSSL:BOOL=TRUE \
-DSTOP_ON_WARNING:BOOL=FALSE \
%if 0%{?fedora} >= 26
-DUSE_CPP14:BOOL=TRUE \
-DUSE_CPP:STRING=14 \
%endif
%ifarch ppc ppc64
-DNOTHREADS:BOOL=FALSE \
@ -199,6 +200,7 @@ cp -a src/doc/*.1 %{buildroot}%{_mandir}/man1
%changelog
* Thu Nov 02 2017 Richard Shaw <hobbes1069@gmail.com> - 1.8.6-1
- Update to latest upstream release.
- Add dcmtk to build to enable DICOM plugin.
* Mon Sep 04 2017 Richard Shaw <hobbes1069@gmail.com> - 1.7.17-2
- Add patch to remove opencv qt5 dependency.