Hi, the snippet i had sent to you should work without modifications (at least it did for me in another package), but anyway this is a bit more complicated, but fine as well! Greetings, Tobias On 05.12.2016 04:47, Larry Finger wrote:
On 12/04/2016 09:39 PM, Simon Lees wrote:
On 12/05/2016 06:08 AM, Stefan Seyfried wrote:
Hi Larry,
Am 04.12.2016 um 17:43 schrieb Larry Finger:
Dominique,
I now have a patch for VB that builds with X server 1.19.0. Unfortunately, it breaks the build with v. 1.18.4. I do not know how to conditionally include a patch depending on the version of a required package, nor do I know how to pass that information to the build as an exported symbol.
I don't know this. But. Maybe the patch could be changed to build with both version (some ugly #ifdef stuff or similar)?
Do you have a pointer to the patched package so that we can see what you're talking about and maybe help?
Best regards,
Probably needs to be uglier then a ifdef, you could create a bash 1 liner based off "X -version" (or any other way to find the X11 version from the command line without launching it). You could then use a shell test too determine whether too apply the patch or not.
It is a little ugly, but with Tobias' help, I ended up with the following patch hunks for the spec file::
@@ -304,6 +307,9 @@ ###########################################
%prep +xserver_str=`rpm -q xorg-x11-server` +XSERVER_VERSION=`expr match "$xserver_str" '.*\(\([0-9]\.[0-9][0-9]\.[0-9]\)\)'` +#XSERVER_VERSION=`echo $XSERVER_VERSION | sed -e 's/\.//g'` %setup -q -n VirtualBox-%{version} %patch1 -p1 %patch2 -p1 @@ -328,6 +334,11 @@ %patch113 -p1 %patch114 -p1 %patch115 -p1 +if [ "$XSERVER_VERSION" = "1.18.4" ] ; then + echo "Patch 116 not applied" +else +%patch116 -p1 +fi
#copy user manual cp %{SOURCE1} UserManual.pdf
That test for the server version should be for > 1.18.4, but I was not able to get the syntax right. This one works for both 1.18.4 and 1.19.0, which is what I needed.
Thanks for all the help,
Larry
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org