- fix building with gcc 11
authorJan Rękorajski <baggins@pld-linux.org>
Tue, 17 Aug 2021 21:14:03 +0000 (23:14 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Tue, 17 Aug 2021 21:14:03 +0000 (23:14 +0200)
framewave.spec
gcc11.patch [new file with mode: 0644]

index 5f7d0a3c4138a73f324219290e77c86c150794aa..9e833d063ecef941c8f4f6ad6000c133460a9538 100644 (file)
@@ -19,6 +19,7 @@ Patch4:               %{name}-warnings.patch
 Patch5:                %{name}-cpuid.patch
 Patch6:                %{name}-scons.patch
 Patch7:                %{name}-opt.patch
+Patch8:                gcc11.patch
 URL:           http://framewave.sourceforge.net/
 BuildRequires: boost-devel >= 1.34
 BuildRequires: libstdc++-devel
@@ -78,11 +79,12 @@ Statyczne biblioteki Framewave.
 %patch5 -p1
 %patch6 -p1
 %patch7 -p1
+%patch8 -p1
 
 # kill precompiled binaries
 %{__rm} BuildTools/bin/FwHeaderConvert_*
 
-%{__sed} -i -e "s/'-O2'/'%{rpmcxxflags}'/" BuildTools/buildscripts/fwflags_gcc.py
+%{__sed} -i -e "s/'-O2'/'%{rpmcxxflags} -std=c++11'/" BuildTools/buildscripts/fwflags_gcc.py
 
 %build
 cd Framewave
diff --git a/gcc11.patch b/gcc11.patch
new file mode 100644 (file)
index 0000000..859afba
--- /dev/null
@@ -0,0 +1,31 @@
+--- FRAMEWAVE_1.3.1_SRC/Framewave/domain/fwImage/src/formatConversion.cpp~     2009-07-09 11:15:34.000000000 +0200
++++ FRAMEWAVE_1.3.1_SRC/Framewave/domain/fwImage/src/formatConversion.cpp      2021-08-17 20:02:38.764534982 +0200
+@@ -11,22 +11,23 @@
+ using namespace OPT_LEVEL;
+-#define CMC_CHECK_PARAMS    if( pDst   ==0 || pSrc   ==0 )               return fwStsNullPtrErr;   \
+-                            if( dstStep<=0 || srcStep<=0 )               return fwStsStepErr;      \
+-                            if( roiSize.height<=0 || roiSize.width <=0 ) return fwStsSizeErr;
+ FwStatus PREFIX_OPT( OPT_PREFIX, fwiYCbCr422_8u_C2P3R )( const Fw8u* pSrc, int srcStep, 
+                                                            Fw8u* pDst[3],    int dstStep[3], 
+                                                            FwiSize roiSize )
+ {
+-    CMC_CHECK_PARAMS; 
++    if( pDst   ==0 || pSrc   ==0 )               return fwStsNullPtrErr;
++    if( srcStep<=0 )               return fwStsStepErr;
++    if( roiSize.height<=0 || roiSize.width <=0 ) return fwStsSizeErr;
+     return CMC::ModelCP <CMC::CH_FC_C2P3 >::ConvertREF( pSrc, srcStep, pDst, dstStep, roiSize ); 
+ }
+ FwStatus PREFIX_OPT( OPT_PREFIX, fwiYCbCr422_8u_P3C2R )( const Fw8u* const pSrc[3], int srcStep[3], 
+                                                            Fw8u* pDst, int dstStep,   FwiSize roiSize )
+ {
+-    CMC_CHECK_PARAMS;
++    if( pDst   ==0 || pSrc   ==0 )               return fwStsNullPtrErr;
++    if( dstStep<=0 )               return fwStsStepErr;
++    if( roiSize.height<=0 || roiSize.width <=0 ) return fwStsSizeErr;
+     return CMC::ModelPC< CMC::CH_FC_P3C2 >::ConvertREF( pSrc, srcStep, pDst, dstStep, roiSize ); 
+ }
This page took 0.048205 seconds and 4 git commands to generate.