File fix-no-wineserver-env.patch of Package wine

--- a/libs/wine/config.c	2017-02-15 13:29:36.895469715 +0000
+++ b/libs/wine/config.c	2017-02-15 13:33:46.669565101 +0000
@@ -530,6 +530,13 @@
     use_preloader = 0;
 #endif
 
+    /* first specified environment variable */
+    if (env_var)
+    {
+        argv[0] = (char *)env_var;
+        preloader_exec( argv, use_preloader );
+    }
+
     if ((ptr = strrchr( name, '/' )))
     {
         /* if we are in build dir and name contains a path, try that */
@@ -542,7 +549,7 @@
         name = ptr + 1;  /* get rid of path */
     }
 
-    /* first, bin directory from the current libdir or argv0 */
+    /* then, bin directory from the current libdir or argv0 */
     if (bindir)
     {
         argv[0] = build_path( bindir, name );
@@ -550,13 +557,6 @@
         free( argv[0] );
     }
 
-    /* then specified environment variable */
-    if (env_var)
-    {
-        argv[0] = (char *)env_var;
-        preloader_exec( argv, use_preloader );
-    }
-
     /* now search in the Unix path */
     if ((path = getenv( "PATH" )))
     {
openSUSE Build Service is sponsored by