Vincent,
First of all my apologies for hijacking this list for this subject. In the hope
that it might be useful to you, I've made a small patch for spec cleaner that
adds %{?no_lang_C} to the %find_lang macro when it exists.
My Python skills are not that great and my git skills are even worst (big fail
on pushing things, blame the auth).
Hope it's useful; It's been for me after Dominique's indications to start using
it...
NM
Melhores cumprimentos,
Nelson M. Marques
From 86d1b35c1f698d9b960fa249d0a03a4614f9e655 Mon Sep 17 00:00:00 2001
From: Nelson Marques <[email protected]>
Date: Tue, 25 Sep 2012 00:42:06 +0100
Subject: [PATCH] append %{?no_lang_C} to %find_lang macros
---
spec-cleaner | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/spec-cleaner b/spec-cleaner
index 27df243..965ce12 100755
--- a/spec-cleaner
+++ b/spec-cleaner
@@ -157,6 +157,9 @@ def replace_preamble_macros(s):
s = s.replace('%SOURCE' + i, '%{SOURCE' + i + '}')
return s
+def replace_lang_macros(s):
+ return re.sub(r'%find_lang(.*)', r'%find_lang\1 %{?no_lang_C}', s)
+
def replace_all(s):
s = replace_buildroot(s)
s = replace_optflags(s)
@@ -165,6 +168,7 @@ def replace_all(s):
s = replace_utils(s)
s = replace_buildservice(s)
s = replace_preamble_macros(s)
+ s = replace_lang_macros(s)
return s
--
1.7.10.4