[MacPorts] #53433: Wine 2.0 build failure in Snow Leopard

MacPorts noreply at macports.org
Sun Jan 29 20:52:38 UTC 2017


#53433: Wine 2.0 build failure in Snow Leopard
---------------------+-------------------
  Reporter:  Umo022  |      Owner:
      Type:  defect  |     Status:  new
  Priority:  Normal  |  Milestone:
 Component:  ports   |    Version:  2.4.0
Resolution:          |   Keywords:
      Port:  wine    |
---------------------+-------------------

Comment (by kencu):

 OK. it was, in the end, just strnlen. Replacing that fixed the wine-2.0
 build, and wine-2.0 seems to work correctly on brief testing with winemine
 and winefile.
 {{{

 port -v installed wine
 The following ports are currently installed:
   wine @1.8.6_0 platform='darwin 10' archs='i386'
 date='2016-12-25T12:14:56-0800'
   wine @2.0_0 (active) platform='darwin 10' archs='i386'
 date='2017-01-29T12:41:26-0800'
 }}}

 as far as I can tell, these are the two files that need the definition
 added:
 {{{

 wine-2.0/dlls/d3d10/effect.c
 wine-2.0/dlls/d3d11/shader.c
 }}}

 I used my strnlen override method to build it, though, saving the
 following file as `/usr/local/include/string.h`

 {{{
 #include "/usr/include/string.h"

 #ifndef KENSTRINGLEN
 #define KENSTRINGLEN

 static inline size_t
 strnlen(const char *s, size_t maxlen)
 {
         size_t len;

         for (len = 0; len < maxlen; len++, s++) {
                 if (!*s)
                         break;
         }
         return (len);
 }

 #endif
 }}}

 A macports-acceptable fix might be to patch the strnlen definition into
 the two files I mentioned above. Or better yet, get the wine developers to
 add in a test for strnlen (that's actually the correct fix).

 Wine-2.0 took about three hours to build, however, so I won't be building
 any patches today.

--
Ticket URL: <https://trac.macports.org/ticket/53433#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list