| |
@@ -288,4 +288,24 @@
|
| |
self.type = 'MUST'
|
| |
|
| |
|
| |
+ class CheckGccBuildRequires(CCppCheckBase):
|
| |
+ """ Check that gcc/gcc-c++/clang is present """
|
| |
+ def __init__(self, base):
|
| |
+ CCppCheckBase.__init__(self, base)
|
| |
+ self.url = 'https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B'
|
| |
+ self.text = 'If your application is a C or C++ application you must ' \
|
| |
+ 'list a BuildRequires against gcc, gcc-c++ or clang.'
|
| |
+ self.automatic = True
|
| |
+ self.type = 'MUST'
|
| |
+
|
| |
+ def run_on_applicable(self):
|
| |
+ """ Run the check """
|
| |
+ br = self.spec.build_requires
|
| |
+ if not 'gcc' in br and not 'gcc-c++' in br and not 'clang' in br:
|
| |
+ self.set_passed(self.FAIL, 'No gcc, gcc-c++ or clang found in ' \
|
| |
+ 'BuildRequires')
|
| |
+ return
|
| |
+ self.set_passed(self.PASS)
|
| |
+
|
| |
+
|
| |
# vim: set expandtab ts=4 sw=4:
|
| |
See https://fedoraproject.org/wiki/Packaging:C_and_C%2B%2B#BuildRequires_and_Requires for rationale.