<div class="gmail_quote">Hello,<br><br>On 18 October 2012 09:57, Thorsten Leemhuis <span dir="ltr">&lt;<a href="mailto:fedora@leemhuis.info" target="_blank">fedora@leemhuis.info</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
&gt; --with-egl-platforms=x11,drm%{!?rhel:,wayland} \<br>
<br>
The &quot;,wayland&quot; is not added, as rhel is defined now as 0 when building<br>
with fedpgk. If you build a srpm and try to build it with rpmbuild then<br>
it works, as it&#39;s not defined there. I explained it in more detail in<br>
<a href="https://bugzilla.redhat.com/show_bug.cgi?id=867375" target="_blank">https://bugzilla.redhat.com/show_bug.cgi?id=867375</a> , which made me<br>
brining up the issue here, as Jesse was unsure how to proceed.<br></blockquote><div><br>Can&#39;t you check that rhel is not defined and different than 0? Something like the following. It is untested as I don&#39;t have commit access; but at least fedpkg prep on the mesa clone does not give me any error.<br>
<br>$ git diff<br>diff --git a/mesa.spec b/mesa.spec<br>index 150a5bc..a61185c 100644<br>--- a/mesa.spec<br>+++ b/mesa.spec<br>@@ -302,7 +302,7 @@ export CXXFLAGS=&quot;$RPM_OPT_FLAGS&quot;<br>     --enable-gles1 \<br>     --enable-gles2 \<br>
     --disable-gallium-egl \<br>-    --with-egl-platforms=x11,drm%{!?rhel:,wayland} \<br>+    --with-egl-platforms=x11,drm%{!0%{?rhel}:,wayland} \<br>     --enable-shared-glapi \<br>     --enable-gbm \<br> %if %{with_hardware}<br>
<br>Or since you are using already the %if statements elsewhere you can add another one with the 2 different config lines,  like<br><br>$ git diff<br>diff --git a/mesa.spec b/mesa.spec<br>index 150a5bc..764449a 100644<br>
--- a/mesa.spec<br>+++ b/mesa.spec<br>@@ -302,7 +302,11 @@ export CXXFLAGS=&quot;$RPM_OPT_FLAGS&quot;<br>     --enable-gles1 \<br>     --enable-gles2 \<br>     --disable-gallium-egl \<br>-    --with-egl-platforms=x11,drm%{!?rhel:,wayland} \<br>
+%if 0%{?rhel}<br>+    --with-egl-platforms=x11,drm} \<br>+%else<br>+    --with-egl-platforms=x11,drm,wayland} \<br>+%endif<br>     --enable-shared-glapi \<br>     --enable-gbm \<br> %if %{with_hardware}<br><br>The packaging guidelines say that a &quot;0&quot; should be used when checking for conditions:<br>
<br><a href="http://fedoraproject.org/wiki/Packaging:DistTag">http://fedoraproject.org/wiki/Packaging:DistTag</a><br><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

I&#39;d say the current behaviour is the quite bad, as it leads to different<br>
results when building with fedpkg and rpmbuild on F18. The real fix<br>
afaics would be to revert the change and, if wanted, define rhel as 0 in<br>
Fedora&#39;s redhat-rpm-config, too -- but then we obviously need to fix all<br>
%{!?rhel:foo} statements in current spec files.<br clear="all"></blockquote><div><br>With the old one I had to check like this (first line) for building; which is not correct anyway as the behaviour was different as well between fedpkg and rpmbuild/mock:<br>
<br><div class="del">-%if (0%{?fedora} == 16 || 0%{?fedora} == 17) &amp;&amp; !0%{?rhel}<br></div><div class="add">+%if 0%{?fedora} == 16 || 0%{?fedora} == 17</div></div></div><br>Regards,<br>--Simone<br><br>-- <br>You cannot discover new oceans unless you have the courage to lose sight of the shore (R. W. Emerson).<br>
<br>