diff --git a/ctk-0.1.20171224git71799c2-fix_qreal_cast.patch b/ctk-0.1.20171224git71799c2-fix_qreal_cast.patch new file mode 100644 index 0000000..3984d15 --- /dev/null +++ b/ctk-0.1.20171224git71799c2-fix_qreal_cast.patch @@ -0,0 +1,19 @@ +Index: CTK-71799c27da506c899f2ef04b50cd8d454374870d/Libs/Widgets/ctkMaterialPropertyPreviewLabel.cpp +=================================================================== +--- CTK-71799c27da506c899f2ef04b50cd8d454374870d.orig/Libs/Widgets/ctkMaterialPropertyPreviewLabel.cpp ++++ CTK-71799c27da506c899f2ef04b50cd8d454374870d/Libs/Widgets/ctkMaterialPropertyPreviewLabel.cpp +@@ -315,10 +315,10 @@ void ctkMaterialPropertyPreviewLabel::dr + } + else + { +- rgba = qRgba(static_cast(qMin(255. * intensity.x() * opacity + qRed(rgba)*(1. - opacity), static_cast(255.))), +- static_cast(qMin(255. * intensity.y() * opacity + qGreen(rgba)*(1. - opacity), static_cast(255.))), +- static_cast(qMin(255. * intensity.z() * opacity + qBlue(rgba)*(1. - opacity), static_cast(255.))), +- static_cast(qMin(255. * opacity + qAlpha(rgba)*(1. - opacity), static_cast(255.)))); ++ rgba = qRgba(static_cast(qMin(static_cast(255. * intensity.x() * opacity + qRed(rgba)*(1. - opacity)), static_cast(255.))), ++ static_cast(qMin(static_cast(255. * intensity.y() * opacity + qGreen(rgba)*(1. - opacity)), static_cast(255.))), ++ static_cast(qMin(static_cast(255. * intensity.z() * opacity + qBlue(rgba)*(1. - opacity)), static_cast(255.))), ++ static_cast(qMin(static_cast(255. * opacity + qAlpha(rgba)*(1. - opacity)), static_cast(255.)))); + } + } + image.setPixel(i,j,rgba); diff --git a/ctk.spec b/ctk.spec index def68a9..01cc35b 100644 --- a/ctk.spec +++ b/ctk.spec @@ -12,6 +12,8 @@ License: ASL 2.0 URL: http://www.commontk.org Source0: https://github.com/commontk/CTK/archive/%{commit}.tar.gz#/CTK-%{commit}.tar.gz +Patch0: %{name}-0.1.20171224git71799c2-fix_qreal_cast.patch + BuildRequires: gcc-c++ BuildRequires: cmake BuildRequires: doxygen @@ -107,7 +109,6 @@ mkdir build %build pushd build - %cmake \ -DCMAKE_PREFIX_PATH=%{_libdir}/cmake/InsightToolkit \ -DCTK_SUPERBUILD=OFF \ @@ -118,17 +119,15 @@ pushd build -DCTK_ENABLE_DICOM=ON \ -DCTK_ENABLE_PluginFramework=ON \ -DCTK_ENABLE_Widgets=ON \ - -DDOCUMENTATION_TARGET_IN_ALL=ON \ + -DDOCUMENTATION_TARGET_IN_ALL=OFF \ .. -make %{?_smp_mflags} - +%make_build +%make_build doc popd %install -pushd build -%make_install -popd +%make_install -C build # No %%check section here because running tests requires working X server