Bug 946924

Summary: kopete FTBFS against recent kernels, uses deprecated v4l interfaces
Product: [Fedora] Fedora Reporter: Rex Dieter <rdieter>
Component: kdenetworkAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: alekcejk, jreznik, kevin, ltinkl, rdieter, rnovacek, smparrish, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: kdenetwork-4.10.2-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-04-23 15:35:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 946925    

Description Rex Dieter 2013-04-01 01:34:06 UTC
Per most recent build failure on f19+:

/builddir/build/BUILD/kdenetwork-4.10.2/kopete/libkopete/avdevice/videodevice.cpp: In member function 'const char* Kopete::AV::VideoDevice::getUnifiedV4L2StdCtrlName(quint32)':
/builddir/build/BUILD/kdenetwork-4.10.2/kopete/libkopete/avdevice/videodevice.cpp:3064:8: error: 'V4L2_CID_HCENTER' was not declared in this scope
   case V4L2_CID_HCENTER:   return I18N_NOOP("Horizontal Center");
        ^
/builddir/build/BUILD/kdenetwork-4.10.2/kopete/libkopete/avdevice/videodevice.cpp:3065:8: error: 'V4L2_CID_VCENTER' was not declared in this scope
   case V4L2_CID_VCENTER:   return I18N_NOOP("Vertical Center");
        ^

Comment 1 Kevin Kofler 2013-04-01 02:03:20 UTC
I already told you the obvious fix on IRC: Kopete::AV::VideoDevice::getUnifiedV4L2StdCtrlName just maps v4l control codes to translatable descriptions. So if we build against a v4l which does not support certain controls, we don't need the mapping either.

The surrounding code already has several of those:
case V4L2_FOO: return I18N_NOOP("Foo");
lines under #ifdef V4L2_FOO, so we just need to do the same here, ergo:
+#ifdef V4L2_CID_HCENTER
 case V4L2_CID_HCENTER:   return I18N_NOOP("Horizontal Center");
+#endif
+#ifdef V4L2_CID_VCENTER
 case V4L2_CID_VCENTER:   return I18N_NOOP("Vertical Center");
+#endif
(or you could use a single #ifdef because those were introduced and removed together).

Comment 2 Rex Dieter 2013-04-01 13:54:40 UTC
confirmed this approach fixes the build, thanks.

Comment 3 Rex Dieter 2013-04-23 15:35:50 UTC
%changelog
* Sun Mar 31 2013 Rex Dieter <rdieter> - 7:4.10.2-1
- 4.10.2
- kopete FTBFS against recent kernels, uses deprecated v4l interfaces (#946924)